-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
104 lines (70 loc) · 1.84 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#FC = ifort -lmpi
#CC = icc -lmpi
#CXX = icpc -lmpi
#FFLAGS += -O3 -DMPI
#CFLAGS += -O3 -DMPI
FC = gfortran
CC = gcc
CXX = g++
FFLAGS += -ffree-line-length-none -O3 -fPIC
CFLAGS += -O3 -fPIC
LAPACKLIB = -llapack
NESTLIBDIR = ./
export FC CC CXX FFLAGS CFLAGS LAPACKLIB
AR = ar r
LINKLIB = ld -shared
NSOBJECTS = utils.o utils1.o priors.o kmeans_clstr.o xmeans_clstr.o posterior.o nested.o
%.o: %.f90
$(FC) $(FFLAGS) -c -o $@ $^
%.o: %.F90
$(FC) $(FFLAGS) -c -o $@ $^
default: libnest3.a
all: libnest3.a obj_detect eggbox eggboxC eggboxC++ gaussian gauss_shell \
rosenbrock himmelblau ackley
libnest3.so: $(NSOBJECTS)
$(LINKLIB) -o $(LIBS) $@ $^
libnest3.a: $(NSOBJECTS)
$(AR) $@ $^
obj_detect:
make -C example_obj_detect
gaussian:
make -C example_gaussian
rosenbrock:
make -C example_rosenbrock
ackley:
make -C example_ackley
himmelblau:
make -C example_himmelblau
eggbox:
make -C example_eggbox
gauss_shell:
make -C example_gauss_shell
eggboxC:
make -C example_eggbox_C
eggboxC++:
make -C example_eggbox_C++
clean:
-rm $(NESTLIBDIR)/libnest3.* *.o *.mod
cleanall: clean_exec clean clean_obj_detect clean_gaussian clean_gauss_shell clean_eggbox \
clean_example_eggbox_C clean_example_eggbox_C++ clean_rosenbrock clean_himmelblau \
clean_ackley
clean_exec:
-rm obj_detect gaussian rosenbrock ackley himmelblau gauss_shell eggbox eggboxC eggboxC++
clean_obj_detect:
make -C example_obj_detect clean
clean_gaussian:
make -C example_gaussian clean
clean_rosenbrock:
make -C example_rosenbrock clean
clean_ackley:
make -C example_ackley clean
clean_himmelblau:
make -C example_himmelblau clean
clean_eggbox:
make -C example_eggbox clean
clean_gauss_shell:
make -C example_gauss_shell clean
clean_example_eggbox_C:
make -C example_eggbox_C clean
clean_example_eggbox_C++:
make -C example_eggbox_C++ clean