mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Allow change of debug flags without forcing complete rebuild (#13708)
This commit is contained in:
parent
1fb73b36f4
commit
6e0855c296
1 changed files with 15 additions and 1 deletions
16
Makefile
16
Makefile
|
@ -34,7 +34,7 @@ CUSTOM_DEFAULTS_EXTENDED ?= no
|
|||
|
||||
# Debugger optons:
|
||||
# empty - ordinary build with all optimizations enabled
|
||||
# INFO - ordinary build with debug symbols and all optimizations enabled
|
||||
# INFO - ordinary build with debug symbols and all optimizations enabled. Only builds touched files.
|
||||
# GDB - debug build with minimum number of optimizations
|
||||
DEBUG ?=
|
||||
|
||||
|
@ -142,6 +142,15 @@ EXTRA_LD_FLAGS :=
|
|||
#
|
||||
# Default Tool options - can be overridden in {mcu}.mk files.
|
||||
#
|
||||
DEBUG_MIXED = no
|
||||
|
||||
ifeq ($(DEBUG),INFO)
|
||||
DEBUG_MIXED = yes
|
||||
endif
|
||||
ifeq ($(DEBUG),GDB)
|
||||
DEBUG_MIXED = yes
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),GDB)
|
||||
OPTIMISE_DEFAULT := -Og
|
||||
|
||||
|
@ -336,7 +345,12 @@ TARGET_MAP = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME).map
|
|||
|
||||
TARGET_EXST_HASH_SECTION_FILE = $(TARGET_OBJ_DIR)/exst_hash_section.bin
|
||||
|
||||
ifeq ($(DEBUG_MIXED),yes)
|
||||
TARGET_EF_HASH := $(shell echo -n -- "$(EXTRA_FLAGS)" "$(OPTIONS)" "$(DEVICE_FLAGS)" "$(TARGET_FLAGS)" | openssl dgst -md5 -r | awk '{print $$1;}')
|
||||
else
|
||||
TARGET_EF_HASH := $(shell echo -n -- "$(EXTRA_FLAGS)" "$(OPTIONS)" "$(DEBUG_FLAGS)" "$(DEVICE_FLAGS)" "$(TARGET_FLAGS)" | openssl dgst -md5 -r | awk '{print $$1;}')
|
||||
endif
|
||||
|
||||
TARGET_EF_HASH_FILE := $(TARGET_OBJ_DIR)/.efhash_$(TARGET_EF_HASH)
|
||||
|
||||
CLEAN_ARTIFACTS := $(TARGET_BIN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue