New options: 1)raw data type. 2)initialization of reconstruction paramteres. Clean up.
[u/mrichter/AliRoot.git] / PWG3 / Makefile
CommitLineData
c40ad03f 1# $Id$
2
1ea49eed 3include $(ROOTSYS)/test/Makefile.arch
c40ad03f 4
5default-target: libPWG3base.so
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
33PACKAGE = PWG3base
34include lib$(PACKAGE).pkg
35
36DHDR_PWG3base := $(DHDR)
37HDRS_PWG3base := $(HDRS)
38SRCS_PWG3base := $(SRCS) G__$(PACKAGE).cxx
39OBJS_PWG3base := $(SRCS_PWG3base:.cxx=.o)
40
41PARFILE = $(PACKAGE).par
42
43lib$(PACKAGE).so: $(OBJS_PWG3base)
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
57G__PWG3base.cxx G__PWG3base.h: $(HDRS_PWG3base) $(DHDR_PWG3base)
58 @echo "Generating dictionary ..."
59 rootcint -f $@ -c $(ALICEINC) $^
60
61clean:
62 @rm -f $(OBJS_PWG3base) *.so G__PWG3base.* $(PARFILE)
63
64### CREATE PAR FILE
65
66$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_PWG3base) $(SRCS_PWG3base) $(DHDR_PWG3base) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
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