Removed call to SetOldRCUFormat, which is only needed for testbeam data
[u/mrichter/AliRoot.git] / ANALYSIS / Makefile
CommitLineData
379c06ec 1
b7c8eec1 2include $(ROOTSYS)/test/Makefile.arch
3
c52c2132 4default-target: libANALYSIS.so
b7c8eec1 5
6ALICEINC = -I.
7
8### define include dir for local case and par case
9ifneq ($(ESD_INCLUDE),)
10 ALICEINC += -I../$(ESD_INCLUDE)
06cc905a 11 ifneq ($(AOD_INCLUDE),)
12 ALICEINC += -I../$(AOD_INCLUDE)
3bf4ccf3 13 endif
14 ifneq ($(STEERBase_INCLUDE),)
15 ALICEINC += -I../$(STEERBase_INCLUDE)
16 endif
b7c8eec1 17else
18 ifneq ($(ALICE_ROOT),)
19 ALICEINC += -I$(ALICE_ROOT)/include
20 endif
21endif
22
c52c2132 23# for building of ANALYSIS.par
24ifneq ($(ANALYSIS_INCLUDE),)
25 ALICEINC += -I../$(ANALYSIS_INCLUDE)
b7c8eec1 26endif
27
28CXXFLAGS += $(ALICEINC) -g
29
c52c2132 30PACKAGE = ANALYSIS
379c06ec 31include lib$(PACKAGE).pkg
32
c52c2132 33DHDR_ANALYSIS := $(DHDR)
34HDRS_ANALYSIS := $(HDRS)
35SRCS_ANALYSIS := $(SRCS) G__$(PACKAGE).cxx
36OBJS_ANALYSIS := $(SRCS_ANALYSIS:.cxx=.o)
b7c8eec1 37
38PARFILE = $(PACKAGE).par
39
379c06ec 40
c52c2132 41lib$(PACKAGE).so: $(OBJS_ANALYSIS)
379c06ec 42 @echo "Linking" $@ ...
43 @/bin/rm -f $@
44ifeq ($(PLATFORM),macosx)
45 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
46else
47 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
48endif
49 @chmod a+x $@
50 @echo "done"
51
52%.o: %.cxx %.h
c16bb9ed 53 $(CXX) $(CXXFLAGS) $(PACKCXXFLAGS) -c $< -o $@
379c06ec 54
55clean:
c52c2132 56 @rm -f $(OBJS_ANALYSIS) *.so G__$(PACKAGE).* $(PARFILE)
379c06ec 57
58G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
59 @echo "Generating dictionary ..."
3f4f3116 60 rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
379c06ec 61
b7c8eec1 62### CREATE PAR FILE
63
c52c2132 64$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_ANALYSIS) $(SRCS_ANALYSIS) $(DHDR_ANALYSIS) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
b7c8eec1 65 @echo "Creating archive" $@ ...
66 @tar cfzh $@ $(PACKAGE)
67 @rm -rf $(PACKAGE)
68 @echo "done"
69
70$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
71 @echo Copying $< to $@ with transformations
72 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
73 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
74
75$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
76 @echo Copying $< to $@
77 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
78 @cp -a $^ $@
79
80$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
81 @echo Copying $< to $@
82 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
83 @cp -a -r $^ $@
84
85$(PACKAGE)/%: %
86 @echo Copying $< to $@
87 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
88 @cp -a $< $@
89
90test-%.par: %.par
91 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
92 @mkdir -p par-tmp
93 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
94 @rm -rf par-tmp
95 @echo "INFO: Testing succeeded (already cleaned up)"