Files
openfoam/wmake/rules/linux64Mingw/c++
Mark Olesen 2c77514417 CONFIG: support wmake -debug-O0, -debug-O1 etc.
- rearranged order of flags so that FOAM_EXTRA_CXXFLAGS is added
  after the WARN/OPT/DBUG flags

CONFIG: drop wmake rules for PGI compiler (defunct)
2022-06-02 22:37:00 +02:00

44 lines
1.3 KiB
Plaintext

#------------------------------------------------------------------------------
# mingw is gcc, but new enough to support c++14
#------------------------------------------------------------------------------
include $(GENERAL_RULES)/Gcc/c++
c++ARCH = -m64 -pthread
# With gnu++14 (not c++14) to ensure __STRICT_ANSI__ is not defined
CC = x86_64-w64-mingw32-g++ -std=gnu++14
include $(RULES)/c++$(WM_COMPILE_OPTION)
c++FLAGS = \
$(c++ARCH) $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) \
$(FOAM_EXTRA_CXXFLAGS) $(LIB_HEADER_DIRS)
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
cxxtoo = $(Ctoo)
LINK_LIBS = $(c++DBUG)
# Using "-Wl,--no-undefined,--enable-runtime-pseudo-reloc"
# does not forgive undefined symbols during linking
LINKLIBSO = $(CC) $(c++FLAGS) -shared \
-Wl,--output-def=$(LIB).def \
-Wl,--out-implib=$(LIB).dll.a \
-Wl,--no-undefined \
-Wl,--enable-runtime-pseudo-reloc \
-Wl,--enable-auto-import \
-Wl,--enable-auto-image-base \
-Wl,--strip-all \
$(FOAM_EXTRA_LDFLAGS)
LINKEXE = $(CC) $(c++FLAGS) \
-Wl,--enable-auto-import \
-Wl,--strip-all \
-Wl,--force-exe-suffix \
$(FOAM_EXTRA_LDFLAGS)
#------------------------------------------------------------------------------