]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - Makefile.flat
Updated Linkdef and libTOF.pkg
[u/mrichter/AliRoot.git] / Makefile.flat
index 96a1fa1fbb5c0bf4e074d10f374874db3f82bb35..134899d44becdaa13e4a69c669d8ef02e61b304d 100644 (file)
@@ -21,7 +21,7 @@ EXPORTDIR = $(ALICE_ROOT)/include
 ##################################################################
 # include machine dependent macros 
 
-include build/Makefile.$(ALICE_TARGET)
+-include build/Makefile.$(ALICE_TARGET)
 ##################################################################
 
 ##################################################################
@@ -40,16 +40,25 @@ endif
 #
 #                   Modules to build 
 
-MODULES:=PDF PYTHIA PYTHIA6 GEANT321 MINICERN STEER HIJING\
+# COMMENTED OUT FOR TEST PURPOSES
+
+ALIROOTMODULES:= STEER \
         TGeant3 PHOS TRD TPC ZDC MUON PMD FMD TOF ITS \
          CASTOR RICH START STRUCT EVGEN RALICE ALIFAST \
-        THijing CONTAINERS MEVSIM TMEVSIM THbtp HBTP EMCAL
+        THijing CONTAINERS MEVSIM TMEVSIM THbtp HBTP EMCAL HBTAN
+
+#ALIROOTMODULES:= HBTP
+
+CERNMODULES:= PDF PYTHIA PYTHIA6 GEANT321 MINICERN HIJING
+
+
+MODULES:=$(ALIROOTMODULES) $(CERNMODULES)
+
 ##################################################################
 
 MODULES += ALIROOT 
 
 MODDIRS := MODULES
-                
 
 #############################################################
 # 
@@ -101,7 +110,7 @@ EXPORTFILES :=
 
 BINLIBDIRS := -L$(ALICE_ROOT)/$(LIBPATH)
 
-.PHONY:                alilibs aliroot makedistr 
+
 
 #Dependencies of module.mk files
 
@@ -112,7 +121,7 @@ include build/module.dep
 #        Check if module.mk is present for the library
 %.mk:
        @echo "***** Creating $@ file *****";
-       share/alibtool mkmodule  $(patsubst %/module.mk,%,$@) > $@;
+       @share/alibtool mkmodule  $(patsubst %/module.mk,%,$@) > $@;
 #############################################################
 
 # **************************************************************************
@@ -120,32 +129,54 @@ include build/module.dep
 #               If cleaning, do not include 
 #             dependencies or module.mk files.
 
-ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
+ifeq ($(findstring $(MAKECMDGOALS), clean clean-all clean-dicts clean-modules clean-depend clean-objects clean-libs clean-bins),)
+#ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
+
+#            If makeing modules, not not include
+#                       anything
+
+ifneq ($(findstring modules,$(MAKECMDGOALS)),modules)
 
 #############################################################
 # 
 #                Include the modules
-include $(patsubst %,%/module.mk,$(MODULES))
+-include $(patsubst %,%/module.mk,$(MODULES))
 #############################################################
 
 #############################################################
 #
 #          include dependencies if not making them!
-ifneq ($(MAKECMDGOALS),depend)
+ifneq ($(MAKECMDGOALS),depend )
+#           Don't include if cleaning of any sort
+ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
 include $(INCLUDEFILES)
 endif
+endif
 #############################################################
 
+endif
 endif
 # **************************************************************************
 
+#############################################################
+#
+#              include dummy dependency file
+#               *MUST* be last includefile
+include build/dummy.d
+#############################################################
+
 
 # targets
 
-aliroot: $(BINPATH) $(ALLEXECS) bin
+.PHONY:                alilibs aliroot makedistr clean
+
+modules: $(patsubst %,%/module.mk,$(MODULES))  
+
+aliroot: $(BINPATH) $(ALLEXECS) alilibs bin
 
+#haders: $(EXPORTFILES)
 
-alilibs: $(LIBPATH) $(ALLLIBS) lib
+alilibs: $(LIBPATH) $(ALLLIBS) lib modules
 
 # Single Makefile "distribution": Makefile + modules + mkdepend scripts
 makedistr: $(MODULES)   
@@ -179,8 +210,21 @@ $(LIBPATH):
        @echo "***** Making $@ *****"
        mkdir -p $@
 
-
-cleanall: clean-modules
+build/dummy.d: $(EXPORTFILES)
+       @(if [ ! -f $@ ] ; then \
+          touch $@; \
+       fi)
+
+clean:
+       @echo "***** No targen clean, use on of these *****"
+       @echo " clean-aliroot     : Clean up all aliroot libraries"
+       @echo " clean-MODULENAME  : Clean everything from module MODULENAME"
+       @echo " clean-all         : Cleans up everything, including cern libraires"
+       @echo " clean-modules     : Clean all module.mk file in all modules"
+       @echo " clean-libs        : Clean all libraries (not object files)"
+       @echo "********************************************"
+
+clean-all: clean-modules
        @echo "***** Cleaning up everything ****"
        rm -rf $(patsubst %,%/module.mk,$(MODULES)) 
        rm -rf $(patsubst %,%/tgt_$(ALICE_TARGET),$(MODULES))
@@ -188,9 +232,11 @@ cleanall: clean-modules
        rm -rf bin/tgt_$(ALICE_TARGET)
        rm -rf $(EXPORTDIR)
 
-clean: clean-modules  clean-objects clean-libs clean-bins clean-ditcs
+#This cleans only libraries that are not CERN-libraries
+
+clean-aliroot:   $(patsubst %,%/module.mk,$(ALIROOTMODULES)) $(patsubst %,clean-%,$(ALIROOTMODULES))
 
-clead-dicts:
+clean-dicts:
        @echo "***** Cleaning up G__ files *****"
        rm -rf */tgt_$(ALICE_TARGET)/G__*
 clean-modules: