-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
190 lines (173 loc) · 5.59 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
##################################################
# makefile for the Coverage & Anisotropy Toolkit #
##################################################
SYSTEM = $(shell uname)
CC = gcc
CXX = g++
OPTFLAGS = -O2
#DBGFLAGS = -g3
WFLAGS = -D__USE_FIXED_PROTOTYPES__ -Wall
OBJ = ./
.PHONY: clean
#------------------- defs ------------------------------
CFITSIO_INCDIR = $(CFITSIO_DIR)/include
CFITSIO_LIBDIR = $(CFITSIO_DIR)/lib
CHEALPIX_INCDIR = $(HEALPIX_DIR)/include
CHEALPIX_LIBDIR = $(HEALPIX_DIR)/lib
STC_INCDIR = $(STC_DIR)
STC_LIBDIR = $(STC_DIR)
INCDIR = -I$(CFITSIO_INCDIR) \
-I$(CHEALPIX_INCDIR) \
-I$(STC_INCDIR) \
$(shell root-config --cflags)
LIBDIR = -L${CHEALPIX_LIBDIR} -lchealpix -lm \
-L${CFITSIO_LIBDIR} -lcfitsio \
-L${STC_LIBDIR} -lSTCoordinates \
$(shell root-config --glibs)
#-------------------------------------------------------
#------- alias -----------------------------------------
libobjs = \
healpixmap.o \
harmotools.o \
lobe.o \
maptools.o \
projmap.o \
coverage.o \
angdist.o \
timemod.o \
events.o \
simuevents.o \
Cl.o \
lima.o \
correlation.o \
common.o \
dipoleHiRes.o \
fitdipole.o \
rayleigh.o \
userfcn.o \
agntools.o \
scanner.o \
crosscorrelation.o
execs = \
example_blindsearch.exe \
example_Cl.exe \
example_bllac.exe \
example_correlation.exe \
compute_lobe.exe \
example_simuDipole.exe \
example_simuSources.exe \
example_simuAcceptance.exe \
example_dipoleHiRes.exe \
example_fitDipole.exe \
example_rayleigh.exe \
example_phiMod.exe \
example_simuAccDip.exe \
example_prescription.exe \
example_deflexion.exe \
example_spectrum.exe \
example_spectrumSimu.exe \
example_plot2MASSvsVCV.exe \
example_percolation.exe \
example_simuAnisotropic.exe \
example_drawSources.exe \
example_ironPrescription.exe \
example_MC.exe \
example_analyzeMC.exe \
example_mapMC.exe \
example_crossCorrelation.exe \
example_LemoineWaxman.exe \
example_testLiMa.exe \
ScanWithoutCenA.exe \
Magnification.exe \
ProducePixFileForGMF.exe
exeobjs = $(patsubst %.exe,%.o,$(execs))
HEADERS = $(patsubst %.o,%.h,$(libobjs))
thelib = libtkit.a
#-------------------------------------------------------
#-------- rules ----------------------------------------
# rules for the library sources
$(OBJ)%.o:%.cc %.h
$(COMPILE.cc) $(DBGFLAGS) $(OPTFLAGS) $(WFLAGS) $(INCDIR) -o $@ $<
# rules for the executable sources
$(OBJ)%.o:%.cc
$(COMPILE.cc) $(DBGFLAGS) $(OPTFLAGS) $(WFLAGS) $(INCDIR) -o $@ $<
#-------------------------------------------------------
#------- targets ---------------------------------------
all : lib $(execs)
lib: $(thelib) userfcn.h
clean :
@echo "Deleting library objects, executables and associated objects."
@/bin/rm -f $(thelib) $(execs) $(libobjs) $(exeobjs)
@echo "Done"
#-------------------------------------------------------
#-------- specific rules -------------------------------
$(thelib): $(libobjs)
@echo "Making "$(thelib)
@ar r $@ $^
@ranlib $@
@echo "Done."
example_simuAcceptance.exe : example_simuAcceptance.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_blindsearch.exe : example_blindsearch.o $(thelib)
$(CXX) $(DBGFLAGS) -o $@ $^ $(LIBDIR)
example_simuSources.exe : example_simuSources.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_simuDipole.exe : example_simuDipole.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR) -lMinuit
example_Cl.exe : example_Cl.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_bllac.exe : example_bllac.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_correlation.exe : example_correlation.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
compute_lobe.exe : compute_lobe.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_dipoleHiRes.exe : example_dipoleHiRes.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_fitDipole.exe : example_fitDipole.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR) -lMinuit
example_rayleigh.exe : example_rayleigh.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_phiMod.exe : example_phiMod.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_simuAccDip.exe : example_simuAccDip.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR) -lMinuit
example_prescription.exe : example_prescription.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_deflexion.exe : example_deflexion.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_spectrum.exe : example_spectrum.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_spectrumSimu.exe : example_spectrumSimu.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_plot2MASSvsVCV.exe: example_plot2MASSvsVCV.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_percolation.exe: example_percolation.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_simuAnisotropic.exe: example_simuAnisotropic.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_drawSources.exe: example_drawSources.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_ironPrescription.exe: example_ironPrescription.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_MC.exe: example_MC.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_mapMC.exe: example_mapMC.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_analyzeMC.exe: example_analyzeMC.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_crossCorrelation.exe: example_crossCorrelation.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_LemoineWaxman.exe: example_LemoineWaxman.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_testLiMa.exe: example_testLiMa.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
example_GalacticSources.exe: example_GalacticSources.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
ScanWithoutCenA.exe: ScanWithoutCenA.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
Magnification.exe: Magnification.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
ProducePixFileForGMF.exe: ProducePixFileForGMF.o $(thelib)
$(CXX) -o $@ $^ $(LIBDIR)
#-------------------------------------------------------