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