Analysis with correction for double hits (work in progress) and analysis independent...
[u/mrichter/AliRoot.git] / Makefile
index 3805b38..1f05acf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -58,9 +58,8 @@ endif
 #-------------------------------------------------------------------------------
 # Check if DATE is installed
 
-ifdef DATE_ROOT
-DATEFLAGS  = -DALI_DATE -D${DATE_SYS} -DDATE_SYS=${DATE_SYS} -Dlong32=${DATE_LONG32} \
-             -Dlong64='${DATE_LONG64}' -DdatePointer=${DATE_POINTER} -I${DATE_COMMON_DEFS} -I${DATE_MONITOR_DIR}
+ifneq ($(shell date-config 2>&1 | grep -i usage),)
+DATEFLAGS  = -DALI_DATE $(shell date-config --cflags | tr \" \')
 CXXFLAGS  += $(DATEFLAGS)
 CFLAGS    += $(DATEFLAGS)
 CINTFLAGS += $(DATEFLAGS)
@@ -89,6 +88,7 @@ ROOTCLIBS     := $(shell $(ROOTCONFIG) --glibs) \
                        -lGeom                  \
                        -lTreePlayer            \
                        -lXMLIO                 \
+                       -lXMLParser             \
                        -lProof                 \
                        -lProofPlayer           \
                        -lMLP                   \
@@ -112,9 +112,10 @@ endif
 
 ALIROOTMODULES := STEER PHOS TRD TPC ZDC MUON PMD FMD TOF ITS \
       ACORDE HMPID T0 BCM STRUCT EVGEN RALICE VZERO \
-      THijing THbtp EMCAL HBTAN \
+      THijing THbtp EMCAL \
       THerwig TEPEMGEN FASTSIM TPHIC RAW MONITOR ANALYSIS \
-      JETAN HLT LHC ESDCheck STAT TTherminator CORRFW DPMJET TDPMjet
+      JETAN HLT LHC ESDCheck STAT TTherminator CORRFW DPMJET TDPMjet \
+      PWG0 PWG1 PWG2 PWG3 PWG4
 
 ifneq ($(shell $(ROOTCONFIG) --has-pythia8), no)
 ALIROOTMODULES += PYTHIA8
@@ -132,32 +133,16 @@ ifeq ($(findstring THydjet,$(MAKECMDGOALS)),THydjet)
 ALIROOTMODULES += THydjet
 endif
 
-ifeq ($(findstring PWG0,$(MAKECMDGOALS)),PWG0)
-ALIROOTMODULES += PWG0
-endif
-
-ifeq ($(findstring PWG1,$(MAKECMDGOALS)),PWG1)
-ALIROOTMODULES += PWG1
-endif
-
-ifeq ($(findstring PWG2,$(MAKECMDGOALS)),PWG2)
-ALIROOTMODULES += PWG2
-endif
-
-ifeq ($(findstring PWG3,$(MAKECMDGOALS)),PWG3)
-ALIROOTMODULES += PWG3
-endif
-
-ifeq ($(findstring PWG4,$(MAKECMDGOALS)),PWG4)
-ALIROOTMODULES += PWG4
-endif
-
 ifeq ($(findstring SHUTTLE,$(MAKECMDGOALS)),SHUTTLE)
 ALIROOTMODULES += SHUTTLE
 endif
 
-ifeq ($(findstring Flugg,$(MAKECMDGOALS)),Flugg)
-ALIROOTMODULES += Flugg
+ifeq ($(findstring TUHKMgen,$(MAKECMDGOALS)),TUHKMgen)
+ALIROOTMODULES += TUHKMgen
+endif
+
+ifeq ($(findstring EPOS,$(MAKECMDGOALS)),EPOS)
+ALIROOTMODULES += EPOS
 endif
 
 CERNMODULES := LHAPDF HIJING MICROCERN HERWIG
@@ -293,6 +278,14 @@ endif
 
 aliroot: alilibs $(BINPATH) $(ALLEXECS) 
 
+ALIRECO.par: macros/loadlibsrec.C STEER/PROOF-INF.ALIRECO/SETUP.C
+       $(MUTE)echo "***** Creating package archive" $@ "*****"
+       $(MUTE)rm -rf ALIRECO
+       $(MUTE)mkdir -p ALIRECO/PROOF-INF
+       $(MUTE)cat $^ > ALIRECO/PROOF-INF/SETUP.C
+       (tar cfzh $@ ALIRECO 2> /dev/null && echo "Package archive" $@ "created in" $(PWD)/$@) || (tar cfzh /tmp/$@ ALIRECO 2> /dev/null && echo "Package archive" $@ "created in /tmp/"$@)
+       $(MUTE)rm -rf ALIRECO
+
 ROOTALIBDIR=$(shell root-config --libdir)
 
 ALIMDCSPECFILE=$(RAWDIRO)/alimdc.spec
@@ -309,9 +302,15 @@ alimdc-rpm: alimdc-static alimdc-specfile
        $(ROOTALIBDIR)/libfreetype.a $(ROOTALIBDIR)/libpcre.a \
        alimdc-root/opt/alimdc/lib
        $(MUTE)rm -rf RPMS
-       $(MUTE)mkdir -p RPMS/i386
-       $(MUTE)rpmbuild --verbose --define "_topdir $(ALICE_ROOT)" --define "_tmppath $(ALICE_ROOT)" -bb $(ALIMDCSPECFILE)
-       $(MUTE)cp -p RPMS/i386/alimdc-*.rpm .
+       $(MUTE)case `uname -m` in \
+           i?86*)      ALIMDCARCHDIR=i386;;\
+           ia64*)      ALIMDCARCHDIR=ia64;;\
+           x86_64*)    ALIMDCARCHDIR=x86_64;;\
+           *)          echo "Unknown architecture: `uname -m`"; exit 1;;\
+       esac; \
+       mkdir -p RPMS/$$ALIMDCARCHDIR; \
+       rpmbuild --verbose --define "_topdir $(ALICE_ROOT)" --define "_tmppath $(ALICE_ROOT)" -bb $(ALIMDCSPECFILE); \
+       cp -p RPMS/$$ALIMDCARCHDIR/alimdc-*.rpm .;
        $(MUTE)rm -rf alimdc-root
        $(MUTE)rm -rf RPMS
        @echo "***** alimdc RPM created and put $(ALICE_ROOT) folder *****"
@@ -373,7 +372,7 @@ alimdc-static: $(LIBPATH) $(BINPATH) $(RAWDatabaseALIB) $(MDCALIB) $(ESDALIB) $(
         $(LIBPATH)/libAliMDC.a \
         $(ROOTALIBDIR)/libRoot.a \
         $(ROOTALIBDIR)/libfreetype.a $(ROOTALIBDIR)/libpcre.a \
-        -ldl
+        -pthread -ldl
 
 alilibs-static: $(LIBPATH) modules $(ALLALIBS)