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