--- /dev/null
+# $ Id: architecture.gmk,v 1.70 2000/12/08 09:41:26 gcosmo Exp $
+# ------------------------------------------------------------------------
+# GEANT 4 - Architecture configuration script for GNU Make
+#
+# First implementation: July 7th 1995
+#
+# Description
+# -----------
+# to override variables defined in this script, use "gmake -e", this will
+# cause environment variables to take precedence. In this case watch for
+# inadvertant overrides!
+#
+# List of the supported architectures/compilers and related flavors for
+# the environment variable G4SYSTEM:
+#
+# SUN-CC SunOS 5.6, CC 4.2 compiler (default)
+#
+# HP-aCC HP-UX 10.20, aCC A.01.23 compiler
+#
+# DEC-cxx DEC-OSF/1 4.0, DEC C++ 6.1
+#
+# Linux-g++ Linux (Red Hat 6.1), egcs 1.1.2
+#
+# WIN32-VC Windows/NT and Microsoft Visual C++ 6.0
+# Adding CYGWIN32 tools (make, g++ as "makedepend", sh...)
+# Note: you will need to set your environment, see the
+# installation guide.
+# -------------------------------------------------------------------------
+
+# FLUGG has adopted Geant4 makefiles:
+#
+# G4INSTALL - Geant4 installation
+# FLUGGINSTALL - Flugg installation
+#
+# But:
+# !!! G4XXX - correspond to Flugg installation !!!
+# !!! G4XXX_G4 - correspond to Geant4 installation !!!
+#
+
+# Definition of HEP_ODBMS_LIBS, OBJY_LIBS and OSPACE_LIBS by HepODBMS.
+# Note: If G4ODBMS is defined, it calls for HEP_ODBMS setup files in
+# $(HEP_ODBMS_DIR)/etc/.
+#
+ifdef G4ODBMS
+ # variables LHCXXTOP and PLATF are used in HepODBMS setup
+ include $(HEP_ODBMS_DIR)/etc/$(OS).mk
+ G4ODBMS_LIBS := $(HEP_ODBMS_LIBS) $(OBJY_LIBS) $(OSPACE_LIBS)
+endif
+
+MAKEFLAGS= --no-print-directory
+
+# If not specified, the default platform for G4SYSTEM is SUN-CC ...
+#
+ifndef G4SYSTEM
+ G4SYSTEM := SUN-CC
+endif
+ifeq ($(G4SYSTEM),WIN32-VC-NICE)
+ G4SYSTEM := WIN32-VC
+endif
+
+# If not specified, the default path for Flugg installation FLUGGINSTALL is
+# set to $HOME/flugg ...
+#
+ifndef FLUGGINSTALL
+ FLUGGINSTALL := $(HOME)/flugg
+endif
+
+# If not specified, the default path for G4 installation G4INSTALL is
+# set to $HOME/geant4 ...
+#
+ifndef G4INSTALL
+ G4INSTALL := $(HOME)/geant4
+endif
+
+# If not specified, the default path for Flugg source G4BASE is
+# set to $FLUGGINSTALL/source ...
+#
+ifndef G4BASE
+ G4BASE := $(FLUGGINSTALL)/source
+endif
+
+# If not specified, the default path for G4 source G4BASE is
+# set to $G4INSTALL/source ...
+#
+ifndef G4BASE_G4
+ G4BASE_G4 := $(G4INSTALL)/source
+endif
+
+# If not specified, the default path for the user's workdir is the same
+# as FLUGGINSTALL ...
+#
+ifndef G4WORKDIR
+ G4WORKDIR := $(FLUGGINSTALL)
+endif
+
+# If not specified, the default path for temporary files G4TMP is
+# set to $G4WORKDIR/tmp/$G4SYSTEM ...
+#
+ifndef G4TMP
+ G4TMP := $(G4WORKDIR)/tmp
+endif
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4TMP) ] && mkdir -p $(G4TMP) )
+
+# If not specified, the default path for FLUGG libraries G4LIB is
+# set to $FLUGGINSTALL/lib/$G4SYSTEM ...
+#
+ifndef G4LIB
+ G4LIB := $(FLUGGINSTALL)/lib
+endif
+
+# If not specified, the default path for G4 libraries G4LIB_G4 is
+# set to $G4INSTALL/lib/$G4SYSTEM ...
+#
+ifndef G4LIB_G4
+ G4LIB_G4 := $(G4INSTALL)/lib
+endif
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4LIB) ] && mkdir -p $(G4LIB) )
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4LIB)/$(G4SYSTEM) ] && mkdir -p $(G4LIB)/$(G4SYSTEM) )
+
+# If not specified, the default path to install G4 include files is G4INCLUDE
+# set to $FLUGGINSTALL/include ...
+#
+ifndef G4INCLUDE
+ G4INCLUDE := $(FLUGGINSTALL)/include
+endif
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4INCLUDE) ] && mkdir -p $(G4INCLUDE) )
+
+# backwards compatiblity
+ifneq ($(G4MAKESHLIB),)
+ G4LIB_BUILD_SHARED = 1
+endif
+
+# defaults for library BUILD. No default for USE, ie. take what is found.
+ifeq ($(G4LIB_BUILD_SHARED),)
+ ifeq ($(G4LIB_BUILD_STATIC),)
+# default is building static libs
+ G4LIB_BUILD_STATIC = 1
+ endif
+endif
+
+
+# If not specified, the default path for G4 binaries G4BIN is
+# set to $G4WORKDIR/bin/$G4SYSTEM ...
+#
+ifndef G4BIN
+ G4BIN := $(G4WORKDIR)/bin
+endif
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4BIN) ] && mkdir -p $(G4BIN) )
+
+#################### schema directories & setup for G4ODBMS ###################
+#
+ifdef G4ODBMS
+# If not specified, the default path for G4 schema G4SCHEMA_DIR is
+# set to $G4LIB/$G4SYSTEM/schema ...
+#
+ifndef G4SCHEMA_DIR
+ G4SCHEMA_DIR := $(G4LIB)/$(G4SYSTEM)/schema
+ G4SCHEMA_INCLUDE := $(G4SCHEMA_DIR)/include
+endif
+ifndef G4SCHEMA_FDID
+ G4SCHEMA_FDID := 207
+endif
+
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4SCHEMA_DIR) ] && mkdir -p $(G4SCHEMA_DIR) )
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4SCHEMA_INCLUDE) ] && mkdir -p $(G4SCHEMA_INCLUDE) )
+
+# If not specified, the default path for G4 temporary schema G4TMPSCHEMA_DIR is
+# set to $G4TMP/$G4SYSTEM/schema (for building persistency library)...
+#
+ifndef G4TMPSCHEMA_DIR
+ G4TMPSCHEMA_DIR := $(G4TMP)/$(G4SYSTEM)/schema
+ G4TMPSCHEMA_BOOT := $(G4TMPSCHEMA_DIR)/G4SCHEMA
+endif
+
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4TMPSCHEMA_DIR) ] && mkdir -p $(G4TMPSCHEMA_DIR) )
+
+# If not specified, the default path for G4 example schema G4EXAMPLE_BOOT_DIR is
+# set to $G4WORKDIR/exampleSchema (for persistency examples)...
+#
+ifndef G4EXAMPLE_BOOT_DIR
+ G4EXAMPLE_BOOT_DIR := $(G4WORKDIR)/exampleSchema/$(G4SYSTEM)
+endif
+
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4EXAMPLE_BOOT_DIR) ] && mkdir -p $(G4EXAMPLE_BOOT_DIR) )
+
+ifndef G4EXAMPLE_BOOT
+ G4EXAMPLE_BOOT = $(G4EXAMPLE_BOOT_DIR)/$(name)
+endif
+
+# If not specified, the default path for G4 example runtime federated
+# database directory G4EXAMPLE_FD_DIR is set to $G4WORKDIR/exampleFD
+# (for persistency examples)...
+#
+ifndef G4EXAMPLE_FD_DIR
+ G4EXAMPLE_FD_DIR := $(G4WORKDIR)/exampleFD/$(G4SYSTEM)
+endif
+
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4EXAMPLE_FD_DIR) ] && mkdir -p $(G4EXAMPLE_FD_DIR) )
+G4OODDLX_FLAGS := -DTEMPLATEP_HIDES_FNCD
+
+ifndef G4EXAMPLE_FD
+ G4EXAMPLE_FD = $(G4EXAMPLE_FD_DIR)/$(name)
+endif
+
+endif
+#
+########################### end setup for G4ODBMS #############################
+
+# If G4DEBUG or G4NO_OPTIMISE are not specified,
+# the default compilation is optimised ...
+#
+ifdef G4DEBUG
+ CPPFLAGS += -DG4DEBUG
+ G4DEBUG := 1
+else
+ ifndef G4NO_OPTIMISE
+ CPPFLAGS += -DG4OPTIMISE
+ G4OPTIMISE := 1
+ endif
+endif
+
+ifdef G4GEOMETRY_DEBUG
+ CPPFLAGS += -DG4GEOMETRY_DEBUG
+endif
+
+# CLHEP path, etc.
+#
+ifndef CLHEP_BASE_DIR
+ CLHEP_BASE_DIR := /afs/cern.ch/sw/geant4/dev/CLHEP/$(G4SYSTEM)/pro
+endif
+ifndef CLHEP_INCLUDE_DIR
+ CLHEP_INCLUDE_DIR := $(CLHEP_BASE_DIR)/include
+endif
+ifndef CLHEP_LIB_DIR
+ CLHEP_LIB_DIR := $(CLHEP_BASE_DIR)/lib
+endif
+ifndef CLHEP_LIB
+ ifeq ($(G4SYSTEM),WIN32-VC)
+ CLHEP_LIB := CLHEP.lib
+ else
+ CLHEP_LIB := CLHEP
+ endif
+endif
+
+# Native STL is the default
+#
+CPPFLAGS += -DG4USE_STL
+G4STLINC := $(G4BASE)/global/STLInterface
+
+# Path to ObjectSpace STL (or STLport <- only test for Win/NT)
+#
+ifdef G4USE_OSPACE
+
+ # ObjectSpace STL implementation
+ #
+ ifndef OSPACE_BASE_DIR
+ OSPACE_BASE_DIR := /afs/cern.ch/sw/geant4/dev/ObjectSpace/$(G4SYSTEM)/pro/ToolKit
+ endif
+ OSPACEINC := -I$(OSPACE_BASE_DIR)/ospace/std -I$(OSPACE_BASE_DIR)/ospace/stl
+ OSPACELIBS := -L$(OSPACE_BASE_DIR)/lib -lospace
+
+ ifeq ($(G4SYSTEM),WIN32-VC)
+ OSPACE_BASE_DIR := $(OBJECT_SPACE_BASE)
+ OSPACEINC := -I$(OSPACE_BASE_DIR)/ospace/std -I$(OSPACE_BASE_DIR)/ospace/stl -I$(OSPACE_BASE_DIR)
+ OSPACELIBS := '-libpath':$(OSPACE_BASE_DIR)/lib std-2.1-vc5.0-mt.lib
+ CPPFLAGS += -DG4USE_OLDSTL
+ CPPFLAGS += -DOS_WIN_NT_4_0 -DOS_MULTI_THREADED -D_WIN32_WINNT $(OSPACEINC)
+ endif
+
+else
+ifdef G4USE_STLPORT
+
+ # STLport STL implementation
+ # (derived from SGI implementation) - TEST on WIN32
+ #
+ ifeq ($(G4SYSTEM),WIN32-VC)
+ STLPORT_BASE_DIR := $(STLPORT_BASE)
+ OSPACEINC := -I$(STLPORT_BASE_DIR)/stl
+ CPPFLAGS += -DG4USE_OLDSTL
+ CPPFLAGS += -D_NOTHREADS -D__STL_NO_NEW_IOSTREAMS -D__STL_NO_NAMESPACES
+ CPPFLAGS += -D__STL_NO_NEW_STYLE_HEADERS
+ endif
+
+endif #STLport
+endif #OPSPACE
+
+# Paths for G4 data
+#
+ifndef G4DATA
+ G4DATA := $(FLUGGINSTALL)/data
+endif
+
+# Photon evaporation data
+#
+ifndef G4LEVELGAMMADATA
+ G4LEVELGAMMADATA := $(G4DATA)/PhotonEvaporation
+endif
+
+# Toggle variables (positional qualifiers) between WIN32-VC and UNIX...
+#
+ifeq ($(G4SYSTEM),WIN32-VC)
+ OUT_OBJ := -TP '-Fo'
+ FOR_OBJ := '-Fo'
+ OUT_LIB := '-out:'
+ OUT_EXE := '-Fe'
+ LIB_PATH := '-libpath:'
+ CERNLIB_PATH := "z:\p32\cern\new\df\lib"
+ PATH_DEL := \\
+ #
+ # pattern for next substitution
+ #
+ LIB_PATT := lib(LibName).a
+ FLIB_PATT := (LibName).lib
+else
+ OUT_OBJ := -o
+ FOR_OBJ := -o
+ OUT_LIB :=
+ OUT_EXE := -o
+ LIB_PATH := -L
+ CERNLIB_PATH := /cern/pro/lib
+ PATH_DEL := /
+ #
+ # pattern for next substitution
+ #
+ LIB_PATT := -l(LibName)
+ FLIB_PATT := $(LIB_PATT)
+endif
+
+# Variables for implicit rules, etc., as suggested in GNU Make manual...
+#
+CPPFLAGS += -Iinclude -I$(G4STLINC)
+CPPFLAGS += -I$(CLHEP_INCLUDE_DIR)
+
+# Positional qualifiers in action...
+#
+ifeq ($(G4SYSTEM),WIN32-VC)
+ LDFLAGS := -link $(LIB_PATH)$(CLHEP_LIB_DIR)
+ LOADLIBS := $(CLHEP_LIB)
+else
+ LDFLAGS := -L$(CLHEP_LIB_DIR)
+# LDFLAGS :=
+ LOADLIBS := -l$(CLHEP_LIB)
+# LOADLIBS := $(CLHEP_LIB_DIR)/lib$(CLHEP_LIB).a
+ LOADLIBS += -lm
+endif
+
+# Graphic variables...
+#
+ifndef VISLIBS
+ VISLIBS :=
+endif
+# ------------------ X11 ---------------------
+X11FLAGS :=
+X11LIBS := -lXmu -lXt -lXext -lX11
+# ----------------- Motif --------------------
+XMFLAGS :=
+XMLIBS := -lXm
+# ---------------- Athena --------------------
+XAWFLAGS :=
+XAWLIBS := -lXaw
+# ---------------- OpenGL --------------------
+# The user can define his own values of OGLFLAGS and OGLLIBS.
+# OGLFLAGS gives the directory containing include files.
+# E.g.: OGLFLAGS := -I$(OGLHOME)/include
+# OGLLIBS gives the libraries.
+# E.g.: OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
+# Or : OGLLIBS := -L$(OGLHOME)/lib -lMesaGLU -lMesaGL
+# OGLHOME is often /usr or /usr/local. Or it can point to a special
+# installation.
+# If the user does not set his/her own values, system-dependent values
+# are set below. Most system-dependent code assumes OGLHOME is set.
+# ------------- OpenInventor -----------------
+ifndef HEPVISINC
+ HEPVISINC := $(HEPVISDIR)/include
+endif
+ifndef HEPVISLIB
+ HEPVISLIB := $(HEPVISDIR)/source
+endif
+ifndef OIVFLAGS
+ OIVFLAGS := -I${HEPVISINC}
+endif
+ifndef OIVLIBS
+ OIVLIBS := -L${HEPVISLIB} -lHEPVis -lInventorXt -lInventor -lGLU -lGL
+endif
+# ----------------- OPACS --------------------
+# lesstiff is bugged for popups ; then OPACS/Xo uses
+# the Xaw widgets for handling popups. The OPACS distrib
+# for Linux assumes that lesstif is used by default. To be
+# coherent we set in Geant4 the default toolkit to lesstif
+# on Linux in order to link with -lXaw, etc...
+ifndef G4_OPACS_WIDGET_SET
+ ifeq ($(G4SYSTEM),Linux-g++)
+ G4_OPACS_WIDGET_SET := lesstif
+ else
+ G4_OPACS_WIDGET_SET := Xm
+ endif
+endif
+
+# For cfront compilers the repository location is set to
+# $G4TMP/$G4SYSTEM/g4.ptrepository.
+#
+G4TEMPLATE_REPOSITORY := $(G4SYSTEM)/g4.ptrepository
+G4TEMPEXEC_REPOSITORY := $(G4TEMPLATE_REPOSITORY)/exec
+G4TREP := $(G4TMP)/$(G4TEMPLATE_REPOSITORY)
+
+# Default archive call. Changed for: SUN-CC.
+#
+AR := ar r
+
+# Default echo used with makedepend. Changed for SUN-CC, Linux-g++.
+#
+ECHO:= echo
+
+# Default grep used with source/GNUmakfile. Changed for SUN-CC.
+#
+GREP := grep
+
+# Include architecture dependent setups...
+#
+include $(FLUGGINSTALL)/config/sys/$(G4SYSTEM).gmk
+
+# If compiler recognises implicit C++ type bool...
+#
+ifdef G4_HAVE_BOOL
+ CPPFLAGS += -DG4_HAVE_BOOL
+endif
+
+# If there is no cbrt() function...
+#
+ifdef G4_NO_CBRT
+ CPPFLAGS += -DG4_NO_CBRT
+endif
+
+# Verbosity code can be left out (for better performance)
+# by defining G4_NO_VERBOSE.
+#
+ifndef G4_NO_VERBOSE
+ CPPFLAGS += -DG4VERBOSE
+endif
+
+# Trajectory related classes can be left out (for better performance)
+# by defining G4_NO_STORE_TRAJECTORY.
+#
+ifndef G4_NO_STORE_TRAJECTORY
+ CPPFLAGS += -DG4_STORE_TRAJECTORY
+endif
+
+# Template setup - repositories, special options etc
+#
+ifdef CFRONT_G4TEMPLATE_REPOSITORY
+ ifeq ($(findstring DEC,$(G4SYSTEM)),DEC)
+ ifdef G4EXEC_BUILD
+ CXXTEMPLATE_FLAGS := -ptr $(G4TREP)/exec -ptr $(G4TREP)
+ else
+ CXXTEMPLATE_FLAGS := -ptr $(G4TREP)
+ endif
+ else
+ ifdef G4EXEC_BUILD
+ CXXTEMPLATE_FLAGS := -ptr$(G4TREP)/exec -ptr$(G4TREP)
+ else
+ CXXTEMPLATE_FLAGS := -ptr$(G4TREP)
+ endif
+ endif
+ CXXFLAGS += $(CXXTEMPLATE_FLAGS)
+ CFRONT := true
+endif
+ifdef CFRONT
+ G4TEMPLATE_REPOSITORY_PARENT := $(shell echo $(G4TREP) | sed 's!/[^/][^/]*/*$$!!' )
+ G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4TEMPLATE_REPOSITORY_PARENT) ] && mkdir -p $(G4TEMPLATE_REPOSITORY_PARENT) )
+ G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4TREP) ] && mkdir -p $(G4TREP) )
+ G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4TREP)/exec ] &&mkdir -p $(G4TREP)/exec )
+endif
+
--- /dev/null
+# $ Id: binmake.gmk,v 1.56.2.1 2001/03/22 13:54:24 gunter Exp $
+# ----------------------------------------------------------
+# Script defining rules and paths for making binaries.
+# Gabriele Cosmo, 25/06/1998.
+# ----------------------------------------------------------
+
+ifndef LDFLAGS
+ include $(FLUGGINSTALL)/config/architecture.gmk
+endif
+
+ifdef G4GEOMETRY_DEBUG
+ CPPFLAGS += -DG4GEOMETRY_DEBUG
+endif
+
+G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
+G4LIBDIR_G4 := $(G4LIB_G4)/$(G4SYSTEM)
+
+ifndef INCFLAGS
+ INCFLAGS := \
+ -I$(G4BASE_G4)/global/management/include \
+ -I$(G4BASE_G4)/global/STLInterface \
+ -I$(G4BASE_G4)/global/HEPRandom/include \
+ -I$(G4BASE_G4)/global/HEPGeometry/include \
+ -I$(G4BASE_G4)/global/HEPNumerics/include \
+ -I$(G4BASE_G4)/materials/include \
+ -I$(G4BASE_G4)/geometry/management/include \
+ -I$(G4BASE_G4)/geometry/solids/CSG/include \
+ -I$(G4BASE_G4)/geometry/solids/specific/include \
+ -I$(G4BASE_G4)/geometry/solids/BREPS/include \
+ -I$(G4BASE_G4)/geometry/solids/Boolean/include \
+ -I$(G4BASE_G4)/geometry/solids/STEP/include \
+ -I$(G4BASE_G4)/geometry/solids/STEPinterface/include \
+ -I$(G4BASE_G4)/geometry/volumes/include \
+ -I$(G4BASE_G4)/geometry/magneticfield/include \
+ -I$(G4BASE_G4)/graphics_reps/include \
+ -I$(G4BASE)/dummyG4/include \
+ -I$(G4BASE)/Wrappers/include
+endif
+
+ifndef G4LIB_USE_GRANULAR
+ GLOBALLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.a && echo yes)
+ ifndef GLOBALLIBS
+ GLOBALLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.$(SHEXT) && echo yes)
+ SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.$(SHEXT) && echo yes)
+ endif
+endif
+
+ifndef SHAREDLIBS
+ SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4globman.$(SHEXT) && echo yes)
+endif
+
+CPPFLAGS += $(INCFLAGS)
+LDFLAGS += -L$(G4LIBDIR) -L$(G4LIBDIR_G4) -L$(CLHEP_LIB_DIR)
+
+# Addded for FLUGG: fortan and fluka libraries path
+LDFLAGS += -L$(FORLIB) -L/lib -L$(FLUKA)
+
+G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(G4TARGET)
+G4BINDIR := $(G4BIN)/$(G4SYSTEM)
+
+ifdef G4EXLIB
+ G4LIBDIR := $(G4TMPDIR)
+ LDFLAGS += -L$(G4LIBDIR)
+ ifdef SHAREDLIBS
+ ifdef G4RUNPATHOPTION
+# for the example dependant directory, keep the path to the shared lib
+# in the executable.
+ LDFLAGS += $(G4RUNPATHOPTION)$(G4LIBDIR)
+ endif
+ endif
+ include $(FLUGGINSTALL)/config/common.gmk
+endif
+
+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)
+
+# VISLIBS and UILIBS are now handled by the granular library script...
+#
+ifdef GLOBALLIBS
+ LDLIBS1 += $(VISLIBS) $(UILIBS)
+endif
+
+ifdef GLOBALLIBS
+
+ ifdef G4ODBMS
+ LDLIBS1 += -lG4persistency
+ endif
+
+ LDLIBS2 := \
+ -lFggWrappers \
+ -lG4geometry \
+ -lG4materials \
+ -lG4graphics_reps \
+ -lG4intercoms \
+ -lG4dummy \
+ -lG4global
+else
+ LDLIBS2 := \
+ -lFggWrappers \
+ -lG4geometrymng \
+ -lG4volumes \
+ -lG4csg \
+ -lG4specsolids \
+ -lG4geomBoolean \
+ -lG4brep \
+ -lG4step \
+ -lG4stepinterface \
+ -lG4magneticfield \
+ -lG4materials \
+ -lG4graphics_reps \
+ -lG4intercoms \
+ -lG4dummy \
+ -lG4hepnumerics \
+ -lG4globman
+endif
+
+# 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
+# Again, do not use := or +=. See note on LDLIBS2 above.
+ LDLIBS_PREFINAL = $(LDLIBS1) $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
+endif
+LDLIBS_PREFINAL += $(LDLIBS4)
+
+ifeq ($(G4SYSTEM),WIN32-VC)
+ WIN32TMP := $(patsubst -L%,$(LIB_PATH)%,$(LDFLAGS))
+ LDFLAGS = $(patsubst /,$(PATH_DEL),$(WIN32TMP))
+ LDLIBS = $(patsubst -l%,lib%.a,$(LDLIBS_PREFINAL))
+else
+ LDLIBS = $(LDLIBS_PREFINAL)
+endif
+
+# Addded for FLUGG: fortan and fluka libraries
+LDLIBS += -lc
+LDLIBS += -lflukahp
+LDLIBS += -lg2c -lstdc++
+#
+
+ifdef transform-RPath
+#invoke system specific transformation of
+include $(FLUGGINSTALL)/config/sys/$(G4SYSTEM)-runpath.gmk
+endif
+
+sources := $(wildcard $(G4TARGET).cc)
+objects := $(patsubst %.cc,$(G4TMPDIR)/exe/%.o,$(sources))
+dependencies := $(patsubst %.cc,$(G4TMPDIR)/exe/%.d,$(sources))
+
+#
+# extra fortran source files for FLUKA
+#
+sources += $(wildcard for/*.f)
+objects += $(patsubst for/%.f,$(G4TMPDIR)/exe/%.o,$(wildcard for/*.f))
+
+$(G4TMPDIR)/exe/%.o: for/%.f
+ @echo Compiling $*.f ...
+ @$(FLUPRO)/flutil/fff for/$*.f
+ @mv for/$*.o $(G4TMPDIR)/exe/$*.o
+
+LINK_DEPENDENCIES := $(G4TMPDIR)/exe/obj.last $(EXTRA_LINK_DEPENDENCIES)
+
+.PHONY: bin clean clean_bin debug
+
+# Make $(G4TARGET) executable.
+bin: $(G4BINDIR)/$(G4TARGET)
+
+$(G4BINDIR)/$(G4TARGET): $(LINK_DEPENDENCIES)
+ifndef USER_DEFINED_LDLIBS
+ ifndef GLOBALLIBS
+ @echo "Using granular libraries ..."
+ else
+ @echo "Using global libraries."
+ endif
+endif
+ @if [ ! -d $(G4BINDIR) ] ; then mkdir $(G4BINDIR) ;fi
+ifdef CPPVERBOSE
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) \
+ -o $(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) \
+ $(LDLIBS)
+else
+ @echo Linking $(G4TARGET) ...
+ @$(CXX) $(CXXFLAGS) $(CPPFLAGS) \
+ -o $(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) \
+ $(LDLIBS)
+endif
+
+# Touch the versioning file
+ifdef G4EXLIB
+$(G4TMPDIR)/exe/obj.last: lib $(objects)
+else
+$(G4TMPDIR)/exe/obj.last: $(objects)
+endif
+ @touch $@
+
+# Make the $(G4TARGET).o file.
+$(G4TMPDIR)/exe/$(G4TARGET).o : $(G4TARGET).cc
+ifdef CPPVERBOSE
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(APPFLAGS) \
+ -c $(OUT_OBJ)$(G4TMPDIR)/exe/$(G4TARGET).o $(G4TARGET).cc
+else
+ @echo Compiling $(G4TARGET).cc ...
+ @$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(APPFLAGS) \
+ -c $(OUT_OBJ)$(G4TMPDIR)/exe/$(G4TARGET).o $(G4TARGET).cc
+endif
+
+ifdef G4ODBMS
+ GPPFLAGS := "-MM"
+else
+ GPPFLAGS := "-M"
+endif
+
+# Make the $(G4TARGET).d file and include it.
+ifdef G4SKIP_DEPEND
+$(G4TMPDIR)/exe/$(G4TARGET).d: $(G4TARGET).cc
+ @echo Skip dependency file creation for file $< ...
+else
+$(G4TMPDIR)/exe/$(G4TARGET).d: $(G4TARGET).cc
+ @if [ ! -d $(G4TMP)/$(G4SYSTEM) ] ; then mkdir $(G4TMP)/$(G4SYSTEM) ;fi
+ @if [ ! -d $(G4TMPDIR) ] ; then mkdir $(G4TMPDIR) ;fi
+ @if [ ! -d $(G4TMPDIR)/exe ] ; then mkdir $(G4TMPDIR)/exe ;fi
+ @echo Making dependency for file $<...
+ @($(ECHO) $(G4TMPDIR)/exe/\\c ; \
+ g++ $(GPPFLAGS) $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/exe/$*.o!& $@!' >$@
+-include $(dependencies)
+endif
+
+clean:
+ @echo Cleaning up ...
+ @rm -f ./core
+ @rm -rf $(G4TMPDIR)
+ @rm -f $(G4LIBDIR)/lib$(G4TARGET).a
+ @rm -f $(G4BINDIR)/$(G4TARGET)
+ifdef CFRONT
+ @rm -rf $(G4TREP)/exec
+endif
+
+clean_bin:
+ @echo Removing application $(G4TARGET) ...
+ @rm -f ./core
+ @rm -f $(G4BINDIR)/$(G4TARGET)
+
+############################+ targets for G4ODBMS +############################
+ifdef G4ODBMS
+
+cleandb: clean newboot
+
+newboot:
+ @echo Copying schema file to $(G4EXAMPLE_BOOT) for FDID $(G4EXAMPLE_FDID)
+ @rm -f $(G4EXAMPLE_BOOT_DIR)/$(name)
+ @rm -f $(G4EXAMPLE_BOOT_DIR)/$(name).FDDB
+ @rm -f $(G4EXAMPLE_BOOT_DIR)/*.$(name).DB
+ @$(HEP_ODBMS_DIR)/etc/getdb $(G4SCHEMA_DIR)/G4SCHEMA \
+ $(G4EXAMPLE_BOOT) $(G4SCHEMA_FDID)
+
+newfd:
+ifndef G4EXAMPLE_FDID
+ @echo G4EXAMPLE_FDID is not defined. Stop.
+ exit 1
+endif
+ @echo Creating new runtime federated database $(G4EXAMPLE_BOOT) for FDID $(G4EXAMPLE_FDID)
+ @rm -f $(G4EXAMPLE_FD_DIR)/$(name)
+ @rm -f $(G4EXAMPLE_FD_DIR)/$(name).FDDB
+ @rm -f $(G4EXAMPLE_FD_DIR)/*.$(name).DB
+ @$(HEP_ODBMS_DIR)/etc/getdb $(G4EXAMPLE_BOOT) \
+ $(G4EXAMPLE_FD) $(G4EXAMPLE_FDID)
+endif
+############################- targets for G4ODBMS -############################
+
--- /dev/null
+# $ Id: common.gmk,v 1.24 2000/12/13 08:31:31 gcosmo Exp $
+# ----------------------------------------------------------------
+# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
+# ----------------------------------------------------------------
+# Libraries are created according to G4SYSTEM. G.Cosmo, 11/6/96.
+# Introduced G4LIBDIR and G4TMPDIR. G.Cosmo, 23/6/98.
+# Introduced G4SCHEMA_HEADER_DIR and G4SCHEMA_SRC_DIR. Y.Morita, 16/11/99.
+
+ifndef G4LIBDIR
+ G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
+endif
+G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(name)
+
+ifdef G4ODBMS_INSTALLATION
+ G4OODDLX_SCHEMA_NAME := -schema Geant4
+else
+ G4OODDLX_SCHEMA_NAME :=
+endif
+G4SCHEMA_HEADER_DIR := $(G4TMPDIR)
+G4SCHEMA_SRC_DIR := $(G4TMPDIR)
+
+sources := $(wildcard src/*.cc)
+schema_ddl := $(wildcard include/*.ddl)
+schema_hh := $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%.hh,$(schema_ddl))
+schema_ref_hh := $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%_ref.hh,$(schema_ddl))
+objects := $(patsubst src/%.cc,$(G4TMPDIR)/%.o,$(sources))
+dependencies := $(patsubst src/%.cc,$(G4TMPDIR)/%.d,$(sources))
+
+# output of ooddlx in G4TMPDIR (.hh, _ref.hh, _ddl.cc)
+#
+temporaries := $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%.hh,$(schema_ddl))
+
+# output of ooddlx in the current directory (if the process does not finish)
+#
+temporaries2 := $(patsubst include/%.ddl,%.hh,$(schema_ddl))
+
+ifdef G4ODBMS
+ temporaries += $(patsubst include/%.ddl,$(G4SCHEMA_SRC_DIR)/%_ddl.cc,$(schema_ddl)) \
+ $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%_ref.hh,$(schema_ddl))
+ temporaries2 += $(patsubst include/%.ddl,%_ddl.cc,$(schema_ddl)) \
+ $(patsubst include/%.ddl,%_ref.hh,$(schema_ddl))
+ objects += $(patsubst include/%.ddl,$(G4TMPDIR)/%_ddl.o,$(schema_ddl))
+endif
+
+ g4libraries_to_build :=
+ifneq ($(G4LIB_BUILD_SHARED),)
+ g4libraries_to_build += $(G4LIBDIR)/lib$(name).$(SHEXT)
+endif
+ifneq ($(G4LIB_BUILD_STATIC),)
+ g4libraries_to_build += $(G4LIBDIR)/lib$(name).a
+endif
+
+lib: $(g4libraries_to_build)
+
+ifneq ($(G4LIB_BUILD_SHARED),)
+# Make shared library.
+$(G4LIBDIR)/lib$(name).$(SHEXT): $(G4TMPDIR)/obj.last
+ @if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
+ @echo Creating shared library $@
+ @$(RM) $@
+# use architecture specific macro defined in sys/$(G4SYSTEM).gmk
+ $(build-granular-shared-lib)
+endif
+
+ifneq ($(G4LIB_BUILD_STATIC),)
+# Make static (archive) library.
+$(G4LIBDIR)/lib$(name).a: $(G4TMPDIR)/obj.last
+ @if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
+ @echo Creating/replacing object files in $(G4LIBDIR)/lib$(name).a
+ @rm -f $(G4LIBDIR)/lib$(name).a
+ @$(AR) $(OUT_LIB)$(G4LIBDIR)/lib$(name).a $(G4TMPDIR)/*.o
+ @if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then ranlib $(G4LIBDIR)/lib$(name).a ;fi
+endif
+
+# Touch the versioning file
+$(G4TMPDIR)/obj.last: $(objects)
+ @touch $@
+
+# Make the .o files.
+ifdef G4ODBMS
+$(G4TMPDIR)/%.o: src/%.cc $(schema_hh)
+else
+$(G4TMPDIR)/%.o: src/%.cc
+endif
+ifdef CPPVERBOSE
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F).o src/$*.cc
+else
+ @echo Compiling $*.cc ...
+ @$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F).o src/$*.cc
+endif
+ifdef G4ODBMS
+$(G4TMPDIR)/%.o: $(G4SCHEMA_SRC_DIR)/%.cc
+ifdef CPPVERBOSE
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(G4TMPDIR)/$(*F).o $(G4SCHEMA_SRC_DIR)/$*.cc
+else
+ @echo Compiling $*.cc ...
+ @$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(G4TMPDIR)/$(*F).o $(G4SCHEMA_SRC_DIR)/$*.cc
+endif
+endif
+# Make the temporary files.
+.PRECIOUS: $(G4SCHEMA_SRC_DIR)/%_ddl.cc $(G4SCHEMA_HEADER_DIR)/%.hh $(G4SCHEMA_HEADER_DIR)/%_ref.hh
+
+ifdef G4ODBMS
+$(G4SCHEMA_SRC_DIR)/%_ddl.cc $(G4SCHEMA_HEADER_DIR)/%.hh $(G4SCHEMA_HEADER_DIR)/%_ref.hh: include/%.ddl
+ifndef G4OODDLX_BOOT
+ @echo G4OODDLX_BOOT is not defined. Stop.
+ exit 1
+endif
+ @if [ ! -d $(G4TMP)/$(G4SYSTEM) ] ; then mkdir $(G4TMP)/$(G4SYSTEM) ;fi
+ @if [ ! -d $(G4TMPDIR) ] ; then mkdir $(G4TMPDIR) ;fi
+ @if [ ! -d $(G4SCHEMA_HEADER_DIR) ] ; then mkdir $(G4SCHEMA_HEADER_DIR) ;fi
+ @if [ ! -d $(G4SCHEMA_SRC_DIR) ] ; then mkdir $(G4SCHEMA_SRC_DIR) ;fi
+ifdef CPPVERBOSE
+ ooddlx -notitle $(G4OODDLX_SCHEMA_NAME) \
+ -header_suffix .hh -ref_suffix _ref.hh -c++_suffix _ddl.cc \
+ $(G4OODDLX_FLAGS) $(CPPFLAGS) $< $(G4OODDLX_BOOT)
+else
+ @echo Preprocessing $< ...
+ @ooddlx -notitle $(G4OODDLX_SCHEMA_NAME) \
+ -header_suffix .hh -ref_suffix _ref.hh -c++_suffix _ddl.cc \
+ $(G4OODDLX_FLAGS) $(CPPFLAGS) $< $(G4OODDLX_BOOT)
+endif
+ @mv -f $*.hh $(G4SCHEMA_HEADER_DIR)/
+ @mv -f $*_ref.hh $(G4SCHEMA_HEADER_DIR)/
+ @mv -f $*_ddl.cc $(G4SCHEMA_SRC_DIR)/
+endif
+
+# Make the .d file(s) and include it(them).
+# g++ -MM (or -M) is good at this, except it forgets the subdirectory
+# (hence the use of $G4TMP/).
+
+# define G4SKIP_DEPEND for simplicity
+ifndef G4ODBMS_DEPEND
+ifdef G4ODBMS
+ G4SKIP_DEPEND := 1
+endif
+endif
+
+ifdef G4ODBMS
+ GPPFLAGS := "-MM"
+else
+ GPPFLAGS := "-M"
+endif
+
+ifdef G4SKIP_DEPEND
+$(G4TMPDIR)/%.d: src/%.cc
+ @if [ ! -d $(G4TMP)/$(G4SYSTEM) ] ; then mkdir $(G4TMP)/$(G4SYSTEM) ;fi
+ @if [ ! -d $(G4TMPDIR) ] ; then mkdir $(G4TMPDIR) ;fi
+ @echo Skip dependency file creation for file $< ...
+else
+$(G4TMPDIR)/%.d: src/%.cc
+ @if [ ! -d $(G4TMP)/$(G4SYSTEM) ] ; then mkdir $(G4TMP)/$(G4SYSTEM) ;fi
+ @if [ ! -d $(G4TMPDIR) ] ; then mkdir $(G4TMPDIR) ;fi
+ @echo Making dependency for file $< ...
+ @($(ECHO) $(G4TMPDIR)/\\c ; \
+ g++ $(GPPFLAGS) $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/$*.o!& $@!' >$@
+ifneq ($(dependencies),)
+-include $(dependencies)
+endif
+endif
+
+# .PHONY targets are executed regardless of time-stamp of any file of
+# same name.
+ifdef G4ODBMS_DEPEND
+.PHONY: all obj lib clean clean_libs d_files install_schema includes
+else
+.PHONY: all obj lib clean clean_libs includes
+endif
+
+obj: $(G4TMPDIR)/obj.last
+
+ifdef G4ODBMS
+headers: $(schema_hh)
+
+d_files: $(dependencies)
+
+$(schema_hh): $(schema_ddl)
+
+install_schema:
+ @echo installing schema header files ...
+ -@(cp -f $(G4TMPDIR)/*.hh $(G4SCHEMA_INCLUDE)/ || \
+ echo " schema header file does not exist, so ignore the error message...")
+endif
+
+installed_includes:=$(foreach file,$(wildcard include/*),$(shell test -f $(file) && echo $(file)))
+installed_includes:=$(patsubst include/%,$(G4INCLUDE)/%,$(installed_includes))
+
+# NOTE: the double colon rule allows to add other rules for the same target
+#
+includes:: $(installed_includes)
+
+# Static Pattern rules, see GNU make manual for details.
+# target(s): target-pattern : dep-pattern
+#
+$(installed_includes): $(G4INCLUDE)/% : include/%
+ @cp -p $< $@
+
+ifndef G4EXLIB
+clean:
+ @echo Cleaning up ...
+ @rm -f $(G4LIBDIR)/lib$(name).a
+ @rm -f $(G4LIBDIR)/lib$(name).$(SHEXT)
+ @rm -f $(schema_hh) $(schema_ref_hh)
+ @rm -rf $(G4TMPDIR)
+endif
+
+clean_libs:
+ @if [ -f $(G4LIBDIR)/lib$(name).a ] ; then \
+ $(ECHO) Removing library lib$(name).a ... ; \
+ $(RM) -f $(G4LIBDIR)/lib$(name).a ; fi
+ @if [ -f $(G4LIBDIR)/lib$(name).$(SHEXT) ] ; then \
+ $(ECHO) Removing library lib$(name).$(SHEXT) ... ; \
+ $(RM) -f $(G4LIBDIR)/lib$(name).$(SHEXT) ; fi
+
--- /dev/null
+# $ Id: globlib.gmk,v 1.16 2000/12/13 09:19:14 gcosmo Exp $
+# --------------------------------------------------------------
+# Script for compound libraries. Gabriele Cosmo, 25/6/98.
+# --------------------------------------------------------------
+
+ifndef FLUGGINSTALL
+ FLUGGINSTALL = ..
+endif
+
+include $(FLUGGINSTALL)/config/architecture.gmk
+
+G4LIBDIR = $(G4LIB)/$(G4SYSTEM)
+
+.PHONY : all glob global objs includes clean clean_libs wipe_libs
+
+all:
+ifndef G4ODBMS
+ @for dir in $(SUBDIRS); do (cd $$dir && $(MAKE)); done
+else
+ @for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) headers); done
+ @for dir in $(SUBDIRS); do (cd $$dir && G4ODBMS_DEPEND=1 && \
+ export G4ODBMS_DEPEND && $(MAKE)); done
+ @echo Copying tmp schema header from G4TMPDIR to $(G4SCHEMA_INCLUDE)
+ @rm -f $(G4SCHEMA_INCLUDE)/*.hh
+ @for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) install_schema); done
+ @echo Copying tmp schema to $(G4SCHEMA_DIR) for FDID $(G4SCHEMA_FDID)
+ @rm -f $(G4SCHEMA_DIR)/G4SCHEMA
+ @rm -f $(G4SCHEMA_DIR)/G4SCHEMA.FDDB
+ @$(HEP_ODBMS_DIR)/etc/getdb $(G4TMPSCHEMA_BOOT) \
+ $(G4SCHEMA_DIR)/G4SCHEMA $(G4SCHEMA_FDID)
+endif
+g4libraries_to_build:=
+
+ifneq ($(G4LIB_BUILD_SHARED),)
+ SHARED_LIB=$(G4LIBDIR)/lib$(name).$(SHEXT)
+ g4libraries_to_build += $(SHARED_LIB)
+else
+ SHARED_LIB=
+endif
+
+ifneq ($(G4LIB_BUILD_STATIC),)
+ g4libraries_to_build += $(G4LIBDIR)/lib$(name).a
+endif
+
+ifndef G4ODBMS
+glob global: objs wipe_libs $(g4libraries_to_build)
+else
+glob global: headers d_files objs wipe_libs $(g4libraries_to_build) $(G4SCHEMA_DIR)/G4SCHEMA.FDDB
+endif
+
+##
+## make static libraries
+##
+ifneq ($(G4LIB_BUILD_STATIC),)
+$(G4LIBDIR)/lib$(name).a: \
+ $(foreach dir,$(SUBLIBS),$(G4TMP)/$(G4SYSTEM)/$(dir)/obj.last)
+ @if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ; fi
+ @echo Merging object files in $(G4LIBDIR)/lib$(name).a
+ @$(RM) $(G4LIBDIR)/lib$(name).a
+#
+#
+#
+ @if [ X$(G4SYSTEM) = XWIN32-VC ] ; i=NO; \
+ then \
+ (( for lib in $(SUBLIBS); \
+ do ( if [ $$i = NO ]; \
+ then \
+ $(AR) $(OUT_LIB)$(G4LIBDIR)/lib$(name).lib \
+ $(G4TMP)/$(G4SYSTEM)/$$lib/*.o ; \
+ else \
+ $(AR) $(G4LIBDIR)/lib$(name).lib $(G4TMP)/$(G4SYSTEM)/$$lib/*.o; \
+ fi ); \
+ i=YES; \
+ done ) ; \
+ mv $(G4LIBDIR)/lib$(name).lib $(G4LIBDIR)/lib$(name).a); \
+ else \
+ (for lib in $(SUBLIBS); \
+ do ($(AR) $(OUT_LIB)$(G4LIBDIR)/lib$(name).a \
+ $(G4TMP)/$(G4SYSTEM)/$$lib/*.o); \
+ done);\
+ fi
+#
+#
+#
+ @if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then \
+ ranlib $(G4LIBDIR)/lib$(name).a ; fi
+endif
+
+
+##
+## make shared libraries
+##
+ifneq ($(G4LIB_BUILD_SHARED),)
+$(SHARED_LIB): $(foreach dir,$(SUBLIBS),$(G4TMP)/$(G4SYSTEM)/$(dir)/obj.last)
+ @if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ; fi
+ @echo Creating global shared library $@
+ @$(RM) $@
+# use system specific commands to build the library
+ $(build-global-shared-lib)
+endif
+
+ifdef G4ODBMS
+headers:
+ @for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) headers); done
+
+d_files:
+ @for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) d_files); done
+
+$(G4SCHEMA_DIR)/G4SCHEMA.FDDB: $(G4TMPSCHEMA_DIR)/G4SCHEMA.FDDB
+ @rm -f $(G4SCHEMA_DIR)/G4SCHEMA
+ @rm -f $(G4SCHEMA_DIR)/G4SCHEMA.FDDB
+ @echo Copying schema file to $(G4SCHEMA_DIR) for FDID $(G4SCHEMA_FDID)
+ @$(HEP_ODBMS_DIR)/etc/getdb $(G4TMPSCHEMA_BOOT) \
+ $(G4SCHEMA_DIR)/G4SCHEMA $(G4SCHEMA_FDID)
+endif
+
+objs:
+ @for dir in $(SUBDIRS); \
+ do (cd $$dir; $(MAKE) -q obj && ok=yes; \
+ if [ $$ok ]; \
+ then echo Nothing to be done for lib$(name) in $$dir/.; \
+ else $(MAKE) clean_libs; $(MAKE) obj; \
+ fi; ) \
+ done
+
+includes::
+ @for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@ ); done
+
+wipe_libs:
+ @for lib in $(SUBLIBS); do (rm -f $(G4LIBDIR)/lib$$lib.a); done
+ @for lib in $(SUBLIBS); do (rm -f $(G4LIBDIR)/lib$$lib.$(SHEXT)); done
+
+clean:
+ @echo Cleaning up ...
+ @for lib in $(SUBLIBS); do ( \
+ rm -rf $(G4TMP)/$(G4SYSTEM)/$$lib;\
+ rm -f $(G4LIBDIR)/lib$$lib.a;\
+ rm -f $(G4LIBDIR)/lib$$lib.$(SHEXT) );\
+ done
+ @rm -f $(G4LIBDIR)/lib$(name).a
+
+clean_libs:
+ @echo Removing lib$(name).a/.$(SHEXT) and sub-libraries ...
+ @for lib in $(SUBLIBS); do ( \
+ rm -f $(G4LIBDIR)/lib$$lib.a;\
+ rm -f $(G4LIBDIR)/lib$$lib.$(SHEXT) );\
+ done
+ @rm -f $(G4LIBDIR)/lib$(name).a
+ @rm -f $(G4LIBDIR)/lib$(name).$(SHEXT)
--- /dev/null
+# $Id$
+# Flugg tag $Name$
+# ----------------------------------------------------------------
+# This script sets the default environment variables for
+# ALICE Flugg;
+# the Geant4 environment is supposed to be set by setup.(c)sh
+# script provided in AliRoot.
+#
+# by I. Hrivnacova, 10.5.2001
+# csh version by I.Gonzalez 6.3.2002
+
+# check ALICE Geant4 environment
+if ( "$AG4_INSTALL" == "" ) then
+ echo "ALICE Geant4 environment is not defined."
+ echo "Check your AliRoot environment and run:"
+ echo "source $ALICE_ROOT/AliGeant4/config/setup.csh"
+ exit 1;
+endif
+
+# FLUKA environment
+setenv FLUKA /afs/cern.ch/alice/offline/fluka/01c
+setenv FORLIB $FLUKA/libflukahp.a
+setenv FLUPRO $FLUKA
+
+# Flugg environment
+setenv FLUGGINSTALL ${ALICE_ROOT}/Flugg
+#setenv G4GEOMETRY_DEBUG=1
+
+# path to Flugg shared libararies
+if ( "$G4LIB_BUILD_SHARED" != "" ) then
+ set SYSTEM=`uname`
+ if ( "$SYSTEM" == "Linux" ) then
+ setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${FLUGGINSTALL}/lib/${G4SYSTEM}"
+ endif
+ if ( "$SYSTEM" == "HP-UX" ) then
+ setenv SHLIB_PATH "${SHLIB_PATH}:${FLUGGINSTALL}/lib/${G4SYSTEM}"
+ endif
+ if ( "$SYSTEM" == "OSF1" ) then
+ setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${FLUGGINSTALL}/lib/${G4SYSTEM}"
+ endif
+ if ( "$SYSTEM" == "SunOS" ) then
+ setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${FLUGGINSTALL}/lib/${G4SYSTEM}"
+ endif
+endif
+# path to Flugg executable
+setenv PATH "${PATH}:${FLUGGINSTALL}/bin/Linux-g++"
+
+#Example of run command:
+#$FLUKA/flutil/rfluka -M1 -N0 -p wa_50m
+#-e $FLUGGINSTALL/bin/Linux-g++/mainAlAuAl alaual
+
+unset SYSTEM
--- /dev/null
+# $Id$
+# Flugg tag $Name$
+# ----------------------------------------------------------------
+# This script sets the default environment variables for
+# ALICE Flugg;
+# the Geant4 environment is supposed to be set by setup.(c)sh
+# script provided in AliRoot.
+#
+# by I. Hrivnacova, 10.5.2001
+
+# check ALICE Geant4 environment
+if [ "$AG4_INSTALL" = "" ]; then
+ echo "ALICE Geant4 environment is not defined."
+ echo "Check your AliRoot environment and run:"
+ echo ". $ALICE_ROOT/AliGeant4/config/setup.sh"
+ exit 1;
+fi
+
+# FLUKA environment
+export FLUKA=/afs/cern.ch/alice/offline/fluka/01c
+export FORLIB=$FLUKA/libflukahp.a
+export FLUPRO=$FLUKA
+
+# Flugg environment
+export FLUGGINSTALL=$ALICE_ROOT/Flugg
+#export G4GEOMETRY_DEBUG=1
+
+# path to Flugg shared libararies
+if [ "$G4LIB_BUILD_SHARED" != "" ]; then
+ SYSTEM=`uname`
+ if [ "$SYSTEM" = "Linux" ]; then
+ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FLUGGINSTALL/lib/$G4SYSTEM
+ fi
+ if [ "$SYSTEM" = "HP-UX" ]; then
+ SHLIB_PATH=$SHLIB_PATH:$FLUGGINSTALL/lib/$G4SYSTEM
+ fi
+ if [ "$SYSTEM" = "OSF1" ]; then
+ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FLUGGINSTALL/lib/$G4SYSTEM
+ fi
+ if [ "$SYSTEM" = "SunOS" ]; then
+ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FLUGGINSTALL/lib/$G4SYSTEM
+ fi
+fi
+# path to Flugg executable
+export PATH=$PATH:$FLUGGINSTALL/bin/Linux=g++
+
+
+#Example of run command:
+#$FLUKA/flutil/rfluka -M1 -N0 -p wa_50m
+#-e $FLUGGINSTALL/bin/Linux-g++/mainAlAuAl alaual
+
+unset SYSTEM
--- /dev/null
+#
+# -------- AIX ---------- !!! not supported !!!
+# AIX-4.3.2 xlC
+ifeq ($(G4SYSTEM),AIX-xlC)
+ CXX := xlC
+ ifdef G4OPTIMISE
+ CXXFLAGS := -O3 -qtwolink -+
+ else
+ ifdef G4DEBUG
+ CXXFLAGS := -g -qdbxextra -qcheck=all -qfullpath -qtwolink -+
+ FCFLAGS := -g
+ CCFLAGS := -g
+ endif
+ endif
+ FC := xlf
+ FCFLAGS += -qextname
+ FCLIBS := -lxlf90 -lxlf
+ X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
+ X11LIBS := -L/usr/lib -lXmu -lX11 -lXext
+ XMFLAGS := -I/usr/include/Motif1.2
+ XMLIBS := -L/usr/lib -lXm -lXt -lX11
+ XAWFLAGS := -I/usr/include/X11
+ XAWLIBS := -L/usr/lib -lXaw -lXmu -lXt -lX11 -lXext
+ ifndef OGLFLAGS
+ OGLFLAGS := -I$(OGLHOME)/include
+ endif
+ ifndef OGLLIBS
+ OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
+ endif
+ CPPFLAGS += -DG4NOT_ISO_DELETES
+ CPPFLAGS += -I$(G4STLINC)/wrappers/$(G4SYSTEM)
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_AIX_4 -DOS_NEW_CHECK -DOS_STL_ASSERT
+ CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
+ endif
+
+ define build-granular-shared-lib
+ @echo "Shared Libraries not supported on $(G4SYSTEM)
+ endef
+ define build-global-shared-lib
+ @echo "Shared Libraries not supported on $(G4SYSTEM)
+ endef
+
+endif
--- /dev/null
+#
+# -------- DEC ---------
+#
+ifeq ($(G4SYSTEM),DEC-cxx)
+ CXX := cxx
+ ifdef G4OPTIMISE
+ CXXFLAGS := -O
+ else
+ ifdef G4DEBUG
+ CXXFLAGS := -gall
+ FCFLAGS := -g
+ CCFLAGS := -g
+ endif
+ endif
+ G4_HAVE_BOOL := yes
+ CXXFLAGS += -ieee -timplicit_local
+ SHEXT := so
+#future G4RUNPATHOPTION := -rpath
+ FC := f77
+ FCLIBS := -lUfor -lfor -lFutil -lots
+ X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
+ ifndef OGLFLAGS
+ OGLFLAGS := -I$(OGLHOME)/include
+# OGLFLAGS := -I/usr/include -I/usr/local/include
+ endif
+ ifndef OGLLIBS
+ OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
+# OGLLIBS := -lMesaGLU -lMesaGL
+ endif
+ CPPFLAGS += -I$(G4STLINC)/wrappers/$(G4SYSTEM)
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_OSF1_4 -DOS_NEW_CHECK -DOS_STL_ASSERT -DOS_NO_WSTRING
+ CPPFLAGS += -DOS_NO_ALLOCATORS -D__NO_EDG_EXCEPTION_CLASSES
+ CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
+ CXXFLAGS += -nostdnew
+ else
+ ifndef G4NO_STD_NAMESPACE
+ G4USE_STD_NAMESPACE := yes
+ CXXFLAGS += -std strict_ansi
+ CPPFLAGS += -DG4USE_STD_NAMESPACE
+ endif
+ endif
+
+ define build-granular-shared-lib
+ @libdir=`(cd $(@D);/bin/pwd)`; \
+ cd $(G4TMPDIR); \
+ $(CXX) -shared -o $$libdir/$(@F) *.o
+ endef
+# transform-RPath = 1
+ define build-global-shared-lib
+ @echo "Global shared Libraries not yet supported on $(G4SYSTEM)
+ endef
+endif
--- /dev/null
+#
+# -------- HP ---------
+#
+ifeq ($(G4SYSTEM),HP-aCC)
+ CXX := aCC
+ ifdef G4OPTIMISE
+ CXXFLAGS := +O2 +Onolimit
+ else
+ ifdef G4DEBUG
+ CXXFLAGS := -g
+ FCFLAGS := -g
+ CCFLAGS := -g
+ endif
+ endif
+ CXXFLAGS += +DAportable +W823
+ CPPFLAGS += -I/usr
+ ifdef G4LIB_BUILD_SHARED
+ CXXFLAGS += +Z
+ FCFLAGS += +Z
+ CCFLAGS += +Z
+ endif
+ G4_HAVE_BOOL := yes
+ FC := f77
+ SHEXT := sl
+ FCFLAGS += +E6 +ppu
+ CCFLAGS += -Ae +DAportable
+ X11FLAGS := -I/usr/include/X11/extensions -I/usr/contrib/X11R6/include
+ X11FLAGS += -I/usr/contrib/X11R6/include/X11
+ X11LIBS := -L/usr/contrib/X11R6/lib -lXmu -L/usr/lib -lXt -lXext -lX11
+ XMFLAGS := -I/usr/include/Motif1.2
+ XMLIBS := -L/usr/lib/Motif1.2_R6 -lXm
+ XAWFLAGS := -I/usr/contrib/X11R6/include -I/usr/contrib/X11R6/include/X11
+ XAWLIBS := -L/usr/contrib/X11R6/lib -lXaw
+ ifndef OGLFLAGS
+ OGLFLAGS := -I$(OGLHOME)/include
+ endif
+ ifndef OGLLIBS
+ OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
+ OGLLIBS += -L/opt/graphics/common/lib -lXwindow -lhpgfx -lXhp11 -ldld
+ endif
+ CPPFLAGS += -DG4NOT_ISO_DELETES
+ CPPFLAGS += -I$(G4STLINC)/wrappers/$(G4SYSTEM)
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_HPUX_10_20 -DOS_NEW_CHECK -DOS_STL_ASSERT
+ CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS -D__HPACC_NOEH
+ CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
+ endif
+
+ define build-granular-shared-lib
+ @libdir=`(cd $(@D);/bin/pwd)`; \
+ cd $(G4TMPDIR); \
+ $(CXX) -b -o $$libdir/$(@F) *.o
+ endef
+ define build-global-shared-lib
+ @libdir=`(cd $(@D);/bin/pwd)`; \
+ cd $(G4TMP)/$(G4SYSTEM); \
+ $(CXX) -b -o $$libdir/$(@F) $(foreach dir,$(SUBLIBS),$(dir)/*.o);
+ endef
+
+endif
--- /dev/null
+#
+# ------ GNU/LINUX ------
+#
+ifeq ($(G4SYSTEM),Linux-g++)
+ CXX := g++
+ GNU_GCC = 1
+ CXXFLAGS := -pipe -fno-for-scope -DGNU_GCC
+ ifdef G4OPTIMISE
+ CXXFLAGS += -O
+ FCFLAGS := -O
+ CCFLAGS := -O
+ else
+ ifdef G4DEBUG
+ CXXFLAGS += -g
+ FCFLAGS := -g
+ CCFLAGS := -g
+ endif
+ endif
+ ifdef G4LIB_BUILD_SHARED
+ CXXFLAGS += -fPIC
+ FCFLAGS += -fPIC
+ CCFLAGS += -fPIC
+ endif
+ G4RUNPATHOPTION := -Wl,-rpath
+ FC := g77
+ FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
+ FCLIBS := -lg2c -lnsl
+ ECHO := /bin/echo -e
+ SHEXT := so
+ X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
+ X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
+ XMFLAGS := -I/usr/X11R6/include
+ XMLIBS := -lXm -lXpm
+ DLDLIBS := -ldl
+ ifndef OGLFLAGS
+ OGLFLAGS := -I$(OGLHOME)/include
+ endif
+ ifndef OGLLIBS
+ OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
+ endif
+ OIVFLAGS += -I$(OIHOME)/include
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_LINUX_2 -DOS_NEW_CHECK -DOS_STL_ASSERT
+ CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += -I$(OSPACE_BASE_DIR)/ospace/std -I$(OSPACE_BASE_DIR)
+ endif
+ ifdef G4ODBMS
+ G4OODDLX_FLAGS += -D__STL_CLASS_PARTIAL_SPECIALIZATION -Dstd=""
+ endif
+
+ define build-granular-shared-lib
+ @libdir=`(cd $(@D);/bin/pwd)`; \
+ cd $(G4TMPDIR); \
+ $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) *.o
+ endef
+ define build-global-shared-lib
+ @libdir=`(cd $(@D);/bin/pwd)`; \
+ cd $(G4TMP)/$(G4SYSTEM); \
+ $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) \
+ $(foreach dir,$(SUBLIBS),$(dir)/*.o);
+ endef
+
+endif
--- /dev/null
+#
+# -------- SGI --------- !!! not supported !!!
+# Irix-6.5.5 CC-7.2.1
+ifeq ($(G4SYSTEM),SGI-CC)
+ CXX := CC
+ ifdef G4OPTIMISE
+ CXXFLAGS := -O -OPT:Olimit=5000
+ else
+ ifdef G4DEBUG
+ CXXFLAGS := -g
+ FCFLAGS := -g
+ CCFLAGS := -g
+ endif
+ endif
+ G4_HAVE_BOOL := yes
+ CXXFLAGS += -ptused
+ FC := f77
+ FCLIBS := -lftn
+ SHEXT := so
+ X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
+ X11LIBS := -L/usr/lib -lXmu -lXt -lXext -lX11
+ XMLIBS := -L/usr/lib -lXm
+ ifndef OGLFLAGS
+ OGLFLAGS :=
+ endif
+ ifndef OGLLIBS
+ OGLLIBS := -L/usr/lib -lGLU -lGL
+ endif
+ CPPFLAGS += -DSOCKET_IRIX_SOLARIS
+ CPPFLAGS += -I$(G4STLINC)/wrappers/$(G4SYSTEM)
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_IRIX_6_5 -DOS_NEW_CHECK -DOS_STL_ASSERT
+ CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
+ endif
+
+ define build-granular-shared-lib
+ @echo "Shared Libraries not supported on $(G4SYSTEM)
+ endef
+ define build-global-shared-lib
+ @echo "Shared Libraries not supported on $(G4SYSTEM)
+ endef
+
+endif
--- /dev/null
+#
+# -------- SUN ---------
+#
+ifeq ($(G4SYSTEM),SUN-CC)
+ CXX := CC
+# -Qoption ld -m
+ ifdef G4OPTIMISE
+ CXXFLAGS := -O
+ else
+ ifdef G4DEBUG
+ CXXFLAGS := -g
+ FCFLAGS := -g
+ CCFLAGS := -g
+ endif
+ endif
+ ifdef G4LIB_BUILD_SHARED
+ CXXFLAGS += -KPIC
+ FCFLAGS += -KPIC
+ CCFLAGS += -KPIC
+ endif
+ G4RUNPATHOPTION = -R
+# CXXFLAGS += -fnonstd
+ CFRONT_G4TEMPLATE_REPOSITORY := true
+ FC := f77
+ SHEXT := so
+ AR := $(CXX) -xar -ptr$(G4TREP) -o
+ ECHO := /bin/echo
+ GREP := /usr/xpg4/bin/grep
+ FCLIBS := -lM77 -lF77 -lsunmath
+ X11FLAGS := -I/usr/openwin/include/X11/extensions -I/usr/openwin/include/X11
+ X11FLAGS += -I/usr/openwin/include
+ X11LIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib
+ X11LIBS += -R/usr/openwin/lib -lXmu -lX11 -lXext
+ XMLIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib
+ XMLIBS += -R/usr/openwin/lib -lXt -lXm -lX11
+ XAWFLAGS := -I/usr/openwin/include/X11
+ XAWLIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib
+ XAWLIBS += -R/usr/openwin/lib -lXaw -lXmu -lXt -lX11 -lXext
+ ifndef OGLFLAGS
+ OGLFLAGS := -I$(OGLHOME)/include
+ endif
+ ifndef OGLLIBS
+ OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
+ endif
+ CPPFLAGS += -DSOCKET_IRIX_SOLARIS
+ LOADLIBS += -L/usr/lib -lsocket -lnsl
+ CPPFLAGS += -DG4NOT_ISO_DELETES
+ CPPFLAGS += -I$(G4STLINC)/wrappers/$(G4SYSTEM)
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_SOLARIS_2_5 -DOS_NEW_CHECK -DOS_STL_ASSERT
+ CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
+ endif
+
+ define build-granular-shared-lib
+ @libdir=`(cd $(@D);/bin/pwd)`; \
+ cd $(G4TMPDIR); \
+ $(CXX) -G $(CXXTEMPLATE_FLAGS) -o $$libdir/$(@F) -h $(@F) *.o
+ endef
+ define build-global-shared-lib
+ @libdir=`(cd $(@D);/bin/pwd)`; \
+ cd $(G4TMP)/$(G4SYSTEM); \
+ $(CXX) -G $(CXXTEMPLATE_FLAGS) -o $$libdir/$(@F) -h $(@F) \
+ $(foreach dir,$(SUBLIBS),$(dir)/*.o);
+endef
+
+endif
--- /dev/null
+#
+# -------- SUN ---------
+#
+ifeq ($(G4SYSTEM),SUN-CC5)
+ CXX := CC
+ ifdef G4OPTIMISE
+ CXXFLAGS := -O
+ else
+ ifdef G4DEBUG
+ CXXFLAGS := -g
+ FCFLAGS := -g
+ CCFLAGS := -g
+ endif
+ endif
+ CXXFLAGS += -features=no%anachronisms -mt -lpthread
+# CXXFLAGS += -fnonstd
+ ifdef G4LIB_BUILD_SHARED
+ CXXFLAGS += -KPIC
+ FCFLAGS += -KPIC
+ CCFLAGS += -KPIC
+ endif
+ G4RUNPATHOPTION := -R
+ G4_HAVE_BOOL := yes
+ CFRONT_G4TEMPLATE_REPOSITORY := true
+ FC := f77
+ SHEXT := so
+ AR := $(CXX) -xar -ptr$(G4TREP) -o
+ ECHO := /bin/echo
+ GREP := /usr/xpg4/bin/grep
+ FCLIBS := -lM77 -lF77 -lsunmath
+ X11FLAGS := -I/usr/openwin/include/X11/extensions -I/usr/openwin/include/X11
+ X11FLAGS += -I/usr/openwin/include
+ X11LIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib
+ X11LIBS += -R/usr/openwin/lib -lXmu -lX11 -lXext
+ XMLIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib
+ XMLIBS += -R/usr/openwin/lib -lXt -lXm -lX11
+ XAWFLAGS := -I/usr/openwin/include/X11
+ XAWLIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib
+ XAWLIBS += -R/usr/openwin/lib -lXaw -lXmu -lXt -lX11 -lXext
+ ifndef OGLFLAGS
+ OGLFLAGS := -I$(OGLHOME)/include
+ endif
+ ifndef OGLLIBS
+ OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
+ endif
+ CPPFLAGS += -DSOCKET_IRIX_SOLARIS
+ LOADLIBS += -L/usr/lib -lsocket -lnsl
+ CPPFLAGS += -DG4NOT_ISO_DELETES
+ CPPFLAGS += -I$(G4STLINC)/wrappers/$(G4SYSTEM)
+ ifdef G4ODBMS
+ G4OODDLX_FLAGS += -noline
+ endif
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_SOLARIS_2_5 -DOS_NEW_CHECK -DOS_STL_ASSERT
+ CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
+ CXXFLAGS += -compat
+ else
+ ifndef G4NO_STD_NAMESPACE
+ G4USE_STD_NAMESPACE := yes
+ CPPFLAGS += -DG4USE_STD_NAMESPACE
+ else
+ CXXFLAGS += -compat
+ endif
+ endif
+
+ define build-granular-shared-lib
+ @libdir=`(cd $(@D);/bin/pwd)`; \
+ cd $(G4TMPDIR); \
+ $(CXX) -G $(CXXTEMPLATE_FLAGS) -o $$libdir/$(@F) -h $(@F) *.o
+ endef
+ define build-global-shared-lib
+ @libdir=`(cd $(@D);/bin/pwd)`; \
+ cd $(G4TMP)/$(G4SYSTEM); \
+ $(CXX) -G $(CXXTEMPLATE_FLAGS) -o $$libdir/$(@F) -h $(@F) \
+ $(foreach dir,$(SUBLIBS),$(dir)/*.o);
+ endef
+endif
--- /dev/null
+#
+# ------ WIN32/VC ------
+#
+ifeq ($(G4SYSTEM),WIN32-VC)
+ CXX := CL
+ G4_HAVE_BOOL := yes
+ G4_NO_CBRT := yes
+ ifdef G4OPTIMISE
+ CXXFLAGS += -Ox
+ else
+ ifdef G4DEBUG
+ CXXFLAGS += -Od -Zi -Fd$(G4LIBDIR)/lib$(name)
+ endif
+ endif
+ CXXFLAGS += -MD -GR -GX -Zm200 -nologo -DWIN32 -D_CONSOLE
+ CXXFLAGS += -D_WIN32 -DOS
+ CPPFLAGS += -DWIN32
+ #
+ # Should set $INCLUDE environment, if not set as below
+ #
+ ifdef G4USE_OSPACE
+ CXXFLAGS += $(OSPACEINC)
+ else
+ ifdef G4USE_STLPORT
+ CXXFLAGS += $(OSPACEINC)
+ else
+ # If native STL is selected, use ISO standard version.
+ G4USE_STD_NAMESPACE := yes
+ CPPFLAGS += -DG4USE_STD_NAMESPACE
+ endif
+ endif #ospace
+
+ LDFLAGS += -FORCE /NODEFAULTLIB:MSVCRT.dll
+
+ #
+ # Should set $LIB environment to include VC++ Studio lib directories, e.g.
+ #
+ # $(LIB_PATH)"c:\ProgramFiles\DevStudio\vc\lib" \
+ # $(LIB_PATH)'\\srv1_info\v2\vc50pro1\DEVSTUDIO\VC\LIB' \
+ # $(LIB_PATH)'\\srv1_info\v2\DecFtn5\x86\df\lib'
+
+ AR := LIB
+ ECHO := echo -e
+ FC := f77
+# FCLIBS := -lf2c
+ ifndef OGLFLAGS
+ OGLFLAGS :=
+ endif
+ ifndef OGLLIBS
+ OGLLIBS := -lGLU -lGL
+ endif
+
+ define build-granular-shared-lib
+ @echo "Shared Libraries not supported on $(G4SYSTEM)
+ endef
+ define build-global-shared-lib
+ @echo "Shared Libraries not supported on $(G4SYSTEM)
+ endef
+
+endif
--- /dev/null
+#
+# ------ GNU/WIN32 CYGNUS ------ !!! not supported !!!
+# cygnus b20 with cygwin1.dll 1.1.5 patch
+# Windows 95 4.00.1111
+#
+# Sys file by Stefano Agostinelli, July 2000
+# IST Group: Franca Foppiano, Stefania Garelli, Stefano Agostinelli
+#
+ifeq ($(G4SYSTEM),WIN32-g++)
+ CXX := g++
+ GNU_GCC = 1
+ CXXFLAGS := -pipe -fno-for-scope -DGNU_GCC
+ ifdef G4OPTIMISE
+ CXXFLAGS += -O
+ FCFLAGS := -O
+ CCFLAGS := -O
+ else
+ ifdef G4DEBUG
+ CXXFLAGS += -g
+ FCFLAGS := -g
+ CCFLAGS := -g
+ endif
+ endif
+ ifdef G4LIB_BUILD_SHARED
+ CXXFLAGS += -fPIC
+ FCFLAGS += -fPIC
+ CCFLAGS += -fPIC
+ endif
+ FC := g77
+ FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
+ FCLIBS := -lg2c -lnsl
+ ECHO := echo -e
+ X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
+ X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
+ XMFLAGS := -I/usr/X11R6/include
+ XMLIBS := -lXm -lXpm
+ ifndef OGLFLAGS
+ OGLFLAGS := -I$(OGLHOME)/include
+ endif
+ ifndef OGLLIBS
+ OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
+ endif
+ OIVFLAGS += -I$(OIHOME)/include
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_LINUX_2 -DOS_NEW_CHECK -DOS_STL_ASSERT
+ CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += -I$(OSPACE_BASE_DIR)/ospace/std -I$(OSPACE_BASE_DIR)
+ endif
+ ifdef G4ODBMS
+ G4OODDLX_FLAGS += -D__STL_CLASS_PARTIAL_SPECIALIZATION -Dstd=""
+ endif
+
+ define build-granular-shared-lib
+ @echo "Shared Libraries not supported on $(G4SYSTEM)
+ endef
+ define build-global-shared-lib
+ @echo "Shared Libraries not supported on $(G4SYSTEM)
+ endef
+
+endif
+
--- /dev/null
+$Id$
+-----------------------------------------------------------------
+
+Tags (history):
+===============
+
+ 25.10.2001:
+ flugg-03_geant4-3-1:
+ Wrappers directory restructured to enable creating a library;
+ extra fortran source code handled by makefiles (binmake.gmk);
+ extended unsufficient arrays size in FGeometryInit.
+
+ 31.5.2001:
+ flugg-02_geant4-3-1:
+ Upgrade to Geant4 3.1 release;
+ added scripts for Geant4 upgrades.
+
+ 16.5.2001:
+ flugg-01_geant4-1-0:
+ The cvs keywords (Id, Name) added in the top of files;
+ all built-in types changed to G4 typedefs;
+ G4std namespace introduced;
+ corrections in Fluka input files and in the makefiles.
+
+ 10.5.2001:
+ flugg-00_geant4-1-0:
+ Import of flugg0.4 based on Geant4 1.0
+
--- /dev/null
+# $Id$
+# Flugg tag $Name$
+
+====================================================================
+====================================================================
+READ-ME-FLUGG - Sara Vanini - June 2000
+Upgrade to Geant4 3.1, I. Hrivnacova, 30 May 2001
+
+(FLUGG documentation: ATL-SOFT-98-039 and ATL-SOFT-99-004.)
+====================================================================
+====================================================================
+
+
+====================================================================
+= 1. Flugg Installation =
+====================================================================
+
+1.1 Supported computers and operating systems
+--------------------------------------------------------------------
+FLUGG is supported under the following operating systems:
+
+ - Flavors of Unix (from vendors HP, DEC)
+ - Linux on PC with g++ (egcs compiler)
+
+Currently, this is the set of flavors which can be associated with
+the environment variable $G4SYSTEM to
+identify the system architecture and compiler used:
+
+ UNIX - HP-UX v.10.20, aCC v.1.23 G4SYSTEM: HP-aCC
+ DEC-OSF/1 v.4.0, cxx 6.1 G4SYSTEM: DEC-cxx
+ Linux - Linux RedHat 6.1, g++ egcs 1.1.2 G4SYSTEM: Linux-g++
+
+1.2 Required software
+-------------------------------------------------------------------
+To run FLUGG, the following software must be properly installed in
+your computing environment:
+
+ - C++ compiler (compiler from Unix vendor, g++ or Visual C++
+ for Windows systems);
+ - CLHEP library (see CLHEP reference guide http://wwwinfo.
+ cern.ch/asd/lhc++/clhep/manual/RefGuide/index.html);
+ - Native STL or ObjectSpace STL
+ (see http://www.objectspace.com/)
+ - GNU Make (note: g++ preprocessing is used to build file
+ dependencies) is also used and a UNIX shell;
+ - FLUGG toolkit;
+ - FLUKA libraries;
+
+1.3 FLUGG environment
+--------------------------------------------------------------------
+Before proceeding with the installation, you need to define some key
+environment variables in your user environment, in order to specify
+where all software components are placed and to set some compilation
+options:
+
+FLUKA path to fluka binary files;
+FORLIB path to the fortran library;
+FLUPRO path to fluka program
+FLUKAOBJ_PATH path to fluka objects;
+FLUKAOBJ name of fluka objects (user's routines, ecc.);
+
+FLUGGINSTALL path where the FLUGG toolkit tree is installed;
+G4SYSTEM set to one of the flavors listed in the above section to
+ specify the kind of architecture and compiler used;
+G4GEOMETRY_DEBUG if set the additional debug information is printed
+ in the log file (default = unset)
+G4LIB_BUILD_SHARED if set shared libraries are built, static ones otherwise
+ (default = unset)
+
+CLHEP_BASE_DIR: path to the CLHEP installation
+OSPACE_BASE_DIR: path to the ObjectSpace STL installation (in case
+ ObjectSpace STL implementation is used in place of the system's
+ native STL).
+
+
+1.4 How to make G4 libraries
+--------------------------------------------------------------------
+At this point, do the following to start building the compilation
+and installation of the kernel libraries.
+You can choose to build libraries in one of two ways, according to
+the needs and system resources. From $FLUGGINSTALL/source:
+
+ 1.gmake global
+ This will make global libraries, one for each major category.
+ 2.gmake
+ This will make one library for each "leaf" category (maximum
+ library granularity) and produce automatically a map
+ of library use and dependencies.
+
+The standard build procedure assumes global libraries if they exist.
+Advantages of using approach 2. can be noticed mainly concerning
+library and program build speed, which in some cases can be improved
+also of a factor 2 or 3 compared to the "global library" approach.
+Using the "granular library" approach a fairly big number of "leaf"
+libraries is produced, dependencies and linking list are however
+evaluated and generated automatically on the fly. The top-level
+GNUmakefile in $FLUGGINSTALL/source parses the dependency files of
+FLUGG and produces libname.map in $G4LIB. libname.map is produced
+by the tool liblist, whose source code is in $FLUGGINSTALL/config.
+When building a binary application the script binmake.gmk in
+$FLUGGINSTALL/config will parse the user's dependency files and use
+libname.map to determine through liblist the required libraries
+to add to the linking list. Only the required libraries will be
+loaded at link time.
+
+
+
+1.5 FLUKA libraries
+--------------------------------------------------------------------
+For FLUKA libraries and FLUKA data files, pemf file, etc, you could
+take a look at FLUKA manual.
+
+At this point, you'll be ready to start building your first
+FLUGG application.
+
+
+====================================================================
+= 2. FluGG - Fluka + Geant4 Geometry for Simulation in HEP =
+====================================================================
+
+2.1 How to build a FLUGG example
+--------------------------------------------------------------------
+You can create a FLUGG example in the directory:
+$(FLUGGINSTALL)/examples/fluggEx/emptyEx
+
+a)GEOMETRY
+The detector definition requires the representation of its geometrical
+elements, their materials and electronics properties, together with
+user defined properties. FLUGG geometrical representation of
+detector elements requires implementing the following G4 classes:
+ - Detector Construction (named "MyDetectorConstruction");
+ - Detector Parameterization (optional);
+ - Magnetic Field Construction (optional);
+
+You must define these classes in include directory and their
+implementation in src of the above directory. (see http://wwwinfo.cern.ch/
+asd/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/
+index.html for details on how to write a G4 geometry).
+
+As regards geometry construction, remember that replicas and
+parameterized volumes are handled as fluka lattice-volumes, so
+boundaries between them are not seen during tracking time.
+Different placements of identical physical volumes, instead,
+correspond to different fluka-regions (boundaries are seen!).
+
+As regards magnetic field construction:
+1) Fluka needs flagged region for magnetic field. So it is
+imperative to flag logical volumes (in Detector Construction
+file) where magnetic field is present for FLUGG simulation
+(in GEANT4 this isn't necessary, you can define only
+magnetic field too).
+
+How volumes can be flagged:
+ 1.a) with flag in G4LogicalVolume constructor:
+ logicBox = new G4LogicalVolume(solidBox,BoxMaterial,
+ "Box",fieldMgr,0,0);
+ 1.b) with member function:
+ logicBigBox->SetFieldManager(fieldMgr,true);
+ *true flag implies that the field is extended to all
+ volume daughters (for field in all detector set this
+ flag for world volume!).
+
+2) If field is defined with G4UniformMgnField (so it's uniform)
+the field value is written in fluka card MGNFIELD (in flukaMat.inp
+file). If field is defined with a user-implemented function,
+MAGFLD wrapper gives the local value as fluka calls it run time.
+
+
+b)FLUGG ENVIRONMENT VARIABLES
+Define environment variables described in section 1.3.
+
+c)FLUGG EXECUTABLE
+In the directory: $(FLUGGINSTALL)/examples/fluggEx/emptyEx,
+run "gmake" (or "gmake clean" and then "gmake" to recompile all files).
+Gmake creates the executable ($(FLUGGINSTALL)/bin/Linux-g++/mainFLUGG)
+compiling FLUGG geometry classes, linking G4 geometry libraries
+and fluka libraries (libflukahp.a).
+
+d)FLUKA INPUT
+Now, to run FLUGG, you need fluka-stile input file. You can see FLUKA
+manual for details, and input and pemf file examples in /flugg/
+examples/fluka. Remember that GEOBEGIN-GEOEND card is dummy (you
+have to put no lines between GEOBEGIN and GEOEND, geometry input comes
+from G4 classes!). As regards material specification: in GEANT4
+toolkit, materials and material-volume assignments are specified in
+geometry input classes, in the detector constructor file. When FLUGG
+initializes the geometry, material information is read from
+GEANT4 detector description, and translated into FLUKA-formatted
+input cards.
+So a first dummy run must be executed; the newly created file containing
+GEANT4 material specifications and volume-material assignments
+(flukaMat.inp) must be included into the FLUKA input file where
+additional properties can still be defined. Other useful information,
+like FLUGG geometry volume names and indexes (together with repetition
+numbers for replicated or parameterized volumes!) are dump in
+Volumes_index.inp.
+
+Now you are ready to run mainFLUGG (see rfluka script in /flugg/
+examples/fluka).
+
+
+2.2 Examples module
+--------------------------------------------------------------------
+This module collects a set of user examples aimed to demonstrate to
+a user how to make correct use of the FLUGG toolkit by implementing
+those user-classes which a Geant4 user is supposed to customize
+in order to define his/her own detector geometry setup.
+This set of examples covers some possible general use-cases
+for actual detector simulation for HEP.
+
+ AlAuAl
+ - series of slab of different elements (Al, Au, Al), which total
+ thickness is of the order of the electron range;
+ - multiple scattering at boundaries (handle delicate situations such
+ as grazing angles, backscattering, deflections at boundaries);
+ Fluka input files: alaual.inp, wa_50m.pemf
+
+ BiasEx
+ - 500 MeV protons on a thick Cu target: the generated neutrons
+ propagate in a concrete shield;
+ - fluka biasing techniques are applied to achieve variance
+ reduction;
+ Fluka input files: Bias.inp, wa_50m.pemf
+
+ MagSphereNotRep
+ - test-geometry with spheres and tubs;
+ - tracking in magnetic field;
+ Fluka input files: MagSphereNotRep.inp, t36.pemf
+
+ T36flugg
+ - Test-36 em-hadronic calorimeter;
+ - Full "ordinary" processes;
+ - no magnetic field;
+ Fluka input files: T36.inp, t36.pemf
+
+
+
+Appendix A. FLUKA input --> FLUGG input
+********************************************************
+When transposing a fluka input in a flugg input you need
+to:
+
+a) Update the following fluka cards substituting fluka
+region indexes with G4 geometry volume indexes: (in
+parenthesis the WHAT() with region numbers):
+
+ASSIGNMAT (2,3,4)
+BEAMPOS (6)
+BIASING (4,5,6)
+DETECT (6; contin.card:2-6)
+EMF-BIAS (4,5,6)
+EMFCUT (4,5,6)
+EMFRAY (2,3,4)
+EXPTRANS (3,4,5)
+GEOBEGIN/END no WHAT exept COMBINAT; throw
+ away everything between GEOBEGIN/END
+GLOBAL (1)
+LOW-BIAS (4,5,6)
+LOW-DOWN (4,5,6)
+RESNUCLEI (5,6)
+STEPSIZE (3,4,5)
+TIMECUT (5,6)
+USRBDX (4,5)
+USRBIN (4,5,6; contin.card:1,2,3,4,5,6)
+USRCOLL (4)
+USRTRACK (4)
+USRYIELD (4,5)
+WW-FACTO (4,5,6)
+
+b)integrate the following material cards with information:
+DELTARAY, EMF-BIAS, EMF-CUT, EMF-FIX, EMF-FLUO, EVXTEST,
+FLUKAFIX, LAM-BIAS, LANDAU, LOW-MAT, MAT-PROP, MULSOPT,
+OPT-PROP, PAIRBREM, PHOTONUC; and in MAPA and PEMF file,
+which contain detailed information about materials.
+
+When comparing fluka and FLUGG runs, REMEMBER to:
+1) check that coordinate system is the same in fluka geometry
+and in GEANT4 geometry; if it is not, update position and beam
+direction.
+2) check how events are the scored!
+
+
+Appendix B. GEANT4 example --> FLUGG example:
+****************************************************************
+0) Copy /src and /include geant4 examples directories in emptyEx/
+1) Delete all classes exept:
+ - Detector Construction;
+ - Detector Parameterization;
+ - Magnetic Field Construction;
+2) Delete corresponding "#include ..." lines in Detector
+Construction source file and variables definitions in the constructor,
+and corresponding class declarations and variable declaration
+in Detector Construction include file.
+2b) Delete #include "G4RunManager.hh" and lines where RunManager is
+invoked.
+3) Delete Detector messenger, initialization and destruction, delete
+code lines where Sensitive Detector is set (be aware of memory leaks!).
+4) Delete code lines where parameterization of processes for fast
+simulation is set (and visualization of ghost volumes).
+Delete commands for interactive definition of the calorimeter
+
+
+
+Appendix C. How to update FLUGG with new Geant4 releases
+****************************************************************
+For updating FLUGG with new Geant4 releases the following
+operations are required:
+
+1) from flugg/source: gmake clean_all to remove the previous
+installation;
+
+2) unzip and untar Geant4 release;
+
+3) set environment variable for paths to Geant4 (G4INSTALL)
+ and Flugg (FLUGGINSTALL)
+
+4) run update_source.sh script
+
+This will replace files placed in include and src sub-directories
+of the following directories:
+geant4/source/geometry ---> flugg/source/geometry
+geant4/source/graphics_reps ---> flugg/source/graphics_reps
+geant4/source/material ---> flugg/source/material
+geant4/source/global ---> flugg/source/global
+geant4/source/intercoms ---> flugg/source/intercoms
+The Geant4 makefiles are modified for Flugg; old Flugg
+makefiles are kept and renamed to GNUmakefile.flugg and kept.
+
+5) now you must add "UpdateNavigatorHistory" member function to
+G4Navigator class; insert the following declaration in
+"flugg/source/geometry/volumes/include/G4Navigator.hh" file:
+
+// flugg member function: reinitialization of navigator history with
+// secondary particle history banked on fluka side
+ void UpdateNavigatorHistory(const G4NavigationHistory* newNavHistory);
+
+6) And append the following definition to
+"flugg/source/geometry/volumes/src/G4Navigator.cc" file:
+
+void G4Navigator::UpdateNavigatorHistory(const G4NavigationHistory* newNavHistory)
+{
+ ResetStackAndState();
+ fHistory = *newNavHistory;
+ SetupHierarchy();
+}
+
+7) run update_config.sh
+
+This will replace makefiles placed in config directory
+with new ones from Geant4 modified for Flugg;
+old makefiles are kept and renamed (by adding .flugg extension).
+!!! binmake.gmk has to be updated by hands.
+In case no major modifications were done in config
+in new Geant4 release the old binmake.gmk may be used without
+modofications.
+