]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/Makefile
updated for the new recoParam representation
[u/mrichter/AliRoot.git] / PWG2 / Makefile
CommitLineData
937bb49a 1# $Id$
2
937bb49a 3include $(ROOTSYS)/test/Makefile.arch
937bb49a 4
378d0357 5PACKAGE = PWG2
6
7default-target: lib$(PACKAGE).so
deb133c5 8
9ALICEINC = -I.
937bb49a 10
11### define include dir for local case and par case
378d0357 12ifneq ($(STEERBase_INCLUDE),)
13 ALICEINC += -I../$(STEERBase_INCLUDE)
14endif
15
16ifneq ($(ESD_INCLUDE),)
17 ALICEINC += -I../$(ESD_INCLUDE)
18endif
19
20ifneq ($(AOD_INCLUDE),)
21 ALICEINC += -I../$(AOD_INCLUDE)
22endif
23
aad44575 24ifneq ($(ANALYSIS_INCLUDE),)
25 ALICEINC += -I../$(ANALYSIS_INCLUDE)
26endif
27
aca22c05 28ifneq ($(ANALYSISalice_INCLUDE),)
29 ALICEINC += -I../$(ANALYSISalice_INCLUDE)
30endif
31
39f2a708 32ifneq ($(COORFW_INCLUDE),)
33 ALICEINC += -I../$(CORRFW_INCLUDE)
34endif
35
aad44575 36ifneq ($(PWG2AOD_INCLUDE),)
37 ALICEINC += -I../$(PWG2AOD_INCLUDE)
38endif
39
40ifneq ($(PWG2femtoscopy_INCLUDE),)
41 ALICEINC += -I../$(PWG2femtoscopy_INCLUDE)
42endif
43
8f4eb10f 44ifneq ($(PWG2resonances_INCLUDE),)
45 ALICEINC += -I../$(PWG2resonances_INCLUDE)
46endif
47
378d0357 48# only if no par file was loaded before
49ifeq ($(ALICEINC),-I.)
50 ifneq ($(ALICE_ROOT),)
51 ALICEINC += -I$(ALICE_ROOT)/include
937bb49a 52 endif
53endif
54
9c19b5fc 55# for building of PWG0dep.par
56#ifneq ($(PWG0base_INCLUDE),)
57# ALICEINC += -I../$(PWG0base_INCLUDE)
58#endif
59
378d0357 60CXXFLAGS += $(ALICEINC) -g
aad44575 61F77FLAGS += $(ALICEINC) -g -fPIC
4c166e18 62
378d0357 63#ALICEINC += -IFEMTOSCOPY/AliFemto -IANALYSIS -IFEMTOSCOPY/AliFemtoUser
deb133c5 64
deb133c5 65include lib$(PACKAGE).pkg
66
9c19b5fc 67DHDR_PWG2 := $(DHDR)
68HDRS_PWG2 := $(HDRS)
69SRCS_PWG2 := $(SRCS) G__$(PACKAGE).cxx
aad44575 70FSCRS_PWG2 := $(FSRCS)
71OBJS_PWG2 := $(SRCS_PWG2:.cxx=.o) $(FSRCS:.F=.o)
deb133c5 72
937bb49a 73PARFILE = $(PACKAGE).par
74
9c19b5fc 75lib$(PACKAGE).so: $(OBJS_PWG2)
937bb49a 76 @echo "Linking" $@ ...
77 @/bin/rm -f $@
10dc066e 78ifeq ($(ARCH),macosx)
937bb49a 79 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
80else
deb133c5 81 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
937bb49a 82endif
83 @chmod a+x $@
84 @echo "done"
85
86%.o: %.cxx %.h
87 $(CXX) $(CXXFLAGS) -c $< -o $@
88
aad44575 89%.o: %.F
90 $(F77) $(F77FLAGS) -c $< -o $@
91
378d0357 92G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS_PWG2) $(DHDR_PWG2)
937bb49a 93 @echo "Generating dictionary ..."
378d0357 94 rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
937bb49a 95
deb133c5 96clean:
378d0357 97 @rm -f $(OBJS_PWG2) *.so G__$(PACKAGE).* $(PARFILE)
deb133c5 98
937bb49a 99### CREATE PAR FILE
100
9c19b5fc 101$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_PWG2) $(SRCS_PWG2) $(DHDR_PWG2) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
937bb49a 102 @echo "Creating archive" $@ ...
103 @tar cfzh $@ $(PACKAGE)
104 @rm -rf $(PACKAGE)
105 @echo "done"
106
107$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
108 @echo Copying $< to $@ with transformations
109 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
110 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
111
112$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
113 @echo Copying $< to $@
114 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
deb133c5 115 @cp -a $^ $@
937bb49a 116
117$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
118 @echo Copying $< to $@
119 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
deb133c5 120 @cp -a -r $^ $@
937bb49a 121
122$(PACKAGE)/%: %
123 @echo Copying $< to $@
124 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
deb133c5 125 @cp -a $< $@
937bb49a 126
127test-%.par: %.par
128 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
129 @mkdir -p par-tmp
130 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
131 @rm -rf par-tmp
132 @echo "INFO: Testing succeeded (already cleaned up)"