Skip to content

Commit

Permalink
Add OPENBLAS_NO_F2C math library option
Browse files Browse the repository at this point in the history
  • Loading branch information
johngebbie committed Dec 4, 2022
1 parent 4c72097 commit 6c28207
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CUDA_ROOT?=/usr/local/cuda
USE_SHARED?=0
# Math libraries
HAVE_OPENBLAS_CLAPACK?=1
HAVE_OPENBLAS_NO_F2C?=0
HAVE_MKL?=0
HAVE_ACCELERATE=0
HAVE_CUDA?=0
Expand Down Expand Up @@ -80,6 +81,18 @@ ifeq ($(HAVE_OPENBLAS_CLAPACK), 1)
endif
endif

ifeq ($(HAVE_OPENBLAS_NO_F2C), 1)
CFLAGS += -I$(OPENBLAS_ROOT)/include
ifeq ($(USE_SHARED), 0)
LIBS += \
$(OPENBLAS_ROOT)/lib/libopenblas.a \
$(OPENBLAS_ROOT)/lib/liblapack.a \
$(OPENBLAS_ROOT)/lib/libblas.a
else
LDFLAGS += -lopenblas -llapack -lblas
endif
endif

ifeq ($(HAVE_MKL), 1)
CFLAGS += -DHAVE_MKL=1 -I$(MKL_ROOT)/include
LDFLAGS += -L$(MKL_ROOT)/lib/intel64 -Wl,-rpath=$(MKL_ROOT)/lib/intel64 -lmkl_rt -lmkl_intel_lp64 -lmkl_core -lmkl_sequential
Expand Down

0 comments on commit 6c28207

Please sign in to comment.