Update of ACORDE-QA-Raw data histograms (now they go from -0.5 to 59.5)
[u/mrichter/AliRoot.git] / PWG3 / Makefile
CommitLineData
c40ad03f 1# $Id$
2
1ea49eed 3include $(ROOTSYS)/test/Makefile.arch
c40ad03f 4
8324a835 5default-target: libPWG3base.so libPWG3muon.so libPWG3muondep.so libPWG3vertexingHF.so libPWG3vertexingOld.so libPWG3hfe.so
c40ad03f 6
7ALICEINC = -I.
8
9### define include dir for local case and par case
10ifneq ($(ESD_INCLUDE),)
11 ALICEINC += -I../$(ESD_INCLUDE)
12 ifneq ($(STEERBase_INCLUDE),)
13 ALICEINC += -I../$(STEERBase_INCLUDE)
14 endif
15 ifneq ($(AOD_INCLUDE),)
16 ALICEINC += -I../$(AOD_INCLUDE)
17 endif
18 ifneq ($(ANALYSIS_INCLUDE),)
19 ALICEINC += -I../$(ANALYSIS_INCLUDE)
20 endif
57b8dffb 21 ifneq ($(ANALYSISalice_INCLUDE),)
22 ALICEINC += -I../$(ANALYSISalice_INCLUDE)
23 endif
b0c9efdb 24 ifneq ($(CORRFW_INCLUDE),)
25 ALICEINC += -I../$(CORRFW_INCLUDE)
26 endif
c40ad03f 27else
28 ifneq ($(ALICE_ROOT),)
dcaa6c37 29 ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/MUON -I$(ALICE_ROOT)/MUON/mapping
c40ad03f 30else
31 endif
32endif
33
34CXXFLAGS += $(ALICEINC) -g
35
e8fd9be7 36PACKAGE = PWG3
c40ad03f 37include lib$(PACKAGE).pkg
38
e8fd9be7 39DHDR_PWG3 := $(DHDR)
40HDRS_PWG3 := $(HDRS)
41SRCS_PWG3 := $(SRCS) G__$(PACKAGE).cxx
42OBJS_PWG3 := $(SRCS_PWG3:.cxx=.o)
c40ad03f 43
44PARFILE = $(PACKAGE).par
45
e8fd9be7 46lib$(PACKAGE).so: $(OBJS_PWG3)
c40ad03f 47 @echo "Linking" $@ ...
48 @/bin/rm -f $@
10dc066e 49ifeq ($(ARCH),macosx)
c40ad03f 50 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
51else
52 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
53endif
54 @chmod a+x $@
55 @echo "done"
56
57%.o: %.cxx %.h
58 $(CXX) $(CXXFLAGS) -c $< -o $@
59
e8fd9be7 60G__PWG3.cxx G__PWG3.h: $(HDRS_PWG3) $(DHDR_PWG3)
c40ad03f 61 @echo "Generating dictionary ..."
62 rootcint -f $@ -c $(ALICEINC) $^
63
64clean:
e8fd9be7 65 @rm -f $(OBJS_PWG3) *.so G__PWG3.* $(PARFILE)
c40ad03f 66
67### CREATE PAR FILE
68
e8fd9be7 69$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_PWG3) $(SRCS_PWG3) $(DHDR_PWG3) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
c40ad03f 70 @echo "Creating archive" $@ ...
71 @tar cfzh $@ $(PACKAGE)
72 @rm -rf $(PACKAGE)
73 @echo "done"
74
75$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
76 @echo Copying $< to $@ with transformations
77 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
78 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
79
80$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
81 @echo Copying $< to $@
82 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
83 @cp -a $^ $@
84
85$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
86 @echo Copying $< to $@
87 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
88 @cp -a -r $^ $@
89
90$(PACKAGE)/%: %
91 @echo Copying $< to $@
92 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
93 @cp -a $< $@
94
95test-%.par: %.par
96 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
97 @mkdir -p par-tmp
98 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
99 @rm -rf par-tmp
100 @echo "INFO: Testing succeeded (already cleaned up)"
101
e8fd9be7 102## libPWG3base part
103##include libPWG3base.pkg
104
105DHDR_PWG3base := $(DHDR)
106HDRS_PWG3base := $(HDRS)
107SRCS_PWG3base := $(SRCS) G__PWG3base.cxx
108OBJS_PWG3base := $(SRCS_PWG3base:.cxx=.o)
109
110libPWG3base.so: $(OBJS_PWG3base)
111 @echo "Linking" $@ ...
112 @/bin/rm -f $@
113ifeq ($(ARCH),macosx)
114 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
115else
116 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
117endif
118 @chmod a+x $@
119 @echo "done"
120
121G__PWG3base.cxx G__PWG3base.h: $(HDRS_PWG3base) $(DHDR_PWG3base)
122 @echo "Generating dictionary ..."
123 rootcint -f $@ -c $(ALICEINC) $^
124
125
126## libPWG3muon part
127##include libPWG3muon.pkg
128
129DHDR_PWG3muon := $(DHDR)
130HDRS_PWG3muon := $(HDRS)
131SRCS_PWG3muon := $(SRCS) G__PWG3muon.cxx
132OBJS_PWG3muon := $(SRCS_PWG3muon:.cxx=.o)
133
134libPWG3muon.so: $(OBJS_PWG3muon)
135 @echo "Linking" $@ ...
136 @/bin/rm -f $@
137ifeq ($(ARCH),macosx)
138 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
139else
140 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
141endif
142 @chmod a+x $@
143 @echo "done"
144
145G__PWG3muon.cxx G__PWG3muon.h: $(HDRS_PWG3muon) $(DHDR_PWG3muon)
146 @echo "Generating dictionary ..."
147 rootcint -f $@ -c $(ALICEINC) $^
148
128a8042 149## libPWG3muondep part
150##include libPWG3muondep.pkg
151
152DHDR_PWG3muondep := $(DHDR)
153HDRS_PWG3muondep := $(HDRS)
154SRCS_PWG3muondep := $(SRCS) G__PWG3muondep.cxx
155OBJS_PWG3muondep := $(SRCS_PWG3muondep:.cxx=.o)
156
157libPWG3muondep.so: $(OBJS_PWG3muondep)
158 @echo "Linking" $@ ...
159 @/bin/rm -f $@
160ifeq ($(ARCH),macosx)
161 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
162else
163 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
164endif
165 @chmod a+x $@
166 @echo "done"
167
168G__PWG3muondep.cxx G__PWG3muondep.h: $(HDRS_PWG3muondep) $(DHDR_PWG3muondep)
169 @echo "Generating dictionary ..."
170 rootcint -f $@ -c $(ALICEINC) $^
171
e8fd9be7 172## libPWG3vertexingHF part
173##include libPWG3vertexingHF.pkg
174
175DHDR_PWG3vertexingHF := $(DHDR)
176HDRS_PWG3vertexingHF := $(HDRS)
177SRCS_PWG3vertexingHF := $(SRCS) G__PWG3vertexingHF.cxx
178OBJS_PWG3vertexingHF := $(SRCS_PWG3vertexingHF:.cxx=.o)
179
180libPWG3vertexingHF.so: $(OBJS_PWG3vertexingHF)
181 @echo "Linking" $@ ...
182 @/bin/rm -f $@
183ifeq ($(ARCH),macosx)
184 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
185else
186 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
187endif
188 @chmod a+x $@
189 @echo "done"
190
191G__PWG3vertexingHF.cxx G__PWG3vertexingHF.h: $(HDRS_PWG3vertexingHF) $(DHDR_PWG3vertexingHF)
192 @echo "Generating dictionary ..."
193 rootcint -f $@ -c $(ALICEINC) $^
194
195## libPWG3vertexingOld part
196##include libPWG3vertexingOld.pkg
197
198DHDR_PWG3vertexingOld := $(DHDR)
199HDRS_PWG3vertexingOld := $(HDRS)
200SRCS_PWG3vertexingOld := $(SRCS) G__PWG3vertexingOld.cxx
201OBJS_PWG3vertexingOld := $(SRCS_PWG3vertexingOld:.cxx=.o)
202
203libPWG3vertexingOld.so: $(OBJS_PWG3vertexingOld)
204 @echo "Linking" $@ ...
205 @/bin/rm -f $@
206ifeq ($(ARCH),macosx)
207 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
208else
209 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
210endif
211 @chmod a+x $@
212 @echo "done"
213
214G__PWG3vertexingOld.cxx G__PWG3vertexingOld.h: $(HDRS_PWG3vertexingOld) $(DHDR_PWG3vertexingOld)
215 @echo "Generating dictionary ..."
216 rootcint -f $@ -c $(ALICEINC) $^
8324a835 217
218## libPWG3hfe part
219##include libPWG3hfe.pkg
220
221DHDR_PWG3hfe := $(DHDR)
222HDRS_PWG3hfe := $(HDRS)
223SRCS_PWG3hfe := $(SRCS) G__PWG3hfe.cxx
224OBJS_PWG3hfe := $(SRCS_PWG3hfe:.cxx=.o)
225
226libPWG3hfe.so: $(OBJS_PWG3hfe)
227 @echo "Linking" $@ ...
228 @/bin/rm -f $@
229ifeq ($(ARCH),macosx)
230 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
231else
232 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
233endif
234 @chmod a+x $@
235 @echo "done"
236
237G__PWG3hfe.cxx G__PWG3hfe.h: $(HDRS_PWG3hfe) $(DHDR_PWG3hfe)
238 @echo "Generating dictionary ..."
239 rootcint -f $@ -c $(ALICEINC) $^
240