- introduce WM_COMPILE_CONTROL variable to convey control information into the build rules. The convention (as per spack): - '+' to select a feature - '~' to deselect a feature Eg, to select the gold linker, and disable openmp (spaces are not required): WM_COMPILE_CONTROL="+gold ~openmp" CONFIG: accept FOAM_EXTRA_LDFLAGS for AMD, gold, Mingw linkers CONFIG: generalize PROJECT_LIBS (-ldl used almost universally)
37 lines
1.0 KiB
Plaintext
37 lines
1.0 KiB
Plaintext
include $(GENERAL_RULES)/Gcc/c++
|
|
|
|
c++ARCH = -m64 -pthread
|
|
|
|
# With gnu++11 (not c++11) to ensure __STRICT_ANSI__ is not defined
|
|
CC = x86_64-w64-mingw32-g++ -std=gnu++11
|
|
|
|
include $(RULES)/c++$(WM_COMPILE_OPTION)
|
|
|
|
c++FLAGS = $(c++ARCH) $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS)
|
|
|
|
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -Wno-alloc-size-larger-than -c $< -o $@
|
|
cxxtoo = $(Ctoo)
|
|
cctoo = $(Ctoo)
|
|
cpptoo = $(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)
|