Make some calculations optional for HLT
[u/mrichter/AliRoot.git] / Makefile
index 5424029..7e7ba92 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,7 +112,7 @@ 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 \
       PWG0 PWG1 PWG2 PWG3 PWG4
@@ -137,8 +137,12 @@ 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
@@ -172,10 +176,9 @@ ALILIBS          := -L$(LIBDIR) -lMUON -lTPC -lPMD -lTRD -lFMD -lTOF \
 LIBS := $(ROOTCLIBS) $(ROOTPLIBS) $(SYSLIBS)
 
 ARVERSIONFILE := $(EXPORTDIR)/ARVersion.h
-SVNREV        := $(strip $(shell svn info | grep "Last Changed Rev:" | \
+SVNREV        := $(strip $(shell LANG=C svn info | grep "Last Changed Rev:" | \
                                 cut -d: -f2 ))
-SVNBRANCH     := w$(subst //alisoft.cern.ch/AliRoot/,,\
-                   $(shell svn info | grep "URL:" | cut -d: -f3 ))
+SVNBRANCH     := $(subst //alisoft.cern.ch/AliRoot/,,$(shell svn info | grep "URL:" | cut -d: -f3 ))
 
 #-------------------------------------------------------------------------------
 # default target
@@ -183,12 +186,10 @@ SVNBRANCH     := w$(subst //alisoft.cern.ch/AliRoot/,,\
 default: $(ARVERSIONFILE)
        $(MUTE)$(MAKE) aliroot
 
-FORCE:
-
 #-------------------------------------------------------------------------------
 # Write header file with aliroot svn version and url
 
-$(ARVERSIONFILE): FORCE $(EXPORTDIR)
+$(ARVERSIONFILE): $(ALICE_ROOT)/.svn/entries $(EXPORTDIR)
        $(MUTE)rm -f $(ARVERSIONFILE)
        @echo "***** Making $(ARVERSIONFILE) *****"
        @echo "#ifndef ALIROOT_ARVersion" >> $@
@@ -274,6 +275,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
@@ -290,9 +299,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 *****"
@@ -354,7 +369,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)