]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - Makefile
Removing warnings
[u/mrichter/AliRoot.git] / Makefile
index 0eb69e3bde5196ce55266f067f66233df220497a..e1fd6f0fc99bb0d98e369ee6577ff162c2dc1345 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,8 @@ else
 MUTE:=@
 endif
 
+CLEAN=$(findstring clean,$(patsubst %clean%,clean,$(MAKECMDGOALS)))
+
 #-------------------------------------------------------------------------------
 # IRST coding rule check
 
@@ -26,14 +28,6 @@ REV_ENG=$(IRST_INSTALLDIR)/scripts/revEng.sh
 
 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 +39,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,17 +62,25 @@ 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
 
@@ -121,8 +123,8 @@ LIBS := $(GLIBS) $(ROOTLIBS) $(SYSLIBS)
 #-------------------------------------------------------------------------------
 # default target
 
-default:     alilibs  aliroot
-
+default:
+       $(MUTE)$(MAKE) aliroot
 
 #-------------------------------------------------------------------------------
 # Each module will add to these macros
@@ -141,35 +143,34 @@ include build/module.dep
 #-------------------------------------------------------------------------------
 # 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 +178,7 @@ endif
 endif
 endif
 endif
+endif
 
 #-------------------------------------------------------------------------------
 # Include dummy dependency file *MUST* be last includefile
@@ -188,19 +190,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 +216,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