- eg, for partially incomplete systems (without libz devel header) ENH: clearer binding of dummy Pstream in OpenFOAM/Make/options - link of dummy stub Pstream now contingent on linking libOpenFOAM as well. This makes the purpose slightly clearer ENH: cleaner option naming/handling in wmake script - allow special purpose -no-openfoam option. Eg, compiling test programs without OpenFOAM and Pstream libraries but using the rest of the wmake system. ENH: add +openmp support into WM_COMPILE_CONTROL (#2633) - this adds compile/link flags for openmp. For single-use, can also use 'wmake -openmp'. If both +openmp and ~openmp are specified in WM_COMPILE_CONTROL the ~openmp will have priority. This is actually done indirectly since ~openmp will set empty COMP_OPENMP, LINK_OPENMP internal variables, which the +openmp then adds to the c++FLAGS and linkexe targets (ie, won't actually add anything). ENH: add +ccache or ccache=... support into WM_COMPILE_CONTROL (#2633) - with the first version (+ccache), simply use ccache from the path without any extra options. - with the second version (ccache=...), can be more specific about what is called. Using "+ccache" is identical to "ccache=ccache", but the later could be used in other ways. For example, ccache=/strange/install/path/ccache ccache=</path/my-tooling --option> Have the choice of unquoted, single or double quoted or '< >' quoted STYLE: relocate FOAM_EXTRA_LDFLAGS in general makefile - removes clutter for different linkers (eg, gold, mold, ldd) making it easier to extend for other linkers. STYLE: protect makefile checks with 'strip' function
46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
#----------------------------*- makefile-gmake -*------------------------------
|
|
|
|
# The dependency generation program
|
|
# 1. wmkdepend : Ragel-based
|
|
# 2. wmkdep : Flex-based (slower, ulimit problem)
|
|
# 3. makeDepend : cpp -M (for testing only)
|
|
|
|
WMKDEP := $(WMAKE_BIN)/wmkdepend
|
|
# WMKDEP := $(WMAKE_BIN)/wmkdep
|
|
# WMKDEP := $(WM_SCRIPTS)/makeDepend
|
|
|
|
WMKDEP_FLAGS := -eWM_PROJECT_DIR -eWM_THIRD_PARTY_DIR
|
|
|
|
ifneq (,$(strip $(WM_QUIET)))
|
|
E=@
|
|
define QUIET_MESSAGE
|
|
@echo " $1: $2";
|
|
endef
|
|
define VERBOSE_MESSAGE
|
|
endef
|
|
WMKDEP_FLAGS += -q
|
|
else
|
|
E=
|
|
define QUIET_MESSAGE
|
|
endef
|
|
define VERBOSE_MESSAGE
|
|
@echo "$1 $2";
|
|
endef
|
|
endif
|
|
|
|
define DEFINE_TRANSFORM
|
|
$(OBJECTS_DIR)/%.o : %$1
|
|
$(call QUIET_MESSAGE,$(subst .,,$(1))too,$(value <F))
|
|
$E $$($(subst .,,$(1))too)
|
|
endef
|
|
|
|
$(foreach s,$(SUFFIXES),$(eval $(call DEFINE_TRANSFORM,$(s))))
|
|
|
|
$(OBJECTS_DIR)/%.dep : %
|
|
$(call QUIET_MESSAGE,dep,$(<F))
|
|
$(call VERBOSE_MESSAGE,Making dependencies:,$(<F))
|
|
@$(WM_SCRIPTS)/makeTargetDir $@
|
|
@$(WMKDEP) $(WMKDEP_FLAGS) -o$@ -I$(*D) $(LIB_HEADER_DIRS) $<
|
|
|
|
#------------------------------------------------------------------------------
|