Skip to content

Commit 9686037

Browse files
committed
Add OPENBLAS math library option
1 parent fff40ce commit 9686037

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CUDA_ROOT?=/usr/local/cuda
77
USE_SHARED?=0
88
# Math libraries
99
HAVE_OPENBLAS_CLAPACK?=1
10+
HAVE_OPENBLAS?=0
1011
HAVE_MKL?=0
1112
HAVE_ACCELERATE=0
1213
HAVE_CUDA?=0
@@ -80,6 +81,15 @@ ifeq ($(HAVE_OPENBLAS_CLAPACK), 1)
8081
endif
8182
endif
8283

84+
ifeq ($(HAVE_OPENBLAS), 1)
85+
CFLAGS += -I$(OPENBLAS_ROOT)/include
86+
ifeq ($(USE_SHARED), 0)
87+
LIBS += $(OPENBLAS_ROOT)/lib/libopenblas.a
88+
else
89+
LDFLAGS += -lopenblas -lgfortan
90+
endif
91+
endif
92+
8393
ifeq ($(HAVE_MKL), 1)
8494
CFLAGS += -DHAVE_MKL=1 -I$(MKL_ROOT)/include
8595
LDFLAGS += -L$(MKL_ROOT)/lib/intel64 -Wl,-rpath=$(MKL_ROOT)/lib/intel64 -lmkl_rt -lmkl_intel_lp64 -lmkl_core -lmkl_sequential

0 commit comments

Comments
 (0)