X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FMakefile;h=ddda47b3c8178b5f2e6e7861e8623677095696df;hb=2308c814509d812c7ba0c6d83ebbe113ed554c0f;hp=d111f870411a3bc5a53017741e838bb160256f72;hpb=cce428fe6452d8c2f30fed360e52744a442ce008;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/Makefile b/PHOS/Makefile index d111f870411..ddda47b3c81 100644 --- a/PHOS/Makefile +++ b/PHOS/Makefile @@ -1,80 +1,47 @@ -############################### PHOS Makefile ################################# +PACKAGE = invalid-only-for-proof -# Include machine specific definitions +include $(ROOTSYS)/test/Makefile.arch +include lib$(PACKAGE).pkg -include $(ALICE_ROOT)/conf/GeneralDef -include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET) +ifndef PACKCXXFLAGS + PACKCXXFLAGS = $(CXXFLAGS) +endif -PACKAGE = PHOS +ALICEINC = -I. -# C++ sources +### define include dir for local case and par case -SRCS = AliPHOS.cxx AliPHOSv0.cxx AliPHOSv0_hits.cxx AliPHOSv1.cxx AliPHOSHit.cxx \ - AliPHOSGeometry.cxx \ - AliPHOSDigit.cxx \ - AliPHOSRecPoint.cxx AliPHOSEmcRecPoint.cxx AliPHOSPpsdRecPoint.cxx \ - AliPHOSClusterizer.cxx AliPHOSClusterizerv1.cxx AliPHOSLink.cxx \ - AliPHOSReconstructioner.cxx AliPHOSTrackSegment.cxx \ - AliPHOSTrackSegmentMaker.cxx AliPHOSTrackSegmentMakerv1.cxx \ - AliPHOSRecParticle.cxx AliPHOSPID.cxx AliPHOSPIDv1.cxx \ - AliPHOSAnalyze.cxx AliPHOSvFast.cxx AliPHOSFastRecParticle.cxx \ - AliPHOSIndexToObject.cxx \ -# C++ Headers - -HDRS = $(SRCS:.cxx=.h) PHOSLinkDef.h - -# Library dictionary - -DICT = PHOSCint.cxx -DICTH = $(DICT:.cxx=.h) -DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT)) - -# C++ Objects - -OBJS = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO) - -# C++ compilation flags - -CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include/ - -ALSRCS = $(SRCS) $(SHSRCS) $(RCSRCS) $(DUSRCS) dummies.c - -ALOBJS = $(SHOBJS) $(RCOBJS) $(DUOBJS) - -##### COMMANDS ##### - -SLIBRARY = $(LIBDIR)/libPHOS.$(SL) - -default: $(SLIBRARY) - -$(LIBDIR)/libPHOS.$(SL): $(OBJS) $(FOBJS) - -$(DICT): $(HDRS) - -depend: $(SRCS) - -TOCLEAN = $(OBJS) *Cint.cxx *Cint.h - -############################### General Macros ################################ - -include $(ALICE_ROOT)/conf/GeneralMacros - -############################ Dependencies ##################################### - --include tgt_$(ALICE_TARGET)/Make-depend - -### Target check creates violation reports (.viol), which depend on -### stripped files (.ii), which in turn depend on preprocessed -### files (.i). Dependences are in conf/GeneralDef. - -CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS)) - -check: $(CHECKS) +# only if no par file was loaded before +ifeq ($(ALICEINC),-I.) + ifneq ($(ALICE_ROOT),) + ALICEINC += -I$(ALICE_ROOT)/include + endif +endif +CXXFLAGS += $(ALICEINC) -g +SRCS += G__$(PACKAGE).cxx +OBJS = $(SRCS:.cxx=.o) +lib$(PACKAGE).so: $(OBJS) + @echo "Linking" $@ ... + @/bin/rm -f $@ +ifeq ($(ARCH),macosx) + @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@ +else + @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@ +endif + @chmod a+x $@ + @echo "done" +%.o: %.cxx %.h + $(CXX) $(PACKCXXFLAGS) -c $< -o $@ +clean: + @rm -f $(OBJS) *.so G__$(PACKAGE).* +G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR) + @echo "Generating dictionaries ..." $(ALICEINC) + rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^