Adding an AnalysisTask for the femto analysis
[u/mrichter/AliRoot.git] / PWG2 / Makefile
CommitLineData
937bb49a 1# $Id$
2
937bb49a 3include $(ROOTSYS)/test/Makefile.arch
937bb49a 4
734d2c12 5default-target: libPWG2.so libPWG2ebye.so libPWG2flow.so libPWG2femtoscopy.so libPWG2femtoscopyUser.so libPWG2spectra.so
deb133c5 6
7ALICEINC = -I.
937bb49a 8
9### define include dir for local case and par case
10ifneq ($(ALICE_ROOT),)
9c19b5fc 11 ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PYTHIA6 -I$(ALICE_ROOT)/EVGEN -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/TPC
937bb49a 12else
734d2c12 13 ifneq ($(STEERBase_INCLUDE),)
14 ALICEINC += -I../$(STEERBase_INCLUDE)
15 endif
937bb49a 16 ifneq ($(ESD_INCLUDE),)
17 ALICEINC += -I../$(ESD_INCLUDE)
18 endif
19endif
20
9c19b5fc 21# for building of PWG0dep.par
22#ifneq ($(PWG0base_INCLUDE),)
23# ALICEINC += -I../$(PWG0base_INCLUDE)
24#endif
25
7f2a4d8b 26CXXFLAGS += $(ALICEINC) -g -IFEMTOSCOPY/AliFemto -IANALYSIS -IFEMTOSCOPY/AliFemtoUser
4c166e18 27
7f2a4d8b 28ALICEINC += -IFEMTOSCOPY/AliFemto -IANALYSIS -IFEMTOSCOPY/AliFemtoUser
deb133c5 29
9c19b5fc 30PACKAGE = PWG2
deb133c5 31include lib$(PACKAGE).pkg
32
9c19b5fc 33DHDR_PWG2 := $(DHDR)
34HDRS_PWG2 := $(HDRS)
35SRCS_PWG2 := $(SRCS) G__$(PACKAGE).cxx
36OBJS_PWG2 := $(SRCS_PWG2:.cxx=.o)
deb133c5 37
937bb49a 38PARFILE = $(PACKAGE).par
39
9c19b5fc 40lib$(PACKAGE).so: $(OBJS_PWG2)
937bb49a 41 @echo "Linking" $@ ...
42 @/bin/rm -f $@
43ifeq ($(PLATFORM),macosx)
44 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
45else
deb133c5 46 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
937bb49a 47endif
48 @chmod a+x $@
49 @echo "done"
50
51%.o: %.cxx %.h
52 $(CXX) $(CXXFLAGS) -c $< -o $@
53
9c19b5fc 54G__PWG2.cxx G__PWG2.h: $(HDRS_PWG2) $(DHDR_PWG2)
937bb49a 55 @echo "Generating dictionary ..."
937bb49a 56 rootcint -f $@ -c $(ALICEINC) $^
57
deb133c5 58clean:
4c166e18 59 @rm -f $(OBJS_PWG2) $(OBJS_PWG2ebye) $(OBJS_PWG2flow) $(OBJS_PWG2femtoscopy) *.so G__PWG2.* G__PWG2ebye.* G__PWG2flow.* G__PWG2femtoscopy.* $(PARFILE)
deb133c5 60
937bb49a 61### CREATE PAR FILE
62
9c19b5fc 63$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_PWG2) $(SRCS_PWG2) $(DHDR_PWG2) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
937bb49a 64 @echo "Creating archive" $@ ...
65 @tar cfzh $@ $(PACKAGE)
66 @rm -rf $(PACKAGE)
67 @echo "done"
68
69$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
70 @echo Copying $< to $@ with transformations
71 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
72 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
73
74$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
75 @echo Copying $< to $@
76 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
deb133c5 77 @cp -a $^ $@
937bb49a 78
79$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
80 @echo Copying $< to $@
81 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
deb133c5 82 @cp -a -r $^ $@
937bb49a 83
84$(PACKAGE)/%: %
85 @echo Copying $< to $@
86 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
deb133c5 87 @cp -a $< $@
937bb49a 88
89test-%.par: %.par
90 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
91 @mkdir -p par-tmp
92 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
93 @rm -rf par-tmp
94 @echo "INFO: Testing succeeded (already cleaned up)"
deb133c5 95
9c19b5fc 96## libPWG0ebye part
97include libPWG2ebye.pkg
98
99DHDR_PWG2ebye := $(DHDR)
100HDRS_PWG2ebye := $(HDRS)
101SRCS_PWG2ebye := $(SRCS) G__PWG2ebye.cxx
102OBJS_PWG2ebye := $(SRCS_PWG2ebye:.cxx=.o)
103
104libPWG2ebye.so: $(OBJS_PWG2ebye)
105 @echo "Linking" $@ ...
106 @/bin/rm -f $@
107ifeq ($(PLATFORM),macosx)
108 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
109else
110 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
111endif
112 @chmod a+x $@
113 @echo "done"
114
115G__PWG2ebye.cxx G__PWG2ebye.h: $(HDRS_PWG2ebye) $(DHDR_PWG2ebye)
116 @echo "Generating dictionary ..."
117 rootcint -f $@ -c $(ALICEINC) $^
118
734d2c12 119## libPWG0spectra part
120include libPWG2spectra.pkg
121
122DHDR_PWG2spectra := $(DHDR)
123HDRS_PWG2spectra := $(HDRS)
124SRCS_PWG2spectra := $(SRCS) G__PWG2spectra.cxx
125OBJS_PWG2spectra := $(SRCS_PWG2spectra:.cxx=.o)
126
127libPWG2spectra.so: $(OBJS_PWG2spectra)
128 @echo "Linking" $@ ...
129 @/bin/rm -f $@
130ifeq ($(PLATFORM),macosx)
131 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
132else
133 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
134endif
135 @chmod a+x $@
136 @echo "done"
137
138G__PWG2spectra.cxx G__PWG2spectra.h: $(HDRS_PWG2spectra) $(DHDR_PWG2spectra)
139 @echo "Generating dictionary ..."
140 rootcint -f $@ -c $(ALICEINC) $^
141
9c19b5fc 142## libPWG2flow part
143include libPWG2flow.pkg
144
145DHDR_PWG2flow := $(DHDR)
146HDRS_PWG2flow := $(HDRS)
147SRCS_PWG2flow := $(SRCS) G__PWG2flow.cxx
148OBJS_PWG2flow := $(SRCS_PWG2flow:.cxx=.o)
149
150libPWG2flow.so: $(OBJS_PWG2flow)
151 @echo "Linking" $@ ...
152 @/bin/rm -f $@
153ifeq ($(PLATFORM),macosx)
154 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
155else
156 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
157endif
158 @chmod a+x $@
159 @echo "done"
160
161G__PWG2flow.cxx G__PWG2flow.h: $(HDRS_PWG2flow) $(DHDR_PWG2flow)
162 @echo "Generating dictionary ..."
163 rootcint -f $@ -c $(ALICEINC) $^
164
4c166e18 165
166## libPWG2femtoscopy part
167include libPWG2femtoscopy.pkg
168
169DHDR_PWG2femtoscopy := $(DHDR)
170HDRS_PWG2femtoscopy := $(HDRS)
171SRCS_PWG2femtoscopy := $(SRCS) G__PWG2femtoscopy.cxx
172OBJS_PWG2femtoscopy := $(SRCS_PWG2femtoscopy:.cxx=.o)
173
174libPWG2femtoscopy.so: $(OBJS_PWG2femtoscopy)
175 @echo "Linking" $@ ...
176 @/bin/rm -f $@
177ifeq ($(PLATFORM),macosx)
178 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
179else
180 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
181endif
182 @chmod a+x $@
183 @echo "done"
184
185G__PWG2femtoscopy.cxx G__PWG2femtoscopy.h: $(HDRS_PWG2femtoscopy) $(DHDR_PWG2femtoscopy)
186 @echo "Generating dictionary ..."
187 rootcint -f $@ -c $(ALICEINC) $^
188
a705009a 189## libPWG2femtoscopyUser part
190include libPWG2femtoscopyUser.pkg
191
192DHDR_PWG2femtoscopyUser := $(DHDR)
193HDRS_PWG2femtoscopyUser := $(HDRS)
194SRCS_PWG2femtoscopyUser := $(SRCS) G__PWG2femtoscopyUser.cxx
195OBJS_PWG2femtoscopyUser := $(SRCS_PWG2femtoscopyUser:.cxx=.o)
196
197libPWG2femtoscopyUser.so: $(OBJS_PWG2femtoscopyUser)
198 @echo "Linking" $@ ...
199 @/bin/rm -f $@
200ifeq ($(PLATFORM),macosx)
201 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
202else
203 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
204endif
205 @chmod a+x $@
206 @echo "done"
207
208G__PWG2femtoscopyUser.cxx G__PWG2femtoscopyUser.h: $(HDRS_PWG2femtoscopyUser) $(DHDR_PWG2femtoscopyUser)
209 @echo "Generating dictionary ..."
210 rootcint -f $@ -c $(ALICEINC) $^
211
7f2a4d8b 212## libPWG2AOD part
213include libPWG2AOD.pkg
214
215DHDR_PWG2AOD := $(DHDR)
216HDRS_PWG2AOD := $(HDRS)
217SRCS_PWG2AOD := $(SRCS) G__PWG2AOD.cxx
218OBJS_PWG2AOD := $(SRCS_PWG2AOD:.cxx=.o)
219
220libPWG2AOD.so: $(OBJS_PWG2AOD)
221 @echo "Linking" $@ ...
222 @/bin/rm -f $@
223ifeq ($(PLATFORM),macosx)
224 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
225else
226 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
227endif
228 @chmod a+x $@
229 @echo "done"
230
231G__PWG2AOD.cxx G__PWG2AOD.h: $(HDRS_PWG2AOD) $(DHDR_PWG2AOD)
232 @echo "Generating dictionary ..."
233 rootcint -f $@ -c $(ALICEINC) $^
234