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