# # ------ WIN32/VC ------ Visual-C++ 7 .NET and higher # ifeq ($(G4SYSTEM),WIN32-VC) CXX := CL ifdef G4OPTIMISE CXXFLAGS += -Ox else ifdef G4DEBUG CXXFLAGS += -Od -Zi -Fd$(G4LIBDIR)/lib$(name) endif endif CXXFLAGS += -MD -GR -EHsc -Zm200 -nologo CXXFLAGS += -D_CONSOLE -D_WIN32 -DOS CPPFLAGS += -DWIN32 -DXPNET -D_CRT_SECURE_NO_DEPRECATE LDFLAGS += -FORCE /NODEFAULTLIB:MSVCRT.dll SHEXT := dll AR := LIB ECHO := /usr/bin/echo -e GREP := /usr/bin/grep SED := /usr/bin/sed CAT := /usr/bin/cat CUT := /usr/bin/cut FC := g77 # FCLIBS := -lf2c ifndef OGLFLAGS OGLFLAGS := endif ifndef OGLLIBS OGLLIBS := glu32.lib opengl32.lib endif ifndef UI32LIBS UI32LIBS := gdi32.lib user32.lib endif ifndef QTHOME QTHOME := /usr endif ifndef QTFLAGS QTFLAGS := -I$(QTHOME)/include/Qt -I$(QTHOME)/include MOC := $(QTHOME)/bin/moc endif ifndef QTLIBS QT3LIBS := -L$(QTHOME)/lib -lqt-mt QT4LIBS := -L$(QTHOME)/lib QtCore4.lib QtGui4.lib QtOpenGL4.lib QtSql4.lib QtXml4.lib QT4LIBS += -lG4baryons -lG4biasing -lG4bosons -lG4brep -lG4csg -lG4cuts -lG4decay -lG4detector -lG4detutils -lG4digits -lG4emhighenergy -lG4emlowenergy -lG4empolar -lG4emstandard -lG4emutils -lG4error_propagation -lG4event -lG4geombias -lG4geomBoolean -lG4geomdivision -lG4geometrymng -lG4gflash -lG4globman -lG4graphics_reps -lG4hadronic_ablation -lG4hadronic_abrasion -lG4hadronic_bert_cascade -lG4hadronic_binary -lG4hadronic_body_ci -lG4hadronic_coherent_elastic -lG4hadronic_deex_evaporation -lG4hadronic_deex_fermi_breakup -lG4hadronic_deex_fission -lG4hadronic_deex_gem_evaporation -lG4hadronic_deex_handler -lG4hadronic_deex_management -lG4hadronic_deex_multifragmentation -lG4hadronic_deex_photon_evaporation -lG4hadronic_deex_util -lG4hadronic_em_dissociation -lG4hadronic_HE -lG4hadronic_hetcpp_evaporation -lG4hadronic_hetcpp_utils -lG4hadronic_interface_ci -lG4hadronic_iso -lG4hadronic_LE -lG4hadronic_leading_particle -lG4hadronic_mgt -lG4hadronic_proc -lG4hadronic_qgstring -lG4hadronic_radioactivedecay -lG4hadronic_stop -lG4hadronic_util -lG4hadronic_xsect -lG4had_im_r_matrix -lG4had_lll_fis -lG4had_mod_man -lG4had_mod_util -lG4had_muon_nuclear -lG4had_neu_hp -lG4had_preequ_exciton -lG4had_string_diff -lG4had_string_frag -lG4had_string_man -lG4had_theo_max -lG4hepnumerics -lG4hits -lG4intercoms -lG4ions -lG4leptons -lG4magneticfield -lG4materials -lG4mesons -lG4modeling -lG4muons -lG4navigation -lG4OpenGL -lG4optical -lG4parameterisation -lG4partman -lG4partutils -lG4persistency -lG4phys_builders -lG4phys_lists -lG4procman -lG4RayTracer -lG4readout -lG4run -lG4scoring -lG4shortlived -lG4specsolids -lG4track -lG4tracking -lG4transportation -lG4Tree -lG4UIbasic -lG4UIcommon -lG4UIGAG -lG4visHepRep -lG4visXXX -lG4vis_management -lG4volumes -lG4VRML -lG4xrays 9 QTLIBS := $(shell test -f $(QTHOME)/lib/Qt3Support4.lib && echo $(QT4LIBS) || echo $(QT3LIBS)) endif # # Building DLLs (G.Barrand) # ------------- # 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 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 : # DOS> win32def G4xxx < G4xxx.dumpbin > G4xxx.def # Libraries libG4xxx.lib can also be built with : # DOS> lib /def:G4xxx.def /out:libG4xxx.lib # It also produces a libG4xxx.exp used to build the DLL. # The DLL can be built with : # DOS> link /dll /out:G4xxx.dll libG4xxx.exp libG4xxx.a # Note that a DLL must be fully linked. You should NOT have undefined # symbols as output of the link command. # define build-granular-shared-lib @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 @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