Import Geant4 6.2.0 source tree
This commit is contained in:
+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
|
||||
|
||||
Reference in New Issue
Block a user