Adding Geant4 configuration file
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Jun 2000 17:17:13 +0000 (17:17 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Jun 2000 17:17:13 +0000 (17:17 +0000)
conf/Geant4.gmk [new file with mode: 0644]
conf/GeneralDef
conf/GeneralMacros
conf/MachineDef.Linux

diff --git a/conf/Geant4.gmk b/conf/Geant4.gmk
new file mode 100644 (file)
index 0000000..0dbb905
--- /dev/null
@@ -0,0 +1,206 @@
+# $Id$
+################### Geant4 specific definitions ################################
+
+# include $(G4INSTALL)/config/architecture.gmk
+
+# Alice options flags
+ifdef AG4_VISUALIZE
+  CPPFLAGS  += -DALICE_VISUALIZE
+endif
+
+ifdef AG4_STACKING
+  CPPFLAGS  += -DALICE_STACKING
+endif
+
+ifdef AG4_NOPHYSICS
+  CPPFLAGS  += -DALICE_EMPTY_PHYSICS_LIST
+endif  
+
+#
+# C++ compilation flags
+#
+
+ifeq ($(ALICE_TARGET),Linux)
+
+# Redefinition of -Wall option 
+# in order to exclude warnings from G4 
+# excluded for Geant4: -Wswitch -Wunused
+
+  CXXOPTS := $(filter-out -Wall,$(CXXOPTS))
+  CXXOPTS += -Wimplicit-int -Wimplicit-function-declaration\
+            -Wimplicit -Wmain -Wreturn-type -Wcomment \
+            -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized \
+            -Wparentheses              
+endif
+#
+# Geant4 include paths
+#
+
+include $(G4INSTALL)/config/G4UI_USE.gmk
+include $(G4INSTALL)/config/G4VIS_USE.gmk
+include $(G4INSTALL)/config/interactivity.gmk
+ifndef INCFLAGS
+  INCFLAGS := \
+              -I$(G4BASE)/global/management/include \
+              -I$(G4BASE)/global/HEPRandom/include \
+              -I$(G4BASE)/global/HEPGeometry/include \
+              -I$(G4BASE)/global/HEPNumerics/include \
+              -I$(G4BASE)/run/include \
+              -I$(G4BASE)/materials/include \
+              -I$(G4BASE)/particles/management/include \
+              -I$(G4BASE)/particles/bosons/include \
+              -I$(G4BASE)/particles/leptons/include \
+              -I$(G4BASE)/particles/hadrons/barions/include \
+              -I$(G4BASE)/particles/hadrons/ions/include \
+              -I$(G4BASE)/particles/hadrons/mesons/include \
+              -I$(G4BASE)/particles/shortlived/include \
+              -I$(G4BASE)/processes/management/include \
+              -I$(G4BASE)/processes/general/include \
+              -I$(G4BASE)/processes/decay/include \
+              -I$(G4BASE)/processes/optical/include \
+              -I$(G4BASE)/processes/transportation/include \
+              -I$(G4BASE)/processes/parameterisation/include \
+              -I$(G4BASE)/processes/electromagnetic/standard/include \
+              -I$(G4BASE)/processes/electromagnetic/muons/include \
+              -I$(G4BASE)/processes/electromagnetic/utils/include \
+              -I$(G4BASE)/processes/electromagnetic/xrays/include \
+              -I$(G4BASE)/processes/electromagnetic/lowenergy/include \
+              -I$(G4BASE)/processes/hadronic/management/include \
+              -I$(G4BASE)/processes/hadronic/processes/include \
+              -I$(G4BASE)/processes/hadronic/util/include \
+              -I$(G4BASE)/processes/hadronic/cross_sections/include \
+              -I$(G4BASE)/processes/hadronic/models/generator/de_excitation/include \
+              -I$(G4BASE)/processes/hadronic/models/generator/diffractive_string/include \
+              -I$(G4BASE)/processes/hadronic/models/generator/high_energy/include \
+              -I$(G4BASE)/processes/hadronic/models/generator/kinetic_model/include \
+              -I$(G4BASE)/processes/hadronic/models/generator/management/include \
+              -I$(G4BASE)/processes/hadronic/models/generator/pre_equilibrium/include \
+              -I$(G4BASE)/processes/hadronic/models/generator/quark_gluon_string/include \
+              -I$(G4BASE)/processes/hadronic/models/generator/string_common/include \
+              -I$(G4BASE)/processes/hadronic/models/generator/string_fragmentation/include \
+              -I$(G4BASE)/processes/hadronic/models/generator/util/include \
+              -I$(G4BASE)/processes/hadronic/models/high_energy/include \
+              -I$(G4BASE)/processes/hadronic/models/low_energy/include \
+              -I$(G4BASE)/processes/hadronic/models/neutron_hp/include \
+              -I$(G4BASE)/processes/hadronic/models/isotope_production/include \
+              -I$(G4BASE)/processes/hadronic/stopping/include \
+              -I$(G4BASE)/geometry/management/include \
+              -I$(G4BASE)/geometry/solids/CSG/include \
+              -I$(G4BASE)/geometry/solids/specific/include \
+              -I$(G4BASE)/geometry/solids/BREPS/include \
+              -I$(G4BASE)/geometry/solids/Boolean/include \
+              -I$(G4BASE)/geometry/solids/STEP/include \
+              -I$(G4BASE)/geometry/solids/STEPinterface/include \
+              -I$(G4BASE)/geometry/volumes/include \
+              -I$(G4BASE)/geometry/magneticfield/include \
+              -I$(G4BASE)/track/include \
+              -I$(G4BASE)/tracking/include \
+              -I$(G4BASE)/digits+hits/detector/include \
+              -I$(G4BASE)/digits+hits/hits/include \
+              -I$(G4BASE)/digits+hits/digits/include \
+              -I$(G4BASE)/readout/include \
+              -I$(G4BASE)/event/include \
+              -I$(G4BASE)/graphics_reps/include \
+              -I$(G4BASE)/intercoms/include \
+              -I$(G4BASE)/g3tog4/include
+
+endif
+CPPFLAGS += $(INCFLAGS)
+
+#
+# Geant4 libraries
+#
+
+ifdef NEED_G4_LIBS
+
+G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(G4TARGET)
+G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
+LDFLAGS += -L$(G4LIBDIR)
+
+ifdef LDLIBS
+  USER_DEFINED_LDLIBS := 1
+endif
+
+# Because of the script for granular libraries which replaces part of LDLIBS
+# and because of the way user defined LDLIBS was augmented historically I
+# have split LDLIBS into 4 parts...
+#
+
+ifndef USER_DEFINED_LDLIBS
+
+# LDLIBS1 contains the very high level libraries...
+#
+ifdef G4EXLIB
+  LDLIBS1 := -l$(G4TARGET)
+endif
+  LDLIBS1 += $(EXTRALIBS)
+  LDLIBS1 += $(VISLIBS) $(UILIBS)
+
+# test if global libraries are present
+GLOBALLIBS := $(shell test -f $(G4LIBDIR)/libG4global.$(SL) && echo yes)
+
+ifdef GLOBALLIBS
+  LDLIBS2 := \
+       -lG4readout \
+       -lG4run \
+       -lG4event \
+       -lG4tracking \
+       -lG4processes \
+       -lG4particles \
+       -lG4digits+hits \
+       -lG4track \
+       -lG4materials \
+       -lG4geometry \
+       -lG4geometry \
+       -lG4graphics_reps \
+       -lG4intercoms \
+       -lG4global 
+else
+  DUMMY := $(shell \
+        if [ ! \( -f $(G4INSTALL)/lib/$(G4SYSTEM)/list \) ]; then \
+       $(G4INSTALL)/lib/$(G4SYSTEM)/liblist  \
+       -d $(G4INSTALL)/tmp/$(G4SYSTEM) \
+       < $(G4INSTALL)/lib/$(G4SYSTEM)/libname.map \
+       > $(G4INSTALL)/lib/$(G4SYSTEM)/list; fi )
+# Extra libraries to resolve remaining circular dependencies...    
+  LDLIBS2 := $(shell cat $(G4INSTALL)/lib/$(G4SYSTEM)/list)    
+  LDLIBS2 += -lG4xrays -lG4optical -lG4muons
+endif  
+
+# Warning: do not add to LDLIBS2 with += becuase this causes it to be
+# expanded too soon.  Hence extra libraries must have a different name...
+# Extra libraries to resolve remaining circular dependencies...
+#  LDLIBS2EXTRA = 
+
+# LDLIBS3 contains the first set of low level libraries...
+#
+  LDLIBS3 += $(INTYLIBS)
+
+endif # ifndef USER_DEFINED_LDLIBS
+
+# LDLIBS4 contains the next set of low level libraries which historically
+# (why?) the user is not supposed to be able to define...
+#
+ifdef G4USE_OSPACE
+  LDLIBS4 += $(OSPACELIBS)
+endif
+
+  LDLIBS4 += $(LOADLIBS)
+
+# Finally assemble libraries...
+#
+ifdef USER_DEFINED_LDLIBS
+  LDLIBS_PREFINAL := $(LDLIBS)
+else
+  LDLIBS_PREFINAL = $(LDLIBS1) $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
+endif
+  LDLIBS_PREFINAL += $(LDLIBS4)
+
+LDLIBS = $(LDLIBS_PREFINAL)
+
+G4LDLIBS = $(LDLIBS) -lG3toG4
+
+endif #ifdef NEED_G4_LIBS
+
index d71a491..0210741 100644 (file)
@@ -63,6 +63,7 @@ MAKEDEPEND    = $(ROOTSYS)/bin/rmkdepend
 # Root libraries
  
 ROOTLIBS      = $(shell $(ROOTSYS)/bin/root-config --glibs) -lMinuit -lHtml
+ROOTLIBS      := $(filter-out -lNew,$(ROOTLIBS))
 
 # Alice libraries
 
index 31841a9..81ae4da 100644 (file)
@@ -32,7 +32,7 @@ headers:      $(patsubst %,$(ALICE_ROOT)/include/%,$(HEADERS))
 
 $(DICT):
                @echo "Generating $@"
-               @rootcint -f $@ -c -I$(ALICE_ROOT)/include $^
+               @rootcint -f $@ -c $(filter -I%,$(CXXFLAGS)) $^
  
 depend:
                @$(MAKEDEPEND) -ftgt_$(ALICE_TARGET)/Make-depend -ptgt_$(ALICE_TARGET)/ -- $(CXXFLAGS) $(DEPINC) -- $^
index cadbc50..08f432a 100644 (file)
@@ -10,6 +10,7 @@ CC          = echo $*.c ; gcc
 
 # Global optimisation
 OPT           = -O2
+OPT           = -g
 
 # Shared library suffix
 SL           = so