Correct references between newly crated AODTracks and old esdTrack used for caloclusters.
[u/mrichter/AliRoot.git] / PWG3 / Makefile
CommitLineData
c40ad03f 1# $Id$
2
1ea49eed 3include $(ROOTSYS)/test/Makefile.arch
c40ad03f 4
e8fd9be7 5default-target: libPWG3base.so libPWG3muon libPWG3vertexingHF.so libPWG3vertexingOld.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
c40ad03f 24else
25 ifneq ($(ALICE_ROOT),)
26 ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/MUON
27else
28 endif
29endif
30
31CXXFLAGS += $(ALICEINC) -g
32
e8fd9be7 33PACKAGE = PWG3
c40ad03f 34include lib$(PACKAGE).pkg
35
e8fd9be7 36DHDR_PWG3 := $(DHDR)
37HDRS_PWG3 := $(HDRS)
38SRCS_PWG3 := $(SRCS) G__$(PACKAGE).cxx
39OBJS_PWG3 := $(SRCS_PWG3:.cxx=.o)
c40ad03f 40
41PARFILE = $(PACKAGE).par
42
e8fd9be7 43lib$(PACKAGE).so: $(OBJS_PWG3)
c40ad03f 44 @echo "Linking" $@ ...
45 @/bin/rm -f $@
10dc066e 46ifeq ($(ARCH),macosx)
c40ad03f 47 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
48else
49 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
50endif
51 @chmod a+x $@
52 @echo "done"
53
54%.o: %.cxx %.h
55 $(CXX) $(CXXFLAGS) -c $< -o $@
56
e8fd9be7 57G__PWG3.cxx G__PWG3.h: $(HDRS_PWG3) $(DHDR_PWG3)
c40ad03f 58 @echo "Generating dictionary ..."
59 rootcint -f $@ -c $(ALICEINC) $^
60
61clean:
e8fd9be7 62 @rm -f $(OBJS_PWG3) *.so G__PWG3.* $(PARFILE)
c40ad03f 63
64### CREATE PAR FILE
65
e8fd9be7 66$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_PWG3) $(SRCS_PWG3) $(DHDR_PWG3) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
c40ad03f 67 @echo "Creating archive" $@ ...
68 @tar cfzh $@ $(PACKAGE)
69 @rm -rf $(PACKAGE)
70 @echo "done"
71
72$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
73 @echo Copying $< to $@ with transformations
74 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
75 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
76
77$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
78 @echo Copying $< to $@
79 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
80 @cp -a $^ $@
81
82$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
83 @echo Copying $< to $@
84 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
85 @cp -a -r $^ $@
86
87$(PACKAGE)/%: %
88 @echo Copying $< to $@
89 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
90 @cp -a $< $@
91
92test-%.par: %.par
93 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
94 @mkdir -p par-tmp
95 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
96 @rm -rf par-tmp
97 @echo "INFO: Testing succeeded (already cleaned up)"
98
e8fd9be7 99## libPWG3base part
100##include libPWG3base.pkg
101
102DHDR_PWG3base := $(DHDR)
103HDRS_PWG3base := $(HDRS)
104SRCS_PWG3base := $(SRCS) G__PWG3base.cxx
105OBJS_PWG3base := $(SRCS_PWG3base:.cxx=.o)
106
107libPWG3base.so: $(OBJS_PWG3base)
108 @echo "Linking" $@ ...
109 @/bin/rm -f $@
110ifeq ($(ARCH),macosx)
111 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
112else
113 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
114endif
115 @chmod a+x $@
116 @echo "done"
117
118G__PWG3base.cxx G__PWG3base.h: $(HDRS_PWG3base) $(DHDR_PWG3base)
119 @echo "Generating dictionary ..."
120 rootcint -f $@ -c $(ALICEINC) $^
121
122
123## libPWG3muon part
124##include libPWG3muon.pkg
125
126DHDR_PWG3muon := $(DHDR)
127HDRS_PWG3muon := $(HDRS)
128SRCS_PWG3muon := $(SRCS) G__PWG3muon.cxx
129OBJS_PWG3muon := $(SRCS_PWG3muon:.cxx=.o)
130
131libPWG3muon.so: $(OBJS_PWG3muon)
132 @echo "Linking" $@ ...
133 @/bin/rm -f $@
134ifeq ($(ARCH),macosx)
135 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
136else
137 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
138endif
139 @chmod a+x $@
140 @echo "done"
141
142G__PWG3muon.cxx G__PWG3muon.h: $(HDRS_PWG3muon) $(DHDR_PWG3muon)
143 @echo "Generating dictionary ..."
144 rootcint -f $@ -c $(ALICEINC) $^
145
146## libPWG3vertexingHF part
147##include libPWG3vertexingHF.pkg
148
149DHDR_PWG3vertexingHF := $(DHDR)
150HDRS_PWG3vertexingHF := $(HDRS)
151SRCS_PWG3vertexingHF := $(SRCS) G__PWG3vertexingHF.cxx
152OBJS_PWG3vertexingHF := $(SRCS_PWG3vertexingHF:.cxx=.o)
153
154libPWG3vertexingHF.so: $(OBJS_PWG3vertexingHF)
155 @echo "Linking" $@ ...
156 @/bin/rm -f $@
157ifeq ($(ARCH),macosx)
158 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
159else
160 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
161endif
162 @chmod a+x $@
163 @echo "done"
164
165G__PWG3vertexingHF.cxx G__PWG3vertexingHF.h: $(HDRS_PWG3vertexingHF) $(DHDR_PWG3vertexingHF)
166 @echo "Generating dictionary ..."
167 rootcint -f $@ -c $(ALICEINC) $^
168
169## libPWG3vertexingOld part
170##include libPWG3vertexingOld.pkg
171
172DHDR_PWG3vertexingOld := $(DHDR)
173HDRS_PWG3vertexingOld := $(HDRS)
174SRCS_PWG3vertexingOld := $(SRCS) G__PWG3vertexingOld.cxx
175OBJS_PWG3vertexingOld := $(SRCS_PWG3vertexingOld:.cxx=.o)
176
177libPWG3vertexingOld.so: $(OBJS_PWG3vertexingOld)
178 @echo "Linking" $@ ...
179 @/bin/rm -f $@
180ifeq ($(ARCH),macosx)
181 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
182else
183 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
184endif
185 @chmod a+x $@
186 @echo "done"
187
188G__PWG3vertexingOld.cxx G__PWG3vertexingOld.h: $(HDRS_PWG3vertexingOld) $(DHDR_PWG3vertexingOld)
189 @echo "Generating dictionary ..."
190 rootcint -f $@ -c $(ALICEINC) $^