openfoam/wmake/rules/General/transform
Mark Olesen 793f4e3a37 CONFIG: add support for WM_COMPILE_OPTION='Dbg'
- uses '-g -DFULLDEBUG' (like Debug), but with -O3 (like Opt).

  This adds in debug symbols and FULLDEBUG code segments (good for
  code development) but retains -O3 optimizations and code paths and
  avoids the much slower -O0 associated with 'Debug'.

- add in central wmake/General/common/{c,c++}XXX tuning,
  which helps reduce the number of nearly identical files

ENH: add support for wmake -debug-Og
2022-09-09 11:55:33 +02:00

46 lines
1.2 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 ("","$(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 dependency list for source file,$(<F))
@$(WM_SCRIPTS)/makeTargetDir $@
@$(WMKDEP) $(WMKDEP_FLAGS) -o$@ -I$(*D) $(LIB_HEADER_DIRS) $<
#------------------------------------------------------------------------------