Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
+38 -2
View File
@@ -1,5 +1,5 @@
$Id: History,v 1.97 2000/02/14 11:27:42 gcosmo Exp $
$Name: geant4-01-01 $
$Id: History,v 1.105 2000/05/23 06:48:25 gcosmo Exp $
$Name: geant4-02-00 $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,42 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
23rd May 2000 John Allison (config-V01-01-04)
- Added -I$(G4BASE)/processes/hadronic/models/radiative_decay/include to
binmake.gmk.
19th May 2000 Gabriele Cosmo (config-V01-01-03)
- architecture.gmk:
o changed -pic option to -KPIC for SUN architectures.
o fixed HP-aCC setup to cope with new CLHEP version 1.5.
o implemented modular setup. Now system specific configurations are
grouped in separated files $G4SYSTEM.gmk and placed in the new
directory config/sys.
7th April 2000 Gabriele Cosmo (config-V01-01-02)
- binmake.gmk: added include path to the new directory
geometry/solids/specific.
- Updated PERL script g4step_correct.pl for parsing STEP files.
30th March 2000 Gabriele Cosmo (config-V01-01-01)
- makeshlib.sh:
o added few corrections to the script in order to allow
creation of shared libraries without need of the static archive on
platforms which allow this.
o added section for SunOS systems.
(courtesy of I.G.Caballero)
- architecture.gmk:
o on SUN-CC and SUN-CC5, added -pic to CXXFLAGS for building shared
libraries.
21st March 2000 Gabriele Cosmo
- makeshlib.sh: corrected invokation of compiler for HP-aCC setup.
Changed CC to aCC (fixes bug-report #68).
13th March 2000 Gabriele Cosmo (config-V01-01-00)
- architecture.gmk: corrected FCLIBS for Linux-g++
o added -lg2c -lnsl and removed -lf2c.
14th February 2000 Gabriele Cosmo (config-V01-00-02)
- architecture.gmk: added option '+W823' to HP-aCC compilation setup to
discard warnings for macros parameter definition as used in the new
+5 -371
View File
@@ -1,4 +1,4 @@
# $Id: architecture.gmk,v 1.62 2000/02/14 11:27:26 gcosmo Exp $
# $Id: architecture.gmk,v 1.66 2000/05/19 07:29:06 gcosmo Exp $
# ------------------------------------------------------------------------
# GEANT 4 - Architecture configuration script for GNU Make
#
@@ -15,11 +15,11 @@
#
# SUN-CC SunOS 5.6, CC 4.2 compiler (default)
#
# HP-aCC HP-UX 10.20, aCC A.01.21 compiler
# 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 5.1/6.1), egcs 1.1.2
# 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...)
@@ -358,375 +358,9 @@ ECHO:= echo
#
GREP := grep
# Include architecture dependent setups...
#
# Architecture dependent setups...
#
# -------- SUN ---------
#
ifeq ($(G4SYSTEM),SUN-CC)
CXX := CC
ifdef G4OPTIMISE
CXXFLAGS := -O
else
ifdef G4DEBUG
CXXFLAGS := -g
FCFLAGS := -g
CCFLAGS := -g
endif
endif
# 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
endif
# -------- SUN/CC5 --------- !!! under testing !!!
# SunOS-2.6 CC-5.0
ifeq ($(G4SYSTEM),SUN-CC5)
CXX := CC
ifdef G4OPTIMISE
CXXFLAGS := -O
else
ifdef G4DEBUG
CXXFLAGS := -g
FCFLAGS := -g
CCFLAGS := -g
endif
endif
# CXXFLAGS += -fnonstd
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 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
endif
# -------- 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 G4MAKESHLIB
CXXFLAGS += +Z
endif
G4_HAVE_BOOL := yes
FC := f77
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)
else
ifndef G4NO_STD_NAMESPACE
G4USE_STD_NAMESPACE := yes
CPPFLAGS += -DG4USE_STD_NAMESPACE
endif
endif
endif
# -------- 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
endif
# -------- 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
endif
# -------- 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
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
endif
# ------ 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 G4MAKESHLIB
CXXFLAGS += -fPIC
FCFLAGS += -fPIC
CCFLAGS += -fPIC
endif
FC := g77
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
FCLIBS := -lf2c
ECHO := /bin/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
endif
# ------ 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 -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
endif
include $(G4INSTALL)/config/sys/$(G4SYSTEM).gmk
# If compiler recognises implicit C++ type bool...
#
+3 -1
View File
@@ -1,4 +1,4 @@
# $Id: binmake.gmk,v 1.42 2000/02/14 11:24:45 gcosmo Exp $
# $Id: binmake.gmk,v 1.45 2000/05/23 05:32:14 stesting Exp $
# ----------------------------------------------------------
# Script defining rules and paths for making binaries.
# Gabriele Cosmo, 25/06/1998.
@@ -58,9 +58,11 @@ ifndef INCFLAGS
-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/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 \
+18 -6
View File
@@ -1,4 +1,4 @@
#!/usr/local/bin/perl
#!/usr/bin/perl
$filename = $ARGV[0];
open(INFILE, $filename) || die "\nSTEP file ".$filename." not found.";
@@ -13,23 +13,35 @@ print "\nModifying STEP file for NIST toolkit...";
foreach (@filebuf)
{
if(/.*VERTEX\_POINT.*/)
if(/.*VERTEX\_POINT.*/)
{
s/VERTEX\_POINT\(\'\'\,/VERTEX\_POINT\(\'\'\,\'\'\,/g ;
s/VERTEX\_POINT\s*\(\s*\'\s*\'\s*\,/VERTEX\_POINT\(\'\'\,\'\'\,/g ;
s/VERTEX\_POINT\s*\(\s*\'NONE\'\s*\,/VERTEX\_POINT\(\'NONE\'\,\'\'\,/g ;
}
elsif(/.*EDGE\_LOOP.*/)
{
s/EDGE\_LOOP\(\'\'\,/EDGE\_LOOP\(\'\'\,\'\'\,/g;
s/EDGE\_LOOP\s*\(\s*\'\s*\'\s*\,/EDGE\_LOOP\(\'\'\,\'\'\,/g;
s/EDGE\_LOOP\s*\(\s*\'NONE\'\s*\,/EDGE\_LOOP\(\'NONE\'\,\'\'\,/g;
}
elsif(/.*POLY\_LOOP.*/)
{
s/POLY\_LOOP\s*\(\s*\'\s*\'\s*\,/POLY\_LOOP\(\'\'\,\'\'\,/g;
s/POLY\_LOOP\s*\(\s*\'NONE\'\s*\,/POLY\_LOOP\(\'NONE\'\,\'\'\,/g;
}
elsif(/.*ADVANCED\_FACE.*/)
{
($a,$b,$c) = split('\)',$&);
s//$a\)\,\'\' $b\)$c\n/;
s//$a\)\,\'\'$b\)$c\n/;
}
elsif(/.*FACE\_SURFACE.*/)
{
($a,$b,$c) = split('\)',$&);
s//$a\)\,\'\'$b\)$c\n/;
}
elsif(/.*EDGE\_CURVE.*/)
{
($a,$b,$c,$d,$e) = split(",",$&);
s//$a\, $b\,$c\,\'\'\,$d\,$e\n/;
s//$a\,$b\,$c\,\'\'\,$d\,$e\n/;
}
print OUTFILE;
+128 -108
View File
@@ -4,120 +4,140 @@
############# G.Barrand ####################
############################################
if test $# -eq 2 ; then
g4system=$1
name=$2
liba=lib$name.a
#echo $g4system
#echo $name
############################################
##### build libs ###########################
############################################
if test -f $g4system/$liba ; then
g4system=$1
name=$2
liba=lib$name.a
#echo $g4system
#echo $name
############################################
##### build libs ###########################
############################################
if test `uname` = "OSF1" ; then
if test -f $g4system/$liba ; then
cd $g4system
# Need to specify a path, so that at run time loader
# is able to find the so lib. This path is put in the
# binaries at link time. In principle a relative
# path from the binary is ok, but we will have
# more than one binary at different places; so
# we have to specify an absolute path.
rpath=`pwd`
#echo $rpath
libso=lib$name.so
/bin/rm -f $libso
/bin/rm -f so_locations
ld -expect_unresolved '*' -shared -o $libso -all $liba -rpath $rpath
cd ..
echo "$libso built."
else
ArchiveError=1
fi
fi
if test `uname` = "OSF1" ; then
cd $g4system
# Need to specify a path, so that at run time loader
# is able to find the so lib. This path is put in the
# binaries at link time. In principle a relative
# path from the binary is ok, but we will have
# more than one binary at different places; so
# we have to specify an absolute path.
rpath=`pwd`
#echo $rpath
libso=lib$name.so
/bin/rm -f $libso
/bin/rm -f so_locations
ld -expect_unresolved '*' -shared -o $libso -all $liba -rpath $rpath
cd ..
echo "$libso built."
fi
if test `uname` = "HP-UX" ; then
cd $g4system
libso=lib$name.sl
/bin/rm -f $libso
# get .o files
objs=`ls *.o`
#ld -b -a shared -o $libso $objs
# CC does more than ld.
aCC -b -o $libso $objs
cd ..
echo "$libso built."
fi
if test `uname` = "HP-UX" ; then
cd $g4system
libso=lib$name.sl
/bin/rm -f $libso
# get .o files
objs=`ls *.o`
#ld -b -a shared -o $libso $objs
# CC does more than ld.
CC -b -o $libso $objs
cd ..
echo "$libso built."
fi
if test `uname` = "SunOS" ; then
cd $g4system
libso=lib$name.so
/bin/rm -f $libso
# get .o files
objs=`ls *.o`
CC -G -o $libso $objs
cd ..
echo "$libso built."
fi
if test `uname` = "IRIX" ; then
cd $g4system
# For path same remarks as for OSF1.
rpath=`pwd`
libso=lib$name.so
/bin/rm -f $libso
/bin/rm -f so_locations
#ld -shared -o $libso -all $liba -rpath $rpath
# CC does more than ld.
CC -Wl,-rpath,$rpath -shared -o $libso -all $liba
cd ..
echo "$libso built."
fi
if test `uname` = "IRIX" ; then
if test -f $g4system/$liba ; then
cd $g4system
# For path same remarks as for OSF1.
rpath=`pwd`
libso=lib$name.so
/bin/rm -f $libso
/bin/rm -f so_locations
#ld -shared -o $libso -all $liba -rpath $rpath
# CC does more than ld.
CC -Wl,-rpath,$rpath -shared -o $libso -all $liba
cd ..
echo "$libso built."
else
ArchivError=1
fi
fi
if test `uname` = "Linux" ; then
cd $g4system
# For path same remarks as for OSF1.
libso=lib$name.so
/bin/rm -f $libso
g++ -Wl,-soname,$libso -shared *.o -o $libso
echo "$libso built."
fi
if test `uname` = "Linux" ; then
cd $g4system
# For path same remarks as for OSF1.
libso=lib$name.so
/bin/rm -f $libso
g++ -Wl,-soname,$libso -shared *.o -o $libso
echo "$libso built."
fi
if test `uname` = "AIX" ; then
# Not yet ready.
exit
#set -x
cd $g4system
libso=lib$name'.so'
/bin/rm -f lib$name.o
/bin/rm -f $libso
/bin/rm -f lib$name.exp
# Get .o files
objs=`ls *.o`
# Determine how to invoke nm depending on AIX version
AIXVERSION=`uname -v`
case ${AIXVERSION} in
#{
3*)
NM=/usr/ucb/nm
;;
4*)
NM='/usr/bin/nm -B'
;;
*)
echo "Error in g4makeshlib.sh!"
exit 1
;;
#}
esac
# Build export file (from Mesa mklib.aix).
echo "#! lib$name.so " > lib$name.exp
echo "noentry" >> lib$name.exp
$NM $objs | awk '/ [BD] /{print $3}' | sort | uniq >> lib$name.exp
# Below command from Mesa mklib.aix.
#cc -o lib$name.o $objs $3 -bE:lib$name.exp -bM:SRE -enoentry
# Unnecessary option -enoentry that produces
# noentry file that contains exported symbols
cc -o lib$name.o $objs $3 -bE:lib$name.exp -bM:SRE
if test -f lib$name.o ; then
ar r $libso lib$name.o
/bin/rm -f lib$name.o
else
echo "Can't create lib$name.o."
fi
#cp $libso lib$name.a
cd ..
echo "$libso treated."
fi
if test `uname` = "AIX" ; then
# Not yet ready.
exit
#set -x
cd $g4system
libso=lib$name'.so'
/bin/rm -f lib$name.o
/bin/rm -f $libso
/bin/rm -f lib$name.exp
# Get .o files
objs=`ls *.o`
# Determine how to invoke nm depending on AIX version
AIXVERSION=`uname -v`
case ${AIXVERSION} in
#{
3*)
NM=/usr/ucb/nm
;;
4*)
NM='/usr/bin/nm -B'
;;
*)
echo "Error in g4makeshlib.sh!"
exit 1
;;
#}
esac
# Build export file (from Mesa mklib.aix).
echo "#! lib$name.so " > lib$name.exp
echo "noentry" >> lib$name.exp
$NM $objs | awk '/ [BD] /{print $3}' | sort | uniq >> lib$name.exp
# Below command from Mesa mklib.aix.
#cc -o lib$name.o $objs $3 -bE:lib$name.exp -bM:SRE -enoentry
# Unnecessary option -enoentry that produces
# noentry file that contains exported symbols
cc -o lib$name.o $objs $3 -bE:lib$name.exp -bM:SRE
if test -f lib$name.o ; then
ar r $libso lib$name.o
/bin/rm -f lib$name.o
else
echo "Can't create lib$name.o."
fi
#cp $libso lib$name.a
cd ..
echo "$libso treated."
fi
if [ $ArchiveError ]; then
echo "ERROR: Archive libraries needed and not found."
echo " Compile first with G$MAKESHLIB unset."
fi
fi
############################################
else
echo 'Give name of binaray directory and library'
echo 'Give name of binary directory and library'
fi
+37
View File
@@ -0,0 +1,37 @@
#
# -------- 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
endif
+41
View File
@@ -0,0 +1,41 @@
#
# -------- 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
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
endif
+45
View File
@@ -0,0 +1,45 @@
#
# -------- 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 G4MAKESHLIB
CXXFLAGS += +Z
endif
G4_HAVE_BOOL := yes
FC := f77
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
endif
+47
View File
@@ -0,0 +1,47 @@
#
# ------ 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 G4MAKESHLIB
CXXFLAGS += -fPIC
FCFLAGS += -fPIC
CCFLAGS += -fPIC
endif
FC := g77
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
FCLIBS := -lg2c -lnsl
ECHO := /bin/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
endif
+36
View File
@@ -0,0 +1,36 @@
#
# -------- 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
endif
+50
View File
@@ -0,0 +1,50 @@
#
# -------- SUN ---------
#
ifeq ($(G4SYSTEM),SUN-CC)
CXX := CC
ifdef G4OPTIMISE
CXXFLAGS := -O
else
ifdef G4DEBUG
CXXFLAGS := -g
FCFLAGS := -g
CCFLAGS := -g
endif
endif
ifdef G4MAKESHLIB
CXXFLAGS += -KPIC
endif
# 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
endif
+59
View File
@@ -0,0 +1,59 @@
#
# -------- SUN ---------
#
ifeq ($(G4SYSTEM),SUN-CC5)
CXX := CC
ifdef G4OPTIMISE
CXXFLAGS := -O
else
ifdef G4DEBUG
CXXFLAGS := -g
FCFLAGS := -g
CCFLAGS := -g
endif
endif
# CXXFLAGS += -fnonstd
ifdef G4MAKESHLIB
CXXFLAGS += -KPIC
endif
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 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
endif
+52
View File
@@ -0,0 +1,52 @@
#
# ------ 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 -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
endif