forked from primme/primme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLink_flags
88 lines (84 loc) · 3.07 KB
/
Link_flags
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#---------------------------------------------------------------
# LINKING FLAGS FOR THE TEST PROGRAMS
# in ZTEST and DTEST test directories
# Linking primme, BLAS/LAPACK for various architectures.
# Makefiles in TEST must also include Make_flags
#---------------------------------------------------------------
#---------------------------------------------------------------
# Loaders
#---------------------------------------------------------------
CLDR ?= $(CC)
FLDR ?= $(F77)
#---------------------------------------------------------------
# Basic Link flags for LAPACK/BLAS and math
#---------------------------------------------------------------
# Debian, Ubuntu, SuSE Linux (>= 13.2), Darwin
#
UNAME := $(shell uname)
# Defaults for FreeBSD for LAPACK installed from package
LDFLAGS ?= $(if $(findstring FreeBSD,$(UNAME)),-L/usr/local/lib -L/usr/local/lib/gcc7,)
ifeq ($(origin LIBS), undefined)
ifeq ($(PRIMME_WITH_MAGMA),yes)
LIBS += -L$(MAGMADIR)/lib -lmagma -lmagma_sparse \
-L$(CUDADIR)/lib64 -lcublas -lcudart -lcusparse
endif
ifndef MKLROOT
LIBS += -llapack -lblas -lm
ifneq (,$(findstring PGI,$(shell $(CC) --version)))
LIBS += -pgf90libs
else
ifneq ($(UNAME), Darwin)
LIBS += -lgfortran
endif
endif
else
ifneq (,$(findstring icc,$(shell $(CC) --version)))
LIBS += -mkl
else
LIBS += -L${MKLROOT}/lib/intel64 -lmkl_rt -lpthread -lm -ldl
endif
endif
endif
#---------------------------------------------------------------
# SuSE Linux (<= 13.1), Centos
#
# LDFLAGS =
# LIBS = -lm -llapack -lblas -lgfortran -lg2c
#---------------------------------------------------------------
# IBM architectures
#
# LDFLAGS =
# LIBS = -lessl -lm # using ESSL
# # using BLAS/LAPACK
# LIBS = -llapack -lblas -lxlf90 -lxl -lxlfmath -lm
#---------------------------------------------------------------
# Mac OS X
#
# LDFLAGS = -Wl,-framework -Wl,vecLib -m64 # Mac OS X 10.0
# LDFLAGS = -Wl,-framework -Wl,Accelerate -m64 # Mac OS X 10.3
# LIBS = -lm
#---------------------------------------------------------------
# Using Intel compilers
#
# LIBS = -mkl
#---------------------------------------------------------------
# Sun Solaris, SunOS 5.9 using sunperf math library
#
# LDFLAGS =
# LIBS = -lm -lrt -xlic_lib=sunperf
#---------------------------------------------------------------
# Cray
#
# LDFLAGS = -framework Accelerate
# LIBS = -lm -llapack -lblas
#---------------------------------------------------------------
# Using ACML for lapack/blas
#
# LDFLAGS =
# LIBS = -lm -L/usr/local/acml-3.5.0/gnu64/lib/ -lacml -lacml_mv
# LIBS = -lm -L/usr/local/acml-3.5.0/gnu64/lib/ -lacml -lacml_mv -lg2c
#---------------------------------------------------------------
#---------------------------------------------------------------
# Link any other sequential or parallel libraries
# in the test makefiles
#---------------------------------------------------------------