Files
ThirdParty-common/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Linux-Mingw.shlib
Mark Olesen ae5b2326c0 ENH: provide separate makeSCOTCH script for independent use
- improve handling of scotch build toolchain

- relax the test for existence of libscotcherrexit, which can also be
  incorporated into libscotch itself
2019-04-29 18:51:05 +02:00

65 lines
1.8 KiB
Makefile

#-------------------------------*- makefile -*---------------------------------
#
# Prior to OpenFOAM-v1906, these were always part of the environment
#
# - WM_CFLAGS : with -m32 / -m64 and -fPIC
# - WM_LDFLAGS : with -m32 / -m64
#
# With OpenFOAM-v1906 and later
#
# - wmake -show-cflags : with -m32 / -m64
# - wmake -show-cflags-arch : with -m32 / -m64
#
# Pass these in via the enviroment since using '$(shell ...)' here does not
# always work well.
#
# Notes:
# - compiled without pthread
#
# Normally set CCS, CCP by caller
#------------------------------------------------------------------------------
EXE =
LIB = .dll
OBJ = .o
# Separate the cross-compilation flags from regular CFLAGS to ensure that
# system gcc does not use them for the scotch build toolchain
CFLAGS_CROSS = -DCOMMON_WINDOWS -DCOMMON_STUB_FORK
AR = x86_64-w64-mingw32-gcc
ARFLAGS = $(CFLAGS) -shared -Wl,--output-def,libscotch.def,--out-implib,libscotch.a,--enable-auto-import,--strip-all -o
CC = x86_64-w64-mingw32-gcc $(CFLAGS_CROSS)
CCS = x86_64-w64-mingw32-gcc
CCP = x86_64-w64-mingw32-gcc
CCD = gcc
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
-DCOMMON_PTHREAD_FILE \
-UCOMMON_FILE_COMPRESS \
-DCOMMON_RANDOM_FIXED_SEED \
-DSCOTCH_DETERMINISTIC \
-DSCOTCH_RENAME \
-DSCOTCH_PTHREAD \
-Drestrict=__restrict
# 32-bit vs. 64-bit labels
ifeq ($(WM_LABEL_SIZE),64)
CFLAGS += -DINTSIZE64
endif
CLIBFLAGS = -shared
LDFLAGS =
MAKE = make
CP = cp
CAT = cat
LN = ln
MKDIR = mkdir
MV = mv
RANLIB = echo
LEX = flex -Pscotchyy -olex.yy.c
YACC = bison -pscotchyy -y -b y
#------------------------------------------------------------------------------