-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathmakefile
28 lines (26 loc) · 1.11 KB
/
makefile
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
CC=gcc
BCPDSRC= register/*.c base/*.c
OMP_PORT= -Xpreprocessor -fopenmp -I/opt/local/include/libomp /opt/local/lib/libomp/libomp.dylib
OMP_BREW_ITL= -Xpreprocessor -fopenmp -I/usr/local/include/ /usr/local/lib/libomp.dylib
OMP_BREW_ARM= -Xpreprocessor -fopenmp -I/opt/homebrew/include/ /opt/homebrew/lib/libomp.dylib
DEBUG=
all:
ifeq ($(OPT),-DUSE_OPENMP)
ifeq ($(ENV),LINUX)
$(CC) -O3 -fopenmp $(OPT) $(DEBUG) $(BCPDSRC) -o bcpd -lm -llapack
else ifeq ($(ENV),MINGW32)
$(CC) -O3 -fopenmp $(OPT) $(DEBUG) $(BCPDSRC) win/*.dll -o win/bcpd -lm -DMINGW32
else ifeq ($(ENV),HOMEBREW_INTEL)
clang -O3 $(OPT) $(OMP_BREW_ITL) $(DEBUG) $(BCPDSRC) -o bcpd -lm -llapack -Wuninitialized
else ifeq ($(ENV),HOMEBREW)
clang -O3 $(OPT) $(OMP_BREW_ARM) $(DEBUG) $(BCPDSRC) -o bcpd -lm -llapack -Wuninitialized
else ifeq ($(ENV),MACPORTS)
clang -O3 $(OPT) $(OMP_PORT) $(DEBUG) $(BCPDSRC) -o bcpd -lm -llapack -Wuninitialized
endif
else
ifeq ($(OPT),-DNUSE_OPENMP)
$(CC) -O3 $(DEBUG) $(BCPDSRC) -o bcpd -lm -llapack
else ## default ##
clang -O3 -DUSE_OPENMP $(OMP_BREW_ARM) $(DEBUG) $(BCPDSRC) -o bcpd -lm -llapack
endif
endif