]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/Makefile
coverity fix
[u/mrichter/AliRoot.git] / PHOS / Makefile
index 05932686ed45c2cbeaf3412b077415157e2bf1ed..771dbe5e201e6e3176aa4902ef101ed5d3855540 100644 (file)
@@ -1,94 +1,70 @@
-############################### PHOS Makefile #################################
-
-# Include machine specific definitions
-
-include $(ALICE_ROOT)/conf/GeneralDef
-include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
-
-PACKAGE = PHOS
-
-# C++ sources
-
-SRCS          =  AliPHOS.cxx AliPHOSv0.cxx AliPHOSv1.cxx \
-                 AliPHOSvFast.cxx AliPHOSvImpacts.cxx \
-                 AliPHOSImpact.cxx \
-                 AliPHOSHit.cxx AliPHOSTick.cxx\
-                 AliPHOSGeometry.cxx \
-                AliPHOSEMCAGeometry.cxx \
-                AliPHOSCPVGeometry.cxx AliPHOSCPVBaseGeometry.cxx \
-                AliPHOSSupportGeometry.cxx \
-                AliPHOSCPVDigit.cxx AliPHOSDigit.cxx  \
-                 AliPHOSRecPoint.cxx AliPHOSEmcRecPoint.cxx \
-                AliPHOSCpvRecPoint.cxx \
-                AliPHOSClusterizer.cxx AliPHOSClusterizerv1.cxx  \
-                 AliPHOSLink.cxx AliPHOSSDigitizer.cxx AliPHOSDigitizer.cxx\
-                AliPHOSReconstructioner.cxx  AliPHOSTrackSegment.cxx \
-                 AliPHOSTrackSegmentMaker.cxx AliPHOSTrackSegmentMakerv1.cxx \
-                 AliPHOSRecParticle.cxx AliPHOSPID.cxx AliPHOSPIDv1.cxx \
-                 AliPHOSAnalyze.cxx AliPHOSFastRecParticle.cxx \
-                 AliPHOSGetter.cxx AliPHOSTick.cxx \
-                AliPHOSQAVirtualCheckable.cxx AliPHOSQAIntCheckable.cxx \
-                 AliPHOSQAFloatCheckable.cxx\
-                 AliPHOSQAObjectCheckable.cxx AliPHOSQAChecker.cxx AliPHOSQAMeanChecker.cxx AliPHOSQAAlarm.cxx
-
-# C++ Headers
-
-HDRS          = $(SRCS:.cxx=.h) $(ROOTSYS)/include/TTree.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
-
-CHECKS        = $(patsubst %.cxx,check/%.viol,$(SRCS))
-
-############################### General Macros ################################
-
-include $(ALICE_ROOT)/conf/GeneralMacros
-
-############################ Dependencies #####################################
-
--include tgt_$(ALICE_TARGET)/Make-depend 
-
-test:  
-               @echo " ____________________________________________________________ "
-               @echo " "
-               @echo " Starting the test of the simulation/reconstruction software. Please don't take the warning messages into account. "
-               @echo " ____________________________________________________________ "
-               @aliroot -b -q testsim.C > out
-               @aliroot -b -q testsimglobal.C > out
-               @rm out
-               @rm testPHOS.root
-
-
-
-
-
+PACKAGE = invalid-only-for-proof
+
+include $(ROOTSYS)/test/Makefile.arch
+
+SRCS     = $(wildcard *.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
+
+ifndef PACKCXXFLAGS
+   PACKCXXFLAGS = $(CXXFLAGS)
+endif
+
+ALICEINC = -I.
+
+### define include dir for local case and par case
+
+ifneq ($(STEERBase_INCLUDE),)
+  ALICEINC += -I../$(STEERBase_INCLUDE)
+endif
+
+# 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 ($(PLATFORM),macosx)
+# We need to make both the .dylib and the .so
+               $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
+ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
+ifeq ($(MACOSX_MINOR),4)
+               ln -sf $@ $(subst .$(DllSuf),.so,$@)
+else
+               $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
+                  $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
+endif
+endif
+else
+ifeq ($(PLATFORM),win32)
+               bindexplib $* $^ > $*.def
+               lib -nologo -MACHINE:IX86 $^ -def:$*.def \
+                  $(OutPutOpt)$(EVENTLIB)
+               $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
+                  $(OutPutOpt)$@
+else
+               $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
+endif
+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) $^