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