-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (22 loc) · 754 Bytes
/
Makefile
File metadata and controls
30 lines (22 loc) · 754 Bytes
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
# C compiler and flags
CPPFLAGS = -I/opt/local/include
LDFLAGS = -L/opt/local/lib -lgsl -lgslcblas -lfftw3f_omp -lfftw3f -lm
CC = /usr/local/bin/gcc -fopenmp -Ofast
#CC = gcc -fopenmp
UNAME := $(shell uname)
# object files
OBJ_FILES = Compute_21cmPS
#########################################################################
ifeq ($(UNAME), Linux)
Compute_21cmPS: Compute_21cmPS.c \
${COSMO_FILES} \
${CC} ${CPPFLAGS} -fPIC -c Compute_21cmPS.c ${LDFLAGS}
${CC} -shared -Wl,-soname,Compute_21cmPS.so.1 -o Compute_21cmPS.so Compute_21cmPS.o ${LDFLAGS}
endif
ifeq ($(UNAME), Darwin)
Compute_21cmPS: Compute_21cmPS.c \
${COSMO_FILES} \
${CC} ${CPPFLAGS} -o Compute_21cmPS.so -shared Compute_21cmPS.c ${LDFLAGS}
endif
clean:
rm *.o *.so