]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - Makefile
Using dinamic array for times of flight
[u/mrichter/AliRoot.git] / Makefile
index 6fc1eb20dc85f222545bf6183acdc8bb42dbdffa..7929ed1bccc8f05703f087e041225f18d905a918 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,8 @@ else
 MUTE:=@
 endif
 
+CLEAN=$(findstring clean,$(patsubst %clean%,clean,$(MAKECMDGOALS)))
+
 #-------------------------------------------------------------------------------
 # IRST coding rule check
 
@@ -121,9 +123,7 @@ LIBS := $(GLIBS) $(ROOTLIBS) $(SYSLIBS)
 #-------------------------------------------------------------------------------
 # default target
 
-default:
-       $(MAKE) aliroot
-
+default: aliroot
 
 #-------------------------------------------------------------------------------
 # Each module will add to these macros
@@ -142,29 +142,27 @@ 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!
 
@@ -201,7 +199,7 @@ else
 alilibs: $(LIBPATH) modules $(ALLLIBS)
 endif
 
-aliroot: $(BINPATH) $(ALLEXECS) alilibs
+aliroot: alilibs $(BINPATH) $(ALLEXECS) 
 
 #-------------------------------------------------------------------------------
 # Single Makefile "distribution": Makefile + modules + mkdepend scripts