Import Geant4 6.2.0 source tree
This commit is contained in:
+69
-2
@@ -1,5 +1,5 @@
|
||||
$Id: History,v 1.238 2004/02/24 09:49:45 gcosmo Exp $
|
||||
$Name: geant4-06-01 $
|
||||
$Id: History,v 1.254 2004/06/23 10:56:23 gcosmo Exp $
|
||||
$Name: geant4-06-02 $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,73 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
23rd June 2004 Gabriele Cosmo (config-V06-01-10)
|
||||
- Updated win32def.c program to fix retrivial of public static data for
|
||||
building DLLs on Windows (G.Barrand).
|
||||
- Updated Configure scripts.
|
||||
|
||||
17th June 2004 Gabriele Cosmo (config-V06-01-09)
|
||||
- Darwin-g++.gmk: use twolevel_namespace and GLOBLIBS for shared-libs
|
||||
build on MacOS. Shared-libs build are possible only global libraries
|
||||
and requires shared-lib version of CLHEP build with compatible options
|
||||
(G.Barrand).
|
||||
|
||||
14th June 2004 Gabriele Cosmo (config-V06-01-08)
|
||||
- architecture.gmk: added specification for G4LIB_USE_DLL.
|
||||
|
||||
11th June 2004 Gabriele Cosmo (config-V06-01-07)
|
||||
- binmake.gmk: activated shared-libs mechanism for Windows platforms;
|
||||
forced creation of static library for examples/applications for the
|
||||
usage with DLLs.
|
||||
|
||||
8th June 2004 Gabriele Cosmo (config-V06-01-06)
|
||||
- binmake.gmk: restored global lib for interfaces which was missing
|
||||
from linking list.
|
||||
- common.gmk, globlib.gmk: fixed clean/clean_libs target.
|
||||
- architecture.gmk: added definition of G4LIB_BUILD_DLL flag.
|
||||
- WIN32-VC.gmk: added targets for DLLs build.
|
||||
- Linux-g++.gmk: made -O2 the default optimisation mode.
|
||||
Archived temporary setup Linux-gO2 introduced in "config-V06-01-01".
|
||||
|
||||
7th June 2004 Gabriele Cosmo (config-V06-01-05)
|
||||
- Corrected setup for WIN32-VC7 for building of DLLs.
|
||||
- Cosmetics in build printout...
|
||||
|
||||
1st June 2004 Gabriele Cosmo (config-V06-01-04)
|
||||
- binmake.gmk, added include paths to new hadronic models for
|
||||
abrasion, em_dissociation, de_excitation/ablation and
|
||||
de_excitation/fission.
|
||||
- architecture.gmk: updated comments to header.
|
||||
|
||||
26th May 2004 Mark Donszelmann (config-V06-01-03)
|
||||
- Fixed small problem in previous fix.
|
||||
|
||||
26th May 2004 Gunter Folger (config-V06-01-02)
|
||||
- binmake.gmk: fixed problem for WIN32 such that also LDLIBS (including
|
||||
EXTRALIBS) will be mangled to replace -L by its WIN32 correspondance
|
||||
libpath.
|
||||
|
||||
11th May 2004 Gabriele Cosmo (config-V06-01-01)
|
||||
- Added new experimental setup for Linux-g++ using -O2 optimisation
|
||||
as default. To trigger this setup G4SYSTEM must be set to "Linux-gO2".
|
||||
It also includes (deactivated by default) Pentium4 chip specific options
|
||||
for using chips-specific floating-point arithmetics based on the SSE unit.
|
||||
|
||||
8th April 2004 Guy Barrand
|
||||
- architecture.gmk: revisited Inventor default. Removed HEPVis dependencies
|
||||
(Inventor visualization driver does not need these libraries any longer).
|
||||
|
||||
7th April 2004 Guy Barrand
|
||||
- Darwin-g++.gmk:
|
||||
o Corrected options to build shared libraries (.dyn); use
|
||||
"-dynamic -single_module" to have faster startup when Geant4 is
|
||||
embedded in an external framework.
|
||||
o Corrected options to retrieve Motif.
|
||||
|
||||
5th April 2004 Gabriele Cosmo (config-V06-01-00)
|
||||
- architecture.gmk: added check for definition of LDFLAGS.
|
||||
Fixes bug report #603.
|
||||
|
||||
24th February 2004 Gabriele Cosmo (config-V06-00-03)
|
||||
- Fixed link rpath definition in Linux-icc.gmk.
|
||||
|
||||
|
||||
+29
-16
@@ -1,4 +1,4 @@
|
||||
# $Id: architecture.gmk,v 1.91 2004/02/09 15:22:49 gunter Exp $
|
||||
# $Id: architecture.gmk,v 1.99 2004/06/14 10:42:12 gcosmo Exp $
|
||||
# ------------------------------------------------------------------------
|
||||
# GEANT 4 - Architecture configuration script for GNU Make
|
||||
#
|
||||
@@ -13,11 +13,11 @@
|
||||
# List of the supported architectures/compilers and related flavors for
|
||||
# the environment variable G4SYSTEM:
|
||||
#
|
||||
# Linux-g++ Linux (Red Hat 7.3), gcc-2.95.2 or gcc-3.2 (default)
|
||||
# Linux-g++ Linux (Red Hat 7.3), gcc-3.2.3 (default)
|
||||
#
|
||||
# SUN-CC SunOS 5.8, CC 5.4
|
||||
#
|
||||
# WIN32-VC Windows/2000/XP and Microsoft Visual C++ 6.0 - SP5
|
||||
# WIN32-VC7 Windows/2000/XP and Microsoft Visual C++ 7.1 .NET
|
||||
# Adding CYGWIN32 tools
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
@@ -84,6 +84,18 @@ ifeq ($(G4LIB_BUILD_SHARED),)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Specify if to build the DLL libraries on Windows. Default is NO.
|
||||
#
|
||||
ifneq ($(G4LIB_USE_DLL),)
|
||||
G4LIB_BUILD_DLL = 1
|
||||
CPPFLAGS += -DG4LIB_BUILD_DLL
|
||||
endif
|
||||
ifneq ($(G4LIB_BUILD_DLL),)
|
||||
G4LIB_BUILD_DLL = 1
|
||||
CPPFLAGS += -DG4LIB_BUILD_DLL
|
||||
G4LIB_USE_DLL = 1
|
||||
endif
|
||||
|
||||
# Specify if to build the G3TOG4 module or not. Default is NO.
|
||||
#
|
||||
ifneq ($(G4LIB_BUILD_G3TOG4),)
|
||||
@@ -115,7 +127,7 @@ endif
|
||||
# CLHEP path, etc.
|
||||
#
|
||||
ifndef CLHEP_BASE_DIR
|
||||
CLHEP_BASE_DIR := /afs/cern.ch/sw/geant4/dev/CLHEP/$(G4SYSTEM)/pro
|
||||
CLHEP_BASE_DIR := $(shell ls CLHEP_BASE_DIR--UNDEFINED)
|
||||
endif
|
||||
ifndef CLHEP_INCLUDE_DIR
|
||||
CLHEP_INCLUDE_DIR := $(CLHEP_BASE_DIR)/include
|
||||
@@ -151,7 +163,7 @@ ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
OUT_LIB := '-out:'
|
||||
OUT_EXE := '-Fe'
|
||||
LIB_PATH := '-libpath:'
|
||||
CERNLIB_PATH := "z:\p32\cern\new\df\lib"
|
||||
CERNLIB_PATH := "c:\cern\pro\lib"
|
||||
PATH_DEL := \\
|
||||
#
|
||||
# pattern for next substitution
|
||||
@@ -180,11 +192,14 @@ CPPFLAGS += -I$(CLHEP_INCLUDE_DIR)
|
||||
|
||||
# Positional qualifiers in action...
|
||||
#
|
||||
ifndef LDFLAGS
|
||||
LDFLAGS :=
|
||||
endif
|
||||
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
LDFLAGS := -link $(LIB_PATH)$(CLHEP_LIB_DIR)
|
||||
LDFLAGS += -link $(LIB_PATH)$(CLHEP_LIB_DIR)
|
||||
LOADLIBS := $(CLHEP_LIB)
|
||||
else
|
||||
LDFLAGS := -L$(CLHEP_LIB_DIR)
|
||||
LDFLAGS += -L$(CLHEP_LIB_DIR)
|
||||
LOADLIBS := -l$(CLHEP_LIB)
|
||||
LOADLIBS += -lm
|
||||
endif
|
||||
@@ -220,21 +235,19 @@ XAWLIBS := -lXaw
|
||||
# are set below. Most system-dependent code assumes OGLHOME is set.
|
||||
#
|
||||
# ------------- OpenInventor -----------------
|
||||
# The path to the installation of HEPVis and OpenInventor must be specified
|
||||
# in HEPVISDIR -only- if the packages are installed in a location different
|
||||
# The path to the installation of OpenInventor must be specified
|
||||
# if the package is installed in a location different
|
||||
# than default system directories (like... /usr or /usr/local).
|
||||
#
|
||||
ifndef HEPVISINC
|
||||
HEPVISINC := $(HEPVISDIR)/include
|
||||
endif
|
||||
ifndef HEPVISLIB
|
||||
HEPVISLIB := $(HEPVISDIR)/lib
|
||||
|
||||
ifndef OIVHOME
|
||||
OIVHOME := /usr/local/Inventor
|
||||
endif
|
||||
ifndef OIVFLAGS
|
||||
OIVFLAGS := -I${HEPVISINC}
|
||||
OIVFLAGS := -I$(OIVHOME)/include
|
||||
endif
|
||||
ifndef OIVLIBS
|
||||
OIVLIBS := -L${HEPVISLIB} -lHEPVis -lHEPVisXt -lInventor -lInventorXt
|
||||
OIVLIBS := -L$(OIVHOME)/lib -lInventorXt -lInventor
|
||||
endif
|
||||
|
||||
# For cfront compilers the repository location is set to
|
||||
|
||||
+55
-30
@@ -1,4 +1,4 @@
|
||||
# $Id: binmake.gmk,v 1.94 2003/11/18 11:28:10 hpw Exp $
|
||||
# $Id: binmake.gmk,v 1.102 2004/06/11 14:07:47 gcosmo Exp $
|
||||
# ----------------------------------------------------------
|
||||
# Script defining rules and paths for making binaries.
|
||||
# First implementation: Gabriele Cosmo, 25/06/1998.
|
||||
@@ -20,6 +20,9 @@ include $(G4INSTALL)/config/G4VIS_USE.gmk
|
||||
include $(G4INSTALL)/config/interactivity.gmk
|
||||
include $(G4INSTALL)/config/analysis.gmk
|
||||
|
||||
# Verify the existance of the global static libraries first.
|
||||
# if not verify the existance of global shared libraries (Unix only).
|
||||
#
|
||||
ifndef G4LIB_USE_GRANULAR
|
||||
GLOBALLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.a && echo yes)
|
||||
ifndef GLOBALLIBS
|
||||
@@ -28,10 +31,15 @@ ifndef G4LIB_USE_GRANULAR
|
||||
endif
|
||||
endif
|
||||
|
||||
# Verify the existance of granular shared libraries (Unix) or global DLLs (Windows)
|
||||
#
|
||||
ifndef SHAREDLIBS
|
||||
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4globman.$(SHEXT) && echo yes)
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/G4global.$(SHEXT) && echo yes)
|
||||
endif
|
||||
|
||||
ifndef INCFLAGS
|
||||
ifeq ($(G4INCLUDE_EXEC),1)
|
||||
INCFLAGS := -I$(G4INCLUDE)
|
||||
@@ -64,44 +72,47 @@ ifndef INCFLAGS
|
||||
-I$(G4BASE)/processes/electromagnetic/lowenergy/include \
|
||||
-I$(G4BASE)/processes/hadronic/cross_sections/include \
|
||||
-I$(G4BASE)/processes/hadronic/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/abrasion/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/binary_cascade/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/cascade/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/utils/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/coherent_elastic/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/high_energy/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/isotope_production/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/leading_particle/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/low_energy/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/neutron_hp/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/binary_cascade/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/ablation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/fermi_breakup/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/fission/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/fission/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/gem_evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/handler/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/multifragmentation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/photon_evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/inucl/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/photolepton_hadron/muon_nuclear/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/pre_equilibrium/exciton_model/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/quark_molecular_dynamics/body/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/quark_molecular_dynamics/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/relativistic_qmd/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/relativistic_qmd/uplusplus/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/em_dissociation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/general_finalstate/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/high_energy/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/im_r_matrix/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/inucl/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/isotope_production/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/leading_particle/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/low_energy/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/neutron_hp/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/parton_string/diffraction/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/parton_string/hadronization/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/parton_string/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/parton_string/qgsm/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/photolepton_hadron/muon_nuclear/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/pre_equilibrium/exciton_model/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/quark_molecular_dynamics/body/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/quark_molecular_dynamics/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/radioactive_decay/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/relativistic_qmd/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/relativistic_qmd/uplusplus/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/theo_high_energy/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/general_finalstate/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/radioactive_decay/include \
|
||||
-I$(G4BASE)/processes/hadronic/processes/include \
|
||||
-I$(G4BASE)/processes/hadronic/stopping/include \
|
||||
-I$(G4BASE)/processes/hadronic/util/include \
|
||||
@@ -160,23 +171,32 @@ endif
|
||||
#
|
||||
ifndef USER_DEFINED_LDLIBS
|
||||
|
||||
# LDLIBS1 contains the very high level libraries...
|
||||
# TARGETLIB is the library generated for the final user application...
|
||||
#
|
||||
ifdef G4EXLIB
|
||||
LDLIBS1 := -l$(G4TARGET)
|
||||
ifeq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
# Unix
|
||||
TARGETLIB := -l$(G4TARGET)
|
||||
else
|
||||
# Windows
|
||||
TARGETLIB := lib$(G4TARGET).a
|
||||
endif
|
||||
endif
|
||||
LDLIBS1 += $(EXTRALIBS)
|
||||
|
||||
# VISLIBS and UILIBS are now handled by the granular library script...
|
||||
# LDLIBS1 contains the very high level libraries...
|
||||
#
|
||||
LDLIBS1 := $(EXTRALIBS)
|
||||
|
||||
# VISLIBS (and UILIBS?) is handled by the granular library script...
|
||||
#
|
||||
ifdef GLOBALLIBS
|
||||
LDLIBS1 += $(VISLIBS) $(UILIBS) -lG4persistency
|
||||
LDLIBS2 := $(VISLIBS) -lG4interfaces -lG4persistency
|
||||
|
||||
ifdef G4USE_G3TOG4
|
||||
LDLIBS1 += -lG3toG4
|
||||
LDLIBS2 += -lG3toG4
|
||||
endif
|
||||
|
||||
LDLIBS2 := -lG4readout \
|
||||
LDLIBS2 += -lG4readout \
|
||||
-lG4run \
|
||||
-lG4event \
|
||||
-lG4tracking \
|
||||
@@ -241,13 +261,18 @@ LDLIBS_PREFINAL += $(LDLIBS4)
|
||||
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
WIN32TMP := $(patsubst -L%,$(LIB_PATH)%,$(LDFLAGS))
|
||||
LDFLAGS = $(patsubst /,$(PATH_DEL),$(WIN32TMP))
|
||||
LDLIBS = $(patsubst -l%,lib%.a,$(LDLIBS_PREFINAL))
|
||||
WIN32TMP2 := $(patsubst -L%,$(LIB_PATH)%,$(LDLIBS_PREFINAL))
|
||||
ifdef SHAREDLIBS
|
||||
LDLIBS = $(TARGETLIB) $(patsubst -l%,lib%.lib,$(WIN32TMP2))
|
||||
else
|
||||
LDLIBS = $(TARGETLIB) $(patsubst -l%,lib%.a,$(WIN32TMP2))
|
||||
endif
|
||||
else
|
||||
LDLIBS = $(LDLIBS_PREFINAL)
|
||||
LDLIBS = $(TARGETLIB) $(LDLIBS_PREFINAL)
|
||||
endif
|
||||
|
||||
ifdef transform-RPath
|
||||
#invoke system specific transformation of
|
||||
# Invoke system specific transformation of
|
||||
include $(G4INSTALL)/config/sys/$(G4SYSTEM)-runpath.gmk
|
||||
endif
|
||||
|
||||
@@ -279,7 +304,7 @@ ifndef USER_DEFINED_LDLIBS
|
||||
echo " gmake libmap"; \
|
||||
exit 1; fi
|
||||
else
|
||||
@echo "Using global libraries."
|
||||
@echo "Using global libraries ..."
|
||||
endif
|
||||
endif
|
||||
@if [ ! -d $(G4BINDIR) ] ; then mkdir $(G4BINDIR) ;fi
|
||||
@@ -339,7 +364,7 @@ $(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 Making dependency for file $< ...
|
||||
@set -e;\
|
||||
g++ $(GPPFLAGS) $(CPPFLAGS) -w $< |\
|
||||
sed 's!$(G4TARGET)\.o!$(G4TMPDIR)/exe/& $@!' >$@;\
|
||||
|
||||
+11
-9
@@ -1,4 +1,4 @@
|
||||
# $Id: common.gmk,v 1.35 2003/01/22 18:02:03 gcosmo Exp $
|
||||
# $Id: common.gmk,v 1.38 2004/06/08 10:04:47 gcosmo Exp $
|
||||
# ----------------------------------------------------------------
|
||||
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
|
||||
# ----------------------------------------------------------------
|
||||
@@ -37,7 +37,7 @@ ifneq ($(G4LIB_BUILD_SHARED),)
|
||||
# Make shared library.
|
||||
$(G4LIBDIR)/lib$(name).$(SHEXT): $(G4TMPDIR)/obj.last
|
||||
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
|
||||
@echo Creating shared library $@
|
||||
@echo Creating shared library $@ ...
|
||||
@$(RM) $@
|
||||
# use architecture specific macro defined in sys/$(G4SYSTEM).gmk
|
||||
$(build-granular-shared-lib)
|
||||
@@ -47,7 +47,7 @@ ifneq ($(G4LIB_BUILD_STATIC),)
|
||||
# Make static (archive) library.
|
||||
$(G4LIBDIR)/lib$(name).a: $(G4TMPDIR)/obj.last
|
||||
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
|
||||
@echo Creating/replacing object files in $(G4LIBDIR)/lib$(name).a
|
||||
@echo Creating/replacing object files in $(G4LIBDIR)/lib$(name).a ...
|
||||
@rm -f $(G4LIBDIR)/lib$(name).a
|
||||
@$(AR) $(OUT_LIB)$(G4LIBDIR)/lib$(name).a $(G4TMPDIR)/*.o
|
||||
@if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then ranlib $(G4LIBDIR)/lib$(name).a ;fi
|
||||
@@ -130,14 +130,16 @@ ifndef G4EXLIB
|
||||
clean:
|
||||
@echo Cleaning up ...
|
||||
@rm -f $(G4LIBDIR)/lib$(name).a
|
||||
@rm -f $(G4LIBDIR)/*$(name).lib
|
||||
@rm -f $(G4LIBDIR)/*$(name).exp
|
||||
@rm -f $(G4LIBDIR)/lib$(name).$(SHEXT)
|
||||
@rm -rf $(G4TMPDIR)
|
||||
endif
|
||||
|
||||
clean_libs:
|
||||
@if [ -f $(G4LIBDIR)/lib$(name).a ] ; then \
|
||||
$(ECHO) Removing library lib$(name).a ... ; \
|
||||
$(RM) -f $(G4LIBDIR)/lib$(name).a ; fi
|
||||
@if [ -f $(G4LIBDIR)/lib$(name).$(SHEXT) ] ; then \
|
||||
$(ECHO) Removing library lib$(name).$(SHEXT) ... ; \
|
||||
$(RM) -f $(G4LIBDIR)/lib$(name).$(SHEXT) ; fi
|
||||
@echo Removing library lib$(name).a ...
|
||||
@rm -f $(G4LIBDIR)/*$(name).a
|
||||
@echo Removing library lib$(name).$(SHEXT) ...
|
||||
@rm -f $(G4LIBDIR)/*$(name).lib
|
||||
@rm -f $(G4LIBDIR)/*$(name).exp
|
||||
@rm -f $(G4LIBDIR)/*$(name).$(SHEXT)
|
||||
|
||||
+19
-10
@@ -1,4 +1,4 @@
|
||||
# $Id: globlib.gmk,v 1.20 2003/01/22 18:02:04 gcosmo Exp $
|
||||
# $Id: globlib.gmk,v 1.24 2004/06/08 10:04:46 gcosmo Exp $
|
||||
# --------------------------------------------------------------
|
||||
# Script for compound libraries. Gabriele Cosmo, 25/6/98.
|
||||
# --------------------------------------------------------------
|
||||
@@ -40,7 +40,7 @@ ifneq ($(G4LIB_BUILD_STATIC),)
|
||||
$(G4LIBDIR)/lib$(name).a: \
|
||||
$(foreach dir,$(SUBLIBS),$(G4TMP)/$(G4SYSTEM)/$(dir)/obj.last)
|
||||
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ; fi
|
||||
@echo Merging object files in $(G4LIBDIR)/lib$(name).a
|
||||
@echo Merging object files in $(G4LIBDIR)/lib$(name).a ...
|
||||
@$(RM) $(G4LIBDIR)/lib$(name).a
|
||||
#
|
||||
#
|
||||
@@ -79,7 +79,7 @@ endif
|
||||
ifneq ($(G4LIB_BUILD_SHARED),)
|
||||
$(SHARED_LIB): $(foreach dir,$(SUBLIBS),$(G4TMP)/$(G4SYSTEM)/$(dir)/obj.last)
|
||||
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ; fi
|
||||
@echo Creating global shared library $@
|
||||
@echo Creating global shared library $@ ...
|
||||
@$(RM) $@
|
||||
# use system specific commands to build the library
|
||||
$(build-global-shared-lib)
|
||||
@@ -105,16 +105,25 @@ clean:
|
||||
@echo Cleaning up ...
|
||||
@for lib in $(SUBLIBS); do ( \
|
||||
rm -rf $(G4TMP)/$(G4SYSTEM)/$$lib;\
|
||||
rm -f $(G4LIBDIR)/lib$$lib.a;\
|
||||
rm -f $(G4LIBDIR)/lib$$lib.$(SHEXT) );\
|
||||
rm -f $(G4LIBDIR)/*$$lib.a;\
|
||||
rm -f $(G4LIBDIR)/*$$lib.lib;\
|
||||
rm -f $(G4LIBDIR)/*$$lib.exp;\
|
||||
rm -f $(G4LIBDIR)/*$$lib.$(SHEXT) );\
|
||||
done
|
||||
@rm -f $(G4LIBDIR)/lib$(name).a
|
||||
@rm -f $(G4LIBDIR)/*$(name).a
|
||||
@rm -f $(G4LIBDIR)/*$(name).lib
|
||||
@rm -f $(G4LIBDIR)/*$(name).exp
|
||||
@rm -f $(G4LIBDIR)/*$(name).$(SHEXT)
|
||||
|
||||
clean_libs:
|
||||
@echo Removing lib$(name).a/.$(SHEXT) and sub-libraries ...
|
||||
@for lib in $(SUBLIBS); do ( \
|
||||
rm -f $(G4LIBDIR)/lib$$lib.a;\
|
||||
rm -f $(G4LIBDIR)/lib$$lib.$(SHEXT) );\
|
||||
rm -f $(G4LIBDIR)/*$$lib.a;\
|
||||
rm -f $(G4LIBDIR)/*$$lib.lib;\
|
||||
rm -f $(G4LIBDIR)/*$$lib.exp;\
|
||||
rm -f $(G4LIBDIR)/*$$lib.$(SHEXT) );\
|
||||
done
|
||||
@rm -f $(G4LIBDIR)/lib$(name).a
|
||||
@rm -f $(G4LIBDIR)/lib$(name).$(SHEXT)
|
||||
@rm -f $(G4LIBDIR)/*$(name).a
|
||||
@rm -f $(G4LIBDIR)/*$(name).lib
|
||||
@rm -f $(G4LIBDIR)/*$(name).exp
|
||||
@rm -f $(G4LIBDIR)/*$(name).$(SHEXT)
|
||||
|
||||
@@ -73,6 +73,12 @@ setenv NeutronHPCrossSections "$g4neutronhpcrosssections"
|
||||
echo "On this machine the NeutronHPCrossSections=\$NeutronHPCrossSections"
|
||||
endif
|
||||
|
||||
#+
|
||||
if ( X$g4elasticdata != X ) then
|
||||
setenv G4ELASTICDATA "$g4elasticdata"
|
||||
echo "On this machine the G4ELASTICDATA=\$G4ELASTICDATA"
|
||||
endif
|
||||
|
||||
#
|
||||
# g4clhep.U
|
||||
#
|
||||
@@ -303,26 +309,8 @@ else
|
||||
# Check for Windows!
|
||||
if ( "X$G4SYSTEM" == "XWIN32-VC" || "X$G4SYSTEM" == "XWIN32-VC7" ) then
|
||||
|
||||
setenv checkdrive `echo $HOME|cut -d"/" -f2`
|
||||
|
||||
if ( "X$checkdrive" == "Xcygdrive" ) then
|
||||
|
||||
setenv windrive `echo $HOME|cut -d"/" -f3`
|
||||
setenv winpath `echo $HOME|cut -d"/" -f4-`
|
||||
|
||||
setenv fullwinpath "$windrive:/$winpath"
|
||||
setenv G4WORKDIR $fullwinpath
|
||||
|
||||
endif # if cygwin syntax is used
|
||||
|
||||
if ( "X$winpath" == "X" ) then
|
||||
echo "G4WORKDIR will be set to ${G4WORKDIR}geant4 (in "native" Windows syntax)."
|
||||
setenv G4WORKDIR ${G4WORKDIR}geant4
|
||||
else
|
||||
echo "G4WORKDIR will be set to $G4WORKDIR/geant4 (in "native" Windows syntax)."
|
||||
setenv G4WORKDIR $G4WORKDIR/geant4
|
||||
endif
|
||||
|
||||
echo "G4WORKDIR will be set to c:/geant4 (in "native" Windows syntax)."
|
||||
setenv G4WORKDIR "c:/geant4"
|
||||
|
||||
else # if Unix
|
||||
|
||||
|
||||
+12
-20
@@ -97,6 +97,15 @@ echo "On this machine the NeutronHPCrossSections=\$NeutronHPCrossSections"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4elasticdata != X ] ; then
|
||||
G4ELASTICDATA="$g4elasticdata"
|
||||
export G4ELASTICDATA
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4ELASTICDATA=\$G4ELASTICDATA"
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# g4clhep.U
|
||||
#
|
||||
@@ -430,26 +439,9 @@ if [ X$g4non_display = X ] ; then
|
||||
# Check for Windows!
|
||||
if test "X$G4SYSTEM" = "XWIN32-VC" -o "X$G4SYSTEM" = "XWIN32-VC7"; then
|
||||
|
||||
checkdrive=`echo $HOME|cut -d"/" -f2`
|
||||
|
||||
if test "X$checkdrive" = "Xcygdrive"; then
|
||||
|
||||
windrive=`echo $HOME|cut -d"/" -f3`
|
||||
winpath=`echo $HOME|cut -d"/" -f4-`
|
||||
|
||||
fullwinpath="$windrive:/$winpath"
|
||||
G4WORKDIR=$fullwinpath
|
||||
|
||||
fi # if cygwin syntax is used
|
||||
|
||||
if test "X$winpath" = "X"; then
|
||||
echo "G4WORKDIR will be set to ${G4WORKDIR}geant4 (in "native" Windows syntax)"
|
||||
export G4WORKDIR=${G4WORKDIR}geant4
|
||||
else
|
||||
echo "G4WORKDIR will be set to $G4WORKDIR/geant4 (in "native" Windows syntax)"
|
||||
export G4WORKDIR=${G4WORKDIR}/geant4
|
||||
fi
|
||||
|
||||
echo "G4WORKDIR will be set to c:/geant4 (in "native" Windows syntax)"
|
||||
G4WORKDIR="c:/geant4"
|
||||
export G4WORKDIR
|
||||
|
||||
else # if Unix
|
||||
|
||||
|
||||
@@ -60,6 +60,12 @@ export G4LIB
|
||||
echo "On this machine the G4LIB=\$G4LIB"
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4lib != X ] ; then
|
||||
G4BIN="$g4lib/../bin"
|
||||
export G4BIN
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4levelgammadata != X ] ; then
|
||||
G4LEVELGAMMADATA="$g4levelgammadata"
|
||||
@@ -88,6 +94,13 @@ export NeutronHPCrossSections
|
||||
echo "On this machine the NeutronHPCrossSections=\$NeutronHPCrossSections"
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4elasticdata != X ] ; then
|
||||
G4ELASTICDATA="$g4elasticdata"
|
||||
export G4ELASTICDATA
|
||||
echo "On this machine the G4ELASTICDATA=\$g4elasticdata"
|
||||
fi
|
||||
|
||||
#
|
||||
# g4clhep.U
|
||||
#
|
||||
@@ -335,8 +348,6 @@ fi
|
||||
|
||||
#####################################################################
|
||||
|
||||
echo g4conf=$g4conf
|
||||
|
||||
#####################################################################
|
||||
# Create GNUmakefile.db to keep ALL GNUmakefile DB :)
|
||||
|
||||
@@ -371,29 +382,59 @@ rm -rf $g4conf/g4make.log
|
||||
$g4make 2>&1 | tee $g4conf/g4make.log
|
||||
fi
|
||||
|
||||
# Check for errors in log file
|
||||
export err=\$[ \`grep Error $g4conf/g4make.log | wc -w\` ]
|
||||
export int=\$[ \`grep Stop\. $g4conf/g4make.log | wc -w\` ]
|
||||
# echo err=\$err
|
||||
if [ X$g4lib_build_dll = Xy ] ; then
|
||||
echo ""
|
||||
rm -rf $g4conf/g4make.log
|
||||
$g4make dll 2>&1 | tee $g4conf/g4make.log
|
||||
fi
|
||||
|
||||
if [ X\$err = X0 -a X\$int = X0 ] ; then
|
||||
if [ X$g4lib_build_dyn = Xy ] ; then
|
||||
echo ""
|
||||
rm -rf $g4conf/g4make.log
|
||||
$g4make global G4LIB_BUILD_SHARED=1 2>&1 | tee $g4conf/g4make.log
|
||||
fi
|
||||
|
||||
# Check for errors in log file
|
||||
if test -f \$g4conf/g4make.log ; then
|
||||
|
||||
# There are two (at least) shells 'sh' and 'bash' with
|
||||
# different arithmetic expansion...So we are doing it by 'text'
|
||||
# in two steps...
|
||||
|
||||
err=\`grep Error $g4conf/g4make.log | wc -w\`
|
||||
int=\`grep Stop\. $g4conf/g4make.log | wc -w\`
|
||||
|
||||
err2=\`echo \$err\`
|
||||
int2=\`echo \$int\`
|
||||
|
||||
if [ X\$err2 = X0 -a X\$int2 = X0 ] ; then
|
||||
echo ""
|
||||
echo "####################################################"
|
||||
echo "# Your Geant4 installation seems to be successful! #"
|
||||
echo "# To be sure please have a look into the log file: #"
|
||||
echo "# $g4conf/g4make.log #"
|
||||
echo "# Your Geant4 installation seems to be successful! "
|
||||
echo "# To be sure please have a look into the log file: "
|
||||
echo "# $g4conf/g4make.log "
|
||||
echo "####################################################"
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
echo "############################################################"
|
||||
echo "# It looks like you had errors during Geant4 installation #"
|
||||
echo "# (or interrupted installation)! #"
|
||||
echo "# Please check log file: #"
|
||||
echo "# $g4conf/g4make.log #"
|
||||
echo "# It looks like you had errors during Geant4 installation "
|
||||
echo "# (or interrupted installation)! "
|
||||
echo "# Please check log file: "
|
||||
echo "# $g4conf/g4make.log "
|
||||
echo "############################################################"
|
||||
echo ""
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
echo "############################################################"
|
||||
echo "# It looks like you had errors during Geant4 installation "
|
||||
echo "# (or interrupted installation)! "
|
||||
echo "# You have no log file: "
|
||||
echo "# $g4conf/g4make.log "
|
||||
echo "############################################################"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# There is no env!
|
||||
if [ X$g4includes_flag = Xy ] ; then
|
||||
|
||||
+12
-12
@@ -35,12 +35,6 @@ ifeq ($(G4SYSTEM),Darwin-g++)
|
||||
FCFLAGS += -pg
|
||||
CCFLAGS += -pg
|
||||
endif
|
||||
ifdef G4LIB_BUILD_SHARED
|
||||
CXXFLAGS += -fPIC
|
||||
FCFLAGS += -fPIC
|
||||
CCFLAGS += -fPIC
|
||||
endif
|
||||
# G4RUNPATHOPTION := -Wl,-rpath
|
||||
FC := g77
|
||||
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
|
||||
FCLIBS := -lg2c -lnsl
|
||||
@@ -48,8 +42,8 @@ ifeq ($(G4SYSTEM),Darwin-g++)
|
||||
SHEXT := dylib
|
||||
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
|
||||
XMFLAGS := -I/sw/include
|
||||
XMLIBS := -L/sw/lib -lXm -lXpm
|
||||
DLDLIBS := -ldl
|
||||
ifndef OGLHOME
|
||||
OGLHOME := /usr/X11R6
|
||||
@@ -60,16 +54,22 @@ ifeq ($(G4SYSTEM),Darwin-g++)
|
||||
ifndef OGLLIBS
|
||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
||||
endif
|
||||
OIVFLAGS += -I$(OIHOME)/include
|
||||
define build-granular-shared-lib
|
||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
cd $(G4TMPDIR); \
|
||||
g++ -dynamiclib -flat_namespace -undefined suppress -o $$libdir/$(@F) $(INTYLIBS) *.o
|
||||
g++ -dynamiclib -twolevel_namespace -undefined error -dynamic \
|
||||
-single_module -o $$libdir/$(@F) *.o -L$(G4LIB)/$(G4SYSTEM) \
|
||||
$(patsubst lib%,-l%,$(patsubst %.lib,%,$(GLOBLIBS))) \
|
||||
-L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) $(INTYLIBS)
|
||||
endef
|
||||
define build-global-shared-lib
|
||||
libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
cd $(G4TMP)/$(G4SYSTEM); \
|
||||
g++ -dynamiclib -flat_namespace -undefined suppress -o $$libdir/$(@F) $(INTYLIBS) $(foreach dir,$(SUBLIBS),$(dir)/*.o);
|
||||
g++ -dynamiclib -twolevel_namespace -undefined error -dynamic \
|
||||
-single_module -o $$libdir/$(@F) \
|
||||
$(foreach dir,$(SUBLIBS),$(dir)/*.o) -L$(G4LIB)/$(G4SYSTEM) \
|
||||
$(patsubst lib%,-l%,$(patsubst %.lib,%,$(GLOBLIBS))) \
|
||||
-L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) $(INTYLIBS);
|
||||
endef
|
||||
|
||||
endif
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
#
|
||||
# ------ GNU/LINUX ------ gcc 2.95.2 / gcc 3.2
|
||||
# ------ GNU/LINUX ------ gcc 3.2 and higher
|
||||
#
|
||||
ifeq ($(G4SYSTEM),Linux-g++)
|
||||
CXX := g++
|
||||
CXXFLAGS := -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
|
||||
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe
|
||||
#
|
||||
# Uncomment the following options to activate Pentium4 chip specific
|
||||
# floating-point operations on the SSE unit. It will allow for more stable
|
||||
# results (no output differences between debug/optimised runs) and little
|
||||
# performance improvement (in the order of 2%).
|
||||
# NOTE: binaries built using these options will NOT be portable cross
|
||||
# platforms. Will only run on Pentium4-based architectures !
|
||||
#
|
||||
# CXXFLAGS += -march=pentium4 -mfpmath=sse
|
||||
ifdef G4OPTIMISE
|
||||
CXXFLAGS += -O
|
||||
FCFLAGS := -O
|
||||
CCFLAGS := -O
|
||||
CXXFLAGS += -O2
|
||||
FCFLAGS := -O2
|
||||
CCFLAGS := -O2
|
||||
else
|
||||
ifdef G4DEBUG
|
||||
CXXFLAGS += -g
|
||||
|
||||
+43
-3
@@ -15,6 +15,7 @@ ifeq ($(G4SYSTEM),WIN32-VC)
|
||||
CPPFLAGS += -DWIN32
|
||||
LDFLAGS += -FORCE /NODEFAULTLIB:MSVCRT.dll
|
||||
|
||||
SHEXT := dll
|
||||
AR := LIB
|
||||
ECHO := echo -e
|
||||
FC := g77
|
||||
@@ -30,10 +31,49 @@ ifeq ($(G4SYSTEM),WIN32-VC)
|
||||
endif
|
||||
|
||||
define build-granular-shared-lib
|
||||
@echo "Shared Libraries not supported on $(G4SYSTEM)
|
||||
@libdir=`(cd $(@D);/bin/pwd)`;\
|
||||
cd $(G4TMP)/$(G4SYSTEM);\
|
||||
echo "Building $(name).dumpbin file ...";\
|
||||
$(RM) $(name).dumpbin;\
|
||||
dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
|
||||
echo "Building $(name).def file ...";\
|
||||
$(RM) $(name).def;\
|
||||
$(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
|
||||
$(RM) $(name).dumpbin;\
|
||||
echo "Building lib$(name).exp and lib$(name).lib file ...";\
|
||||
$(RM) $(G4LIBDIR)/lib$(name).exp;\
|
||||
$(RM) $(G4LIBDIR)/lib$(name).lib;\
|
||||
lib.exe /nologo /machine:ix86 /def:$(name).def \
|
||||
/out:$(G4LIBDIR)/lib$(name).lib;\
|
||||
$(RM) $(G4LIBDIR)/$(name).dll;\
|
||||
echo "Building $(name).dll file ...";\
|
||||
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
|
||||
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
|
||||
/libpath:$(G4LIBDIR) $(GLOBLIBS) \
|
||||
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
|
||||
$(INTYLIBS) $(ANALYSISLIBS) $(UI32LIBS)
|
||||
endef
|
||||
define build-global-shared-lib
|
||||
@echo "Shared Libraries not supported on $(G4SYSTEM)
|
||||
@libdir=`(cd $(@D);/bin/pwd)`;\
|
||||
cd $(G4TMP)/$(G4SYSTEM);\
|
||||
echo "Building $(name).dumpbin file ...";\
|
||||
$(RM) $(name).dumpbin;\
|
||||
dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
|
||||
echo "Building $(name).def file ...";\
|
||||
$(RM) $(name).def;\
|
||||
$(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
|
||||
$(RM) $(name).dumpbin;\
|
||||
echo "Building lib$(name).exp and lib$(name).lib ...";\
|
||||
$(RM) $(G4LIBDIR)/lib$(name).exp;\
|
||||
$(RM) $(G4LIBDIR)/lib$(name).lib;\
|
||||
lib.exe /nologo /machine:ix86 /def:$(name).def \
|
||||
/out:$(G4LIBDIR)/lib$(name).lib;\
|
||||
$(RM) $(G4LIBDIR)/$(name).dll;\
|
||||
echo "Building $(name).dll ...";\
|
||||
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
|
||||
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
|
||||
/libpath:$(G4LIBDIR) $(GLOBLIBS) \
|
||||
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
|
||||
$(INTYLIBS) $(ANALYSISLIBS) $(UI32LIBS)
|
||||
endef
|
||||
|
||||
endif
|
||||
|
||||
+30
-19
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# ------ WIN32/VC ------ Visual-C++ 7 .NET
|
||||
# experimental setup
|
||||
#
|
||||
ifeq ($(G4SYSTEM),WIN32-VC7)
|
||||
CXX := CL
|
||||
ifdef G4OPTIMISE
|
||||
@@ -31,16 +31,17 @@ ifeq ($(G4SYSTEM),WIN32-VC7)
|
||||
endif
|
||||
|
||||
#
|
||||
# Building DLLs (from G.Barrand)
|
||||
# Building DLLs (G.Barrand)
|
||||
# -------------
|
||||
# The below commands permit to build DLLs from the archive libraries.
|
||||
# The commands below allow to build DLLs from the archive libraries.
|
||||
# From a libG4xxx.a, it will extract the symbols with :
|
||||
# DOS> dumpbin /symbols libG4xxx.a > G4xxx.dumpbin
|
||||
# After that it will produce a G4xxx.def using the 'win32def' program.
|
||||
# The G4xxx.def file will contain the list of symbols that are "exported"
|
||||
# or made public for using the DLLs.
|
||||
# The source win32def.c is in config/sys. The binary is built during the
|
||||
# library installation process, and will be placed in $G4LIB/G4SYSTEM.
|
||||
# The source win32def.c is in the geant4/config directory. The binary is
|
||||
# built during the library installation process, and will be placed in
|
||||
# $G4LIB/G4SYSTEM.
|
||||
# If can also be built as follows :
|
||||
# DOS> cl.exe /Fowin32def.exe win32def.c
|
||||
# Then, to use it :
|
||||
@@ -56,37 +57,47 @@ ifeq ($(G4SYSTEM),WIN32-VC7)
|
||||
define build-granular-shared-lib
|
||||
@libdir=`(cd $(@D);/bin/pwd)`;\
|
||||
cd $(G4TMP)/$(G4SYSTEM);\
|
||||
echo "Building $(name).dumpbin file";\
|
||||
echo "Building $(name).dumpbin file ...";\
|
||||
$(RM) $(name).dumpbin;\
|
||||
dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
|
||||
echo "Building $(name).def file";\
|
||||
echo "Building $(name).def file ...";\
|
||||
$(RM) $(name).def;\
|
||||
$(G4LIBDIR)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
|
||||
$(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
|
||||
$(RM) $(name).dumpbin;\
|
||||
echo "Building lib$(name).exp and lib$(name).lib file";\
|
||||
echo "Building lib$(name).exp and lib$(name).lib file ...";\
|
||||
$(RM) $(G4LIBDIR)/lib$(name).exp;\
|
||||
$(RM) $(G4LIBDIR)/lib$(name).lib;\
|
||||
lib.exe /nologo /machine:ix86 /def:$(name).def /out:$(G4LIBDIR)/lib$(name).lib;\
|
||||
lib.exe /nologo /machine:ix86 /def:$(name).def \
|
||||
/out:$(G4LIBDIR)/lib$(name).lib;\
|
||||
$(RM) $(G4LIBDIR)/$(name).dll;\
|
||||
echo "Building $(name).dll file";\
|
||||
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a /libpath:$(G4LIBDIR) $(GLOBLIBS) $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB)
|
||||
echo "Building $(name).dll file ...";\
|
||||
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
|
||||
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
|
||||
/libpath:$(G4LIBDIR) $(GLOBLIBS) \
|
||||
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
|
||||
$(INTYLIBS) $(ANALYSISLIBS) $(UI32LIBS)
|
||||
endef
|
||||
define build-global-shared-lib
|
||||
@libdir=`(cd $(@D);/bin/pwd)`;\
|
||||
cd $(G4TMP)/$(G4SYSTEM);\
|
||||
echo "Building $(name).dumpbin file";\
|
||||
echo "Building $(name).dumpbin file ...";\
|
||||
$(RM) $(name).dumpbin;\
|
||||
dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
|
||||
echo "Building $(name).def file";\
|
||||
echo "Building $(name).def file ...";\
|
||||
$(RM) $(name).def;\
|
||||
$(G4LIBDIR)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
|
||||
$(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
|
||||
$(RM) $(name).dumpbin;\
|
||||
echo "Building lib$(name).exp and lib$(name).lib file";\
|
||||
echo "Building lib$(name).exp and lib$(name).lib ...";\
|
||||
$(RM) $(G4LIBDIR)/lib$(name).exp;\
|
||||
$(RM) $(G4LIBDIR)/lib$(name).lib;\
|
||||
lib.exe /nologo /machine:ix86 /def:$(name).def /out:$(G4LIBDIR)/lib$(name).lib;\
|
||||
lib.exe /nologo /machine:ix86 /def:$(name).def \
|
||||
/out:$(G4LIBDIR)/lib$(name).lib;\
|
||||
$(RM) $(G4LIBDIR)/$(name).dll;\
|
||||
echo "Building $(name).dll file";\
|
||||
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a /libpath:$(G4LIBDIR) $(GLOBLIBS) $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB)
|
||||
echo "Building $(name).dll ...";\
|
||||
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
|
||||
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
|
||||
/libpath:$(G4LIBDIR) $(GLOBLIBS) \
|
||||
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
|
||||
$(INTYLIBS) $(ANALYSISLIBS) $(UI32LIBS)
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# ------ GNU/WIN32 CYGNUS ------ !!! not supported !!!
|
||||
# Cygnus CygWin - gcc-2.95.3, gcc-3.2
|
||||
# Windows 2000/XP
|
||||
# Cygnus CygWin - gcc-3.2 and higher
|
||||
# Windows 2000/XP
|
||||
#
|
||||
# Stefano Agostinelli (agos001@pn.itnet.it) - IST Group, Genova
|
||||
#
|
||||
@@ -24,10 +24,12 @@ ifeq ($(G4SYSTEM),WIN32-g++)
|
||||
FCFLAGS += -fPIC
|
||||
CCFLAGS += -fPIC
|
||||
endif
|
||||
G4RUNPATHOPTION := -Wl,-rpath
|
||||
FC := g77
|
||||
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
|
||||
FCLIBS := -lg2c -lnsl
|
||||
ECHO := echo -e
|
||||
SHEXT := so
|
||||
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
|
||||
X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
|
||||
XMFLAGS := -I/usr/X11R6/include
|
||||
@@ -39,12 +41,16 @@ ifeq ($(G4SYSTEM),WIN32-g++)
|
||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
||||
endif
|
||||
OIVFLAGS += -I$(OIHOME)/include
|
||||
|
||||
define build-granular-shared-lib
|
||||
@echo "Shared Libraries not supported on $(G4SYSTEM)
|
||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
cd $(G4TMPDIR); \
|
||||
$(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) *.o
|
||||
endef
|
||||
define build-global-shared-lib
|
||||
@echo "Shared Libraries not supported on $(G4SYSTEM)
|
||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
cd $(G4TMP)/$(G4SYSTEM); \
|
||||
$(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) \
|
||||
$(foreach dir,$(SUBLIBS),$(dir)/*.o);
|
||||
endef
|
||||
|
||||
endif
|
||||
|
||||
+17
-13
@@ -1,4 +1,4 @@
|
||||
/* $Id: win32def.c,v 1.2 2004/02/09 16:44:45 gcosmo Exp $ */
|
||||
/* $Id: win32def.c,v 1.3 2004/06/18 16:10:06 gcosmo Exp $ */
|
||||
/* +---------------------- Copyright notice -------------------------------+ */
|
||||
/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
/* | Permission to use, copy, modify, and distribute this software | */
|
||||
@@ -60,8 +60,11 @@ EXPORTS\n",aArgs[1]);
|
||||
length--;
|
||||
}
|
||||
if(strstr(buffer,"SECT")==NULL) continue;
|
||||
if(strstr(buffer,"??_")!=NULL) continue;
|
||||
if(strstr(buffer,"External")==NULL) continue;
|
||||
if(strstr(buffer,"??_")!=NULL) {
|
||||
if(strstr(buffer,"operator/=")==NULL) continue;
|
||||
/* Keep operator /= */
|
||||
}
|
||||
|
||||
{
|
||||
char** words;
|
||||
@@ -69,24 +72,25 @@ EXPORTS\n",aArgs[1]);
|
||||
words = GetWords (buffer," ",&wordn);
|
||||
if(wordn>=8) {
|
||||
int iword = 7;
|
||||
int offset = 0;
|
||||
if(strcmp(words[4],"()")==0) {
|
||||
iword = 7;
|
||||
} else if(strcmp(words[4],"External")==0) {
|
||||
iword = 6;
|
||||
}
|
||||
if(words[iword][0]=='_') {
|
||||
if(iword==6) {
|
||||
printf(" %s\tDATA\n",words[iword]+1);
|
||||
} else {
|
||||
printf(" %s\n",words[iword]+1);
|
||||
}
|
||||
if(words[iword][0]=='_') offset = 1;
|
||||
|
||||
if( (iword==6) && (strstr(buffer,"static class")!=NULL) ){
|
||||
/* static class objects are not DATA */
|
||||
printf(" %s\n",words[iword]+offset);
|
||||
} else if(iword==6) {
|
||||
/* DATA */
|
||||
printf(" %s\tDATA\n",words[iword]+offset);
|
||||
} else {
|
||||
if(iword==6) {
|
||||
printf(" %s\tDATA\n",words[iword]);
|
||||
} else {
|
||||
printf(" %s\n",words[iword]);
|
||||
}
|
||||
/* code */
|
||||
printf(" %s\n",words[iword]+offset);
|
||||
}
|
||||
|
||||
}
|
||||
{int count;
|
||||
for(count=0;count<wordn;count++) if(words[count]) free(words[count]);
|
||||
|
||||
Reference in New Issue
Block a user