Warning, /geant4/config/sys/WIN32-g++.gmk is written in an unsupported language. File is not indexed.
0001 #
0002 # ------ GNU/WIN32 CYGWIN ------ !!! not supported !!!
0003 # Cygnus CygWin - gcc-9.2 and higher
0004 # Windows 10
0005 #
0006 ifeq ($(G4SYSTEM),WIN32-g++)
0007 CXX := g++
0008 CXXFLAGS := -Wall -Wno-non-virtual-dtor -Wno-long-long
0009 CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
0010 CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
0011 CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
0012 G4USE_STD17 := 1
0013 CPPFLAGS += -std=c++17
0014 CXXFLAGS += -std=c++17
0015 ifdef G4OPTIMISE
0016 CXXFLAGS += -O3
0017 FCFLAGS := -O3
0018 CCFLAGS := -O3
0019 else
0020 ifdef G4DEBUG
0021 CXXFLAGS += -g
0022 FCFLAGS := -g
0023 CCFLAGS := -g
0024 endif
0025 endif
0026 ifdef G4PROFILE
0027 CXXFLAGS += -pg
0028 FCFLAGS += -pg
0029 CCFLAGS += -pg
0030 endif
0031 ifdef G4OPTDEBUG
0032 CXXFLAGS += -O2 -g
0033 FCFLAGS += -O2 -g
0034 CCFLAGS += -O2 -g
0035 endif
0036 ifdef G4LIB_BUILD_SHARED
0037 CXXFLAGS += -fPIC
0038 FCFLAGS += -fPIC
0039 CCFLAGS += -fPIC
0040 endif
0041
0042 G4RUNPATHOPTION := -Wl,-rpath
0043 SHEXT := so
0044 ECHO := echo -e
0045 GREP := /usr/bin/grep
0046 SED := /usr/bin/sed
0047 CAT := /usr/bin/cat
0048 CUT := /usr/bin/cut
0049
0050 FC := g77
0051 FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
0052 FCLIBS := -lg2c -lnsl
0053 LOADLIBS += -lm -lstdc++
0054 ifndef X11FLAGS
0055 X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
0056 endif
0057 ifndef X11LIBS
0058 X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
0059 endif
0060 ifndef XMFLAGS
0061 XMFLAGS := -I/usr/X11R6/include
0062 endif
0063 ifndef XMLIBS
0064 XMLIBS := -lXm -lXpm
0065 endif
0066 ifndef XAWFLAGS
0067 XAWFLAGS := -I/usr/X11R6/include
0068 endif
0069 ifndef XAWLIBS
0070 XAWLIBS := -lXaw
0071 endif
0072 ifndef OGLFLAGS
0073 OGLFLAGS := -I$(OGLHOME)/include
0074 endif
0075 ifndef OGLLIBS
0076 OGLLIBS := -L$(OGLHOME)/lib -lGL
0077 endif
0078 define build-granular-shared-lib
0079 @libdir=`(cd $(@D);/bin/pwd)`; \
0080 cd $(G4TMPDIR); \
0081 $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) *.o
0082 endef
0083 define build-global-shared-lib
0084 @libdir=`(cd $(@D);/bin/pwd)`; \
0085 cd $(G4TMP)/$(G4SYSTEM); \
0086 $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) \
0087 $(foreach dir,$(SUBLIBS),$(dir)/*.o);
0088 endef
0089
0090 endif
0091