mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
69 lines
1.7 KiB
Makefile
69 lines
1.7 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 environment since using '$(shell ...)' here does not
|
|
# always work well.
|
|
#
|
|
# Notes:
|
|
# - compiled without pthread
|
|
#
|
|
# Normally set CCS, CCP by caller
|
|
#------------------------------------------------------------------------------
|
|
|
|
EXE =
|
|
LIB = .so
|
|
OBJ = .o
|
|
|
|
AR = $(CC)
|
|
ARFLAGS = $(WM_CFLAGS) -shared -o
|
|
CCS ?= $(CC)
|
|
CCP ?= mpicc
|
|
CCD = $(CCP)
|
|
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
|
|
-UCOMMON_FILE_COMPRESS \
|
|
-DCOMMON_RANDOM_FIXED_SEED \
|
|
-DSCOTCH_DETERMINISTIC \
|
|
-DSCOTCH_RENAME \
|
|
-DIDXSIZE64 \
|
|
-Drestrict=__restrict
|
|
|
|
# Use 32/64-bit integers
|
|
# ---------------
|
|
# Unfortunately -DINT32 seems to fail when openmpi is build without
|
|
# Fortran! The MPI_INT32_T is interpreted as MPI_INTEGER4 which does
|
|
# not exist
|
|
# ---------------
|
|
# ifeq ($(WM_LABEL_SIZE),32)
|
|
# CFLAGS += -DINTSIZE32
|
|
# endif
|
|
ifeq ($(WM_LABEL_SIZE),64)
|
|
CFLAGS += -DINTSIZE64
|
|
endif
|
|
|
|
CLIBFLAGS = -shared
|
|
LDFLAGS = -Xlinker --no-as-needed $(WM_LDFLAGS) -lm -lrt
|
|
|
|
MAKE = make
|
|
CP = cp
|
|
CAT = cat
|
|
LN = ln
|
|
MKDIR = mkdir
|
|
MV = mv
|
|
RANLIB = echo
|
|
|
|
FLEX = flex "-Pscotchyy$(SCOTCH_NAME_SUFFIX)" -olex.yy.c
|
|
BISON = bison "-pscotchyy$(SCOTCH_NAME_SUFFIX)" -y -b y
|
|
LEX = $(FLEX)
|
|
YACC = $(BISON)
|
|
|
|
#------------------------------------------------------------------------------
|