-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (26 loc) · 1.06 KB
/
Makefile
File metadata and controls
47 lines (26 loc) · 1.06 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FC ?= gcc
CC ?= gcc
FFLAGS = -cpp -O3 -ffast-math -ffree-line-length-none -fopenmp -fmax-errors=10 -fPIC
LNK =
OUTPUT_DIR = source
vpath %.f90 source
vpath %.o source
UTILS = MiscUtils.o MpiUtils.o StringUtils.o FileUtils.o ObjectLists.o Interpolation.o Romberg.o
WRAPPER = LogLikeCosmoLSS.o pyLogLikeCosmoLSS.o
OBJ = $(addsuffix $(OUTPUT_DIR), $(UTILS) $(WRAPPER))
main: libCosmoLSS.a pyLogLikeCosmoLSS.pyx pyLogLikeCosmoLSS.h
touch pyLogLikeCosmoLSS.c; rm pyLogLikeCosmoLSS.c
alias ld=$(CC);CC=$(CC) python setup.py build_ext --inplace
LogLikeCosmoLSS.o: Interpolation.o
pyLogLikeCosmoLSS.o: LogLikeCosmoLSS.o
StringUtils.o: MiscUtils.o MpiUtils.o
FileUtils.o: StringUtils.o MiscUtils.o MpiUtils.o
ObjectLists.o: FileUtils.o MpiUtils.o
Interpolation.o: FileUtils.o MpiUtils.o MiscUtils.o StringUtils.o ObjectLists.o
libCosmoLSS.a: $(UTILS) $(WRAPPER)
cd $(OUTPUT_DIR); ar rvs ../libCosmoLSS.a $(UTILS) $(WRAPPER)
%.o: %.f90
cd $(OUTPUT_DIR); $(FC) $(FFLAGS) -c ../$< -o $*.o
.PHONY: clean
clean:
rm -f *.c $(OUTPUT_DIR)/*.o $(OUTPUT_DIR)/*.mod libCosmoLSS.a