Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
-17
View File
@@ -1,17 +0,0 @@
# $Id: G4ODBMS_BUILD.gmk,v 1.2 1999/09/17 13:15:29 morita Exp $
# ----------------------------------------------------------------
# GNUmakefile for CPPFLAGS for HepODBMS and Objectivity/DB.
# Youhei Morita, 9th July 1998.
#--------------------------------------------------------------------
# Objectivity and HepODBMS definitions
ifdef OBJY_DIR
CPPFLAGS += -I$(OBJY_DIR)/include
endif
ifdef HEP_ODBMS_DIR
CPPFLAGS += -I$(HEP_ODBMS_DIR)/include \
-DHEP_ODBMS_EXPORT="" \
-DHep_HAS_BUILDIN_BOOL_CONSTANTS
endif
#--------------------------------------------------------------------
+9 -5
View File
@@ -1,4 +1,4 @@
# $Id: G4UI_USE.gmk,v 1.5 2001/11/13 16:00:44 johna Exp $
# $Id: G4UI_USE.gmk,v 1.6 2002/11/22 11:53:02 gcosmo Exp $
# -------------------------------------------------------------
# GNUmakefile for CPPFLAGS for interfaces USE phase.
# John Allison, 6th July 1998.
@@ -21,11 +21,13 @@ UILIBS :=
# C-pre-processor variable G4UI_USE_TERMINAL is set by default, although
# there is no need to use it.
CPPFLAGS += -I$(G4BASE)/interfaces/basic/include
ifneq ($(G4INCLUDE_EXEC),1)
CPPFLAGS += -I$(G4BASE)/interfaces/basic/include
CPPFLAGS += -I$(G4BASE)/interfaces/common/include
CPPFLAGS += -I$(G4BASE)/interfaces/GAG/include
endif
UILIBS += -lG4UIbasic
CPPFLAGS += -I$(G4BASE)/interfaces/common/include
UILIBS += -lG4UIcommon
CPPFLAGS += -I$(G4BASE)/interfaces/GAG/include
UILIBS += -lG4UIGAG
ifdef G4UI_USE_TERMINAL
@@ -74,7 +76,9 @@ ifdef G4UI_USE_WO
G4UI_USE = 1
G4INTY_USE_XT = 1
CPPFLAGS += -DG4UI_USE_WO
CPPFLAGS += -I$(G4BASE)/interfaces/OPACS/include
ifneq ($(G4INCLUDE_EXEC),1)
CPPFLAGS += -I$(G4BASE)/interfaces/OPACS/include
endif
UILIBS += -lG4UIOPACS
INC_OPACS = 1
LOAD_OPACS = 1
+22 -11
View File
@@ -1,4 +1,4 @@
# $Id: G4VIS_USE.gmk,v 1.13 2002/03/09 03:12:33 johna Exp $
# $Id: G4VIS_USE.gmk,v 1.14 2002/11/22 11:53:09 gcosmo Exp $
# -------------------------------------------------------------
# GNUmakefile for CPPFLAGS for visualization USE phase.
# John Allison, 24th January 1998.
@@ -13,26 +13,29 @@ endif
# Set old USE C-pre-processor flags for backwards compatibility of user code...
CPPFLAGS += -DG4VIS_USE_DAWNFILE
CPPFLAGS += -I$(G4BASE)/visualization/FukuiRenderer/include
VISLIBS += -lG4FR
CPPFLAGS += -DG4VIS_USE_HEPREPFILE
CPPFLAGS += -I$(G4BASE)/visualization/HepRep/include
VISLIBS += -lG4visHepRep
CPPFLAGS += -DG4VIS_USE_RAYTRACER
CPPFLAGS += -I$(G4BASE)/visualization/RayTracer/include
VISLIBS += -lG4RayTracer
CPPFLAGS += -DG4VIS_USE_VRMLFILE
CPPFLAGS += -I$(G4BASE)/visualization/VRML/include
VISLIBS += -lG4VRML
CPPFLAGS += -DG4VIS_USE_ASCIITREE
CPPFLAGS += -DG4VIS_USE_GAGTREE
CPPFLAGS += -I$(G4BASE)/visualization/Tree/include
VISLIBS += -lG4Tree
ifneq ($(G4INCLUDE_EXEC),1)
CPPFLAGS += -I$(G4BASE)/visualization/FukuiRenderer/include
CPPFLAGS += -I$(G4BASE)/visualization/HepRep/include
CPPFLAGS += -I$(G4BASE)/visualization/RayTracer/include
CPPFLAGS += -I$(G4BASE)/visualization/VRML/include
CPPFLAGS += -I$(G4BASE)/visualization/Tree/include
endif
ifdef G4VIS_USE_DAWN
CPPFLAGS += -DG4VIS_USE_DAWN
# CPPFLAGS += -I... and VISLIBS += set above.
@@ -42,7 +45,9 @@ ifdef G4VIS_USE_OPACS
INC_OPACS = 1
LOAD_OPACS = 1
CPPFLAGS += -DG4VIS_USE_OPACS
CPPFLAGS += -I$(G4BASE)/visualization/OPACS/include
ifneq ($(G4INCLUDE_EXEC),1)
CPPFLAGS += -I$(G4BASE)/visualization/OPACS/include
endif
VISLIBS += -lG4OPACS
endif
@@ -64,7 +69,9 @@ ifdef G4VIS_USE_OPENGLWIN32
endif
ifdef G4VIS_USE_OPENGL
CPPFLAGS += -DG4VIS_USE_OPENGL
CPPFLAGS += -I$(G4BASE)/visualization/OpenGL/include
ifneq ($(G4INCLUDE_EXEC),1)
CPPFLAGS += -I$(G4BASE)/visualization/OpenGL/include
endif
VISLIBS += -lG4OpenGL
INC_GL = 1
LOAD_GL = 1
@@ -82,7 +89,9 @@ ifdef G4VIS_USE_OIWIN32
endif
ifdef G4VIS_USE_OI
CPPFLAGS += -DG4VIS_USE_OI
CPPFLAGS += -I$(G4BASE)/visualization/OpenInventor/include
ifneq ($(G4INCLUDE_EXEC),1)
CPPFLAGS += -I$(G4BASE)/visualization/OpenInventor/include
endif
VISLIBS += -lG4OpenInventor
INC_IV = 1
LOAD_IV = 1
@@ -106,8 +115,10 @@ endif
ifdef G4_SOLVE_VIS_TEMPLATES
CPPFLAGS += -DG4_SOLVE_VIS_TEMPLATES
endif
CPPFLAGS += -I$(G4BASE)/visualization/management/include
CPPFLAGS += -I$(G4BASE)/visualization/modeling/include
ifneq ($(G4INCLUDE_EXEC),1)
CPPFLAGS += -I$(G4BASE)/visualization/management/include
CPPFLAGS += -I$(G4BASE)/visualization/modeling/include
endif
VISLIBS += -lG4vis_management
VISLIBS += -lG4modeling
+72 -3
View File
@@ -1,6 +1,5 @@
$Id: History,v 1.193 2002/06/26 17:27:18 gcosmo Exp $
$Name: geant4-04-01 $
$Id: History,v 1.209 2002/12/10 14:05:59 gcosmo Exp $
$Name: geant4-05-00 $
-------------------------------------------------------------------
=========================================================
@@ -18,6 +17,76 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
4th December 2002 Gabriele Cosmo (config-V04-01-08)
- Removed obsolete setup for ObjectSpace-STL (G4USE_OSPACE and related
variables). Removed obsolete variable G4USE_STL.
- Updated Configure scripts.
2nd December 2002 John Allison (config-V04-01-07)
- common.gmk, binmake.gmk: New dependency file algorithm that avoids
leaving corrupt .d files when #include'd files cannot be found.
- Removed obsolete schema targets in common.gmk.
25th November 2002 Gabriele Cosmo (config-V04-01-06)
- Removed ODBMS setup. Now library for persistency is built as part of the
kernel and specific implementations for persistency have been moved to
examples. Setup for ODBMS no more required. G4USE_HEPODBMS is no longer
used.
- Updated configuration file AIX-xlC.gmk to port code on AIX with xlC 6.0
(K.Murakami).
22nd November 2002 Gabriele Cosmo (config-V04-01-05)
- liblist.c:
o Enhanced script to provide the whole list of installed libraries
in the correct order, without requiring parsing of dependencies.
The functionality is achieved by invoking "liblist" with option '-m",
i.e. - liblist -m [libpath] < libname.map
where [libpath] is the path where libraries are placed
(i.e. $G4LIB/$G4SYSTEM).
- binmake.gmk:
o Use "liblist -m [libpath]" to retrieve the list of libraries to link in
case headers are installed in $G4INCLUDE, and granular libraries are used.
- G4UI_USE.gmk, G4VIS_USE.gmk:
o Protected specification of -I paths for headers, in case $G4INCLUDE is
used. A single -I$G4INCLUDE path will be used for compilation in such case.
16th November 2002 Hans-Peter Wellisch
- binmake.gmk:
o Added hadronic/models/cascade/cascade and
hadronic/models/generator/scattering include paths.
8th November 2002 Gabriele Cosmo (config-V04-01-04)
- Darwin-g++.gmk:
o Updated setup to support MacOS 10.2 (H.Burkhardt).
30th October 2002 Gabriele Cosmo (config-V04-01-03)
- architecture.gmk:
o Issue an error if G4SYSTEM is not defined in the environment or not valid.
o Define G4LIB_BUILD_G3TOG4 and G4USE_G3TOG4 for optional installation and
usage of the g3tog4 module.
o Updated list of supported systems/compilers.
- binmake.gmk:
o Include path and library for g3tog4 module only if G4USE_G3TOG4 is defined.
Implies proper handling of G4USE_G3TOG4 in source/GNUmakefile.
- Removed obsolete OSPACE setup for WIN32-VC, HP-aCC, DEC-cxx. Still kept for
platforms with ODBMS setup.
- SUN-CC.gmk: removed -L/usr/lib path specification from LOADLIBS definition.
10th September 2002 Gabriele Cosmo (config-V04-01-02)
- Linux-g++.gmk: added assignment 'CC := gcc' for default 'cc' compiler.
26th August 2002 Gabriele Cosmo (config-V04-01-01)
- binmake.gmk: added include path to persistency/run/include which was
missing. Removed unnecessary processes/general/include.
8th July 2002 John Allison
- liblist.c: added protection and warning for file/directory not found
in parsedir. Also small cosmetic improvements.
4th July 2002 Gabriele Cosmo (config-V04-01-00)
- Upgraded WIN32-g++ to compile with -ansi and gcc-2.95.3 for most recent versions
of CygWin.
26th June 2002 Gabriele Cosmo (config-V04-00-10)
- Moved STEP PERL scripts to examples/extended/geometry/cad/scripts.
- Updated scripts for Configure.
+21 -94
View File
@@ -1,4 +1,4 @@
# $Id: architecture.gmk,v 1.78 2002/06/27 14:24:28 gcosmo Exp $
# $Id: architecture.gmk,v 1.84 2002/12/04 14:44:23 gcosmo Exp $
# ------------------------------------------------------------------------
# GEANT 4 - Architecture configuration script for GNU Make
#
@@ -13,34 +13,16 @@
# List of the supported architectures/compilers and related flavors for
# the environment variable G4SYSTEM:
#
# Linux-g++ Linux (Red Hat 6.1 or 7.2), gcc-2.95.2 (default)
# Linux-g++ Linux (Red Hat 7.3), gcc-2.95.2 or gcc-3.2 (default)
#
# Linux-egcs Linux (Red Hat 6.1), egcs-1.1.2
# SUN-CC SunOS 5.8, CC 5.3 or 5.4
#
# SUN-CC SunOS 5.7, CC 5.2
#
# WIN32-VC Windows/2000 and Microsoft Visual C++ 6.0 - SP5
# WIN32-VC Windows/2000/XP and Microsoft Visual C++ 6.0 - SP5
# Adding CYGWIN32 tools
# -------------------------------------------------------------------------
# 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 Linux-g++ ...
#
ifndef G4SYSTEM
G4SYSTEM := Linux-g++
endif
# If not specified, the default path for G4 installation G4INSTALL is
# set to $HOME/geant4 ...
#
@@ -87,19 +69,27 @@ ifndef G4INCLUDE
endif
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4INCLUDE) ] && mkdir -p $(G4INCLUDE) )
# backwards compatiblity
# Backwards compatibility
#
ifneq ($(G4MAKESHLIB),)
G4LIB_BUILD_SHARED = 1
endif
# defaults for library BUILD. No default for USE, ie. take what is found.
# Defaults for library BUILD. No default for USE, ie. take what is found.
# Default is building static libraries.
#
ifeq ($(G4LIB_BUILD_SHARED),)
ifeq ($(G4LIB_BUILD_STATIC),)
# default is building static libs
G4LIB_BUILD_STATIC = 1
endif
endif
# Specify if to build the G3TOG4 module or not. Default is NO.
#
ifneq ($(G4LIB_BUILD_G3TOG4),)
G4LIB_BUILD_G3TOG4 = 1
G4USE_G3TOG4 = 1
endif
# If not specified, the default path for G4 binaries G4BIN is
# set to $G4WORKDIR/bin/$G4SYSTEM ...
@@ -109,56 +99,6 @@ ifndef G4BIN
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_BOOT := $(G4SCHEMA_DIR)/G4SCHEMA
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 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) )
G4DDLX_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 ...
#
@@ -191,23 +131,6 @@ ifndef CLHEP_LIB
endif
endif
# Native STL is the default
#
CPPFLAGS += -DG4USE_STL
# Path to ObjectSpace STL (NOT supported. Kept for backward compatibility)
#
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
endif #OSPACE
# Paths for G4 data
#
ifndef G4DATA
@@ -262,9 +185,7 @@ ifeq ($(G4SYSTEM),WIN32-VC)
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
@@ -395,3 +316,9 @@ ifdef CFRONT
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4TREP)/exec ] &&mkdir -p $(G4TREP)/exec )
endif
# If G4SYSTEM is not specified or not valid, issue an ERROR !
#
#$(G4INSTALL)/config/sys/$(G4SYSTEM).gmk:
# @echo "ERROR - G4SYSTEM is not defined in the environment"
# @echo " or $(G4SYSTEM) architecture is not a valid one !"
# exit 1
+53 -116
View File
@@ -1,4 +1,4 @@
# $Id: binmake.gmk,v 1.76 2002/06/13 11:08:08 jwellisc Exp $
# $Id: binmake.gmk,v 1.85 2002/12/04 14:44:23 gcosmo Exp $
# ----------------------------------------------------------
# Script defining rules and paths for making binaries.
# First implementation: Gabriele Cosmo, 25/06/1998.
@@ -10,6 +10,11 @@ endif
G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
# Define variable checking for existence of centrally installed headers.
# If check will be true, avoid explicit definition of paths to INCFLAGS.
#
G4INCLUDE_EXEC := $(shell [ -r $(G4INCLUDE)/globals.hh ] && echo 1)
include $(G4INSTALL)/config/G4UI_USE.gmk
include $(G4INSTALL)/config/G4VIS_USE.gmk
include $(G4INSTALL)/config/interactivity.gmk
@@ -27,18 +32,6 @@ ifndef SHAREDLIBS
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4globman.$(SHEXT) && echo yes)
endif
# Define variable checking for existence of centrally installed headers,
# and global compound libraries installed (in future, the mechanism will
# be extended to the granular libraries as well. The liblist application
# must be re-engineered for that).
# If check will be true, avoid explicit definition of paths to INCFLAGS.
#
ifndef GLOBALLIBS
G4INCLUDE_EXEC := 0
else
G4INCLUDE_EXEC := $(shell [ -r $(G4INCLUDE)/globals.hh ] && echo 1)
endif
ifndef INCFLAGS
ifeq ($(G4INCLUDE_EXEC),1)
INCFLAGS := -I$(G4INCLUDE)
@@ -59,7 +52,6 @@ ifndef INCFLAGS
-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 \
@@ -76,6 +68,7 @@ ifndef INCFLAGS
-I$(G4BASE)/processes/hadronic/cross_sections/include \
-I$(G4BASE)/processes/hadronic/models/cascade/evaporation/include \
-I$(G4BASE)/processes/hadronic/models/cascade/utils/include \
-I$(G4BASE)/processes/hadronic/models/cascade/cascade/include \
-I$(G4BASE)/processes/hadronic/models/coherent_elastic/include \
-I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/body/include \
-I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/interface/include \
@@ -88,6 +81,7 @@ ifndef INCFLAGS
-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/scattering/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 \
@@ -112,34 +106,17 @@ ifndef INCFLAGS
-I$(G4BASE)/digits+hits/detector/include \
-I$(G4BASE)/digits+hits/hits/include \
-I$(G4BASE)/digits+hits/digits/include \
-I$(G4BASE)/persistency/include \
-I$(G4BASE)/readout/include \
-I$(G4BASE)/event/include \
-I$(G4BASE)/graphics_reps/include \
-I$(G4BASE)/intercoms/include \
-I$(G4BASE)/g3tog4/include
-I$(G4BASE)/intercoms/include
ifdef G4USE_G3TOG4
INCFLAGS += -I$(G4BASE)/g3tog4/include
endif
endif
endif
ifdef G4ODBMS
ifneq ($(G4INCLUDE_EXEC),1)
INCFLAGS += \
-I$(G4BASE)/persistency/global/include \
-I$(G4BASE)/persistency/digits+hits/hits/include \
-I$(G4BASE)/persistency/digits+hits/digits/include \
-I$(G4BASE)/persistency/events/include \
-I$(G4BASE)/persistency/geometry/global/include \
-I$(G4BASE)/persistency/geometry/solids/CSG/include \
-I$(G4BASE)/persistency/geometry/solids/Boolean/include \
-I$(G4BASE)/persistency/geometry/solids/specific/include \
-I$(G4BASE)/persistency/geometry/management/include \
-I$(G4BASE)/persistency/management/include \
-I$(G4SCHEMA_INCLUDE)
endif
INCFLAGS += -I$(OBJY_DIR)/include \
-I$(HEP_ODBMS_DIR)/include \
-DHep_HAS_BUILDIN_BOOL_CONSTANTS
endif
CPPFLAGS += $(INCFLAGS)
LDFLAGS += -L$(G4LIBDIR)
@@ -179,19 +156,15 @@ LDLIBS1 += $(EXTRALIBS)
# VISLIBS and UILIBS are now handled by the granular library script...
#
ifdef GLOBALLIBS
LDLIBS1 += $(VISLIBS) $(UILIBS)
endif
LDLIBS1 += $(VISLIBS) $(UILIBS) -lG4persistency
ifdef GLOBALLIBS
ifdef G4ODBMS
LDLIBS1 += -lG4persistency
ifdef G4USE_G3TOG4
LDLIBS1 += -lG3toG4
endif
LDLIBS2 := -lG4readout \
-lG4run \
-lG4event \
-lG3toG4 \
-lG4tracking \
-lG4parmodels \
-lG4processes \
@@ -204,9 +177,18 @@ ifdef GLOBALLIBS
-lG4intercoms \
-lG4global
else
# The next line specifically should read LDLIBS2 = , not LDLIBS2 :=, so
# that it is not expanded until the directory G4TMPDIR is created.
LDLIBS2 = $(shell \
# The next lines specifically should read LDLIBS2 = , not LDLIBS2 :=, so
# that it is not expanded until the directory G4TMPDIR is created.
ifeq ($(G4INCLUDE_EXEC),1)
LDLIBS2 = $(shell \
G4TMP=$(G4TMP); export G4TMP; \
if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
$(G4LIB)/$(G4SYSTEM)/liblist \
-m $(G4LIB)/$(G4SYSTEM) \
< $(G4LIB)/$(G4SYSTEM)/libname.map; fi)
else
LDLIBS2 = $(shell \
G4TMP=$(G4TMP); export G4TMP; \
if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
@@ -217,6 +199,7 @@ else
# expanded too soon. Hence extra libraries must have a different name...
# Extra libraries to resolve remaining circular dependencies...
# LDLIBS2EXTRA =
endif
endif
# LDLIBS3 contains the first set of low level libraries...
@@ -229,19 +212,6 @@ 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 G4ODBMS
LDFLAGS += -L$(OBJY_DIR)/lib \
-L$(HEP_ODBMS_DIR)/lib
# Note: $(G4ODBMS_LIBS) should be placed
# _before_ -l$(CLHEP_LIB)
LDLIBS4 += $(G4ODBMS_LIBS)
endif
ifdef G4USE_OSPACE
LDLIBS4 += $(OSPACELIBS)
endif
LDLIBS4 += $(LOADLIBS)
# Finally assemble libraries...
@@ -273,16 +243,7 @@ dependencies := $(patsubst %.cc,$(G4TMPDIR)/exe/%.d,$(sources))
LINK_DEPENDENCIES := $(G4TMPDIR)/exe/obj.last $(EXTRA_LINK_DEPENDENCIES)
ifndef G4ODBMS
.PHONY: bin clean clean_bin debug
else
.PHONY: bin clean clean_bin debug cleandb newboot newfd
endif
#
# Target "bin" requires dependency files when G4ODBMS=1.
# gmake must be recursively called with MAKE_DFILES=1.
#
# Make $(G4TARGET) executable.
@@ -338,20 +299,37 @@ else
-c $(OUT_OBJ)$(G4TMPDIR)/exe/$(G4TARGET).o $(G4TARGET).cc
endif
ifdef G4ODBMS
GPPFLAGS := "-MM"
else
GPPFLAGS := "-M"
endif
GPPFLAGS := "-M"
# Make the $(G4TARGET).d file and include it.
# The ideas for this come from the GNU Make Manual, Section 4.12,
# Generating Prerequisites Automatically. The g++ compiler has an
# option -M or -MM to write to standard output a list of dependencies
# based on the #include statements. The "sed" adds the dependency
# file itself as a second target. The result is a mini-makefile which
# specifies the .o and .d files as targets which depend on all the
# files found through the #include statements. This file is then
# included, causing GNU Make to honour these dependencies.
# The "set -e" causes the shell to exit with an error when the "g++"
# fails (otherwise it would only notice the last command in the
# pipeline, namely "sed"). GNU Make notices the error and exits
# sooner than it otherwise would (still not as soon as I expect,
# though!). Even then, an empty file is made, so "[ -s $@ ] || rm -f
# $@" removes it ([ -s filename ] gives zero exit code only if file
# exists and has a size greater than zero). This avoids making
# corrupt .d files which would play havoc with your next build.
$(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!& $@!' >$@
@set -e;\
g++ $(GPPFLAGS) $(CPPFLAGS) $< |\
sed 's!$(G4TARGET)\.o!$(G4TMPDIR)/exe/& $@!' >$@;\
[ -s $@ ] || rm -f $@
ifneq ($(dependencies),)
-include $(dependencies)
endif
@@ -370,44 +348,3 @@ clean_bin:
@echo Removing application $(G4TARGET) ...
@rm -f ./core
@rm -f $(G4BINDIR)/$(G4TARGET)
############################+ targets for G4ODBMS +############################
ifdef G4ODBMS
cleandb: clean newboot
$(G4EXAMPLE_BOOT):
@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)
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)
$(G4EXAMPLE_FD):
@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)
newfd:
@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 -############################
+38 -49
View File
@@ -1,12 +1,9 @@
# $Id: common.gmk,v 1.30 2001/06/25 10:58:51 morita Exp $
# $Id: common.gmk,v 1.34 2002/12/04 08:36:14 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.
# Actual targets splitted into common_kernel.gmk and common_objy.gmk,
# Y.Morita, 15/3/01.
ifndef G4LIBDIR
G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
@@ -26,33 +23,15 @@ ifneq ($(G4LIB_BUILD_STATIC),)
endif
# GPPFLAGS is defined here to make the .d file(s) and include it(them).
# This variable is actually used in common_kernel.gmk and common_objy.gmk.
ifdef G4ODBMS
GPPFLAGS := "-MM"
else
GPPFLAGS := "-M"
endif
GPPFLAGS := "-M"
###############################################################################
#
# Actual gmake targets.
#
#
# Target "lib" requires dependency files when G4ODBMS=1.
# gmake must be recursively called with MAKE_DFILES=1.
#
ifdef G4ODBMS
lib:
@if [ ! -d $(G4TMPDIR) ] ; then mkdir -p $(G4TMPDIR) ;fi
@(MAKE_DFILES=1; export MAKE_DFILES; $(MAKE) lib_d)
lib_d: $(g4libraries_to_build)
else
lib: $(g4libraries_to_build)
endif
ifneq ($(G4LIB_BUILD_SHARED),)
# Make shared library.
@@ -76,42 +55,56 @@ endif
###############################################################################
#
# Actual targets for .o, .d files and others are defined in
# common_kernel.gmk and common_objy.gmk.
# Actual targets for .o, .d files
#
ifndef G4ODBMS
include $(G4INSTALL)/config/common_kernel.gmk
$(G4TMPDIR)/%.o: src/%.cc
ifdef CPPVERBOSE
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F).o src/$*.cc
else
include $(G4INSTALL)/config/common_objy.gmk
@echo Compiling $*.cc ...
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F).o src/$*.cc
endif
###############################################################################
# .PHONY targets are executed regardless of time-stamp of any file of
# same name.
.PHONY: all obj lib clean clean_libs includes
obj: $(G4TMPDIR)/obj.last
# Touch the versioning file
$(G4TMPDIR)/obj.last: $(objects) $(schema_o)
$(G4TMPDIR)/obj.last: $(objects)
@touch $@
# 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/).
# schema_hh and schema_ref_hh are defined in common_objy.gmk.
$(G4TMPDIR)/%.d: src/%.cc $(schema_hh) $(schema_ref_hh)
# The ideas for this come from the GNU Make Manual, Section 4.12,
# Generating Prerequisites Automatically. The g++ compiler has an
# option -M or -MM to write to standard output a list of dependencies
# based on the #include statements. The "sed" adds the dependency
# file itself as a second target. The result is a mini-makefile which
# specifies the .o and .d files as targets which depend on all the
# files found through the #include statements. This file is then
# included, causing GNU Make to honour these dependencies.
# The "set -e" causes the shell to exit with an error when the "g++"
# fails (otherwise it would only notice the last command in the
# pipeline, namely "sed"). GNU Make notices the error and exits
# sooner than it otherwise would (still not as soon as I expect,
# though!). Even then, an empty file is made, so "[ -s $@ ] || rm -f
# $@" removes it ([ -s filename ] gives zero exit code only if file
# exists and has a size greater than zero). This avoids making
# corrupt .d files which would play havoc with your next build.
$(G4TMPDIR)/%.d: src/%.cc
@echo Making dependency for file $< ...
@if [ ! -d $(G4TMPDIR) ] ; then mkdir -p $(G4TMPDIR) ;fi
@($(ECHO) $(G4TMPDIR)/\\c ; \
g++ $(GPPFLAGS) $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/$*.o!& $@!' >$@
@set -e;\
g++ $(GPPFLAGS) $(CPPFLAGS) $< |\
sed 's!$*\.o!$(G4TMPDIR)/& $@!' >$@;\
[ -s $@ ] || rm -f $@
ifneq ($(dependencies),)
ifndef G4ODBMS
-include $(dependencies)
else
ifdef MAKE_DFILES
-include $(dependencies)
endif
endif
endif
#
@@ -138,9 +131,6 @@ clean:
@echo Cleaning up ...
@rm -f $(G4LIBDIR)/lib$(name).a
@rm -f $(G4LIBDIR)/lib$(name).$(SHEXT)
ifdef schema_hh
@rm -f $(schema_hh) $(schema_ref_hh)
endif
@rm -rf $(G4TMPDIR)
endif
@@ -151,4 +141,3 @@ clean_libs:
@if [ -f $(G4LIBDIR)/lib$(name).$(SHEXT) ] ; then \
$(ECHO) Removing library lib$(name).$(SHEXT) ... ; \
$(RM) -f $(G4LIBDIR)/lib$(name).$(SHEXT) ; fi
-20
View File
@@ -1,20 +0,0 @@
# $Id: common_kernel.gmk,v 1.3 2001/06/21 17:48:33 morita Exp $
# ----------------------------------------------------------------
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
# ----------------------------------------------------------------
# Splitted from common.gmk for transient part of G4. Y.Morita, 15/3/01.
$(G4TMPDIR)/%.o: src/%.cc
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
# .PHONY targets are executed regardless of time-stamp of any file of
# same name.
.PHONY: all obj lib clean clean_libs includes
obj: $(G4TMPDIR)/obj.last
-105
View File
@@ -1,105 +0,0 @@
# $Id: common_objy.gmk,v 1.3 2001/06/22 15:09:25 gunter Exp $
# ----------------------------------------------------------------
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
# ----------------------------------------------------------------
# Splitted from common.gmk for persistency part of G4. Y.Morita, 15/3/01.
PWD := $(shell (dirname `pwd`/dummy | sed -e 's/ //g'))
ifdef G4ODBMS_INSTALLATION
G4_SCHEMA_NAME := -schema Geant4
else
G4_SCHEMA_NAME :=
endif
G4SCHEMA_HEADER_DIR := $(G4TMPDIR)
G4DDLX := ooddlx -notitle $(G4_SCHEMA_NAME)
G4DDLX_FLAGS += -header_suffix .hh -ref_suffix _ref.hh -c++_suffix _ddl.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))
schema_cc := $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%_ddl.cc,$(schema_ddl))
schema_o := $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%_ddl.o ,$(schema_ddl))
# 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))
temporaries += $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_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))
###############################################################################
#
# Actual target.
#
# Make the .o files.
$(G4TMPDIR)/%.o: src/%.cc $(G4TMPDIR)/%.d $(G4OODDLX_BOOT)
ifdef CPPVERBOSE
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ) $@ $<
else
@echo Compiling $*.cc ...
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ) $@ $<
endif
$(G4TMPDIR)/%_ddl.o: $(G4SCHEMA_HEADER_DIR)/%_ddl.cc \
$(G4SCHEMA_HEADER_DIR)/%.hh \
$(G4SCHEMA_HEADER_DIR)/%_ref.hh \
$(G4TMPDIR)/%.d $(G4OODDLX_BOOT)
ifdef CPPVERBOSE
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ) $@ $<
else
@echo Compiling $*.cc ...
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ) $@ $<
endif
# Make the temporary files.
.PRECIOUS: $(G4SCHEMA_HEADER_DIR)/%_ddl.cc $(G4SCHEMA_HEADER_DIR)/%.hh \
$(G4SCHEMA_HEADER_DIR)/%_ref.hh
$(G4SCHEMA_HEADER_DIR)/%_ddl.cc \
$(G4SCHEMA_HEADER_DIR)/%.hh \
$(G4SCHEMA_HEADER_DIR)/%_ref.hh: include/%.ddl $(G4OODDLX_BOOT)
ifndef G4OODDLX_BOOT
@echo G4OODDLX_BOOT is not defined. Stop.
exit 1
endif
@if [ ! -d $(G4TMPDIR) ] ; then mkdir -p $(G4TMPDIR) ;fi
@if [ ! -d $(G4SCHEMA_HEADER_DIR) ] ; then mkdir -p $(G4SCHEMA_HEADER_DIR) ;fi
ifdef CPPVERBOSE
(cd $(G4SCHEMA_HEADER_DIR) ; \
$(G4DDLX) $(G4DDLX_FLAGS) $(CPPFLAGS) $(PWD)/$< $(G4OODDLX_BOOT) )
else
@echo Preprocessing $< ...
@(cd $(G4SCHEMA_HEADER_DIR) ; \
$(G4DDLX) $(G4DDLX_FLAGS) $(CPPFLAGS) $(PWD)/$< $(G4OODDLX_BOOT) )
endif
# .PHONY targets are executed regardless of time-stamp of any file of
# same name.
.PHONY: all obj lib clean clean_libs includes
obj: $(G4TMPDIR)/obj.last
$(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...")
$(G4SCHEMA_BOOT):
@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 $(HEP_ODBMS_DIR)/schema/HEP_BASE \
$(G4SCHEMA_BOOT) $(G4SCHEMA_FDID)
+2 -10
View File
@@ -1,4 +1,4 @@
# $Id: globlib.gmk,v 1.18 2001/06/26 02:16:10 morita Exp $
# $Id: globlib.gmk,v 1.19 2002/11/25 12:10:44 gcosmo Exp $
# --------------------------------------------------------------
# Script for compound libraries. Gabriele Cosmo, 25/6/98.
# --------------------------------------------------------------
@@ -13,15 +13,10 @@ G4LIBDIR = $(G4LIB)/$(G4SYSTEM)
.PHONY : all glob global objs includes clean clean_libs wipe_libs
all: makesub $(G4SCHEMA_BOOT)
all: makesub
makesub:
@for dir in $(SUBDIRS); do (cd $$dir && $(MAKE)); done
ifdef G4ODBMS
@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
endif
g4libraries_to_build:=
@@ -100,9 +95,6 @@ objs:
includes::
@for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@ ); done
ifdef G4ODBMS
-@cp -p $(G4SCHEMA_INCLUDE)/*.hh $(G4INCLUDE)/
endif
wipe_libs:
@for lib in $(SUBLIBS); do (rm -f $(G4LIBDIR)/lib$$lib.a); done
+144 -96
View File
@@ -1,4 +1,4 @@
/* $Id: liblist.c,v 1.14 2002/05/03 12:59:08 gcosmo Exp $ */
/* $Id: liblist.c,v 1.17 2002/11/22 11:53:10 gcosmo Exp $ */
/*
Given a "libname.map" file on standard input and a list or directory
@@ -9,7 +9,9 @@ of .d dependency files liblist produces:
original libname.map file, then reordered according to the dependencies
found in the .d files. This option is used for compiling the file
libname.map from all the dependencies.
The .d files are specfied in the argument(s).
c) with -m <lpath> option, the whole existing libraries list ordered
according to the libname.map, where libraries are placed in <lpath>.
The .d files are specified in the argument(s).
The libname.map is on standard input.
Usage:
@@ -18,8 +20,11 @@ Usage:
liblist -l *.d < libname.map
liblist -ld <ddir> < libname.map
liblist -l -d <ddir> < libname.map
where <ddir> is a directory name of a directory which is recursively
searched for dependency files.
liblist -m <lpath> < libname.map
where:
<ddir> is a directory name of a directory which is recursively
searched for dependency files
<lpath> is the path where libraries are located
Frank Behner, John Allison 13th February 1999.
*/
@@ -103,7 +108,13 @@ char** parsedir(char *directory,int *argc)
}
}
else
perror(" No status");
{
fprintf
(stderr,
" No status - perhaps file %s does not exist.\n",
directory);
exit(1);
}
}
if(buffer) free(buffer);
@@ -116,9 +127,10 @@ char** parsedir(char *directory,int *argc)
int main (int argc, char** argv) {
char static buffer[BUFSIZE],*bufferPtr,workbuf[256];
char *ptr,*p,**pp,**pp1,**pp2,*directory=0;
char *ptr,*p,**pp,**pp1,**pp2,*directory=0,*libpath=0;
char **rargv;
int i,optl=0,swapping,c,rargc;
char libname[128];
int i,optl=0,optm=0,swapping,c,rargc;
FILE *fp;
#if defined ( _WIN32 ) || defined ( __CYGWIN__ ) || defined ( __CYGWIN32__ )
@@ -138,7 +150,7 @@ int main (int argc, char** argv) {
struct libmap_ *libmap=0,*libmapPtr=0,*libmapPtr1=0,*libmapPtr2=0,
*prevPtr1,*prevPtr2,*tmpp,*userLibmapPtr;
while((c=getopt(argc,argv,"ld:"))!=EOF)
while((c=getopt(argc,argv,"ld: m:"))!=EOF)
{
switch(c)
{
@@ -148,6 +160,10 @@ int main (int argc, char** argv) {
case 'd':
directory=strdup(optarg);
break;
case 'm':
optm=1;
libpath=strdup(optarg);
break;
}
}
@@ -172,8 +188,10 @@ int main (int argc, char** argv) {
}
else
{
fprintf(stderr," ERROR: If you specify a directory don't also specify files\n");
exit(-1);
fprintf
(stderr,
" ERROR: If you specify a directory don't also specify files\n");
exit(1);
}
}
@@ -215,7 +233,7 @@ int main (int argc, char** argv) {
libmapPtr->uses=(char**)calloc(NLIBMAX,sizeof(char*));
/* If option -l not specified, fill uses list... */
if(!optl)
if(!optl && !optm)
{
pp=libmapPtr->uses;
if(ptr)
@@ -230,34 +248,39 @@ int main (int argc, char** argv) {
}
}
/* Get directory name... */
gets(buffer);
ptr=strtok(buffer,"/");
if(!ptr)
{
fprintf(stderr," ERROR: \"/\" before \"source\" expected.\n");
exit(1);
}
while(ptr&&strcmp (ptr,"source"))ptr=strtok(NULL,"/");
ptr=strtok(NULL,"/");
if(!ptr)
{
fprintf(stderr," ERROR: \"source\" expected.\n");
exit(1);
}
libmapPtr->trigger=(char*)malloc(TRIGSIZE);
strcpy(libmapPtr->trigger,ptr);
ptr=strtok(NULL,"/");
while(ptr&&strcmp(ptr,"GNUmakefile"))
{
strcat(libmapPtr->trigger,"/");
strcat(libmapPtr->trigger,ptr);
ptr=strtok(NULL,"/");
}
if(!ptr)
{
fprintf(stderr," ERROR: \"source/<unique-sub-path>/GNUmakefile\" expected.\n");
exit(1);
if(!optm)
{
/* Get directory name... */
gets(buffer);
ptr=strtok(buffer,"/");
if(!ptr)
{
fprintf(stderr," ERROR: \"/\" before \"source\" expected.\n");
exit(1);
}
while(ptr&&strcmp (ptr,"source"))ptr=strtok(NULL,"/");
ptr=strtok(NULL,"/");
if(!ptr)
{
fprintf(stderr," ERROR: \"source\" expected.\n");
exit(1);
}
libmapPtr->trigger=(char*)malloc(TRIGSIZE);
strcpy(libmapPtr->trigger,ptr);
ptr=strtok(NULL,"/");
while(ptr&&strcmp(ptr,"GNUmakefile"))
{
strcat(libmapPtr->trigger,"/");
strcat(libmapPtr->trigger,ptr);
ptr=strtok(NULL,"/");
}
if(!ptr)
{
fprintf
(stderr,
" ERROR: \"source/<unique-sub-path>/GNUmakefile\" expected.\n");
exit(1);
}
}
}
@@ -310,69 +333,72 @@ int main (int argc, char** argv) {
userLibmapPtr=0;
}
/* Look for a "used" library and add it to the "user" uses list... */
bufferPtr=strtok(NULL,"\n"); /* Start *after* ":". */
if (!bufferPtr)
if(!optm)
{
fprintf(stderr," WARNING: It seems there is nothing after \':\' in dependency file %s.\n", rargv[i]);
}
else {
do
{
for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
{
/* Look for trigger string. */
strcpy(workbuf,libmapPtr->trigger);
strcat(workbuf,"/include");
ptr=strstr(bufferPtr,workbuf);
if(ptr && (userLibmapPtr != libmapPtr))
{
libmapPtr->used=1;
if(userLibmapPtr)
{
for(pp=userLibmapPtr->uses;*pp;pp++)
{
if(strcmp(*pp,libmapPtr->lib)==0)break;
}
if(!*pp)*pp=libmapPtr->lib;
}
}
/* Also look for library name in case header files are
placed in temporary directories under a subdirectory
with the same name as the library name. This can
happen with Objectivity which makes header files
from .ddl files and places them in a temporary
directory. */
strcpy(workbuf,libmapPtr->lib);
strcat(workbuf,"/");
ptr=strstr(bufferPtr,workbuf);
if(ptr && (userLibmapPtr != libmapPtr))
{
libmapPtr->used=1;
if(userLibmapPtr)
{
for(pp=userLibmapPtr->uses;*pp;pp++)
{
if(strcmp(*pp,libmapPtr->lib)==0)break;
}
if(!*pp)*pp=libmapPtr->lib;
}
}
}
fgets(buffer,BUFSIZE,fp);
bufferPtr=buffer;
/* Look for a "used" library and add it to the "user" uses list... */
bufferPtr=strtok(NULL,"\n"); /* Start *after* ":". */
if (!bufferPtr)
{
fprintf(stderr," WARNING: It seems there is nothing after \':\' in dependency file %s.\n", rargv[i]);
}
else {
do
{
for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
{
/* Look for trigger string. */
strcpy(workbuf,libmapPtr->trigger);
strcat(workbuf,"/include");
ptr=strstr(bufferPtr,workbuf);
if(ptr && (userLibmapPtr != libmapPtr))
{
libmapPtr->used=1;
if(userLibmapPtr)
{
for(pp=userLibmapPtr->uses;*pp;pp++)
{
if(strcmp(*pp,libmapPtr->lib)==0)break;
}
if(!*pp)*pp=libmapPtr->lib;
}
}
/* Also look for library name in case header files are
placed in temporary directories under a subdirectory
with the same name as the library name. This can
happen with Objectivity which makes header files
from .ddl files and places them in a temporary
directory. */
strcpy(workbuf,libmapPtr->lib);
strcat(workbuf,"/");
ptr=strstr(bufferPtr,workbuf);
if(ptr && (userLibmapPtr != libmapPtr))
{
libmapPtr->used=1;
if(userLibmapPtr)
{
for(pp=userLibmapPtr->uses;*pp;pp++)
{
if(strcmp(*pp,libmapPtr->lib)==0)break;
}
if(!*pp)*pp=libmapPtr->lib;
}
}
}
fgets(buffer,BUFSIZE,fp);
bufferPtr=buffer;
#if defined ( _WIN32 ) || defined ( __CYGWIN__ ) || defined ( __CYGWIN32__ )
while ( ptr=strchr(buffer,'\\') ) *ptr='/';
while ( ptr=strchr(buffer,'\\') ) *ptr='/';
while (ntg4tmp1 && (ptr=strstr(buffer,ntg4tmp1)) )
{
for(nti=0;nti<strlen(ntg4tmp1);nti++) ptr[nti]=' ';
}
while (ntg4tmp1 && (ptr=strstr(buffer,ntg4tmp1)) )
{
for(nti=0;nti<strlen(ntg4tmp1);nti++) ptr[nti]=' ';
}
#endif
} while(!feof(fp));
fclose(fp);
} while(!feof(fp));
fclose(fp);
}
}
}
@@ -509,6 +535,28 @@ int main (int argc, char** argv) {
printf("source/%s/GNUmakefile\n",libmapPtr->trigger);
}
}
else if (optm)
{
/* Write out full library list... */
for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
{
/* Check existance of libraries and print out only installed ones */
sprintf(libname, "%s/lib%s.a", libpath, libmapPtr->lib);
if (access(libname,R_OK))
{
sprintf(libname, "%s/lib%s.so", libpath, libmapPtr->lib);
if (!access(libname,R_OK))
{
printf("-l%s ",libmapPtr->lib);
}
}
else
{
printf("-l%s ",libmapPtr->lib);
}
libmapPtr=libmapPtr->next;
}
}
else
{
/* Add dependent libraries... */
+23
View File
@@ -0,0 +1,23 @@
# $Id: GNUmakefile,v 1.1 2002/12/13 15:47:31 stesting Exp $
# --------------------------------------------------------------
# GNUmakefile for tests module. Gabriele Cosmo, 27/06/98.
# --------------------------------------------------------------
name := Marker
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/scripts/binmake.gmk
CXXFLAGS_FINAL := $(CXXFLAGS)
INCFLAGS_FINAL := $(INCFLAGS)
LDLIBS_FINAL := $(LDLIBS)
#LDFLAGS_FINAL := $(LDFLAGS)
+354
View File
@@ -0,0 +1,354 @@
# $Id: binmake.gmk,v 1.1 2002/12/13 15:47:27 stesting Exp $
# ----------------------------------------------------------
# Script defining rules and paths for making binaries.
# First implementation: Gabriele Cosmo, 25/06/1998.
# ----------------------------------------------------------
ifndef LDFLAGS
include $(G4INSTALL)/config/architecture.gmk
endif
G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
# Define variable checking for existence of centrally installed headers.
# If check will be true, avoid explicit definition of paths to INCFLAGS.
#
G4INCLUDE_EXEC := $(shell [ -r $(G4INCLUDE)/globals.hh ] && echo 1)
include $(G4INSTALL)/config/G4UI_USE.gmk
include $(G4INSTALL)/config/G4VIS_USE.gmk
include $(G4INSTALL)/config/interactivity.gmk
include $(G4INSTALL)/config/analysis.gmk
ifndef G4LIB_USE_GRANULAR
GLOBALLIBS := 1
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
ifndef INCFLAGS
ifeq ($(G4INCLUDE_EXEC),1)
INCFLAGS := -I$(G4INCLUDE)
else
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)/parameterisations/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/decay/include \
-I$(G4BASE)/processes/optical/include \
-I$(G4BASE)/processes/transportation/include \
-I$(G4BASE)/processes/parameterisation/include \
-I$(G4BASE)/processes/photolepton_hadron/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/cascade/evaporation/include \
-I$(G4BASE)/processes/hadronic/models/cascade/utils/include \
-I$(G4BASE)/processes/hadronic/models/cascade/cascade/include \
-I$(G4BASE)/processes/hadronic/models/coherent_elastic/include \
-I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/body/include \
-I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/interface/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/scattering/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/models/radiative_decay/include \
-I$(G4BASE)/processes/hadronic/models/leading_particle/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/verification/include \
-I$(G4BASE)/geometry/magneticfield/include \
-I$(G4BASE)/geometry/biasing/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)/persistency/include \
-I$(G4BASE)/readout/include \
-I$(G4BASE)/event/include \
-I$(G4BASE)/graphics_reps/include \
-I$(G4BASE)/intercoms/include
ifdef G4USE_G3TOG4
INCFLAGS += -I$(G4BASE)/g3tog4/include
endif
endif
endif
CPPFLAGS_FINAL := $(CPPFLAGS)
CPPFLAGS += $(INCFLAGS)
LDFLAGS += -L$(G4LIBDIR)
G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(G4TARGET)
G4BINDIR := $(G4BIN)/$(G4SYSTEM)
LDFLAGS_FINAL := $(LDFLAGS)
ifdef G4EXLIB
G4LIBDIR := $(G4TMPDIR)
LDFLAGS += -L$(G4LIBDIR)
ifdef SHAREDLIBS
ifdef G4RUNPATHOPTION
# For the example dependent directory, keep the
# path to the shared lib in the executable.
LDFLAGS += $(G4RUNPATHOPTION)$(G4LIBDIR)
endif
endif
include $(G4INSTALL)/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) -lG4persistency
ifdef G4USE_G3TOG4
LDLIBS1 += -lG3toG4
endif
LDLIBS2 := -lG4readout \
-lG4run \
-lG4event \
-lG4tracking \
-lG4parmodels \
-lG4processes \
-lG4digits+hits \
-lG4track \
-lG4particles \
-lG4geometry \
-lG4materials \
-lG4graphics_reps \
-lG4intercoms \
-lG4global
else
# The next lines specifically should read LDLIBS2 = , not LDLIBS2 :=, so
# that it is not expanded until the directory G4TMPDIR is created.
ifeq ($(G4INCLUDE_EXEC),1)
LDLIBS2 = $(shell \
G4TMP=$(G4TMP); export G4TMP; \
if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
$(G4LIB)/$(G4SYSTEM)/liblist \
-m $(G4LIB)/$(G4SYSTEM) \
< $(G4LIB)/$(G4SYSTEM)/libname.map; fi)
else
LDLIBS2 = $(shell \
G4TMP=$(G4TMP); export G4TMP; \
if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
$(G4LIB)/$(G4SYSTEM)/liblist \
-d $(G4TMPDIR) \
< $(G4LIB)/$(G4SYSTEM)/libname.map; fi)
# Warning: do not add to LDLIBS2 with += because this causes it to be
# expanded too soon. Hence extra libraries must have a different name...
# Extra libraries to resolve remaining circular dependencies...
# LDLIBS2EXTRA =
endif
endif
# LDLIBS3 contains the first set of low level libraries...
#
LDLIBS3 += $(INTYLIBS)
LDLIBS3 += $(ANALYSISLIBS)
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...
#
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
ifdef transform-RPath
#invoke system specific transformation of
include $(G4INSTALL)/config/sys/$(G4SYSTEM)-runpath.gmk
endif
sources := $(wildcard $(G4TARGET).cc)
objects := $(patsubst %.cc,$(G4TMPDIR)/exe/%.o,$(sources))
dependencies := $(patsubst %.cc,$(G4TMPDIR)/exe/%.d,$(sources))
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 ..."
@if [ ! \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
echo "ERROR: No liblist program or library map file."; \
echo " These are needed for building with granular"; \
echo " libraries."; \
echo ' cd $$G4INSTALL/source'; \
echo " gmake"; \
echo " or if you are sure you have already made all the"; \
echo " granular libraries:"; \
echo " gmake libmap"; \
exit 1; fi
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
GPPFLAGS := "-M"
# Make the $(G4TARGET).d file and include it.
# The ideas for this come from the GNU Make Manual, Section 4.12,
# Generating Prerequisites Automatically. The g++ compiler has an
# option -M or -MM to write to standard output a list of dependencies
# based on the #include statements. The "sed" adds the dependency
# file itself as a second target. The result is a mini-makefile which
# specifies the .o and .d files as targets which depend on all the
# files found through the #include statements. This file is then
# included, causing GNU Make to honour these dependencies.
# The "set -e" causes the shell to exit with an error when the "g++"
# fails (otherwise it would only notice the last command in the
# pipeline, namely "sed"). GNU Make notices the error and exits
# sooner than it otherwise would (still not as soon as I expect,
# though!). Even then, an empty file is made, so "[ -s $@ ] || rm -f
# $@" removes it ([ -s filename ] gives zero exit code only if file
# exists and has a size greater than zero). This avoids making
# corrupt .d files which would play havoc with your next build.
$(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 $<...
@set -e;\
g++ $(GPPFLAGS) $(CPPFLAGS) $< |\
sed 's!$(G4TARGET)\.o!$(G4TMPDIR)/exe/& $@!' >$@;\
[ -s $@ ] || rm -f $@
ifneq ($(dependencies),)
-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)
+14 -10
View File
@@ -117,16 +117,6 @@ setenv G4ANALYSIS_USE 1
echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE"
endif
#+
#
# g4persistency
#
if ( X$g4use_hepodbms == Xy ) then
setenv G4USE_HEPODBMS 1
source \$G4INSTALL/examples/extended/persistency/PersistentEx01/g4odbms_setup.csh
echo "On this machine the G4USE_HEPODBMS=\$G4USE_HEPODBMS"
endif
#
# g4ui
#
@@ -283,6 +273,20 @@ setenv OGLHOME "$g4vis_oglhome"
echo "On this machine the OGLHOME=\$OGLHOME"
endif
#
# Use G3TOG4 module
#
#+
if ( X$g4wlib_build_g3tog4 == Xy ) then
setenv G4LIB_BUILD_G3TOG4 1
echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
endif
if ( X$g4w_use_g3tog4 == Xy ) then
setenv G4USE_G3TOG4 1
echo "On this machine the G4USE_G3TOG4=\$G4USE_G3TOG4"
endif
#+
#
# g4shared
+112 -11
View File
@@ -29,7 +29,9 @@ $spitshell >env.sh <<!GROK!THIS!
#+
G4SYSTEM="$g4system"
export G4SYSTEM
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4SYSTEM=\$G4SYSTEM"
fi
#
# g4dirs.U
@@ -37,49 +39,63 @@ echo "On this machine the G4SYSTEM=\$G4SYSTEM"
#+
G4INSTALL="$g4install"
export G4INSTALL
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4INSTALL=\$G4INSTALL"
fi
#+
if [ X$g4include != X ] ; then
G4INCLUDE="$g4include"
export G4INCLUDE
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4INCLUDE=\$G4INCLUDE"
fi
fi
#+
if [ X$g4lib != X ] ; then
G4LIB="$g4lib"
export G4LIB
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4LIB=\$G4LIB"
fi
fi
#+
if [ X$g4levelgammadata != X ] ; then
G4LEVELGAMMADATA="$g4levelgammadata"
export G4LEVELGAMMADATA
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4LEVELGAMMADATA=\$G4LEVELGAMMADATA"
fi
fi
#+
if [ X$g4radioactivedata != X ] ; then
G4RADIOACTIVEDATA="$g4radioactivedata"
export G4RADIOACTIVEDATA
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4RADIOACTIVEDATA=\$G4RADIOACTIVEDATA"
fi
fi
#+
if [ X$g4ledata != X ] ; then
G4LEDATA="$g4ledata"
export G4LEDATA
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4LEDATA=\$G4LEDATA"
fi
fi
#+
if [ X$g4neutronhpcrosssections != X ] ; then
NeutronHPCrossSections="$g4neutronhpcrosssections"
export NeutronHPCrossSections
if [ X\$g4non_display = X ] ; then
echo "On this machine the NeutronHPCrossSections=\$NeutronHPCrossSections"
fi
fi
#
# g4clhep.U
@@ -87,29 +103,37 @@ fi
if [ X$g4clhep_base_dir != X ] ; then
CLHEP_BASE_DIR="$g4clhep_base_dir"
export CLHEP_BASE_DIR
if [ X\$g4non_display = X ] ; then
echo "On this machine the CLHEP_BASE_DIR=\$CLHEP_BASE_DIR"
fi
fi
#+
if [ X$g4clhep_include_dir != X ] ; then
CLHEP_INCLUDE_DIR="$g4clhep_include_dir"
export CLHEP_INCLUDE_DIR
if [ X\$g4non_display = X ] ; then
echo "On this machine the CLHEP_INCLUDE_DIR=\$CLHEP_INCLUDE_DIR"
fi
fi
#+
if [ X$g4clhep_lib_dir != X ] ; then
CLHEP_LIB_DIR="$g4clhep_lib_dir"
export CLHEP_LIB_DIR
if [ X\$g4non_display = X ] ; then
echo "On this machine the CLHEP_LIB_DIR=\$CLHEP_LIB_DIR"
fi
fi
#+
if [ X$g4clhep_lib != X ] ; then
CLHEP_LIB="$g4clhep_lib"
export CLHEP_LIB
if [ X\$g4non_display = X ] ; then
echo "On this machine the CLHEP_LIB=\$CLHEP_LIB"
fi
fi
#+
#
@@ -118,8 +142,10 @@ fi
if [ X$g4debug != X ] ; then
G4DEBUG="$g4debug"
export G4DEBUG
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4DEBUG=\$G4DEBUG"
fi
fi
#
# g4analysis
@@ -128,18 +154,9 @@ fi
if [ X$g4wanalysis_use = Xy ] ; then
G4ANALYSIS_USE=1
export G4ANALYSIS_USE
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE"
fi
#+
#
# g4persistency
#
if [ X$g4use_hepodbms = Xy ] ; then
G4USE_HEPODBMS=1
export G4USE_HEPODBMS
. \$G4INSTALL/examples/extended/persistency/PersistentEx01/g4odbms_setup.sh
echo "On this machine the G4USE_HEPODBMS=\$G4USE_HEPODBMS"
fi
fi
#
@@ -149,56 +166,72 @@ fi
if [ X$g4ui_build_xaw_session = Xy ] ; then
G4UI_BUILD_XAW_SESSION=1
export G4UI_BUILD_XAW_SESSION
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4UI_BUILD_XAW_SESSION=\$G4UI_BUILD_XAW_SESSION"
fi
fi
#+
if [ X$g4ui_use_xaw = Xy ] ; then
G4UI_USE_XAW=1
export G4UI_USE_XAW
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4UI_USE_XAW=\$G4UI_USE_XAW"
fi
fi
#+
if [ X$g4ui_build_xm_session = Xy ] ; then
G4UI_BUILD_XM_SESSION=1
export G4UI_BUILD_XM_SESSION
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4UI_BUILD_XM_SESSION=\$G4UI_BUILD_XM_SESSION"
fi
fi
#+
if [ X$g4ui_use_xm = Xy ] ; then
G4UI_USE_XM=1
export G4UI_USE_XM
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4UI_USE_XM=\$G4UI_USE_XM"
fi
fi
#+
if [ X$g4ui_build_win32_session = Xy ] ; then
G4UI_BUILD_WIN32_SESSION=1
export G4UI_BUILD_WIN32_SESSION
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4UI_BUILD_WIN32_SESSION=\$G4UI_BUILD_WIN32_SESSION"
fi
fi
#+
if [ X$g4ui_use_win32 = Xy ] ; then
G4UI_USE_WIN32=1
export G4UI_USE_WIN32
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4UI_USE_WIN32=\$G4UI_USE_WIN32"
fi
fi
#+
if [ X$g4ui_build_wo_session = Xy ] ; then
G4UI_BUILD_WO_SESSION=1
export G4UI_BUILD_WO_SESSION
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4UI_BUILD_WO_SESSION=\$G4UI_BUILD_WO_SESSION"
fi
fi
#+
if [ X$g4ui_use_wo = Xy ] ; then
G4UI_USE_WO=1
export G4UI_USE_WO
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4UI_USE_WO=\$G4UI_USE_WO"
fi
fi
#
@@ -208,119 +241,173 @@ fi
if [ X$g4vis_build_dawn_driver = Xy ] ; then
G4VIS_BUILD_DAWN_DRIVER=1
export G4VIS_BUILD_DAWN_DRIVER
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER"
fi
fi
#+
if [ X$g4vis_build_opacs_driver = Xy ] ; then
G4VIS_BUILD_OPACS_DRIVER=1
export G4VIS_BUILD_OPACS_DRIVER
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_BUILD_OPACS_DRIVER=\$G4VIS_BUILD_OPACS_DRIVER"
fi
fi
#+
if [ X$g4vis_build_openglx_driver = Xy ] ; then
G4VIS_BUILD_OPENGLX_DRIVER=1
export G4VIS_BUILD_OPENGLX_DRIVER
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER"
fi
fi
#+
if [ X$g4vis_build_openglxm_driver = Xy ] ; then
G4VIS_BUILD_OPENGLXM_DRIVER=1
export G4VIS_BUILD_OPENGLXM_DRIVER
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER"
fi
fi
#+
if [ X$g4vis_build_openglwin32_driver = Xy ] ; then
G4VIS_BUILD_OPENGLWIN32_DRIVER=1
export G4VIS_BUILD_OPENGLWIN32_DRIVER
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER"
fi
fi
#+
if [ X$g4vis_build_oix_driver = Xy ] ; then
G4VIS_BUILD_OIX_DRIVER=1
export G4VIS_BUILD_OIX_DRIVER
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER"
fi
fi
#+
if [ X$g4vis_build_oiwin32_driver = Xy ] ; then
G4VIS_BUILD_OIWIN32_DRIVER=1
export G4VIS_BUILD_OIWIN32_DRIVER
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER"
fi
fi
#+
if [ X$g4vis_build_vrml_driver = Xy ] ; then
G4VIS_BUILD_VRML_DRIVER=1
export G4VIS_BUILD_VRML_DRIVER
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER"
fi
fi
#+
if [ X$g4vis_use_dawn = Xy ] ; then
G4VIS_USE_DAWN=1
export G4VIS_USE_DAWN
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN"
fi
fi
#+
if [ X$g4vis_use_opacs = Xy ] ; then
G4VIS_USE_OPACS=1
export G4VIS_USE_OPACS
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_USE_OPACS=\$G4VIS_USE_OPACS"
fi
fi
#+
if [ X$g4vis_use_openglx = Xy ] ; then
G4VIS_USE_OPENGLX=1
export G4VIS_USE_OPENGLX
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX"
fi
fi
#+
if [ X$g4vis_use_openglxm = Xy ] ; then
G4VIS_USE_OPENGLXM=1
export G4VIS_USE_OPENGLXM
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM"
fi
fi
#+
if [ X$g4vis_use_openglwin32 = Xy ] ; then
G4VIS_USE_OPENGLWIN32=1
export G4VIS_USE_OPENGLWIN32
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32"
fi
fi
#+
if [ X$g4vis_use_oix = Xy ] ; then
G4VIS_USE_OIX=1
export G4VIS_USE_OIX
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX"
fi
fi
#+
if [ X$g4vis_use_oiwin32 = Xy ] ; then
G4VIS_USE_OIWIN32=1
export G4VIS_USE_OIWIN32
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32"
fi
fi
#+
if [ X$g4vis_use_vrml = Xy ] ; then
G4VIS_USE_VRML=1
export G4VIS_USE_VRML
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML"
fi
fi
#+
if [ X$g4vis_oglhome != X ] ; then
OGLHOME="$g4vis_oglhome"
export OGLHOME
if [ X\$g4non_display = X ] ; then
echo "On this machine the OGLHOME=\$OGLHOME"
fi
fi
#
# Use G3TOG4 module
#
#+
if [ X$g4wlib_build_g3tog4 = Xy ] ; then
G4LIB_BUILD_G3TOG4=1
export G4LIB_BUILD_G3TOG4
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
fi
fi
if [ X$g4w_use_g3tog4 = Xy ] ; then
G4USE_G3TOG4=1
export G4USE_G3TOG4
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4USE_G3TOG4=\$G4USE_G3TOG4"
fi
fi
#+
@@ -330,25 +417,33 @@ fi
if [ X$g4lib_build_shared = Xy ] ; then
G4LIB_BUILD_SHARED=1
export G4LIB_BUILD_SHARED
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED"
fi
fi
if [ X$g4lib_build_static = Xy ] ; then
G4LIB_BUILD_STATIC=1
export G4LIB_BUILD_STATIC
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC"
fi
fi
if [ X$g4lib_use_shared = Xy ] ; then
G4LIB_USE_SHARED=1
export G4LIB_USE_SHARED
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4LIB_USE_SHARED=\$G4LIB_USE_SHARED"
fi
fi
if [ X$g4lib_use_static = Xy ] ; then
G4LIB_USE_STATIC=1
export G4LIB_USE_STATIC
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4LIB_USE_STATIC=\$G4LIB_USE_STATIC"
fi
fi
#+
@@ -358,7 +453,9 @@ fi
if [ X$g4lib_use_granular = Xy ] ; then
G4LIB_USE_GRANULAR=1
export G4LIB_USE_GRANULAR
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR"
fi
fi
#####################################################################
@@ -373,9 +470,13 @@ $spitshell >>env.sh <<'!NO!SUBS!'
# G4WORKDIR
#
if [ $G4WORKDIR ] ; then
if [ X$g4non_display = X ] ; then
echo "In your environment you have the G4WORKDIR=$G4WORKDIR"
fi
else
if [ X$g4non_display = X ] ; then
echo "G4WORKDIR will be set to HOME=$HOME."
fi
export G4WORKDIR=$HOME
fi
+25 -12
View File
@@ -138,17 +138,6 @@ export G4ANALYSIS_USE
echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE"
fi
#+
#
# g4persistency
#
if [ X$g4use_hepodbms = Xy ] ; then
G4USE_HEPODBMS=1
export G4USE_HEPODBMS
. \$G4INSTALL/examples/extended/persistency/PersistentEx01/g4odbms_setup.sh
echo "On this machine the G4USE_HEPODBMS=\$G4USE_HEPODBMS"
fi
#
# g4ui
#
@@ -330,6 +319,22 @@ export OGLHOME
echo "On this machine the OGLHOME=\$OGLHOME"
fi
#
# Use G3TOG4 module
#
#+
if [ X$g4wlib_build_g3tog4 = Xy ] ; then
G4LIB_BUILD_G3TOG4=1
export G4LIB_BUILD_G3TOG4
echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
fi
if [ X$g4w_use_g3tog4 = Xy ] ; then
G4USE_G3TOG4=1
export G4USE_G3TOG4
echo "On this machine the G4USE_G3TOG4=\$G4USE_G3TOG4"
fi
#+
#
# g4shared
@@ -370,13 +375,21 @@ fi
#####################################################################
# Create GNUmakefile.db to keep ALL GNUmakefile DB :)
if test -f \$G4INSTALL/config/scripts/GNUmakefile.db ; then
mv \$G4INSTALL/config/scripts/GNUmakefile.db \$G4LIB/\$G4SYSTEM/GNUmakefile.db.bac
fi
$g4make -n -p -f \$G4INSTALL/config/scripts/GNUmakefile > \$G4LIB/\$G4SYSTEM/GNUmakefile.db
echo ""
echo "Starting installation..."
echo ""
cd $g4install/source
echo `pwd`
# THere is no env!
# There is no env!
if [ X$g4global = Xy ] ; then
$g4make global
fi
+4 -8
View File
@@ -1,6 +1,7 @@
#
# -------- AIX ---------- !!! not supported !!!
# AIX-4.3.2 xlC
# AIX-4.3.2 xlC 6.0
ifeq ($(G4SYSTEM),AIX-xlC)
CXX := xlC
ifdef G4OPTIMISE
@@ -27,13 +28,8 @@ ifeq ($(G4SYSTEM),AIX-xlC)
ifndef OGLLIBS
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
endif
CPPFLAGS += -DG4NOT_ISO_DELETES
CPPFLAGS += -I$(G4BASE)/global/management/include/g4std/wrappers/$(G4SYSTEM)
ifdef G4USE_OSPACE
CPPFLAGS += -DOS_AIX_4 -DOS_NEW_CHECK -DOS_STL_ASSERT
CPPFLAGS += -DG4USE_OSPACE -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
endif
G4USE_STD_NAMESPACE := yes
CPPFLAGS += -DG4USE_STD_NAMESPACE
define build-granular-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
+5 -14
View File
@@ -1,6 +1,6 @@
#
# -------- DEC ---------
#
# -------- DEC --------- !!! not supported !!!
# OSF V4.0, cxx C++ V6.1-027
ifeq ($(G4SYSTEM),DEC-cxx)
CXX := cxx
ifdef G4OPTIMISE
@@ -28,18 +28,9 @@ ifeq ($(G4SYSTEM),DEC-cxx)
# OGLLIBS := -lMesaGLU -lMesaGL
endif
CPPFLAGS += -I$(G4BASE)/global/management/include/g4std/wrappers/$(G4SYSTEM)
ifdef G4USE_OSPACE
CPPFLAGS += -DG4USE_OSPACE -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
G4USE_STD_NAMESPACE := yes
CXXFLAGS += -std strict_ansi
CPPFLAGS += -DG4USE_STD_NAMESPACE
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
+12 -7
View File
@@ -1,13 +1,21 @@
#
# ------ MacOS-X ------ !!! not supported !!!
# MacOS 10.1 GNU-gcc 2.92.2
# ------ MacOS-X ------ !!! not generally supported !!!
#
# MacOS 10.1 GNU-gcc 2.92.2
# MacOS 10.2 there is g++2 and g++3, choose consistently one,
# like g++2 which is 2.95.2
# use echo -n (there is not the echo -e option of Linux)
#
# Helmut Burkhardt - CERN
#
ifeq ($(G4SYSTEM),Darwin-g++)
CXX := g++
# choice of GNU compilers:
CXX := g++2
# CXX := g++3
GNU_GCC = 1
CXXFLAGS := -Wall -ansi -pedantic -pipe -fno-for-scope -DGNU_GCC
# optionally add verbose flag
# CXXFLAGS += -v
ifdef G4OPTIMISE
CXXFLAGS += -O
FCFLAGS := -O
@@ -33,7 +41,7 @@ ifeq ($(G4SYSTEM),Darwin-g++)
FC := g77
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
FCLIBS := -lg2c -lnsl
ECHO := /bin/echo -e
ECHO := /bin/echo -n
SHEXT := so
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
@@ -52,9 +60,6 @@ ifeq ($(G4SYSTEM),Darwin-g++)
OIVFLAGS += -I$(OIHOME)/include
G4USE_STD_NAMESPACE := yes
CPPFLAGS += -DG4USE_STD_NAMESPACE
ifdef G4ODBMS
G4DDLX_FLAGS += -DG4std=""
endif
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMPDIR); \
-5
View File
@@ -39,11 +39,6 @@ ifeq ($(G4SYSTEM),HP-aCC)
OGLLIBS += -L/opt/graphics/common/lib -lXwindow -lhpgfx -lXhp11 -ldld
endif
CPPFLAGS += -DG4NOT_ISO_DELETES -DG4NO_ISO_VECDIST
ifdef G4USE_OSPACE
CPPFLAGS += -DOS_HPUX_10_20 -DOS_NEW_CHECK -DOS_STL_ASSERT
CPPFLAGS += -DG4USE_OSPACE -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)`; \
+2 -10
View File
@@ -1,6 +1,6 @@
#
# ------ GNU/LINUX ------ egcs-1.1.2 (gcc-2.91.66)
#
# ------ GNU/LINUX ------ !!! not supported !!!
# Red-Hat 6.1, egcs-1.1.2 (gcc-2.91.66)
ifeq ($(G4SYSTEM),Linux-egcs)
CXX := g++
GNU_GCC = 1
@@ -44,14 +44,6 @@ ifeq ($(G4SYSTEM),Linux-egcs)
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 += -DG4USE_OSPACE -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
CPPFLAGS += -I$(OSPACE_BASE_DIR)/ospace/std -I$(OSPACE_BASE_DIR)
endif
ifdef G4ODBMS
G4DDLX_FLAGS += -D__STL_CLASS_PARTIAL_SPECIALIZATION -Dstd="" -DG4std=""
endif
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMPDIR); \
+1 -3
View File
@@ -28,6 +28,7 @@ ifeq ($(G4SYSTEM),Linux-g++)
CCFLAGS += -fPIC
endif
G4RUNPATHOPTION := -Wl,-rpath
CC := gcc
FC := g77
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
FCLIBS := -lg2c -lnsl
@@ -47,9 +48,6 @@ ifeq ($(G4SYSTEM),Linux-g++)
OIVFLAGS += -I$(OIHOME)/include
G4USE_STD_NAMESPACE := yes
CPPFLAGS += -DG4USE_STD_NAMESPACE
ifdef G4ODBMS
G4DDLX_FLAGS += -DG4std=""
endif
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMPDIR); \
+3 -8
View File
@@ -1,6 +1,6 @@
#
# -------- SGI --------- !!! not supported !!!
# Irix-6.5.5 CC-7.2.1
# Irix-6.5.5 CC-8
ifeq ($(G4SYSTEM),SGI-CC)
CXX := CC
ifdef G4OPTIMISE
@@ -26,13 +26,8 @@ ifeq ($(G4SYSTEM),SGI-CC)
ifndef OGLLIBS
OGLLIBS := -L/usr/lib -lGLU -lGL
endif
CPPFLAGS += -DSOCKET_IRIX_SOLARIS
CPPFLAGS += -I$(G4BASE)/global/management/include/g4std/wrappers/$(G4SYSTEM)
ifdef G4USE_OSPACE
CPPFLAGS += -DOS_IRIX_6_5 -DOS_NEW_CHECK -DOS_STL_ASSERT
CPPFLAGS += -DG4USE_OSPACE -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
endif
G4USE_STD_NAMESPACE := yes
CPPFLAGS += -DSOCKET_IRIX_SOLARIS -DG4USE_STD_NAMESPACE
define build-granular-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
+3 -21
View File
@@ -13,7 +13,6 @@ ifeq ($(G4SYSTEM),SUN-CC)
endif
endif
CXXFLAGS += -features=no%anachronisms -mt -lpthread
# CXXFLAGS += -fnonstd
ifdef G4LIB_BUILD_SHARED
CXXFLAGS += -KPIC
FCFLAGS += -KPIC
@@ -44,27 +43,10 @@ ifeq ($(G4SYSTEM),SUN-CC)
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
endif
CPPFLAGS += -DSOCKET_IRIX_SOLARIS
LOADLIBS += -L/usr/lib -lsocket -lnsl
LOADLIBS += -lsocket -lnsl
CPPFLAGS += -DG4NOT_ISO_DELETES -DG4NO_ISO_VECDIST
ifdef G4ODBMS
G4DDLX_FLAGS += -noline
endif
ifdef G4USE_OSPACE
CPPFLAGS += -DOS_SOLARIS_2_5 -DOS_NEW_CHECK -DOS_STL_ASSERT
CPPFLAGS += -DG4USE_OSPACE -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
ifdef G4ODBMS
G4DDLX_FLAGS += -DG4std="std"
endif
else
CXXFLAGS += -compat
endif
endif
G4USE_STD_NAMESPACE := yes
CPPFLAGS += -DG4USE_STD_NAMESPACE
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
+3 -13
View File
@@ -15,20 +15,10 @@ ifeq ($(G4SYSTEM),WIN32-VC)
CXXFLAGS += -D_WIN32 -DOS
CPPFLAGS += -DWIN32
#
# Should set $INCLUDE environment, if not set as below
# Use ISO standard version.
#
ifdef G4USE_OSPACE
CXXFLAGS += $(OSPACEINC)
CPPFLAGS += -DG4USE_OSPACE
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
G4USE_STD_NAMESPACE := yes
CPPFLAGS += -DG4USE_STD_NAMESPACE
LDFLAGS += -FORCE /NODEFAULTLIB:MSVCRT.dll
+6 -12
View File
@@ -1,14 +1,14 @@
#
# ------ GNU/WIN32 CYGNUS ------ !!! not supported !!!
# cygnus b20 with cygwin1.dll 1.1.5 patch
# Windows 95 4.00.1111
# Cygnus CygWin - gcc-2.95.3
# Windows 2000
#
# Stefano Agostinelli - IST Group, Genova
# Stefano Agostinelli (agos001@pn.itnet.it) - IST Group, Genova
#
ifeq ($(G4SYSTEM),WIN32-g++)
CXX := g++
GNU_GCC = 1
CXXFLAGS := -pipe -fno-for-scope -DGNU_GCC
CXXFLAGS := -Wall -ansi -pedantic -pipe -fno-for-scope -DGNU_GCC
ifdef G4OPTIMISE
CXXFLAGS += -O
FCFLAGS := -O
@@ -40,14 +40,8 @@ ifeq ($(G4SYSTEM),WIN32-g++)
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 += -DG4USE_OSPACE -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
CPPFLAGS += -I$(OSPACE_BASE_DIR)/ospace/std -I$(OSPACE_BASE_DIR)
endif
ifdef G4ODBMS
G4DDLX_FLAGS += -D__STL_CLASS_PARTIAL_SPECIALIZATION -Dstd="" -DG4std=""
endif
G4USE_STD_NAMESPACE := yes
CPPFLAGS += -DG4USE_STD_NAMESPACE
define build-granular-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)