]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/Makefile
added unit test for AliHLTTPCMapping class
[u/mrichter/AliRoot.git] / PWG2 / Makefile
CommitLineData
937bb49a 1# $Id$
2
937bb49a 3include $(ROOTSYS)/test/Makefile.arch
937bb49a 4
378d0357 5PACKAGE = PWG2
6
7default-target: lib$(PACKAGE).so
deb133c5 8
9ALICEINC = -I.
937bb49a 10
11### define include dir for local case and par case
378d0357 12ifneq ($(STEERBase_INCLUDE),)
13 ALICEINC += -I../$(STEERBase_INCLUDE)
14endif
15
16ifneq ($(ESD_INCLUDE),)
17 ALICEINC += -I../$(ESD_INCLUDE)
18endif
19
20ifneq ($(AOD_INCLUDE),)
21 ALICEINC += -I../$(AOD_INCLUDE)
22endif
23
24# only if no par file was loaded before
25ifeq ($(ALICEINC),-I.)
26 ifneq ($(ALICE_ROOT),)
27 ALICEINC += -I$(ALICE_ROOT)/include
937bb49a 28 endif
29endif
30
9c19b5fc 31# for building of PWG0dep.par
32#ifneq ($(PWG0base_INCLUDE),)
33# ALICEINC += -I../$(PWG0base_INCLUDE)
34#endif
35
378d0357 36CXXFLAGS += $(ALICEINC) -g
4c166e18 37
378d0357 38#ALICEINC += -IFEMTOSCOPY/AliFemto -IANALYSIS -IFEMTOSCOPY/AliFemtoUser
deb133c5 39
deb133c5 40include lib$(PACKAGE).pkg
41
9c19b5fc 42DHDR_PWG2 := $(DHDR)
43HDRS_PWG2 := $(HDRS)
44SRCS_PWG2 := $(SRCS) G__$(PACKAGE).cxx
45OBJS_PWG2 := $(SRCS_PWG2:.cxx=.o)
deb133c5 46
937bb49a 47PARFILE = $(PACKAGE).par
48
9c19b5fc 49lib$(PACKAGE).so: $(OBJS_PWG2)
937bb49a 50 @echo "Linking" $@ ...
51 @/bin/rm -f $@
52ifeq ($(PLATFORM),macosx)
53 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
54else
deb133c5 55 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
937bb49a 56endif
57 @chmod a+x $@
58 @echo "done"
59
60%.o: %.cxx %.h
61 $(CXX) $(CXXFLAGS) -c $< -o $@
62
378d0357 63G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS_PWG2) $(DHDR_PWG2)
937bb49a 64 @echo "Generating dictionary ..."
378d0357 65 rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
937bb49a 66
deb133c5 67clean:
378d0357 68 @rm -f $(OBJS_PWG2) *.so G__$(PACKAGE).* $(PARFILE)
deb133c5 69
937bb49a 70### CREATE PAR FILE
71
9c19b5fc 72$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_PWG2) $(SRCS_PWG2) $(DHDR_PWG2) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
937bb49a 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 $@)
deb133c5 86 @cp -a $^ $@
937bb49a 87
88$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
89 @echo Copying $< to $@
90 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
deb133c5 91 @cp -a -r $^ $@
937bb49a 92
93$(PACKAGE)/%: %
94 @echo Copying $< to $@
95 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
deb133c5 96 @cp -a $< $@
937bb49a 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)"