Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
# $Id: G4UI_USE.gmk,v 1.1 1999/01/07 15:58:31 gunter Exp $
# $Id: G4UI_USE.gmk,v 1.2 2000/11/21 10:15:22 maire Exp $
# -------------------------------------------------------------
# GNUmakefile for CPPFLAGS for interfaces USE phase.
# John Allison, 6th July 1998.
@@ -17,6 +17,12 @@ ifdef G4UI_USE_TERMINAL
CPPFLAGS += -DG4UI_USE_TERMINAL
endif
ifdef G4UI_USE_TCSH
G4UI_USE = 1
G4UI_USE_BASIC = 1
CPPFLAGS += -DG4UI_USE_TCSH
endif
ifdef G4UI_USE_XM
G4UI_USE = 1
G4UI_USE_BASIC = 1
+99 -2
View File
@@ -1,5 +1,5 @@
$Id: History,v 1.105 2000/05/23 06:48:25 gcosmo Exp $
$Name: geant4-02-00 $
$Id: History,v 1.129 2000/12/13 09:19:56 gcosmo Exp $
$Name: geant4-03-00 $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,103 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
13th December 2000 Gunter Folger (config-V02-00-14)
- common.gmk: fix to rule for building dependencies, parsing is skip
if $(dependencies) is empty.
- globlib.gmk: added "includes" to PHONY target list and fixed typo.
- Added comments to "includes" rules.
8th December 2000 Gabriele Cosmo (config-V02-00-13)
- Changed G4LIB_BUILD_ARCHIVE to G4LIB_BUILD_STATIC in architecture.gmk,
common.gmk and globlib.gmk.
7th December 2000 Gabriele Cosmo (config-V02-00-12)
- Added options to SUN-CC5.gmk to handle multithreading and persistency.
5th December 2000 Youhei Morita (config-V02-00-11)
- Introduced GPPFLAGS to set -M or -MM according to G4ODBMS.
5th December 2000 Gabriele Cosmo (config-V02-00-10)
- Restored -MM option to g++ for making dependencies. -M was introduced in
tag config-V02-00-02 to allow dependency search on system headers as well
(#include<...> statements). This however introduces serious clashes with
Objectivity schema generation for the persistency module.
4th December 2000 Gunter Folger (config-V02-00-09)
- Disable G4RUNPATHOPTION (internal variable) for all but SUN. This is/will
be used when linking with G4 shared libraries to store the path to these
libraries in the executable.
1st December 2000 Gabriele Cosmo (config-V02-00-08)
- Added G4UI_USE_TCSH and related settings to G4UI_USE.gmk (M.Maire).
- Merged SUN-CC6.gmk to SUN-CC5.gmk and removed SUN-CC6.gmk.
1st December 2000 Gunter Folger (config-V02-00-07)
- Change -M to -M -MG in common.gmk, binmake.gmk. This will output a "correct"
dependency file even when missing header files are missing. Correct in the
sense that liblist will work, and that the missing header is supposed to be
(made) in the source directory.
17th November 2000 Gunter Folger (config-V02-00-06)
- Link with CLHEP using -L/-l instead of absolute filename; this allows
to link with shared lib of Anaphe, or static lib of Geant4.
- Added shared-lib settings to sys configurations.
14th November 2000 Gabriele Cosmo (config-V02-00-05)
- Added reference to new "parameterisations" top category.
Modified files: binmake.gmk.
- Removed makeshlib.sh script, now obsolete.
7th November 2000 Guy Barrand
- analysis.gmk : renamed OpenScientist things to "Lab" ;
Lab is the concrete package where analysis is done.
3rd November 2000 Gunter Folger (config-V02-00-04)
- common.gmk: fix for shared-library build.
- common.gmk, globlib.gmk: added rules for "includes" gmake target.
- architecture.gmk: introduced new user settable variable G4INCLUDE
to specify path where headers (files or symbolic-links) should be installed.
1st November 2000 Guy Barrand
- analysis.gmk: declared Lizard.
24th October 2000 Gunter Folger (config-V02-00-03)
- architecture.gmk, common.gmk, globlib.gmk, sys/*:
o merged building shared libraries into makefiles.
The MAKESHLIB script is no longer used.
- Introduced new variables steering the building of archive/shared libs:
G4LIB_BUILD_SHARED
G4LIB_BUILD_ARCHIVE (still default)
note that G4MAKESHLIB set will internally set G4LIB_BUILD_SHARED for
backwards compatiblity.
- Introduced new variable (G4LIB_USE_GRANULAR) to force using of granular
libraries, even when libG4global.a/.so exists.
14th September 2000 Guy Barrand
- Introduced changes to handle analysis module.
o added analysis.gmk.
o sys/Linux-g++.gmk: added macro DLDLIBS for library dynamic loading.
o binmake.gmk: added inclusion of analysis.gmk.
o binmake.gmk: place LDLIBS3 += $(ANALYSISLIBS) after LDLIBS3 += $(INTYLIBS).
22nd August 2000 John Allison (config-V02-00-02)
- Changed -MM to -M in dependency file making in binmake.gmk and common.gmk.
This causes dependencies of both #include "..." and #include <...> to be
followed. This is the safer option, since some users might/should use,
e.g., #include <g4std/...>, but even these files change sometime.
22nd August 2000 Gunter Folger
- globlib.gmk: fix for protection from infinite loops when a dir does
not exist (G.Folger).
1st August 2000 Gabriele Cosmo (config-V02-00-01)
- Added setup WIN32-g++ for Windows/NT/9X with Cygwin and g++ compiler.
Configuration non officially supported (courtesy of S.Agostinelli and
IST group, Genova).
24th July 2000 Gabriele Cosmo (config-V02-00-00)
- Added path to g3tog4 for global libs.
23rd May 2000 John Allison (config-V01-01-04)
- Added -I$(G4BASE)/processes/hadronic/models/radiative_decay/include to
binmake.gmk.
+152
View File
@@ -0,0 +1,152 @@
# Guy Barrand, 20th Mai 2000
#
# Analysis variables...
#
# -----------------------------------
ifdef G4ANALYSIS_USE
CPPFLAGS += -DG4ANALYSIS_USE
G4ANALYSIS_BUILD = 1
endif
ifdef G4ANALYSIS_BUILD
CPPFLAGS += -DG4ANALYSIS_BUILD
INC_ANALYSIS = 1
LIB_ANALYSIS = 1
endif
# ------------- Lab -----------------
ifdef G4ANALYSIS_USE_LAB
CPPFLAGS += -DG4ANALYSIS_USE_LAB
CPPFLAGS += -DG4ANALYSIS_USE
G4ANALYSIS_BUILD_LAB = 1
endif
ifdef G4ANALYSIS_BUILD_LAB
CPPFLAGS += -DG4ANALYSIS_BUILD
CPPFLAGS += -DG4ANALYSIS_BUILD_LAB
INC_ANALYSIS = 1
LIB_ANALYSIS = 1
INC_LAB = 1
LIB_LAB = 1
endif
# ------------- jas -----------------
ifdef G4ANALYSIS_USE_JAS
CPPFLAGS += -DG4ANALYSIS_USE_JAS
CPPFLAGS += -DG4ANALYSIS_USE
G4ANALYSIS_BUILD_JAS = 1
endif
ifdef G4ANALYSIS_BUILD_JAS
CPPFLAGS += -DG4ANALYSIS_BUILD
CPPFLAGS += -DG4ANALYSIS_BUILD_JAS
INC_ANALYSIS = 1
LIB_ANALYSIS = 1
INC_JAS = 1
LIB_JAS = 1
endif
# ------------- Lizard -----------------
ifdef G4ANALYSIS_USE_LIZARD
CPPFLAGS += -DG4ANALYSIS_USE_LIZARD
CPPFLAGS += -DG4ANALYSIS_USE
G4ANALYSIS_BUILD_LIZARD = 1
endif
ifdef G4ANALYSIS_BUILD_LIZARD
CPPFLAGS += -DG4ANALYSIS_BUILD
CPPFLAGS += -DG4ANALYSIS_BUILD_LIZARD
INC_ANALYSIS = 1
LIB_ANALYSIS = 1
INC_LIZARD = 1
LIB_LIZARD = 1
endif
# ------------- Else ---------------
ifdef G4ANALYSIS_NON_AIDA
CPPFLAGS += -DG4ANALYSIS_NON_AIDA
endif
# ------------- Hook packages -----------------
ANALYSISLIBS :=
#
ifdef INC_ANALYSIS
CPPFLAGS += -I$(G4BASE)/analysis/management/include
# AIDA interfaces :
ifdef G4ANALYSIS_AIDA
CPPFLAGS += -I$(G4ANALYSIS_AIDA)
endif
endif
#
ifdef LIB_LAB
ANALYSISLIBS += -lG4Lab
endif
ifdef LIB_JAS
ANALYSISLIBS += -lG4jas
endif
ifdef LIB_LIZARD
ANALYSISLIBS += -lG4Lizard
endif
ifdef LIB_ANALYSIS
ANALYSISLIBS += -lG4analysis_management
endif
#
# ------------- Lab -----------------
ifdef INC_LAB
CPPFLAGS += -I$(G4BASE)/analysis/Lab/include
CPPFLAGS += -I$(LIBROOT)/include -I$(HCLROOT)/include -I$(LABROOT)/include
CPPFLAGS += -DHasRio
ifdef G4ANALYSIS_LAB_VISUALIZATION
CPPFLAGS += -DG4ANALYSIS_LAB_VISUALIZATION
CPPFLAGS += -I$(ONXROOT)/include
INC_XM = 1
endif
endif
#
ifdef LIB_LAB
ifdef G4ANALYSIS_LAB_VISUALIZATION
ANALYSISLIBS += $(ONXROOT)/$(ONXCONFIG)/XmUI.o
ANALYSISLIBS += -L$(ONXROOT)/$(ONXCONFIG) -lOnXInventorXt
ANALYSISLIBS += -L$(HEPVISROOT)/$(HEPVISCONFIG) -lHEPVisXt
ANALYSISLIBS += -L$(ONXROOT)/$(ONXCONFIG) -lOnXInventor
ANALYSISLIBS += -L$(ONXROOT)/$(ONXCONFIG) -lOnX
ANALYSISLIBS += -L$(EXPATROOT)/$(EXPATCONFIG) -lexpat
ANALYSISLIBS += -L$(SOFREEROOT)/$(SOFREECONFIG) -lSoFreeXt
ANALYSISLIBS += -L$(HEPVISROOT)/$(HEPVISCONFIG) -lHEPVis
ANALYSISLIBS += -L$(SOFREEROOT)/$(SOFREECONFIG) -lSoFree
LIB_XM = 1
LIB_GL = 1
endif
ANALYSISLIBS += -L$(LABROOT)/$(LABCONFIG) -lLab
ANALYSISLIBS += -L$(RIOGRANDEROOT)/$(RIOGRANDECONFIG) -lRioTree -lRioBed
ANALYSISLIBS += -L$(CINTROOT)/$(CINTCONFIG) -lcint
ANALYSISLIBS += -L$(HCLROOT)/$(HCLCONFIG) -lHCL
ANALYSISLIBS += -L$(MIDNIGHTROOT)/$(MIDNIGHTCONFIG) -lMidnight
ANALYSISLIBS += -L$(LIBROOT)/$(LIBCONFIG) -lLib
ANALYSISLIBS += $(DLDLIBS)
endif
#
# ------------- jas -----------------
ifdef INC_JAS
CPPFLAGS += -I$(G4BASE)/analysis/jas/include
CPPFLAGS += -I$(JDKHOME)/include -I$(JDKHOME)/include/linux
endif
#
ifdef LIB_JAS
ANALYSISLIBS += -L$(JDKHOME)/jre/lib/i386/classic -L$(JDKHOME)/jre/lib/i386/native_threads -ljvm -lhpi
endif
# ------------- Lizard -----------------
ifdef INC_LIZARD
CPPFLAGS += -I$(G4BASE)/analysis/Lizard/include
CPPFLAGS += -I$(LIZARDROOT)/include
endif
#
ifdef LIB_LIZARD
ANALYSISLIBS += -L$(LIZARDROOT)/lib -lAIDA_HTL -lT_Histoxx -lVector -lAIDA_Annotation -lAIDA_Plotter -lqp -lqpview -lqpqwt -lqt -lHepUtilities
endif
+27 -5
View File
@@ -1,4 +1,4 @@
# $Id: architecture.gmk,v 1.66 2000/05/19 07:29:06 gcosmo Exp $
# $Id: architecture.gmk,v 1.70 2000/12/08 09:41:26 gcosmo Exp $
# ------------------------------------------------------------------------
# GEANT 4 - Architecture configuration script for GNU Make
#
@@ -86,6 +86,28 @@ endif
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4LIB) ] && mkdir -p $(G4LIB) )
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4LIB)/$(G4SYSTEM) ] && mkdir -p $(G4LIB)/$(G4SYSTEM) )
# If not specified, the default path to install G4 include files is G4INCLUDE
# set to $G4INSTALL/include ...
#
ifndef G4INCLUDE
G4INCLUDE := $(G4INSTALL)/include
endif
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4INCLUDE) ] && mkdir -p $(G4INCLUDE) )
# backwards compatiblity
ifneq ($(G4MAKESHLIB),)
G4LIB_BUILD_SHARED = 1
endif
# defaults for library BUILD. No default for USE, ie. take what is found.
ifeq ($(G4LIB_BUILD_SHARED),)
ifeq ($(G4LIB_BUILD_STATIC),)
# default is building static libs
G4LIB_BUILD_STATIC = 1
endif
endif
# If not specified, the default path for G4 binaries G4BIN is
# set to $G4WORKDIR/bin/$G4SYSTEM ...
#
@@ -280,10 +302,10 @@ ifeq ($(G4SYSTEM),WIN32-VC)
LDFLAGS := -link $(LIB_PATH)$(CLHEP_LIB_DIR)
LOADLIBS := $(CLHEP_LIB)
else
## LDFLAGS := -L$(CLHEP_LIB_DIR)
LDFLAGS :=
## LOADLIBS := -l$(CLHEP_LIB)
LOADLIBS := $(CLHEP_LIB_DIR)/lib$(CLHEP_LIB).a
LDFLAGS := -L$(CLHEP_LIB_DIR)
# LDFLAGS :=
LOADLIBS := -l$(CLHEP_LIB)
# LOADLIBS := $(CLHEP_LIB_DIR)/lib$(CLHEP_LIB).a
LOADLIBS += -lm
endif
+44 -7
View File
@@ -1,4 +1,4 @@
# $Id: binmake.gmk,v 1.45 2000/05/23 05:32:14 stesting Exp $
# $Id: binmake.gmk,v 1.54 2000/12/05 17:19:49 morita Exp $
# ----------------------------------------------------------
# Script defining rules and paths for making binaries.
# Gabriele Cosmo, 25/06/1998.
@@ -13,6 +13,7 @@ G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
include $(G4INSTALL)/config/G4UI_USE.gmk
include $(G4INSTALL)/config/G4VIS_USE.gmk
include $(G4INSTALL)/config/interactivity.gmk
include $(G4INSTALL)/config/analysis.gmk
ifndef INCFLAGS
INCFLAGS := \
@@ -22,6 +23,7 @@ ifndef INCFLAGS
-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 \
@@ -77,7 +79,8 @@ ifndef INCFLAGS
-I$(G4BASE)/readout/include \
-I$(G4BASE)/event/include \
-I$(G4BASE)/graphics_reps/include \
-I$(G4BASE)/intercoms/include
-I$(G4BASE)/intercoms/include \
-I$(G4BASE)/g3tog4/include
endif
ifdef G4ODBMS
@@ -97,20 +100,41 @@ ifdef G4ODBMS
-DHep_HAS_BUILDIN_BOOL_CONSTANTS
endif
ifndef G4LIB_USE_GRANULAR
GLOBALLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.a && echo yes)
ifndef GLOBALLIBS
GLOBALLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.$(SHEXT) && echo yes)
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.$(SHEXT) && echo yes)
endif
endif
ifndef SHAREDLIBS
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4globman.$(SHEXT) && echo yes)
endif
CPPFLAGS += $(INCFLAGS)
LDFLAGS += -L$(G4LIBDIR)
ifdef SHAREDLIBS
ifdef G4RUNPATHOPTION
LDFLAGS += $(G4RUNPATHOPTION)$(G4LIBDIR)
endif
endif
G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(G4TARGET)
G4BINDIR := $(G4BIN)/$(G4SYSTEM)
ifdef G4EXLIB
G4LIBDIR := $(G4TMPDIR)
LDFLAGS += -L$(G4LIBDIR)
ifdef SHAREDLIBS
ifdef G4RUNPATHOPTION
LDFLAGS += $(G4RUNPATHOPTION)$(G4LIBDIR)
endif
endif
include $(G4INSTALL)/config/common.gmk
endif
GLOBALLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.a && echo yes)
ifdef LDLIBS
USER_DEFINED_LDLIBS := 1
endif
@@ -143,7 +167,9 @@ ifdef GLOBALLIBS
LDLIBS2 := -lG4readout \
-lG4run \
-lG4event \
-lG3toG4 \
-lG4tracking \
-lG4parmodels \
-lG4processes \
-lG4digits+hits \
-lG4track \
@@ -163,7 +189,7 @@ else
$(G4LIB)/$(G4SYSTEM)/liblist \
-d $(G4TMPDIR) \
< $(G4LIB)/$(G4SYSTEM)/libname.map; fi)
# Warning: do not add to LDLIBS2 with += becuase this causes it to be
# 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 =
@@ -172,6 +198,7 @@ endif
# LDLIBS3 contains the first set of low level libraries...
#
LDLIBS3 += $(INTYLIBS)
LDLIBS3 += $(ANALYSISLIBS)
endif # ifndef USER_DEFINED_LDLIBS
@@ -211,7 +238,11 @@ 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))
@@ -277,6 +308,12 @@ else
-c $(OUT_OBJ)$(G4TMPDIR)/exe/$(G4TARGET).o $(G4TARGET).cc
endif
ifdef G4ODBMS
GPPFLAGS := "-MM"
else
GPPFLAGS := "-M"
endif
# Make the $(G4TARGET).d file and include it.
ifdef G4SKIP_DEPEND
$(G4TMPDIR)/exe/$(G4TARGET).d: $(G4TARGET).cc
@@ -288,7 +325,7 @@ $(G4TMPDIR)/exe/$(G4TARGET).d: $(G4TARGET).cc
@if [ ! -d $(G4TMPDIR)/exe ] ; then mkdir $(G4TMPDIR)/exe ;fi
@echo Making dependency for file $<...
@($(ECHO) $(G4TMPDIR)/exe/\\c ; \
g++ -MM $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/exe/$*.o!& $@!' >$@
g++ $(GPPFLAGS) $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/exe/$*.o!& $@!' >$@
-include $(dependencies)
endif
+52 -21
View File
@@ -1,4 +1,4 @@
# $Id: common.gmk,v 1.14 1999/12/05 22:41:38 morita Exp $
# $Id: common.gmk,v 1.24 2000/12/13 08:31:31 gcosmo Exp $
# ----------------------------------------------------------------
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
# ----------------------------------------------------------------
@@ -42,25 +42,35 @@ ifdef G4ODBMS
objects += $(patsubst include/%.ddl,$(G4TMPDIR)/%_ddl.o,$(schema_ddl))
endif
ifneq ($(G4MAKESHLIB),)
# Make shared library.
$(G4LIBDIR)/lib$(name).$(SHEXT): $(G4LIBDIR)/lib$(name).a
ifneq ($(G4TMPDIR),$(G4LIBDIR))
@cp $(G4TMPDIR)/*.o $(G4LIBDIR)/.
@sh $(G4MAKESHLIB) $(G4LIBDIR) $(name)
@$(RM) $(G4LIBDIR)/*.o
else
@sh $(G4MAKESHLIB) $(G4LIBDIR) $(name)
g4libraries_to_build :=
ifneq ($(G4LIB_BUILD_SHARED),)
g4libraries_to_build += $(G4LIBDIR)/lib$(name).$(SHEXT)
endif
ifneq ($(G4LIB_BUILD_STATIC),)
g4libraries_to_build += $(G4LIBDIR)/lib$(name).a
endif
# Make library.
lib: $(g4libraries_to_build)
ifneq ($(G4LIB_BUILD_SHARED),)
# Make shared library.
$(G4LIBDIR)/lib$(name).$(SHEXT): $(G4TMPDIR)/obj.last
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
@echo Creating shared library $@
@$(RM) $@
# use architecture specific macro defined in sys/$(G4SYSTEM).gmk
$(build-granular-shared-lib)
endif
ifneq ($(G4LIB_BUILD_STATIC),)
# Make static (archive) library.
$(G4LIBDIR)/lib$(name).a: $(G4TMPDIR)/obj.last
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
@echo Creating/replacing object files in $(G4LIBDIR)/lib$(name).a
@rm -f $(G4LIBDIR)/lib$(name).a
@$(AR) $(OUT_LIB)$(G4LIBDIR)/lib$(name).a $(G4TMPDIR)/*.o
@if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then ranlib $(G4LIBDIR)/lib$(name).a ;fi
endif
# Touch the versioning file
$(G4TMPDIR)/obj.last: $(objects)
@@ -116,7 +126,7 @@ endif
endif
# Make the .d file(s) and include it(them).
# g++ -MM is good at this, except it forgets the subdirectory
# g++ -MM (or -M) is good at this, except it forgets the subdirectory
# (hence the use of $G4TMP/).
# define G4SKIP_DEPEND for simplicity
@@ -126,8 +136,16 @@ ifdef G4ODBMS
endif
endif
ifdef G4ODBMS
GPPFLAGS := "-MM"
else
GPPFLAGS := "-M"
endif
ifdef G4SKIP_DEPEND
$(G4TMPDIR)/%.d:
$(G4TMPDIR)/%.d: src/%.cc
@if [ ! -d $(G4TMP)/$(G4SYSTEM) ] ; then mkdir $(G4TMP)/$(G4SYSTEM) ;fi
@if [ ! -d $(G4TMPDIR) ] ; then mkdir $(G4TMPDIR) ;fi
@echo Skip dependency file creation for file $< ...
else
$(G4TMPDIR)/%.d: src/%.cc
@@ -135,16 +153,18 @@ $(G4TMPDIR)/%.d: src/%.cc
@if [ ! -d $(G4TMPDIR) ] ; then mkdir $(G4TMPDIR) ;fi
@echo Making dependency for file $< ...
@($(ECHO) $(G4TMPDIR)/\\c ; \
g++ -MM $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/$*.o!& $@!' >$@
g++ $(GPPFLAGS) $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/$*.o!& $@!' >$@
ifneq ($(dependencies),)
-include $(dependencies)
endif
endif
# .PHONY targets are executed regardless of time-stamp of any file of
# same name.
ifdef G4ODBMS_DEPEND
.PHONY: all obj lib clean clean_libs d_files install_schema
.PHONY: all obj lib clean clean_libs d_files install_schema includes
else
.PHONY: all obj lib clean clean_libs
.PHONY: all obj lib clean clean_libs includes
endif
obj: $(G4TMPDIR)/obj.last
@@ -162,16 +182,24 @@ install_schema:
echo " schema header file does not exist, so ignore the error message...")
endif
ifneq ($(G4MAKESHLIB),)
lib: $(G4LIBDIR)/lib$(name).$(SHEXT)
else
lib: $(G4LIBDIR)/lib$(name).a
endif
installed_includes:=$(foreach file,$(wildcard include/*),$(shell test -f $(file) && echo $(file)))
installed_includes:=$(patsubst include/%,$(G4INCLUDE)/%,$(installed_includes))
# NOTE: the double colon rule allows to add other rules for the same target
#
includes:: $(installed_includes)
# Static Pattern rules, see GNU make manual for details.
# target(s): target-pattern : dep-pattern
#
$(installed_includes): $(G4INCLUDE)/% : include/%
@cp -p $< $@
ifndef G4EXLIB
clean:
@echo Cleaning up ...
@rm -f $(G4LIBDIR)/lib$(name).a
@rm -f $(G4LIBDIR)/lib$(name).$(SHEXT)
@rm -f $(schema_hh) $(schema_ref_hh)
@rm -rf $(G4TMPDIR)
endif
@@ -180,4 +208,7 @@ 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
+51 -18
View File
@@ -1,4 +1,4 @@
# $Id: globlib.gmk,v 1.10 1999/11/30 19:41:08 morita Exp $
# $Id: globlib.gmk,v 1.16 2000/12/13 09:19:14 gcosmo Exp $
# --------------------------------------------------------------
# Script for compound libraries. Gabriele Cosmo, 25/6/98.
# --------------------------------------------------------------
@@ -11,31 +11,47 @@ include $(G4INSTALL)/config/architecture.gmk
G4LIBDIR = $(G4LIB)/$(G4SYSTEM)
.PHONY : all glob global objs clean clean_libs wipe_libs
.PHONY : all glob global objs includes clean clean_libs wipe_libs
all:
ifndef G4ODBMS
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE)); done
@for dir in $(SUBDIRS); do (cd $$dir && $(MAKE)); done
else
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) headers); done
@for dir in $(SUBDIRS); do (cd $$dir; G4ODBMS_DEPEND=1; \
export G4ODBMS_DEPEND; $(MAKE)); done
@for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) headers); done
@for dir in $(SUBDIRS); do (cd $$dir && G4ODBMS_DEPEND=1 && \
export G4ODBMS_DEPEND && $(MAKE)); done
@echo Copying tmp schema header from G4TMPDIR to $(G4SCHEMA_INCLUDE)
@rm -f $(G4SCHEMA_INCLUDE)/*.hh
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) install_schema); done
@for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) install_schema); done
@echo Copying tmp schema to $(G4SCHEMA_DIR) for FDID $(G4SCHEMA_FDID)
@rm -f $(G4SCHEMA_DIR)/G4SCHEMA
@rm -f $(G4SCHEMA_DIR)/G4SCHEMA.FDDB
@$(HEP_ODBMS_DIR)/etc/getdb $(G4TMPSCHEMA_BOOT) \
$(G4SCHEMA_DIR)/G4SCHEMA $(G4SCHEMA_FDID)
endif
g4libraries_to_build:=
ifndef G4ODBMS
glob global: objs wipe_libs $(G4LIBDIR)/lib$(name).a
ifneq ($(G4LIB_BUILD_SHARED),)
SHARED_LIB=$(G4LIBDIR)/lib$(name).$(SHEXT)
g4libraries_to_build += $(SHARED_LIB)
else
glob global: headers d_files objs wipe_libs $(G4LIBDIR)/lib$(name).a $(G4SCHEMA_DIR)/G4SCHEMA.FDDB
SHARED_LIB=
endif
ifneq ($(G4LIB_BUILD_STATIC),)
g4libraries_to_build += $(G4LIBDIR)/lib$(name).a
endif
ifndef G4ODBMS
glob global: objs wipe_libs $(g4libraries_to_build)
else
glob global: headers d_files objs wipe_libs $(g4libraries_to_build) $(G4SCHEMA_DIR)/G4SCHEMA.FDDB
endif
##
## make static libraries
##
ifneq ($(G4LIB_BUILD_STATIC),)
$(G4LIBDIR)/lib$(name).a: \
$(foreach dir,$(SUBLIBS),$(G4TMP)/$(G4SYSTEM)/$(dir)/obj.last)
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ; fi
@@ -68,14 +84,19 @@ $(G4LIBDIR)/lib$(name).a: \
#
@if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then \
ranlib $(G4LIBDIR)/lib$(name).a ; fi
endif
##
## make shared libraries
##
ifneq ($(G4MAKESHLIB),)
@for lib in $(SUBLIBS); do (cp $(G4TMP)/$(G4SYSTEM)/$$lib/*.o $(G4LIBDIR)/.); done
@sh $(G4MAKESHLIB) $(G4LIBDIR) $(name)
@$(RM) $(G4LIBDIR)/*.o
ifneq ($(G4LIB_BUILD_SHARED),)
$(SHARED_LIB): $(foreach dir,$(SUBLIBS),$(G4TMP)/$(G4SYSTEM)/$(dir)/obj.last)
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ; fi
@echo Creating global shared library $@
@$(RM) $@
# use system specific commands to build the library
$(build-global-shared-lib)
endif
ifdef G4ODBMS
@@ -97,20 +118,32 @@ objs:
@for dir in $(SUBDIRS); \
do (cd $$dir; $(MAKE) -q obj && ok=yes; \
if [ $$ok ]; \
then echo Nothing to be done for lib$(name).a in $$dir/.; \
then echo Nothing to be done for lib$(name) in $$dir/.; \
else $(MAKE) clean_libs; $(MAKE) obj; \
fi; ) \
done
includes::
@for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@ ); done
wipe_libs:
@for lib in $(SUBLIBS); do (rm -f $(G4LIBDIR)/lib$$lib.a); done
@for lib in $(SUBLIBS); do (rm -f $(G4LIBDIR)/lib$$lib.$(SHEXT)); done
clean:
@echo Cleaning up ...
@for lib in $(SUBLIBS); do (rm -rf $(G4TMP)/$(G4SYSTEM)/$$lib; rm -f $(G4LIBDIR)/lib$$lib.a); done
@for lib in $(SUBLIBS); do ( \
rm -rf $(G4TMP)/$(G4SYSTEM)/$$lib;\
rm -f $(G4LIBDIR)/lib$$lib.a;\
rm -f $(G4LIBDIR)/lib$$lib.$(SHEXT) );\
done
@rm -f $(G4LIBDIR)/lib$(name).a
clean_libs:
@echo Removing lib$(name).a and sub-libraries ...
@for lib in $(SUBLIBS); do (rm -f $(G4LIBDIR)/lib$$lib.a); done
@echo Removing lib$(name).a/.$(SHEXT) and sub-libraries ...
@for lib in $(SUBLIBS); do ( \
rm -f $(G4LIBDIR)/lib$$lib.a;\
rm -f $(G4LIBDIR)/lib$$lib.$(SHEXT) );\
done
@rm -f $(G4LIBDIR)/lib$(name).a
@rm -f $(G4LIBDIR)/lib$(name).$(SHEXT)
-143
View File
@@ -1,143 +0,0 @@
#!/bin/sh -f
############################################
##### To build GEANT4 shared libraries #####
############# G.Barrand ####################
############################################
if test $# -eq 2 ; 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` = "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` = "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
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` = "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
############################################
else
echo 'Give name of binary directory and library'
fi
+8
View File
@@ -34,4 +34,12 @@ ifeq ($(G4SYSTEM),AIX-xlC)
CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
endif
define build-granular-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
endef
define build-global-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
endef
endif
+12
View File
@@ -14,6 +14,8 @@ ifeq ($(G4SYSTEM),DEC-cxx)
endif
G4_HAVE_BOOL := yes
CXXFLAGS += -ieee -timplicit_local
SHEXT := so
#future G4RUNPATHOPTION := -rpath
FC := f77
FCLIBS := -lUfor -lfor -lFutil -lots
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
@@ -38,4 +40,14 @@ ifeq ($(G4SYSTEM),DEC-cxx)
CPPFLAGS += -DG4USE_STD_NAMESPACE
endif
endif
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMPDIR); \
$(CXX) -shared -o $$libdir/$(@F) *.o
endef
# transform-RPath = 1
define build-global-shared-lib
@echo "Global shared Libraries not yet supported on $(G4SYSTEM)
endef
endif
+16 -1
View File
@@ -14,11 +14,14 @@ ifeq ($(G4SYSTEM),HP-aCC)
endif
CXXFLAGS += +DAportable +W823
CPPFLAGS += -I/usr
ifdef G4MAKESHLIB
ifdef G4LIB_BUILD_SHARED
CXXFLAGS += +Z
FCFLAGS += +Z
CCFLAGS += +Z
endif
G4_HAVE_BOOL := yes
FC := f77
SHEXT := sl
FCFLAGS += +E6 +ppu
CCFLAGS += -Ae +DAportable
X11FLAGS := -I/usr/include/X11/extensions -I/usr/contrib/X11R6/include
@@ -42,4 +45,16 @@ ifeq ($(G4SYSTEM),HP-aCC)
CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS -D__HPACC_NOEH
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
endif
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMPDIR); \
$(CXX) -b -o $$libdir/$(@F) *.o
endef
define build-global-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMP)/$(G4SYSTEM); \
$(CXX) -b -o $$libdir/$(@F) $(foreach dir,$(SUBLIBS),$(dir)/*.o);
endef
endif
+17 -1
View File
@@ -16,19 +16,22 @@ ifeq ($(G4SYSTEM),Linux-g++)
CCFLAGS := -g
endif
endif
ifdef G4MAKESHLIB
ifdef G4LIB_BUILD_SHARED
CXXFLAGS += -fPIC
FCFLAGS += -fPIC
CCFLAGS += -fPIC
endif
#future G4RUNPATHOPTION := -rpath
FC := g77
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
FCLIBS := -lg2c -lnsl
ECHO := /bin/echo -e
SHEXT := so
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
XMFLAGS := -I/usr/X11R6/include
XMLIBS := -lXm -lXpm
DLDLIBS := -ldl
ifndef OGLFLAGS
OGLFLAGS := -I$(OGLHOME)/include
endif
@@ -44,4 +47,17 @@ ifeq ($(G4SYSTEM),Linux-g++)
ifdef G4ODBMS
G4OODDLX_FLAGS += -D__STL_CLASS_PARTIAL_SPECIALIZATION -Dstd=""
endif
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMPDIR); \
$(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) *.o
endef
define build-global-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMP)/$(G4SYSTEM); \
$(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) \
$(foreach dir,$(SUBLIBS),$(dir)/*.o);
endef
endif
+8
View File
@@ -33,4 +33,12 @@ ifeq ($(G4SYSTEM),SGI-CC)
CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
endif
define build-granular-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
endef
define build-global-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
endef
endif
+17 -1
View File
@@ -12,9 +12,12 @@ ifeq ($(G4SYSTEM),SUN-CC)
CCFLAGS := -g
endif
endif
ifdef G4MAKESHLIB
ifdef G4LIB_BUILD_SHARED
CXXFLAGS += -KPIC
FCFLAGS += -KPIC
CCFLAGS += -KPIC
endif
G4RUNPATHOPTION = -R
# CXXFLAGS += -fnonstd
CFRONT_G4TEMPLATE_REPOSITORY := true
FC := f77
@@ -47,4 +50,17 @@ ifeq ($(G4SYSTEM),SUN-CC)
CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
endif
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMPDIR); \
$(CXX) -G $(CXXTEMPLATE_FLAGS) -o $$libdir/$(@F) -h $(@F) *.o
endef
define build-global-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMP)/$(G4SYSTEM); \
$(CXX) -G $(CXXTEMPLATE_FLAGS) -o $$libdir/$(@F) -h $(@F) \
$(foreach dir,$(SUBLIBS),$(dir)/*.o);
endef
endif
+20 -1
View File
@@ -12,10 +12,14 @@ ifeq ($(G4SYSTEM),SUN-CC5)
CCFLAGS := -g
endif
endif
CXXFLAGS += -features=no%anachronisms -mt -lpthread
# CXXFLAGS += -fnonstd
ifdef G4MAKESHLIB
ifdef G4LIB_BUILD_SHARED
CXXFLAGS += -KPIC
FCFLAGS += -KPIC
CCFLAGS += -KPIC
endif
G4RUNPATHOPTION := -R
G4_HAVE_BOOL := yes
CFRONT_G4TEMPLATE_REPOSITORY := true
FC := f77
@@ -43,6 +47,9 @@ ifeq ($(G4SYSTEM),SUN-CC5)
LOADLIBS += -L/usr/lib -lsocket -lnsl
CPPFLAGS += -DG4NOT_ISO_DELETES
CPPFLAGS += -I$(G4STLINC)/wrappers/$(G4SYSTEM)
ifdef G4ODBMS
G4OODDLX_FLAGS += -noline
endif
ifdef G4USE_OSPACE
CPPFLAGS += -DOS_SOLARIS_2_5 -DOS_NEW_CHECK -DOS_STL_ASSERT
CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
@@ -56,4 +63,16 @@ ifeq ($(G4SYSTEM),SUN-CC5)
CXXFLAGS += -compat
endif
endif
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMPDIR); \
$(CXX) -G $(CXXTEMPLATE_FLAGS) -o $$libdir/$(@F) -h $(@F) *.o
endef
define build-global-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMP)/$(G4SYSTEM); \
$(CXX) -G $(CXXTEMPLATE_FLAGS) -o $$libdir/$(@F) -h $(@F) \
$(foreach dir,$(SUBLIBS),$(dir)/*.o);
endef
endif
+8
View File
@@ -49,4 +49,12 @@ ifeq ($(G4SYSTEM),WIN32-VC)
ifndef OGLLIBS
OGLLIBS := -lGLU -lGL
endif
define build-granular-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
endef
define build-global-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
endef
endif
+61
View File
@@ -0,0 +1,61 @@
#
# ------ GNU/WIN32 CYGNUS ------ !!! not supported !!!
# cygnus b20 with cygwin1.dll 1.1.5 patch
# Windows 95 4.00.1111
#
# Sys file by Stefano Agostinelli, July 2000
# IST Group: Franca Foppiano, Stefania Garelli, Stefano Agostinelli
#
ifeq ($(G4SYSTEM),WIN32-g++)
CXX := g++
GNU_GCC = 1
CXXFLAGS := -pipe -fno-for-scope -DGNU_GCC
ifdef G4OPTIMISE
CXXFLAGS += -O
FCFLAGS := -O
CCFLAGS := -O
else
ifdef G4DEBUG
CXXFLAGS += -g
FCFLAGS := -g
CCFLAGS := -g
endif
endif
ifdef G4LIB_BUILD_SHARED
CXXFLAGS += -fPIC
FCFLAGS += -fPIC
CCFLAGS += -fPIC
endif
FC := g77
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
FCLIBS := -lg2c -lnsl
ECHO := echo -e
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
XMFLAGS := -I/usr/X11R6/include
XMLIBS := -lXm -lXpm
ifndef OGLFLAGS
OGLFLAGS := -I$(OGLHOME)/include
endif
ifndef OGLLIBS
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
endif
OIVFLAGS += -I$(OIHOME)/include
ifdef G4USE_OSPACE
CPPFLAGS += -DOS_LINUX_2 -DOS_NEW_CHECK -DOS_STL_ASSERT
CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
CPPFLAGS += -I$(OSPACE_BASE_DIR)/ospace/std -I$(OSPACE_BASE_DIR)
endif
ifdef G4ODBMS
G4OODDLX_FLAGS += -D__STL_CLASS_PARTIAL_SPECIALIZATION -Dstd=""
endif
define build-granular-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
endef
define build-global-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
endef
endif