-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·131 lines (108 loc) · 4.82 KB
/
Makefile
File metadata and controls
executable file
·131 lines (108 loc) · 4.82 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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
UNAME_S := $(shell uname -s)
all: spectrum turbospectrum moog moog-scat isochrones
spectrum: ispec/synthesizer.so synthesizer/spectrum/spectrum
turbospectrum: synthesizer/turbospectrum/bin/babsma_lu synthesizer/turbospectrum/bin/bsyn_lu
moog: synthesizer/moog/MOOGSILENT
moog-scat: synthesizer/moog-scat/MOOG_SCATSILENT
ares: synthesizer/ARES/bin/ARES
isochrones: isochrones/YYmix2
ispec/synthesizer.so: synthesizer/synthesizer.pyx synthesizer/synthesizer_func.c synthesizer/spectrum/*.c
rm -f synthesizer/synthesizer.c
rm -rf synthesizer/build/
cd synthesizer/ ; python setup.py build_ext --inplace
mv -f synthesizer/synthesizer*.so ispec/synthesizer.so
rm -f synthesizer/synthesizer.c
rm -rf synthesizer/build/
synthesizer/spectrum/spectrum: synthesizer/spectrum/*.c
rm -f synthesizer/spectrum/*.o
$(MAKE) -C synthesizer/spectrum/
isochrones/YYmix2: isochrones/YYmix2.f
rm -f isochrones/YYmix2
gfortran -L/usr/lib -o isochrones/YYmix2 isochrones/YYmix2.f
synthesizer/ARES/bin/ARES: synthesizer/ARES/src/ARES_v2.c synthesizer/ARES/src/*.h
mkdir -p synthesizer/ARES/bin/
gcc -o synthesizer/ARES/bin/ARES synthesizer/ARES/src/ARES_v2.c -lcfitsio -lgsl -lgslcblas -lm -lgomp -fopenmp ${CPPFLAGS} ${LDFLAGS}
synthesizer/turbospectrum/bin/babsma_lu synthesizer/turbospectrum/bin/bsyn_lu: synthesizer/turbospectrum/source/*.f
rm -f synthesizer/turbospectrum/exec-gf/*.o
rm -f synthesizer/turbospectrum/exec-gf/*.mod
rm -f synthesizer/turbospectrum/exec-gf/babsma_lu
rm -f synthesizer/turbospectrum/exec-gf/bsyn_lu
$(MAKE) -C synthesizer/turbospectrum/exec-gf/
mkdir -p synthesizer/turbospectrum/bin/
mv synthesizer/turbospectrum/exec-gf/babsma_lu synthesizer/turbospectrum/bin/
mv synthesizer/turbospectrum/exec-gf/bsyn_lu synthesizer/turbospectrum/bin/
synthesizer/moog/MOOGSILENT: synthesizer/moog/*.f
ifeq ($(UNAME_S),Linux)
sed -i 's/machine = "mac"/machine = "pcl"/' synthesizer/moog/Moogsilent.f
sed -i 's/machine = "uni"/machine = "pcl"/' synthesizer/moog/Moogsilent.f
endif
ifeq ($(UNAME_S),Darwin)
sed -i.bak 's/machine = "pcl"/machine = "mac"/' synthesizer/moog/Moogsilent.f
sed -i.bak 's/machine = "uni"/machine = "mac"/' synthesizer/moog/Moogsilent.f
rm -f synthesizer/moog/Moogsilent.f.bak
endif
ifeq ($(UNAME_S),Solaris)
sed -i 's/machine = "mac"/machine = "uni"/' synthesizer/moog/Moogsilent.f
sed -i 's/machine = "pcl"/machine = "uni"/' synthesizer/moog/Moogsilent.f
endif
rm -f synthesizer/moog/*.o
rm -f synthesizer/moog/MOOG
rm -f synthesizer/moog/MOOGSILENT
$(MAKE) -C synthesizer/moog/fake_sm-2.4.35/ -f Makefile
$(MAKE) -C synthesizer/moog/ -f Makefile.rhsilent
ifeq ($(UNAME_S),Darwin)
sed -i.bak 's/machine = "mac"/machine = "pcl"/' synthesizer/moog/Moogsilent.f
rm -f synthesizer/moog/Moogsilent.f.bak
endif
ifeq ($(UNAME_S),Solaris)
sed -i 's/machine = "uni"/machine = "pcl"/' synthesizer/moog/Moogsilent.f
endif
synthesizer/moog-scat/MOOG_SCATSILENT: synthesizer/moog-scat/*.f
ifeq ($(UNAME_S),Linux)
sed -i 's/machine = "mac"/machine = "pcl"/' synthesizer/moog-scat/Moogsilent_SCAT.f
sed -i 's/machine = "uni"/machine = "pcl"/' synthesizer/moog-scat/Moogsilent_SCAT.f
endif
ifeq ($(UNAME_S),Darwin)
sed -i.bak 's/machine = "pcl"/machine = "mac"/' synthesizer/moog-scat/Moogsilent_SCAT.f
sed -i.bak 's/machine = "uni"/machine = "mac"/' synthesizer/moog-scat/Moogsilent_SCAT.f
rm -f synthesizer/moog-scat/Moogsilent_SCAT.f.bak
endif
ifeq ($(UNAME_S),Solaris)
sed -i 's/machine = "mac"/machine = "uni"/' synthesizer/moog-scat/Moogsilent_SCAT.f
sed -i 's/machine = "pcl"/machine = "uni"/' synthesizer/moog-scat/Moogsilent_SCAT.f
endif
rm -f synthesizer/moog-scat/*.o
rm -f synthesizer/moog-scat/MOOG_SCAT
rm -f synthesizer/moog-scat/MOOG_SCATSILENT
$(MAKE) -C synthesizer/moog-scat/fake_sm-2.4.35/ -f Makefile
$(MAKE) -C synthesizer/moog-scat/ -f Makefile_SCAT.rhsilent
ifeq ($(UNAME_S),Darwin)
sed -i.bak 's/machine = "mac"/machine = "pcl"/' synthesizer/moog-scat/Moogsilent_SCAT.f
rm -f synthesizer/moog-scat/Moogsilent_SCAT.f.bak
endif
ifeq ($(UNAME_S),Solaris)
sed -i 's/machine = "uni"/machine = "pcl"/' synthesizer/moog-scat/Moogsilent_SCAT.f
endif
.PHONY: clean
clean:
rm -f ispec.log
rm -f synthesizer/moog/fake_sm-2.4.35/lib/libfakesm.a
rm -f synthesizer/moog/fake_sm-2.4.35/src/fakesm.o
rm -f synthesizer/moog/*.o
rm -f synthesizer/moog/MOOG
rm -f synthesizer/moog/MOOGSILENT
rm -f synthesizer/moog-scat/*.o
rm -f synthesizer/moog-scat/MOOG_SCAT
rm -f synthesizer/moog-scat/MOOG_SCATSILENT
rm -f synthesizer/turbospectrum/exec-gf/*.o
rm -f synthesizer/turbospectrum/exec-gf/*.mod
rm -f synthesizer/turbospectrum/bin/babsma_lu
rm -f synthesizer/turbospectrum/bin/bsyn_lu
rm -f synthesizer/synthesizer.c
rm -rf synthesizer/build/
rm -f synthesizer/synthesizer*.so
rm -f synthesizer/spectrum/*.o
rm -f synthesizer/spectrum/spectrum
rm -f ispec/synthesizer.so
rm -f isochrones/YYmix2
rm -f synthesizer/ARES/bin/ARES