3 include $(ROOTSYS)/test/Makefile.arch
5 default-target: libPWG0base.so libPWG0dep.so libPWG0selectors.so
9 ### define include dir for local case and par case
10 ifneq ($(ALICE_ROOT),)
11 ALICEINC += -I$(ALICE_ROOT)/include
13 ifneq ($(ESD_INCLUDE),)
14 ALICEINC += -I../$(ESD_INCLUDE)
18 # for building of PWG0dep.par
19 ifneq ($(PWG0base_INCLUDE),)
20 ALICEINC += -I../$(PWG0base_INCLUDE)
23 CXXFLAGS += $(ALICEINC) -g
26 include lib$(PACKAGE).pkg
28 DHDR_PWG0base := $(DHDR)
29 HDRS_PWG0base := $(HDRS)
30 SRCS_PWG0base := $(SRCS) G__$(PACKAGE).cxx
31 OBJS_PWG0base := $(SRCS_PWG0base:.cxx=.o)
33 PARFILE = $(PACKAGE).par
35 lib$(PACKAGE).so: $(OBJS_PWG0base)
36 @echo "Linking" $@ ...
38 ifeq ($(PLATFORM),macosx)
39 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
41 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
47 $(CXX) $(CXXFLAGS) -c $< -o $@
49 G__PWG0base.cxx G__PWG0base.h: $(HDRS_PWG0base) $(DHDR_PWG0base)
50 @echo "Generating dictionary ..."
51 rootcint -f $@ -c $(ALICEINC) $^
54 @rm -f $(OBJS_PWG0base) $(OBJS_PWG0dep) $(OBJS_PWG0selectors) *.so G__PWG0base.* G__PWG0dep.* G__PWG0selectors.* $(PARFILE)
58 $(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_PWG0base) $(SRCS_PWG0base) $(DHDR_PWG0base) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
59 @echo "Creating archive" $@ ...
60 @tar cfzh $@ $(PACKAGE)
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/' < $^ > $@
69 $(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
70 @echo Copying $< to $@
71 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
74 $(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
75 @echo Copying $< to $@
76 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
80 @echo Copying $< to $@
81 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
85 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
87 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
89 @echo "INFO: Testing succeeded (already cleaned up)"
92 include libPWG0dep.pkg
94 DHDR_PWG0dep := $(DHDR)
95 HDRS_PWG0dep := $(HDRS)
96 SRCS_PWG0dep := $(SRCS) G__PWG0dep.cxx
97 OBJS_PWG0dep := $(SRCS_PWG0dep:.cxx=.o)
99 libPWG0dep.so: $(OBJS_PWG0dep)
100 @echo "Linking" $@ ...
102 ifeq ($(PLATFORM),macosx)
103 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
105 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
110 G__PWG0dep.cxx G__PWG0dep.h: $(HDRS_PWG0dep) $(DHDR_PWG0dep)
111 @echo "Generating dictionary ..."
112 rootcint -f $@ -c $(ALICEINC) $^
114 ## libPWG0selectors part
115 include libPWG0selectors.pkg
117 DHDR_PWG0selectors := $(DHDR)
118 HDRS_PWG0selectors := $(HDRS)
119 SRCS_PWG0selectors := $(SRCS) G__PWG0selectors.cxx
120 OBJS_PWG0selectors := $(SRCS_PWG0selectors:.cxx=.o)
122 libPWG0selectors.so: $(OBJS_PWG0selectors)
123 @echo "Linking" $@ ...
125 ifeq ($(PLATFORM),macosx)
126 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
128 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
133 G__PWG0selectors.cxx G__PWG0selectors.h: $(HDRS_PWG0selectors) $(DHDR_PWG0selectors)
134 @echo "Generating dictionary ..."
135 rootcint -f $@ -c $(ALICEINC) $^