Adding the hit strips patterns (Bogdan)
[u/mrichter/AliRoot.git] / PWG4 / Makefile
CommitLineData
f9cea31c 1
2a1d8a29 2include Makefile.arch
f9cea31c 3
861ef725 4default-target: libPWG4Gamma.so
f9cea31c 5
6ALICEINC = -I.
7
8### define include dir for local case and par case
f61d9588 9ifneq ($(ANALYSIS_INCLUDE),)
2880eb00 10 ALICEINC += -I../$(ESD_INCLUDE) -I../$(AOD_INCLUDE) -I../$(ANALYSIS_INCLUDE) -I../$(STEERBase_INCLUDE)
f9cea31c 11else
12 ifneq ($(ALICE_ROOT),)
13 ALICEINC += -I$(ALICE_ROOT)/include
14 endif
15endif
16
861ef725 17# for building of PWG4Gamma.par
f9cea31c 18ifneq ($(GAMMA_INCLUDE),)
19 ALICEINC += -I../$(GAMMA_INCLUDE)
20endif
21
22CXXFLAGS += $(ALICEINC) -g
23
861ef725 24PACKAGE = PWG4Gamma
f9cea31c 25include lib$(PACKAGE).pkg
26
861ef725 27DHDR_PWG4Gamma := $(DHDR)
28HDRS_PWG4Gamma := $(HDRS)
29SRCS_PWG4Gamma := $(SRCS) G__$(PACKAGE).cxx
30OBJS_PWG4Gamma := $(SRCS_PWG4Gamma:.cxx=.o)
f9cea31c 31
32PARFILE = $(PACKAGE).par
33
34
861ef725 35lib$(PACKAGE).so: $(OBJS_PWG4Gamma)
f9cea31c 36 @echo "Linking" $@ ...
37 @/bin/rm -f $@
38ifeq ($(PLATFORM),macosx)
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:
861ef725 50 @rm -f $(OBJS_PWG4Gamma) *.so G__$(PACKAGE).* $(PARFILE)
f9cea31c 51
52G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
53 @echo "Generating dictionary ..."
54 rootcint -f $@ -c $(ALICEINC) $^
55
56### CREATE PAR FILE
57
861ef725 58$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_PWG4Gamma) $(SRCS_PWG4Gamma) $(DHDR_PWG4Gamma) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
f9cea31c 59 @echo "Creating archive" $@ ...
60 @tar cfzh $@ $(PACKAGE)
61 @rm -rf $(PACKAGE)
62 @echo "done"
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)"