recoparam is modified to tackle refined clustering
[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
3e228187 27# only if no par file was loaded before
28ifeq ($(ALICEINC),-I.)
29 ifneq ($(ALICE_ROOT),)
dcea967f 30 ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/ANALYSIS/Tender -I$(ALICE_ROOT)/TOF
3e228187 31 endif
b7c8eec1 32endif
33
34CXXFLAGS += $(ALICEINC) -g
35
e9e06a24 36CHECKXML := $(shell root-config --has-xml)
379c06ec 37include lib$(PACKAGE).pkg
38
c52c2132 39DHDR_ANALYSIS := $(DHDR)
40HDRS_ANALYSIS := $(HDRS)
41SRCS_ANALYSIS := $(SRCS) G__$(PACKAGE).cxx
42OBJS_ANALYSIS := $(SRCS_ANALYSIS:.cxx=.o)
b7c8eec1 43
44PARFILE = $(PACKAGE).par
45
379c06ec 46
c52c2132 47lib$(PACKAGE).so: $(OBJS_ANALYSIS)
379c06ec 48 @echo "Linking" $@ ...
49 @/bin/rm -f $@
10dc066e 50ifeq ($(ARCH),macosx)
379c06ec 51 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
52else
53 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
54endif
55 @chmod a+x $@
56 @echo "done"
57
58%.o: %.cxx %.h
c16bb9ed 59 $(CXX) $(CXXFLAGS) $(PACKCXXFLAGS) -c $< -o $@
379c06ec 60
61clean:
c52c2132 62 @rm -f $(OBJS_ANALYSIS) *.so G__$(PACKAGE).* $(PARFILE)
379c06ec 63
64G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
65 @echo "Generating dictionary ..."
3f4f3116 66 rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
379c06ec 67
b7c8eec1 68### CREATE PAR FILE
69
c52c2132 70$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_ANALYSIS) $(SRCS_ANALYSIS) $(DHDR_ANALYSIS) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
b7c8eec1 71 @echo "Creating archive" $@ ...
72 @tar cfzh $@ $(PACKAGE)
73 @rm -rf $(PACKAGE)
74 @echo "done"
75
76$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
77 @echo Copying $< to $@ with transformations
78 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
79 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
80
81$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
82 @echo Copying $< to $@
83 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
84 @cp -a $^ $@
85
86$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
87 @echo Copying $< to $@
88 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
89 @cp -a -r $^ $@
90
91$(PACKAGE)/%: %
92 @echo Copying $< to $@
93 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
94 @cp -a $< $@
95
96test-%.par: %.par
97 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
98 @mkdir -p par-tmp
99 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
100 @rm -rf par-tmp
101 @echo "INFO: Testing succeeded (already cleaned up)"