Skip to content

Commit 69c632f

Browse files
lauvergnlauvergn
authored andcommitted
change the makefile, so that with LAPACK=0, it doesn't link with lapack lib.
1 parent 0ba8dbb commit 69c632f

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

makefile

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ OPT = 0
1414
## OpenMP? Empty: default with OpenMP; 0: No OpenMP; 1 with OpenMP
1515
OMP = 1
1616
## Lapack/blas/mkl? Empty: default with Lapack; 0: without Lapack; 1 with Lapack
17-
LAPACK = 1
17+
LAPACK = 0
1818
## Some compilers (like PGF90) do not have inverse hyperbolic functions: atanh, asinh, acosh
1919
# NVHYP = 1 : with intrinsic inverse hyperbolic functions
2020
# NVHYP = 0 : with external inverse hyperbolic functions (without intrinsic ones)
@@ -116,7 +116,13 @@ ifeq ($(F90),ifort)
116116
else
117117
F90FLAGS = -O0 $(OMPFLAG) -check all -g -traceback
118118
endif
119-
F90LIB = -mkl -lpthread
119+
120+
ifeq ($(LAPACK),1)
121+
F90LIB = -mkl -lpthread
122+
#F90LIB = $(MKLROOT)/lib/libmkl_lapack95_ilp64.a $(MKLROOT)/lib/libmkl_core.a $(MKLROOT)/lib/libmkl_blas95_ilp64.a -lpthread
123+
else
124+
F90LIB = -lpthread
125+
endif
120126

121127
F90_VER = $(shell $(F90) --version | head -1 )
122128

@@ -170,17 +176,20 @@ endif
170176
OMPFLAG = -fopenmp
171177
endif
172178
# OS management
173-
ifeq ($(OS),Darwin) # OSX
174-
# OSX libs (included lapack+blas)
175-
F90LIB = -framework Accelerate
176-
else # Linux
177-
# linux libs
178-
F90LIB = -llapack -lblas
179-
#
180-
# linux libs with mkl and with openmp
181-
#F90LIB = -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread
182-
# linux libs with mkl and without openmp
183-
#F90LIB = -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential
179+
ifeq ($(LAPACK),1)
180+
ifeq ($(OS),Darwin) # OSX
181+
# OSX libs (included lapack+blas)
182+
F90LIB = -framework Accelerate
183+
else # Linux
184+
# linux libs
185+
F90LIB = -llapack -lblas
186+
# linux libs with mkl and with openmp
187+
#F90LIB = -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread
188+
# linux libs with mkl and without openmp
189+
#F90LIB = -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential
190+
endif
191+
else
192+
F90LIB =
184193
endif
185194
#
186195
# opt management
@@ -230,7 +239,7 @@ CPPSHELL_DIAGO = -D__LAPACK="$(LAPACK)"
230239
F90_FLAGS = $(F90) $(F90FLAGS)
231240
LYNK90 = $(F90_FLAGS)
232241

233-
LIBS := $(PESLIB) $(F90LIB) $(ARPACKLIB)
242+
LIBS := $(PESLIB) $(ARPACKLIB) $(F90LIB)
234243
LYNKFLAGS = $(LIBS)
235244

236245

0 commit comments

Comments
 (0)