]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - Makefile
Updated version of the calibration data (A.Colla)
[u/mrichter/AliRoot.git] / Makefile
index 0eb69e3bde5196ce55266f067f66233df220497a..590a18f32a91888d4b99ab7d9607fb55f0043f62 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,8 @@ else
 MUTE:=@
 endif
 
+CLEAN=$(findstring clean,$(MAKECMDGOALS))
+
 #-------------------------------------------------------------------------------
 # IRST coding rule check
 
@@ -21,19 +23,6 @@ export CLASSPATH IRST_INSTALLDIR IRST_CONFIG_DIR
 CODE_CHECK=java rules.ALICE.ALICERuleChecker
 REV_ENG=$(IRST_INSTALLDIR)/scripts/revEng.sh
 
-#-------------------------------------------------------------------------------
-# Include library definition
-
-include build/Makefile.config
-
-#-------------------------------------------------------------------------------
-# Location where to install libraries and binaries and common header files
-
-LIBPATH      := lib/tgt_$(ALICE_TARGET)
-BINPATH      := bin/tgt_$(ALICE_TARGET)
-EXPORTDIR    := $(ALICE_ROOT)/include
-BINLIBDIRS   := -L$(ALICE_ROOT)/$(LIBPATH)
-
 #-------------------------------------------------------------------------------
 # Include machine dependent macros
 
@@ -45,8 +34,8 @@ BINLIBDIRS   := -L$(ALICE_ROOT)/$(LIBPATH)
 ifeq ($(ALIDEBUG),YES)
 override ALICE_TARGET := $(ALICE_TARGET)DEBUG
 FFLAGS   := -g $(filter-out -O%,$(FFLAGS))
-CXXFLAGS := -g $(filter-out -O%,$(CXXLAGS))
-CFLAGS   := -g $(filter-out -O%,$(CLAGS))
+CXXFLAGS := -g $(filter-out -O%,$(CXXFLAGS))
+CFLAGS   := -g $(filter-out -O%,$(CFLAGS))
 SOFLAGS  := -g $(filter-out -O%,$(SOFLAGS))
 LDFLAGS  := -g $(filter-out -O%,$(LDFLAGS))
 endif
@@ -68,25 +57,33 @@ endif
 
 ifdef DATE_ROOT
 DATEFLAGS  = -DALI_DATE -D${DATE_SYS} -DDATE_SYS=${DATE_SYS} -Dlong32=${DATE_LONG32} \
-             -Dlong64=${DATE_LONG64} -DdatePointer=${DATE_POINTER}
+             -Dlong64='${DATE_LONG64}' -DdatePointer=${DATE_POINTER} -I${DATE_COMMON_DEFS}
 CXXFLAGS  += $(DATEFLAGS)
 CFLAGS    += $(DATEFLAGS)
 CINTFLAGS += $(DATEFLAGS)
 DEPINC    += $(DATEFLAGS)
 endif
 
+#-------------------------------------------------------------------------------
+# Location where to install libraries and binaries and common header files
+
+LIBPATH      := lib/tgt_$(ALICE_TARGET)
+BINPATH      := bin/tgt_$(ALICE_TARGET)
+EXPORTDIR    := $(ALICE_ROOT)/include
+BINLIBDIRS   := -L$(ALICE_ROOT)/$(LIBPATH)
+
 #-------------------------------------------------------------------------------
 # Modules to build
 
-ifdef ALIVERBOSE
+ifeq (ALIVERBOSE,2)
 $(warning MAKECMDGOALS=$(MAKECMDGOALS))
 endif
 
 ALIROOTMODULES := STEER PHOS TRD TPC ZDC MUON PMD FMD TOF ITS \
       CRT RICH START STRUCT EVGEN RALICE ALIFAST VZERO \
-      THijing CONTAINERS MEVSIM TMEVSIM THbtp HBTP EMCAL HBTAN \
+      THijing MEVSIM TMEVSIM THbtp HBTP EMCAL HBTAN \
       THerwig TEPEMGEN EPEMGEN FASTSIM TPHIC RAW MONITOR DISPLAY ANALYSIS \
-      JETAN HLT
+      JETAN HLT LHC
 
 ifeq ($(findstring TFluka,$(MAKECMDGOALS)),TFluka)
 ALIROOTMODULES += TFluka
@@ -115,14 +112,25 @@ DEPINC     += $(GENINC)
 #-------------------------------------------------------------------------------
 # Libraries to link binaries against
 # Libraries will be linked against SHLIB
+# ROOT libraries 
+
+ROOTCLIBS     := $(shell root-config --glibs) -lThread -lMinuit -lHtml -lVMC -lEG -lGeom
+
+ROOTPLIBS     := -lEGPythia6
+
+ALILIBS              := -L$(LIBDIR) -lMUON -lTPC -lPMD -lTRD -lFMD -lTOF \
+                -lITS -lPHOS -lCRT -lRICH -lVZERO -lZDC -lSTRUCT \
+                -lSTART -lEVGEN -lSTEER
 
-LIBS := $(GLIBS) $(ROOTLIBS) $(SYSLIBS)
+LIBS := $(ROOTCLIBS) $(ROOTPLIBS) $(SYSLIBS)
 
 #-------------------------------------------------------------------------------
 # default target
 
-default:     alilibs  aliroot
+default:
+       $(MUTE)$(MAKE) aliroot
 
+FORCE:
 
 #-------------------------------------------------------------------------------
 # Each module will add to these macros
@@ -134,42 +142,43 @@ BINLIBS      :=
 EXPORTFILES  :=
 
 #-------------------------------------------------------------------------------
-# Dependencies of module.mk files
+# Dependencies of module.mk files if not cleaning
 
+ifeq ($(CLEAN),)
 include build/module.dep
+endif
 
 #-------------------------------------------------------------------------------
 # Check if module.mk is present for the library
 
-%.mk: build/module.tpl
+%.mk: build/module.tpl build/header.tpl build/clean.tpl share/alibtool
 ifndef ALIQUIET
        @echo "***** Creating $@ file *****";
 endif
        @share/alibtool mkmodule  $(patsubst %/module.mk,%,$@) > $@;
 
-#-------------------------------------------------------------------------------
-# If cleaning, do not include dependencies or module.mk files.
-
-ifeq ($(findstring $(MAKECMDGOALS), clean distclean clean-all clean-dicts \
-clean-modules clean-depend clean-objects clean-libs clean-bins \
-clean-check-all),)
-
 #-------------------------------------------------------------------------------
 # If making modules, not not include anything
 
-ifneq ($(findstring modules,$(MAKECMDGOALS)),modules)
+ifeq ($(findstring modules,$(MAKECMDGOALS)),)
 
 #-------------------------------------------------------------------------------
 # Include the modules
 
 -include $(patsubst %,%/module.mk,$(MODULES))
 
+#-------------------------------------------------------------------------------
+# If cleaning, do not include dependencies or module.mk files.
+
+ifeq ($(CLEAN),)
+
 #-------------------------------------------------------------------------------
 # Include dependencies if not making them!
 
 ifneq ($(MAKECMDGOALS),depend)
+ifneq ($(MAKECMDGOALS),)
 
-ifdef ALIVERBOSE
+ifeq (ALIVERBOSE,2)
 $(warning INCLUDEFILES=$(INCLUDEFILES))
 endif
 -include $(INCLUDEFILES)
@@ -177,6 +186,7 @@ endif
 endif
 endif
 endif
+endif
 
 #-------------------------------------------------------------------------------
 # Include dummy dependency file *MUST* be last includefile
@@ -188,19 +198,18 @@ include build/dummy.d
 # Targets
 
 .PHONY:                alilibs aliroot makedistr clean distclean clean-all \
-               htmldoc profile
+               htmldoc profile modules depend
 
 modules: $(patsubst %,%/module.mk,$(MODULES)) 
 
-
-aliroot: $(BINPATH) $(ALLEXECS) alilibs
-
 ifeq ($(ALIPROFILE),YES)
 alilibs: $(LIBPATH) modules $(ALLLIBS) $(ALLALIBS)
 else
 alilibs: $(LIBPATH) modules $(ALLLIBS)
 endif
 
+aliroot: alilibs $(BINPATH) $(ALLEXECS) 
+
 #-------------------------------------------------------------------------------
 # Single Makefile "distribution": Makefile + modules + mkdepend scripts
 makedistr: $(MODULES)
@@ -215,13 +224,13 @@ debug:
 ifndef ALIQUIET
        @echo "***** Entering DEBUG mode. *****"
 endif
-       @(export ALIDEBUG=YES && $(MAKE))
+       @(export ALIDEBUG=YES && $(MAKE) aliroot)
 
 profile:
 ifndef ALIQUIET
        @echo "***** Entering PROFILE mode. *****"
 endif
-       @(export ALIPROFILE=YES && $(MAKE))
+       @(export ALIPROFILE=YES && $(MAKE) aliroot)
 
 $(MODULES):
 ifndef ALIQUIET