X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGLF%2FMakefile;h=dccfe23422ec92e3462e775a88390658263f8051;hb=bb9124d02440e50f834ef53970e3e1141d1aff12;hp=d25c016cf628332920da53ddc61bc536c6ccd68a;hpb=41f671ab609085085e0acaf43374c677c7e75427;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGLF/Makefile b/PWGLF/Makefile index d25c016cf62..dccfe23422e 100644 --- a/PWGLF/Makefile +++ b/PWGLF/Makefile @@ -1,156 +1,153 @@ -# $Id: Makefile 53653 2011-12-16 10:05:45Z cholm $ +PACKAGE = PWGLFresonances include Makefile.arch -PACKAGE = PWGLFresonances +SRCS = +HDRS = +DHDR = + +ifndef PACKCXXFLAGS + PACKCXXFLAGS = $(CXXFLAGS) +endif + +ALIARCH := $(shell $(RC) --arch) +PARPATH := $(shell pwd) -default-target: lib$(PACKAGE).so +ALICEINC = -I. +ALICEINC += -I$(PACKAGE) -I$(PACKAGE)/RESONANCES -ALICEINC = -I. -I$(ALICE_ROOT)/TOF -I$(ALICE_ROOT)/ANALYSIS/EventMixing +# ALIPARLIBS = -L$(ROOTLIBDIR) -lMinuit -lTree -lXMLParser -lVMC -lMinuit -lEG -lGeom +ALIPARLIBS = +# ALICELIBS += -L$(ALICE_ROOT)/lib/tgt_$(shell $(RC) --arch) + +ifneq ($(STEERBase_INCLUDE),) + ALICEINC += -I../$(STEERBase_INCLUDE) + ALIPARLIBS += $(STEERBase_LIBS) +else + ifneq ($(PACKAGE),STEERBase) + ALICELIBS += -lSTEERBase + else + ALIPARLIBS += -L$(PARPATH) -lSTEERBase + endif +endif -### define include dir for local case and par case ifneq ($(ESD_INCLUDE),) ALICEINC += -I../$(ESD_INCLUDE) - ALICEINC += -I../$(AOD_INCLUDE) - ALICEINC += -I../$(STEERBase_INCLUDE) - ALICEINC += -I../$(OADB_INCLUDE) - ALICEINC += -I../$(ANALYSIS_INCLUDE) - ALICEINC += -I../$(ANALYSISalice_INCLUDE) - else - ifneq ($(ALICE_ROOT),) - ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PWGLF - endif + ALIPARLIBS += $(ESD_LIBS) +else + ifneq ($(PACKAGE),ESD) + ALICELIBS += -lESD + else + ALIPARLIBS += -L$(PARPATH) -lESD + endif endif -ifneq ($(PWGLFresonances_INCLUDE),) - ALICEINC += -I../$(PWGLFresonances_INCLUDE) - else - ifneq ($(ALICE_ROOT),) - ALICEINC += -I$(ALICE_ROOT)/PWGLF/RESONANCES - endif +ifneq ($(AOD_INCLUDE),) + ALICEINC += -I../$(AOD_INCLUDE) + ALIPARLIBS += $(AOD_LIBS) +else + ifneq ($(PACKAGE),AOD) + ALICELIBS += -lAOD + else + ALIPARLIBS += -L$(PARPATH) -lAOD + endif endif -ifneq ($(PWGLFSTRANGENESS_INCLUDE),) - ALICEINC += -I../$(PWGLFSTRANGENESS_INCLUDE) - else - ifneq ($(ALICE_ROOT),) - ALICEINC += -I$(ALICE_ROOT)/PWGLF/STRANGENESS - endif +ifneq ($(ANALYSIS_INCLUDE),) + ALICEINC += -I../$(ANALYSIS_INCLUDE) + ALIPARLIBS += $(ANALYSIS_LIBS) +else + ifneq ($(PACKAGE),ANALYSIS) + ALICELIBS += -lANALYSIS + else + ALIPARLIBS += -L$(PARPATH) -lANALYSIS + endif endif -ifneq ($(PWGLFtotEt_INCLUDE),) - ALICEINC += -I../$(PWGLFtotEt_INCLUDE) - else - ifneq ($(ALICE_ROOT),) - ALICEINC += -I$(ALICE_ROOT)/PWGLF/totEt - endif +ifneq ($(ANALYSISalice_INCLUDE),) + ALICEINC += -I../$(ANALYSISalice_INCLUDE) + ALIPARLIBS += $(ANALYSISalice_LIBS) +else + ifneq ($(PACKAGE),ANALYSISalice) + ALICELIBS += -lANALYSISalice + else + ALIPARLIBS += -L$(PARPATH) -lANALYSISalice + endif endif -ifneq ($(PWGLFforward_INCLUDE),) - ALICEINC += -I../$(PWGLFforward_INCLUDE) - else - ifneq ($(ALICE_ROOT),) - ALICEINC += -I$(ALICE_ROOT)/PWGLF/FORWARD/analysis - endif +ifneq ($(EventMixing_INCLUDE),) + ALICEINC += -I../$(EventMixng_INCLUDE) + ALIPARLIBS += $(EventMixing_LIBS) +else + ifneq ($(PACKAGE),EventMixing) + ALICELIBS += -lEventMixing + else + ALIPARLIBS += -L$(PARPATH) -lEventMixing + endif endif -ifneq ($(PWGLFforward2_INCLUDE),) - ALICEINC += -I../$(PWGLFforward2_INCLUDE) - else - ifneq ($(ALICE_ROOT),) - ALICEINC += -I$(ALICE_ROOT)/PWGLF/FORWARD/analysis2 - endif +ifneq ($(CORRFW_INCLUDE),) + ALICEINC += -I../$(CORRFW_INCLUDE) + ALIPARLIBS += $(CORRFW_LIBS) +else + ifneq ($(PACKAGE),CORRFW) + ALICELIBS += -lCORRFW + else + ALIPARLIBS += -L$(PARPATH) -lCORRFW + endif endif -ifneq ($(OADB_INCLUDE), ) - ALICEINC += -I../$(OADB_INCLUDE) +ifneq ($(PWGLFresonances_INCLUDE),) + ALICEINC += -I../$(PWGLFresonances_INCLUDE) + ALIPARLIBS += $(PWGLFresonances_LIBS) else - ifneq ($(ALICE_ROOT),) - ALICEINC += -I$(ALICE_ROOT)/OADB - endif + ifneq ($(PACKAGE),PWGLFresonances) + ALICELIBS += -lPWGLFresonances + else + ALIPARLIBS += -L$(PARPATH) -lPWGLFresonances + endif endif # only if no par file was loaded before -#ifeq ($(ALICEINC),-I.) +ifeq ($(ALICEINC),-I.) ifneq ($(ALICE_ROOT),) ALICEINC += -I$(ALICE_ROOT)/include + ALIPARLIBS += -L$(ALICE_ROOT)/lib/tgt_$(ALIARCH) $(ALICELIBS) endif -#endif - -ifneq ($(EINCLUDE),) - ALICEINC += $(EINCLUDE:%=-I$(ALICE_ROOT)/%) endif -CXXFLAGS += $(ALICEINC) -g -F77FLAGS += $(ALICEINC) -g -fPIC +ALICEINC += -I$(ALICE_ROOT)/include +ALIPARLIBS += -L$(ALICE_ROOT)/lib/tgt_$(ALIARCH) $(ALICELIBS) + +# ifeq ($(PLATFORM),macosx) +ROOTLIBDIR := $(shell $(RC) --libdir) +# ALIROOTLIBDIR := $(ALICE_ROOT)/lib/tgt_$(shell $(RC) --arch) -DHDR = -HDRS = -SRCS = -FSRCS = +PACKLDFLAGS := $(ALIPARLIBS) -L$(ROOTLIBDIR) -lMinuit -lTree -lXMLParser -lVMC -lMinuit -lEG -lGeom -DHDR_PWGLF := $(DHDR) -HDRS_PWGLF := $(HDRS) -SRCS_PWGLF := $(SRCS) G__$(PACKAGE).cxx -FSCRS_PWGLF := $(FSRCS) -OBJS_PWGLF := $(SRCS_PWGLF:.cxx=.o) $(FSRCS:.F=.o) +CXXFLAGS += $(ALICEINC) -g -PARFILE = $(PACKAGE).par +SRCS += G__$(PACKAGE).cxx +OBJS = $(SRCS:.cxx=.o) -lib$(PACKAGE).so: $(OBJS_PWGLF) +lib$(PACKAGE).so: $(OBJS) @echo "Linking" $@ ... @/bin/rm -f $@ - $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS) +ifeq ($(PLATFORM),macosx) + $(LD) $(SOFLAGS) -flat_namespace -undefined suppress $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS) +else + $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS) +endif @chmod a+x $@ @echo "done" %.o: %.cxx %.h - $(CXX) $(CXXFLAGS) -c $< -o $@ - -%.o: %.F - $(F77) $(F77FLAGS) -c $< -o $@ - -G__$(PACKAGE).h:G__$(PACKAGE).cxx - @if test -f $@ ; then : ; else rm -f $< ; $(MAKE) $@ ; fi - -G__$(PACKAGE).cxx: $(HDRS_PWGLF) $(DHDR_PWGLF) - @echo "Generating dictionary ..." - rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^ + $(CXX) $(PACKCXXFLAGS) -c $< -o $@ clean: - @rm -f $(OBJS_PWGLF) *.so G__$(PACKAGE).* $(PARFILE) - -### CREATE PAR FILE + @rm -f $(OBJS) *.so G__$(PACKAGE).* -$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_PWGLF) $(SRCS_PWGLF) $(DHDR_PWGLF) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF)) - @echo "Creating archive" $@ ... - @tar cfzh $@ $(PACKAGE) - @rm -rf $(PACKAGE) - @echo "done" +G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR) + @echo "Generating dictionaries ..." $(ALICEINC) + rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^ -$(PACKAGE)/Makefile: Makefile #.$(PACKAGE) - @echo Copying $< to $@ with transformations - @[ -d $(dir $@) ] || mkdir -p $(dir $@) - @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@ - -$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch - @echo Copying $< to $@ - @[ -d $(dir $@) ] || mkdir -p $(dir $@) - @cp -a $^ $@ - -$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE) - @echo Copying $< to $@ - @[ -d $(dir $@) ] || mkdir -p $(dir $@) - @cp -a -r $^ $@ - -$(PACKAGE)/%: % - @echo Copying $< to $@ - @[ -d $(dir $@) ] || mkdir -p $(dir $@) - @cp -a $< $@ - -test-%.par: %.par - @echo "INFO: The file $< is now tested, in case of an error check in par-tmp." - @mkdir -p par-tmp - @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh - @rm -rf par-tmp - @echo "INFO: Testing succeeded (already cleaned up)"