Commit fec570f3 authored by Andrew Heather's avatar Andrew Heather
Browse files

Merge branch 'feature-build-granularity' into 'develop'

Feature build granularity

See merge request !359
parents c1561256 f233595a
......@@ -14,11 +14,9 @@ EXE_INC = \
${c++CGALWARN} \
-I.. \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I/usr/include/Qt
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-L$(CGAL_ARCH_PATH)/lib \
-L$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L${CGAL_LIBS} \
-lsurfMesh \
-lmeshTools
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
#------------------------------------------------------------------------------
wclean dummy
wcleanLibMpi mpi
./Allwclean-mpi
#------------------------------------------------------------------------------
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
#------------------------------------------------------------------------------
wcleanLibMpi mpi
#------------------------------------------------------------------------------
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
#------------------------------------------------------------------------------
echo "wmake $targetType dummy (mpi=$WM_MPLIB)"
wmake $targetType dummy
wmakeLibMpi mpi
./Allwmake-mpi $targetType $*
#------------------------------------------------------------------------------
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
# No AllwmakeParseArguments [infinite loop via Allwmake]
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmake.wmake-args
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
#------------------------------------------------------------------------------
# Environment
# - FOAM_MPI_LIBBIN (optional: defaults to FOAM_LIBBIN/FOAM_MPI)
wmakeLibMpi mpi
#------------------------------------------------------------------------------
......@@ -3,4 +3,4 @@ UIPread.C
UPstream.C
PstreamGlobals.C
LIB = $(FOAM_LIBBIN)/$(FOAM_MPI)/libPstream
LIB = $(FOAM_MPI_LIBBIN)/libPstream
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(DEFAULT_RULES)/mplib$(WM_MPLIB)
/* Default is PROJECT LIB/mpi target */
ifeq (,$(FOAM_MPI_LIBBIN))
FOAM_MPI_LIBBIN := $(FOAM_LIBBIN)/$(FOAM_MPI)
endif
EXE_INC = $(PFLAGS) $(PINC) $(c++LESSWARN)
LIB_LIBS = $(PLIBS)
......
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
#------------------------------------------------------------------------------
......@@ -10,6 +9,6 @@ wclean scotchDecomp
wclean decompositionMethods
wclean decompose
wcleanLibMpi ptscotchDecomp
./Allwclean-mpi
#------------------------------------------------------------------------------
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
#------------------------------------------------------------------------------
wcleanLibMpi ptscotchDecomp
#------------------------------------------------------------------------------
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_kahip
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_metis
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_scotch
......@@ -27,12 +26,8 @@ fi
if have_scotch
then
wmake $targetType scotchDecomp
if have_ptscotch
then
wmakeLibMpi ptscotchDecomp "scotch=$SCOTCH_VERSION"
fi
fi
./Allwmake-mpi $targetType $*
#------------------------------------------------------------------------------
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
# No AllwmakeParseArguments [infinite loop via Allwmake]
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmake.wmake-args
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_scotch
#------------------------------------------------------------------------------
# Environment
# - FOAM_MPI_LIBBIN (optional: defaults to FOAM_LIBBIN/FOAM_MPI)
: "${FOAM_EXT_LIBBIN:=/usr/lib$WM_COMPILER_LIB_ARCH}" # Extra safety?
export FOAM_EXT_LIBBIN
if have_scotch
then
if have_ptscotch
then
wmakeLibMpi ptscotchDecomp "scotch=$SCOTCH_VERSION"
fi
fi
#------------------------------------------------------------------------------
ptscotchDecomp.C
LIB = $(FOAM_LIBBIN)/$(FOAM_MPI)/libptscotchDecomp
LIB = $(FOAM_MPI_LIBBIN)/libptscotchDecomp
......@@ -5,6 +5,11 @@
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(DEFAULT_RULES)/mplib$(WM_MPLIB)
/* Default is PROJECT LIB/mpi target */
ifeq (,$(strip $(FOAM_MPI_LIBBIN)))
FOAM_MPI_LIBBIN := $(FOAM_LIBBIN)/$(FOAM_MPI)
endif
EXE_INC = \
-I$(PTSCOTCH_INC_DIR) \
-I$(SCOTCH_INC_DIR) \
......@@ -22,8 +27,8 @@ LIB_LIBS = \
-lscotch \
-lptscotch
/* Combined into libptscotch for windows compile */
ifneq ($(WM_OSTYPE),MSwindows)
/* errexit, except for windows compile (already in library) */
ifeq (,$(findstring windows,$(WM_OSTYPE)))
LIB_LIBS += -lptscotcherrexit
endif
......
......@@ -7,8 +7,8 @@ LIB_LIBS = \
-L$(SCOTCH_LIB_DIR) \
-lscotch
/* Combined into libscotch for windows compile */
ifneq ($(WM_OSTYPE),MSwindows)
/* errexit, except for windows compile (already in library) */
ifeq (,$(findstring windows,$(WM_OSTYPE)))
LIB_LIBS += -lscotcherrexit
endif
......
CGAL_INC = \
-I$(GMP_ARCH_PATH)/include \
-I$(MPFR_ARCH_PATH)/include \
-I$(BOOST_ARCH_PATH)/include \
-I$(CGAL_ARCH_PATH)/include \
-I/usr/local/include \
-I/usr/include
CGAL_LIBS = \
-L$(GMP_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L$(MPFR_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L$(BOOST_ARCH_PATH)/lib \
-L$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L$(CGAL_ARCH_PATH)/lib \
-L$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-lCGAL \
-lgmp \
-lmpfr
# ----------------------------------------------------------------------------
# CGAL definitions - several possibilities
#
# 0. missing
# 1. header-only
# 2. library, no mpfr
# 3. library, with mpfr (a likely default)
#
# Dispatch according to the defined 'CGAL_FLAVOUR'
# - names may change [see wmake/scripts/have_cgal]
# (no-cgal | cgal-header | cgal-no-mpfr | cgal-mpfr)
cgal_subrule := cgal-mpfr
ifneq (,$(findstring header,$(CGAL_FLAVOUR)))
cgal_subrule := cgal-header-only
endif
ifneq (,$(findstring no-mpfr,$(CGAL_FLAVOUR)))
cgal_subrule := cgal-no-mpfr
endif
# ----------------------------------------------------------------------------
# BOOST include/library directories - synthesize from ARCH_PATH as required
ifeq (,$(strip $(BOOST_INC_DIR)))
ifneq (,$(strip $(BOOST_ARCH_PATH)))
BOOST_INC_DIR = $(BOOST_ARCH_PATH)/include
BOOST_LIB_DIR = $(BOOST_ARCH_PATH)/lib \
$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH)
endif
endif
# ----------------------------------------------------------------------------
# CGAL include/library directories - synthesize from ARCH_PATH as required
ifeq (,$(strip $(CGAL_INC_DIR)))
ifneq (,$(strip $(CGAL_ARCH_PATH)))
CGAL_INC_DIR = $(CGAL_ARCH_PATH)/include
CGAL_LIB_DIR = $(CGAL_ARCH_PATH)/lib \
$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH)
endif
endif
# ----------------------------------------------------------------------------
CGAL_INC =
CGAL_LIBS =
include $(GENERAL_RULES)/$(cgal_subrule)
# Override
sinclude $(DEFAULT_RULES)/CGAL
sinclude $(DEFAULT_RULES)/$(cgal_subrule)
# DEBUG
# -----
## $(info CGAL_FLAVOUR $(CGAL_FLAVOUR))
## $(info subrule $(cgal_subrule))
## CGAL_INC += -Wp,-v
## $(info CGAL_INC: $(CGAL_INC))
## $(info CGAL_LIB: $(CGAL_LIBS))
## $(info BOOST_INC_DIR: $(BOOST_INC_DIR))
## $(info BOOST_LIB_DIR: $(BOOST_LIB_DIR))
## $(info CGAL_INC_DIR: $(CGAL_INC_DIR))
## $(info CGAL_LIB_DIR: $(CGAL_LIB_DIR))
# ---------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# CGAL (header-only version)
CGAL_INC = -DCGAL_HEADER_ONLY
CGAL_LIBS =
ifneq (,$(GMP_ARCH_PATH))
CGAL_INC += -I$(GMP_ARCH_PATH)/include
CGAL_LIBS += -L$(GMP_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH)
endif
ifneq (,$(MPFR_ARCH_PATH))
CGAL_INC += -I$(MPFR_ARCH_PATH)/include
CGAL_LIBS += -L$(MPFR_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH)
endif
CGAL_INC += \
$(foreach dir,$(BOOST_INC_DIR),-I$(dir)) \
$(foreach dir,$(CGAL_INC_DIR),-I$(dir))
CGAL_LIBS += \
$(foreach dir,$(BOOST_LIB_DIR),-L$(dir)) \
-lmpfr -lgmp
# ----
# Extra failsafe - still needed? (2020-05-15)
## CGAL_INC += -I/usr/local/include -I/usr/include
# -----------------------------------------------------------------------------
# Headers-only CGAL
CGAL_INC = \
-I$(BOOST_ARCH_PATH)/include \
-I$(CGAL_ARCH_PATH)/include
CGAL_LIBS =
#------------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# CGAL (library version) with mpfr/gmp
CGAL_INC =
CGAL_LIBS =
ifneq (,$(strip $(GMP_ARCH_PATH)))
CGAL_INC += -I$(GMP_ARCH_PATH)/include
CGAL_LIBS += -L$(GMP_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH)
endif
ifneq (,$(strip $(MPFR_ARCH_PATH)))
CGAL_INC += -I$(MPFR_ARCH_PATH)/include
CGAL_LIBS += -L$(MPFR_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH)
endif
CGAL_INC += \
$(foreach dir,$(BOOST_INC_DIR),-I$(dir)) \
$(foreach dir,$(CGAL_INC_DIR),-I$(dir))
CGAL_LIBS += \
$(foreach dir,$(BOOST_LIB_DIR),-L$(dir)) \
$(foreach dir,$(CGAL_LIB_DIR),-L$(dir)) \
-lCGAL -lmpfr -lgmp
# ----
# Extra failsafe - still needed? (2020-05-15)
## CGAL_INC += -I/usr/local/include -I/usr/include
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# CGAL (library version) without mpfr
CGAL_INC = \
$(foreach dir,$(BOOST_INC_DIR),-I$(dir)) \
$(foreach dir,$(CGAL_INC_DIR),-I$(dir))
CGAL_LIBS = \
$(foreach dir,$(BOOST_LIB_DIR),-L$(dir)) \
$(foreach dir,$(CGAL_LIB_DIR),-L$(dir)) \
-lCGAL
# ----
# Extra failsafe - still needed? (2020-05-15)
## CGAL_INC += -I/usr/local/include -I/usr/include
# -----------------------------------------------------------------------------
# Empty flags for not compiling/linking with CGAL
#------------------------------------------------------------------------------
# CGAL - empty flags for not compiling/linking
CGAL_INC =
CGAL_LIBS =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment