Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/config/sys/WIN32-VC.gmk is written in an unsupported language. File is not indexed.

0001 #
0002 # ------ WIN32/VC ------    Visual Studio 2019 and higher
0003 #
0004 ifeq ($(G4SYSTEM),WIN32-VC)
0005   CXX       := CL
0006   ifdef G4OPTIMISE
0007     CXXFLAGS  += -Ox -MD
0008   else
0009     ifdef G4DEBUG
0010       CXXFLAGS  += -Od -MDd -Zi -Fd$(G4LIBDIR)/lib$(name)
0011     endif
0012   endif
0013   CXXFLAGS += -GR -EHsc -Zm200 -nologo -std:c++17
0014   CXXFLAGS += -D_CONSOLE -D_WIN32 -DOS
0015   CPPFLAGS += -DWIN32 -DXPNET -D_CRT_SECURE_NO_DEPRECATE -D_NO_CRT_STDIO_INLINE
0016   LDFLAGS  += -FORCE /NODEFAULTLIB:MSVCRT.dll /STACK:12582912
0017   LOADLIBS += legacy_stdio_definitions.lib
0018 
0019   SHEXT := dll
0020   AR := LIB
0021   ECHO := /usr/bin/echo -e
0022   FIND := /usr/bin/find
0023   SORT := /usr/bin/sort
0024   GREP := /usr/bin/grep
0025   SED  := /usr/bin/sed
0026   CAT  := /usr/bin/cat
0027   CUT  := /usr/bin/cut
0028   TOUCH := /usr/bin/touch
0029 
0030   FC := g77
0031 #  FCLIBS := -lf2c
0032   ifndef OGLFLAGS
0033     OGLFLAGS  :=
0034   endif
0035   ifndef OGLLIBS
0036     OGLLIBS   := opengl32.lib gdi32.lib user32.lib
0037   endif
0038   ifndef UI32LIBS
0039     UI32LIBS  := gdi32.lib user32.lib comctl32.lib
0040   endif
0041   ifndef QTHOME
0042     QTHOME   := /Qt
0043   endif
0044   ifndef QT_VERSION
0045     QT_VERSION := 5
0046   endif
0047   ifndef QTFLAGS
0048     QTFLAGS  := -I$(QTHOME)/include
0049     QTFLAGS  += -I$(QTHOME)/include/QtCore
0050     QTFLAGS  += -I$(QTHOME)/include/QtGui
0051     QTFLAGS  += -I$(QTHOME)/include/QtWidgets
0052     QTFLAGS  += -I$(QTHOME)/include/QtOpenGL
0053     ifeq ($(QT_VERSION),6)
0054       QTFLAGS   += -I $(QTHOME)/include/QtOpenGLWidgets
0055     endif
0056   endif
0057   ifndef QTMOC
0058     QTMOC    := $(QTHOME)/bin/moc
0059   endif
0060   ifeq ($(QT_VERSION),5)       # Qt5
0061     ifndef QTLIBS
0062       QTLIBS   := $(LIB_PATH)$(QTHOME)/lib Qt5Core.lib Qt5Gui.lib Qt5Widgets.lib
0063     ifndef GLQTLIBS
0064       GLQTLIBS := $(LIB_PATH)$(QTHOME)/lib Qt5Core.lib Qt5Gui.lib Qt5Widgets.lib Qt5OpenGL.lib
0065     endif
0066   else                         # Qt6
0067     ifndef QTLIBS
0068       QTLIBS   := $(LIB_PATH)$(QTHOME)/lib Qt6Core.lib Qt6Gui.lib Qt6Widgets.lib
0069     ifndef GLQTLIBS
0070       GLQTLIBS := $(LIB_PATH)$(QTHOME)/lib Qt6Core.lib Qt6Gui.lib Qt6Widgets.lib Qt6OpenGL.lib Qt6OpenGLWidgets.lib
0071     endif
0072   endif
0073 #
0074 # Building DLLs
0075 # -------------
0076 #  The commands below allow to build DLLs from the archive libraries.
0077 #  From a libG4xxx.a, will extract the symbols with the genwindef tool,
0078 #  which will produce a G4xxx.def file.
0079 #  The G4xxx.def file will contain the list of symbols that are "exported"
0080 #  or made public for using the DLLs.
0081 #  The source genwindef.cc is in the geant4/config directory. The binary is
0082 #  built during the library installation process, and will be placed in
0083 #  $G4LIB/G4SYSTEM. 
0084 #  If can also be built as follows :
0085 #    DOS> cl.exe /Fegenwindef.exe genwindef.cc 
0086 #  Then, to use it :
0087 #    DOS> genwindef -o G4xxx.def -l G4xxx libG4xxx.a 
0088 #  Libraries libG4xxx.lib can also be built with :
0089 #    DOS> lib /def:G4xxx.def /out:libG4xxx.lib
0090 #  It also produces a libG4xxx.exp used to build the DLL.
0091 #  The DLL can be built with :
0092 #    DOS> link /dll /out:G4xxx.dll libG4xxx.exp libG4xxx.a <dependencies>
0093 #  Note that a DLL must be fully linked. You should NOT have undefined 
0094 #  symbols as output of the link command.
0095 #
0096   ifdef G4LIB_USE_CLHEP
0097     GLOBLIBS += libG4clhep.lib
0098   endif
0099   ifdef G4LIB_USE_PTL
0100     GLOBLIBS += libG4ptl.lib
0101   endif
0102   define build-granular-shared-lib
0103     @libdir=`(cd $(@D);/bin/pwd)`;\
0104     cd $(G4TMP)/$(G4SYSTEM);\
0105     $(ECHO) "Building $(name).def file ...";\
0106     $(RM) $(name).def;\
0107     $(G4LIB)/$(G4SYSTEM)/genwindef.exe -o $(name).def -l $(name) $(G4LIBDIR)/lib$(name).a;\
0108     $(ECHO) "Building lib$(name).exp and lib$(name).lib file ...";\
0109     $(RM) $(G4LIBDIR)/lib$(name).exp;\
0110     $(RM) $(G4LIBDIR)/lib$(name).lib;\
0111     lib.exe /nologo /machine:x64 /def:$(name).def \
0112             /out:$(G4LIBDIR)/lib$(name).lib;\
0113     $(RM) $(G4LIBDIR)/$(name).dll;\
0114     $(ECHO) "Building $(name).dll file ...";\
0115     link.exe /nologo /machine:x64 /dll /out:$(G4LIBDIR)/$(name).dll \
0116              $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
0117              $(LIB_PATH)$(G4LIBDIR) $(GLOBLIBS) \
0118              $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
0119              $(LIB_PATH)$(PTL_LIB_DIR) $(PTL_LIB) \
0120              $(INTYLIBS) $(GDMLLIBS) $(ANALYSISLIBS) $(UI32LIBS) $(LOADLIBS)
0121   endef
0122   define build-global-shared-lib
0123     @libdir=`(cd $(@D);/bin/pwd)`;\
0124     cd $(G4TMP)/$(G4SYSTEM);\
0125     $(ECHO) "Building $(name).def file ...";\
0126     $(RM) $(name).def;\
0127     $(G4LIB)/$(G4SYSTEM)/genwindef.exe -o $(name).def -l $(name) $(G4LIBDIR)/lib$(name).a;\
0128     $(ECHO) "Building lib$(name).exp and lib$(name).lib ...";\
0129     $(RM) $(G4LIBDIR)/lib$(name).exp;\
0130     $(RM) $(G4LIBDIR)/lib$(name).lib;\
0131     lib.exe /nologo /machine:x64 /def:$(name).def \
0132             /out:$(G4LIBDIR)/lib$(name).lib;\
0133     $(RM) $(G4LIBDIR)/$(name).dll;\
0134     $(ECHO) "Building $(name).dll ...";\
0135     link.exe /nologo /machine:x64 /dll /out:$(G4LIBDIR)/$(name).dll \
0136              $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
0137              $(LIB_PATH)$(G4LIBDIR) $(GLOBLIBS) \
0138              $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
0139              $(LIB_PATH)$(PTL_LIB_DIR) $(PTL_LIB) \
0140              $(INTYLIBS) $(GDMLLIBS) $(ANALYSISLIBS) $(UI32LIBS) $(LOADLIBS)
0141   endef
0142 endif