Add build debug option to tmk_core/rules.mk (#11324)
* Add DUMP_C_MACROS to tmk_core/rules.mk * update DUMP_C_MACROS * add VERBOSE_LD_CMD, VERBOSE_AS_CMD * add VERBOSE_C_CMD, VERBOSE_C_INCLUDE * update DUMP_C_MACROS, VERBOSE_C_INCLUDE, VERBOSE_C_CMD
This commit is contained in:
parent
34513b4665
commit
3edfb93d5d
1 changed files with 18 additions and 1 deletions
|
@ -150,6 +150,9 @@ ifeq ($(strip $(DEBUG_ENABLE)),yes)
|
||||||
else
|
else
|
||||||
ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100
|
ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(VERBOSE_AS_CMD),yes)
|
||||||
|
ASFLAGS += -v
|
||||||
|
endif
|
||||||
|
|
||||||
#---------------- Library Options ----------------
|
#---------------- Library Options ----------------
|
||||||
# Minimalistic printf version
|
# Minimalistic printf version
|
||||||
|
@ -192,6 +195,9 @@ CREATE_MAP ?= yes
|
||||||
ifeq ($(CREATE_MAP),yes)
|
ifeq ($(CREATE_MAP),yes)
|
||||||
LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref
|
LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(VERBOSE_LD_CMD),yes)
|
||||||
|
LDFLAGS += -v
|
||||||
|
endif
|
||||||
#LDFLAGS += -Wl,--relax
|
#LDFLAGS += -Wl,--relax
|
||||||
LDFLAGS += $(EXTMEMOPTS)
|
LDFLAGS += $(EXTMEMOPTS)
|
||||||
LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
|
LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
|
||||||
|
@ -327,8 +333,19 @@ $1_ASFLAGS = $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS)
|
||||||
$1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN)
|
$1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN)
|
||||||
@mkdir -p $$(@D)
|
@mkdir -p $$(@D)
|
||||||
@$$(SILENT) || printf "$$(MSG_COMPILING) $$<" | $$(AWK_CMD)
|
@$$(SILENT) || printf "$$(MSG_COMPILING) $$<" | $$(AWK_CMD)
|
||||||
$$(eval CMD := $$(CC) -c $$($1_CFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
|
$$(eval CC_EXEC := $$(CC))
|
||||||
|
ifneq ($$(VERBOSE_C_CMD),)
|
||||||
|
$$(if $$(filter $$(notdir $$(VERBOSE_C_CMD)),$$(notdir $$<)),$$(eval CC_EXEC += -v))
|
||||||
|
endif
|
||||||
|
ifneq ($$(VERBOSE_C_INCLUDE),)
|
||||||
|
$$(if $$(filter $$(notdir $$(VERBOSE_C_INCLUDE)),$$(notdir $$<)),$$(eval CC_EXEC += -H))
|
||||||
|
endif
|
||||||
|
$$(eval CMD := $$(CC_EXEC) -c $$($1_CFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
|
||||||
@$$(BUILD_CMD)
|
@$$(BUILD_CMD)
|
||||||
|
ifneq ($$(DUMP_C_MACROS),)
|
||||||
|
$$(eval CMD := $$(CC) -E -dM $$($1_CFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$<)
|
||||||
|
@$$(if $$(filter $$(notdir $$(DUMP_C_MACROS)),$$(notdir $$<)),$$(BUILD_CMD))
|
||||||
|
endif
|
||||||
|
|
||||||
# Compile: create object files from C++ source files.
|
# Compile: create object files from C++ source files.
|
||||||
$1/%.o : %.cpp $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN)
|
$1/%.o : %.cpp $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN)
|
||||||
|
|
Loading…
Reference in a new issue