Import Geant4 8.2.0 source tree
This commit is contained in:
+65
-63
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.79 2006/06/07 10:18:10 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.86 2006/12/14 10:39:45 gcosmo Exp $
|
||||
# -----------------------------------------------------------------
|
||||
# "gmake" makes default libraries for each subdomain.
|
||||
# "gmake global" makes global libraries for each subdomain.
|
||||
@@ -13,34 +13,55 @@
|
||||
#
|
||||
# (The .o files(s) are made by implicit rules.)
|
||||
|
||||
SUBDIR1 = global intercoms graphics_reps materials
|
||||
SUBDIR2 = geometry particles track digits_hits processes
|
||||
SUBDIR2 += parameterisations tracking event run readout
|
||||
SUBDIR3 = persistency interfaces visualization
|
||||
SUBDIR4 = g3tog4
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ..
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
SUBDIR1 = global intercoms graphics_reps materials
|
||||
SUBDIR2 = geometry particles track digits_hits processes
|
||||
SUBDIR2 += parameterisations tracking event run readout
|
||||
SUBDIR3 = persistency interfaces visualization
|
||||
ifeq ($(G4LIB_BUILD_LISTS),1)
|
||||
SUBDIR3 += physics_lists
|
||||
endif
|
||||
|
||||
SUBDIR4 = g3tog4
|
||||
|
||||
G4BINDIR := $(G4BIN)/$(G4SYSTEM)
|
||||
G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
|
||||
G4TMPDIR := $(G4TMP)/$(G4SYSTEM)
|
||||
unique := $(shell echo $$$$)
|
||||
|
||||
.PHONY: all glob global kernel_global kernel libmap dll win32def includes clean_libs clean clean_lists clean_all
|
||||
.PHONY: all glob global kernel_global kernel liblist libmap dll win32def includes clean_libs clean clean_lists clean_all
|
||||
|
||||
all: banner kernel
|
||||
ifdef G4LIB_USE_G3TOG4
|
||||
@for dir in $(SUBDIR4); do (cd $$dir && $(MAKE)); done;:
|
||||
endif
|
||||
@$(MAKE) libmap
|
||||
@$(ECHO) "Libraries installation completed !"
|
||||
|
||||
glob global: banner kernel_global
|
||||
ifdef G4LIB_USE_G3TOG4
|
||||
@for dir in $(SUBDIR4); do (cd $$dir && $(MAKE)); done;:
|
||||
endif
|
||||
@$(MAKE) liblist
|
||||
@$(ECHO) "Libraries installation completed !"
|
||||
|
||||
fpe_debug: banner kernel
|
||||
@$(ECHO) Activating FPE debug build ...
|
||||
ifneq (,$(findstring Linux-g++,$(G4SYSTEM)))
|
||||
@rm -f $(G4TMPDIR)/G4run/G4RunManagerKernel.*
|
||||
@cd $(G4INSTALL)/source/run; $(MAKE) G4FPE_DEBUG=1;
|
||||
@cd $(G4INSTALL)/source; $(MAKE) libmap;
|
||||
@$(ECHO) "Libraries installation completed !"
|
||||
else
|
||||
@$(ECHO) "Build of FPE check is only supported on Linux platforms with gcc !"
|
||||
@$(ECHO) "The system you have currently selected is $(G4SYSTEM)."
|
||||
@$(ECHO) "No actions taken !"
|
||||
endif
|
||||
|
||||
kernel_global:
|
||||
@for dir in $(SUBDIR1); do (cd $$dir && $(MAKE) global); done;:
|
||||
@@ -52,30 +73,29 @@ kernel:
|
||||
@for dir in $(SUBDIR2); do (cd $$dir && $(MAKE)); done;:
|
||||
@for dir in $(SUBDIR3); do (cd $$dir && $(MAKE)); done;:
|
||||
|
||||
libmap: $(G4LIBDIR)/liblist
|
||||
@echo "libmap stage:"
|
||||
@echo "Searching for GNUmakefiles and sorting ..."
|
||||
libmap: liblist
|
||||
@$(ECHO) "Libmap stage. Searching for GNUmakefiles and sorting ..."
|
||||
@find . \
|
||||
-name GNUmakefile -exec $(GREP) -l '^ *name *:=' {} \; \
|
||||
| sort \
|
||||
> /tmp/G4_all_lib_makefiles.$(unique);
|
||||
@echo "Weeding out paths and files ..."
|
||||
@for i in `cat /tmp/G4_all_lib_makefiles.$(unique)`; \
|
||||
@$(ECHO) "Weeding out paths and files ..."
|
||||
@for i in `$(CAT) /tmp/G4_all_lib_makefiles.$(unique)`; \
|
||||
do \
|
||||
echo $$i | $(GREP) -q -e '/tests\?/' -e 'models/verification' || \
|
||||
$(ECHO) $$i | $(GREP) -q -e '/tests\?/' -e 'models/verification' || \
|
||||
$(GREP) -q -e SUBDIR -e G4hepgeometry $$i || \
|
||||
echo $$i >> /tmp/G4_granlib_makefiles.$(unique); \
|
||||
$(ECHO) $$i >> /tmp/G4_granlib_makefiles.$(unique); \
|
||||
done
|
||||
@echo "Making libname.map starter file ..."
|
||||
@$(ECHO) "Making libname.map starter file ..."
|
||||
@touch /tmp/G4libname.map.starter.$(unique);
|
||||
@for i in `cat /tmp/G4_granlib_makefiles.$(unique)`; \
|
||||
@for i in `$(CAT) /tmp/G4_granlib_makefiles.$(unique)`; \
|
||||
do \
|
||||
$(GREP) '^ *name *:=' $$i | cut -d \ -f 3 \
|
||||
$(GREP) '^ *name *:=' $$i | $(CUT) -d \ -f 3 \
|
||||
>> /tmp/G4libname.map.starter.$(unique); \
|
||||
echo $$i | sed "s/^\\./source/" \
|
||||
$(ECHO) $$i | $(SED) "s/^\\./source/" \
|
||||
>> /tmp/G4libname.map.starter.$(unique); \
|
||||
done
|
||||
@echo "Making libname.map ..."
|
||||
@$(ECHO) "Making libname.map ..."
|
||||
@rm -f $(G4LIBDIR)/libname.map;
|
||||
@G4TMP=$(G4TMP); export G4TMP; \
|
||||
$(G4LIBDIR)/liblist -l -d $(G4TMPDIR) \
|
||||
@@ -85,41 +105,44 @@ libmap: $(G4LIBDIR)/liblist
|
||||
@rm -f /tmp/G4_granlib_makefiles.$(unique);
|
||||
@rm -f /tmp/G4libname.map.starter.$(unique);
|
||||
|
||||
liblist: $(G4LIBDIR)/liblist
|
||||
|
||||
$(G4LIBDIR)/liblist: $(G4INSTALL)/config/liblist.c
|
||||
@echo "Building library management utility liblist ..."
|
||||
@$(ECHO) "Building library management utility liblist ..."
|
||||
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
|
||||
@$(CC) $(CCFLAGS) -o $(G4LIBDIR)/liblist $(G4INSTALL)/config/liblist.c
|
||||
|
||||
dll: banner win32def
|
||||
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
@echo "Verifying existence of global libraries for DLLs ..."
|
||||
@$(ECHO) "Verifying existence of global libraries for DLLs ..."
|
||||
@$(MAKE) kernel_global G4LIB_BUILD_DLL=1
|
||||
@echo "Building Windows DLL libraries ..."
|
||||
@$(ECHO) "Building Windows DLL libraries ..."
|
||||
@$(MAKE) kernel_global G4LIB_BUILD_DLL=1 G4LIB_BUILD_SHARED=1
|
||||
@echo "Clearing temporary DLL objects and temporaries ..."
|
||||
@$(ECHO) "Clearing temporary DLL objects and temporaries ..."
|
||||
@rm -rf $(G4LIBDIR)/*.def $(G4LIBDIR)/*.exp
|
||||
@rm -rf $(G4TMPDIR)/*
|
||||
ifdef G4LIB_USE_G3TOG4
|
||||
@for dir in $(SUBDIR4); do (cd $$dir && $(MAKE)); done;:
|
||||
@mv $(G4LIBDIR)/libG3toG4.a $(G4LIBDIR)/libG3toG4.lib
|
||||
endif
|
||||
@echo "Done !"
|
||||
@$(ECHO) "Done !"
|
||||
else
|
||||
@echo "Sorry !"
|
||||
@$(ECHO) "Sorry !"
|
||||
endif
|
||||
|
||||
win32def: $(G4INSTALL)/config/win32def.c
|
||||
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
@echo "Building DLL management utility win32def ..."
|
||||
@$(ECHO) "Building DLL management utility win32def ..."
|
||||
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
|
||||
@$(CC) $(CCFLAGS) -o $(G4LIBDIR)/win32def $(G4INSTALL)/config/win32def.c
|
||||
else
|
||||
@echo "Build of DLLs is only supported on Windows platforms !"
|
||||
@echo "The system you have currently selected is $(G4SYSTEM)."
|
||||
@$(ECHO) "Build of DLLs is only supported on Windows platforms !"
|
||||
@$(ECHO) "The system you have currently selected is $(G4SYSTEM)."
|
||||
@$(ECHO) "No actions taken !"
|
||||
endif
|
||||
|
||||
includes:
|
||||
@echo Installing header files in $(G4INCLUDE) ...
|
||||
@$(ECHO) Installing header files in $(G4INCLUDE) ...
|
||||
@for dir in $(SUBDIR1); do (cd $$dir && $(MAKE) $@); done
|
||||
@for dir in $(SUBDIR2); do (cd $$dir && $(MAKE) $@); done
|
||||
@for dir in $(SUBDIR3); do (cd $$dir && $(MAKE) $@); done
|
||||
@@ -128,13 +151,13 @@ ifdef G4LIB_USE_G3TOG4
|
||||
endif
|
||||
|
||||
banner:
|
||||
@echo "*************************************************************"
|
||||
@echo " Installation Geant4 version $$Name: geant4-08-01 $ "
|
||||
@echo " Copyright (C) 1994-2006 Geant4 Collaboration "
|
||||
@echo "*************************************************************"
|
||||
@$(ECHO) "*************************************************************"
|
||||
@$(ECHO) " Installation Geant4 version $$Name: geant4-08-02 $ "
|
||||
@$(ECHO) " Copyright (C) 1994-2007 Geant4 Collaboration "
|
||||
@$(ECHO) "*************************************************************"
|
||||
|
||||
clean_libs::
|
||||
@echo Removing all libraries ...
|
||||
@$(ECHO) Removing all libraries ...
|
||||
@for dir in $(SUBDIR1); do (cd $$dir && $(MAKE) clean_libs); done
|
||||
@for dir in $(SUBDIR2); do (cd $$dir && $(MAKE) clean_libs); done
|
||||
@for dir in $(SUBDIR3); do (cd $$dir && $(MAKE) clean_libs); done
|
||||
@@ -144,48 +167,27 @@ endif
|
||||
@rm -rf $(G4LIBDIR)/libname.map
|
||||
|
||||
clean::
|
||||
@echo Removing current $(G4SYSTEM) installation ...
|
||||
@$(ECHO) Removing current $(G4SYSTEM) installation ...
|
||||
@rm -rf $(G4TMPDIR)
|
||||
@rm -rf $(G4LIBDIR)
|
||||
@rm -rf $(G4BINDIR)
|
||||
@rm -rf $(G4INSTALL)/.config/bin/$(G4SYSTEM)
|
||||
@echo Removing physics-lists installation ...
|
||||
ifndef G4LISTS_BASE
|
||||
@rm -rf $(G4LIB)/plists/$(G4SYSTEM)
|
||||
@rm -rf $(G4TMP)/plists/$(G4SYSTEM)
|
||||
else
|
||||
@rm -rf $(G4LISTS_BASE)/hadronic/plists/lib/$(G4SYSTEM)
|
||||
@rm -rf $(G4LISTS_BASE)/hadronic/plists/tmp/$(G4SYSTEM)
|
||||
endif
|
||||
ifdef CFRONT
|
||||
@rm -rf $(G4TREP)
|
||||
endif
|
||||
|
||||
clean_lists::
|
||||
@echo Removing physics-lists installation ...
|
||||
ifndef G4LISTS_BASE
|
||||
@rm -rf $(G4LIB)/plists/$(G4SYSTEM)
|
||||
@rm -rf $(G4TMP)/plists/$(G4SYSTEM)
|
||||
else
|
||||
@rm -rf $(G4LISTS_BASE)/hadronic/plists/lib/$(G4SYSTEM)
|
||||
@rm -rf $(G4LISTS_BASE)/hadronic/plists/tmp/$(G4SYSTEM)
|
||||
endif
|
||||
|
||||
# Pay _extremely_ attention before executing the following target !!
|
||||
#
|
||||
clean_all::
|
||||
@echo Removing all installations ...
|
||||
@echo Removing $(G4TMP) ...
|
||||
@$(ECHO) Removing all installations ...
|
||||
@$(ECHO) Removing $(G4TMP) ...
|
||||
@rm -rf $(G4TMP)
|
||||
@echo Removing $(G4LIB) ...
|
||||
@$(ECHO) Removing $(G4LIB) ...
|
||||
@rm -rf $(G4LIB)
|
||||
@echo Removing $(G4BIN) ...
|
||||
@$(ECHO) Removing $(G4BIN) ...
|
||||
@rm -rf $(G4BIN)
|
||||
@echo Removing $(G4INCLUDE) ...
|
||||
@$(ECHO) Removing $(G4INCLUDE) ...
|
||||
@rm -rf $(G4INCLUDE)
|
||||
ifdef G4LISTS_BASE
|
||||
@echo Removing physics-lists installation ...
|
||||
@rm -rf $(G4LISTS_BASE)/hadronic/plists
|
||||
endif
|
||||
@echo Removing installation configurations ...
|
||||
@$(ECHO) Removing installation configurations ...
|
||||
@rm -rf $(G4INSTALL)/.config
|
||||
|
||||
Reference in New Issue
Block a user