Forcing the order of the V0 daughter inside the constructor
[u/mrichter/AliRoot.git] / ANALYSIS / Makefile
CommitLineData
379c06ec 1
b7c8eec1 2include $(ROOTSYS)/test/Makefile.arch
3
9af2beba 4PACKAGE = ANALYSIS
5
6default-target: lib$(PACKAGE).so
b7c8eec1 7
8ALICEINC = -I.
9
3e228187 10# add include paths from other par files
b7c8eec1 11ifneq ($(ESD_INCLUDE),)
12 ALICEINC += -I../$(ESD_INCLUDE)
b7c8eec1 13endif
14
3e228187 15ifneq ($(AOD_INCLUDE),)
16 ALICEINC += -I../$(AOD_INCLUDE)
17endif
18
19ifneq ($(STEERBase_INCLUDE),)
20 ALICEINC += -I../$(STEERBase_INCLUDE)
21endif
22
9af2beba 23ifneq ($(ANALYSIS_INCLUDE),)
24 ALICEINC += -I../$(ANALYSIS_INCLUDE)
25endif
26
02fc82ff 27ifneq ($(ANALYSISalice_INCLUDE),)
28 ALICEINC += -I../$(ANALYSISalice_INCLUDE)
29endif
30
3e228187 31# only if no par file was loaded before
32ifeq ($(ALICEINC),-I.)
33 ifneq ($(ALICE_ROOT),)
dcea967f 34 ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/ANALYSIS/Tender -I$(ALICE_ROOT)/TOF
3e228187 35 endif
b7c8eec1 36endif
37
38CXXFLAGS += $(ALICEINC) -g
39
e9e06a24 40CHECKXML := $(shell root-config --has-xml)
84d4333f 41
42SRCS := $(wildcard *.cxx)
43HDRS := $(SRCS:.cxx=.h)
44DHDR := $(PACKAGE)LinkDef.h
379c06ec 45
c52c2132 46DHDR_ANALYSIS := $(DHDR)
47HDRS_ANALYSIS := $(HDRS)
48SRCS_ANALYSIS := $(SRCS) G__$(PACKAGE).cxx
49OBJS_ANALYSIS := $(SRCS_ANALYSIS:.cxx=.o)
b7c8eec1 50
51PARFILE = $(PACKAGE).par
52
379c06ec 53
c52c2132 54lib$(PACKAGE).so: $(OBJS_ANALYSIS)
379c06ec 55 @echo "Linking" $@ ...
56 @/bin/rm -f $@
10dc066e 57ifeq ($(ARCH),macosx)
379c06ec 58 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
59else
60 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
61endif
62 @chmod a+x $@
63 @echo "done"
64
65%.o: %.cxx %.h
c16bb9ed 66 $(CXX) $(CXXFLAGS) $(PACKCXXFLAGS) -c $< -o $@
379c06ec 67
68clean:
c52c2132 69 @rm -f $(OBJS_ANALYSIS) *.so G__$(PACKAGE).* $(PARFILE)
379c06ec 70
71G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
72 @echo "Generating dictionary ..."
3f4f3116 73 rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
379c06ec 74
b7c8eec1 75### CREATE PAR FILE
76
84d4333f 77$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_ANALYSIS) $(SRCS_ANALYSIS) $(DHDR_ANALYSIS) Makefile Makefile.arch PROOF-INF))
b7c8eec1 78 @echo "Creating archive" $@ ...
79 @tar cfzh $@ $(PACKAGE)
80 @rm -rf $(PACKAGE)
81 @echo "done"
82
83$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
84 @echo Copying $< to $@ with transformations
85 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
86 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
87
88$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
89 @echo Copying $< to $@
90 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
91 @cp -a $^ $@
92
93$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
94 @echo Copying $< to $@
95 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
96 @cp -a -r $^ $@
97
98$(PACKAGE)/%: %
99 @echo Copying $< to $@
100 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
101 @cp -a $< $@
102
103test-%.par: %.par
104 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
105 @mkdir -p par-tmp
106 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
107 @rm -rf par-tmp
108 @echo "INFO: Testing succeeded (already cleaned up)"