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.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /config/sys/WIN32-VC.gmk (Version 11.3.0) and /config/sys/WIN32-VC.gmk (Version 10.0.p2)


  1 #                                                   1 #
  2 # ------ WIN32/VC ------    Visual Studio 2019 <<   2 # ------ WIN32/VC ------    Visual-C++ 7 .NET and higher
  3 #                                                   3 #
  4 ifeq ($(G4SYSTEM),WIN32-VC)                         4 ifeq ($(G4SYSTEM),WIN32-VC)
  5   CXX       := CL                                   5   CXX       := CL
  6   ifdef G4OPTIMISE                                  6   ifdef G4OPTIMISE
  7     CXXFLAGS  += -Ox -MD                            7     CXXFLAGS  += -Ox -MD
  8   else                                              8   else
  9     ifdef G4DEBUG                                   9     ifdef G4DEBUG
 10       CXXFLAGS  += -Od -MDd -Zi -Fd$(G4LIBDIR)     10       CXXFLAGS  += -Od -MDd -Zi -Fd$(G4LIBDIR)/lib$(name)
 11     endif                                          11     endif
 12   endif                                            12   endif
 13   CXXFLAGS += -GR -EHsc -Zm200 -nologo -std:c+ <<  13   CXXFLAGS += -GR -EHsc -Zm200 -nologo
 14   CXXFLAGS += -D_CONSOLE -D_WIN32 -DOS             14   CXXFLAGS += -D_CONSOLE -D_WIN32 -DOS
 15   CPPFLAGS += -DWIN32 -DXPNET -D_CRT_SECURE_NO <<  15   CPPFLAGS += -DWIN32 -DXPNET -D_CRT_SECURE_NO_DEPRECATE
 16   LDFLAGS  += -FORCE /NODEFAULTLIB:MSVCRT.dll      16   LDFLAGS  += -FORCE /NODEFAULTLIB:MSVCRT.dll /STACK:12582912
 17   LOADLIBS += legacy_stdio_definitions.lib     << 
 18                                                    17 
 19   SHEXT := dll                                     18   SHEXT := dll
 20   AR := LIB                                        19   AR := LIB
 21   ECHO := /usr/bin/echo -e                         20   ECHO := /usr/bin/echo -e
 22   FIND := /usr/bin/find                            21   FIND := /usr/bin/find
 23   SORT := /usr/bin/sort                            22   SORT := /usr/bin/sort
 24   GREP := /usr/bin/grep                            23   GREP := /usr/bin/grep
 25   SED  := /usr/bin/sed                             24   SED  := /usr/bin/sed
 26   CAT  := /usr/bin/cat                             25   CAT  := /usr/bin/cat
 27   CUT  := /usr/bin/cut                             26   CUT  := /usr/bin/cut
 28   TOUCH := /usr/bin/touch                          27   TOUCH := /usr/bin/touch
 29                                                    28 
 30   FC := g77                                        29   FC := g77
 31 #  FCLIBS := -lf2c                                 30 #  FCLIBS := -lf2c
 32   ifndef OGLFLAGS                                  31   ifndef OGLFLAGS
 33     OGLFLAGS  :=                                   32     OGLFLAGS  :=
 34   endif                                            33   endif
 35   ifndef OGLLIBS                                   34   ifndef OGLLIBS
 36     OGLLIBS   := opengl32.lib gdi32.lib user32 <<  35     OGLLIBS   := glu32.lib opengl32.lib gdi32.lib user32.lib
 37   endif                                            36   endif
 38   ifndef UI32LIBS                                  37   ifndef UI32LIBS
 39     UI32LIBS  := gdi32.lib user32.lib comctl32 <<  38     UI32LIBS  := gdi32.lib user32.lib
 40   endif                                            39   endif
 41   ifndef QTHOME                                    40   ifndef QTHOME
 42     QTHOME   := /Qt                            <<  41     QTHOME    := /usr
 43   endif                                        << 
 44   ifndef QT_VERSION                            << 
 45     QT_VERSION := 5                            << 
 46   endif                                            42   endif
 47   ifndef QTFLAGS                                   43   ifndef QTFLAGS
 48     QTFLAGS  := -I$(QTHOME)/include            <<  44     QTFLAGS   := -I$(QTHOME)/include/Qt -I$(QTHOME)/include
 49     QTFLAGS  += -I$(QTHOME)/include/QtCore     << 
 50     QTFLAGS  += -I$(QTHOME)/include/QtGui      << 
 51     QTFLAGS  += -I$(QTHOME)/include/QtWidgets  << 
 52     QTFLAGS  += -I$(QTHOME)/include/QtOpenGL   << 
 53     ifeq ($(QT_VERSION),6)                     << 
 54       QTFLAGS   += -I $(QTHOME)/include/QtOpen << 
 55     endif                                      << 
 56   endif                                            45   endif
 57   ifndef QTMOC                                     46   ifndef QTMOC
 58     QTMOC    := $(QTHOME)/bin/moc              <<  47     QTMOC     := $(QTHOME)/bin/moc
 59   endif                                            48   endif
 60   ifeq ($(QT_VERSION),5)       # Qt5           <<  49 
 61     ifndef QTLIBS                              <<  50   ifndef QTLIBS
 62       QTLIBS   := $(LIB_PATH)$(QTHOME)/lib Qt5 <<  51     QTLIBS   := -L$(QTHOME)/lib QtCore4.lib QtGui4.lib
 63     ifndef GLQTLIBS                            <<  52   endif
 64       GLQTLIBS := $(LIB_PATH)$(QTHOME)/lib Qt5 <<  53   ifndef GLQTLIBS
 65     endif                                      <<  54     GLQTLIBS   := -L$(QTHOME)/lib QtCore4.lib QtGui4.lib QtOpenGL4.lib
 66   else                         # Qt6           << 
 67     ifndef QTLIBS                              << 
 68       QTLIBS   := $(LIB_PATH)$(QTHOME)/lib Qt6 << 
 69     ifndef GLQTLIBS                            << 
 70       GLQTLIBS := $(LIB_PATH)$(QTHOME)/lib Qt6 << 
 71     endif                                      << 
 72   endif                                            55   endif
                                                   >>  56 
 73 #                                                  57 #
 74 # Building DLLs                                    58 # Building DLLs
 75 # -------------                                    59 # -------------
 76 #  The commands below allow to build DLLs from     60 #  The commands below allow to build DLLs from the archive libraries.
 77 #  From a libG4xxx.a, will extract the symbols     61 #  From a libG4xxx.a, will extract the symbols with the genwindef tool,
 78 #  which will produce a G4xxx.def file.            62 #  which will produce a G4xxx.def file.
 79 #  The G4xxx.def file will contain the list of     63 #  The G4xxx.def file will contain the list of symbols that are "exported"
 80 #  or made public for using the DLLs.              64 #  or made public for using the DLLs.
 81 #  The source genwindef.cc is in the geant4/co     65 #  The source genwindef.cc is in the geant4/config directory. The binary is
 82 #  built during the library installation proce     66 #  built during the library installation process, and will be placed in
 83 #  $G4LIB/G4SYSTEM.                                67 #  $G4LIB/G4SYSTEM. 
 84 #  If can also be built as follows :               68 #  If can also be built as follows :
 85 #    DOS> cl.exe /Fegenwindef.exe genwindef.cc     69 #    DOS> cl.exe /Fegenwindef.exe genwindef.cc 
 86 #  Then, to use it :                               70 #  Then, to use it :
 87 #    DOS> genwindef -o G4xxx.def -l G4xxx libG     71 #    DOS> genwindef -o G4xxx.def -l G4xxx libG4xxx.a 
 88 #  Libraries libG4xxx.lib can also be built wi     72 #  Libraries libG4xxx.lib can also be built with :
 89 #    DOS> lib /def:G4xxx.def /out:libG4xxx.lib     73 #    DOS> lib /def:G4xxx.def /out:libG4xxx.lib
 90 #  It also produces a libG4xxx.exp used to bui     74 #  It also produces a libG4xxx.exp used to build the DLL.
 91 #  The DLL can be built with :                     75 #  The DLL can be built with :
 92 #    DOS> link /dll /out:G4xxx.dll libG4xxx.ex     76 #    DOS> link /dll /out:G4xxx.dll libG4xxx.exp libG4xxx.a <dependencies>
 93 #  Note that a DLL must be fully linked. You s     77 #  Note that a DLL must be fully linked. You should NOT have undefined 
 94 #  symbols as output of the link command.          78 #  symbols as output of the link command.
 95 #                                                  79 #
 96   ifdef G4LIB_USE_CLHEP                            80   ifdef G4LIB_USE_CLHEP
 97     GLOBLIBS += libG4clhep.lib                     81     GLOBLIBS += libG4clhep.lib
 98   endif                                            82   endif
 99   ifdef G4LIB_USE_PTL                          << 
100     GLOBLIBS += libG4ptl.lib                   << 
101   endif                                        << 
102   define build-granular-shared-lib                 83   define build-granular-shared-lib
103     @libdir=`(cd $(@D);/bin/pwd)`;\                84     @libdir=`(cd $(@D);/bin/pwd)`;\
104     cd $(G4TMP)/$(G4SYSTEM);\                      85     cd $(G4TMP)/$(G4SYSTEM);\
105     $(ECHO) "Building $(name).def file ...";\      86     $(ECHO) "Building $(name).def file ...";\
106     $(RM) $(name).def;\                            87     $(RM) $(name).def;\
107     $(G4LIB)/$(G4SYSTEM)/genwindef.exe -o $(na     88     $(G4LIB)/$(G4SYSTEM)/genwindef.exe -o $(name).def -l $(name) $(G4LIBDIR)/lib$(name).a;\
108     $(ECHO) "Building lib$(name).exp and lib$(     89     $(ECHO) "Building lib$(name).exp and lib$(name).lib file ...";\
109     $(RM) $(G4LIBDIR)/lib$(name).exp;\             90     $(RM) $(G4LIBDIR)/lib$(name).exp;\
110     $(RM) $(G4LIBDIR)/lib$(name).lib;\             91     $(RM) $(G4LIBDIR)/lib$(name).lib;\
111     lib.exe /nologo /machine:x64 /def:$(name). <<  92     lib.exe /nologo /machine:ix86 /def:$(name).def \
112             /out:$(G4LIBDIR)/lib$(name).lib;\      93             /out:$(G4LIBDIR)/lib$(name).lib;\
113     $(RM) $(G4LIBDIR)/$(name).dll;\                94     $(RM) $(G4LIBDIR)/$(name).dll;\
114     $(ECHO) "Building $(name).dll file ...";\      95     $(ECHO) "Building $(name).dll file ...";\
115     link.exe /nologo /machine:x64 /dll /out:$( <<  96     link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
116              $(G4LIBDIR)/lib$(name).exp $(G4LI     97              $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
117              $(LIB_PATH)$(G4LIBDIR) $(GLOBLIBS     98              $(LIB_PATH)$(G4LIBDIR) $(GLOBLIBS) \
118              $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLH     99              $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
119              $(LIB_PATH)$(PTL_LIB_DIR) $(PTL_L << 100              $(INTYLIBS) $(GDMLLIBS) $(ANALYSISLIBS) $(UI32LIBS)
120              $(INTYLIBS) $(GDMLLIBS) $(ANALYSI << 
121   endef                                           101   endef
122   define build-global-shared-lib                  102   define build-global-shared-lib
123     @libdir=`(cd $(@D);/bin/pwd)`;\               103     @libdir=`(cd $(@D);/bin/pwd)`;\
124     cd $(G4TMP)/$(G4SYSTEM);\                     104     cd $(G4TMP)/$(G4SYSTEM);\
125     $(ECHO) "Building $(name).def file ...";\     105     $(ECHO) "Building $(name).def file ...";\
126     $(RM) $(name).def;\                           106     $(RM) $(name).def;\
127     $(G4LIB)/$(G4SYSTEM)/genwindef.exe -o $(na    107     $(G4LIB)/$(G4SYSTEM)/genwindef.exe -o $(name).def -l $(name) $(G4LIBDIR)/lib$(name).a;\
128     $(ECHO) "Building lib$(name).exp and lib$(    108     $(ECHO) "Building lib$(name).exp and lib$(name).lib ...";\
129     $(RM) $(G4LIBDIR)/lib$(name).exp;\            109     $(RM) $(G4LIBDIR)/lib$(name).exp;\
130     $(RM) $(G4LIBDIR)/lib$(name).lib;\            110     $(RM) $(G4LIBDIR)/lib$(name).lib;\
131     lib.exe /nologo /machine:x64 /def:$(name). << 111     lib.exe /nologo /machine:ix86 /def:$(name).def \
132             /out:$(G4LIBDIR)/lib$(name).lib;\     112             /out:$(G4LIBDIR)/lib$(name).lib;\
133     $(RM) $(G4LIBDIR)/$(name).dll;\               113     $(RM) $(G4LIBDIR)/$(name).dll;\
134     $(ECHO) "Building $(name).dll ...";\          114     $(ECHO) "Building $(name).dll ...";\
135     link.exe /nologo /machine:x64 /dll /out:$( << 115     link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
136              $(G4LIBDIR)/lib$(name).exp $(G4LI    116              $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
137              $(LIB_PATH)$(G4LIBDIR) $(GLOBLIBS    117              $(LIB_PATH)$(G4LIBDIR) $(GLOBLIBS) \
138              $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLH    118              $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
139              $(LIB_PATH)$(PTL_LIB_DIR) $(PTL_L << 119              $(INTYLIBS) $(GDMLLIBS) $(ANALYSISLIBS) $(UI32LIBS)
140              $(INTYLIBS) $(GDMLLIBS) $(ANALYSI << 
141   endef                                           120   endef
142 endif                                             121 endif