aboutsummaryrefslogtreecommitdiffstats
path: root/build_keyboard.mk
diff options
context:
space:
mode:
authorGravatar Fred Sundvik <fsundvik@gmail.com>2016-11-06 22:11:24 +0200
committerGravatar Fred Sundvik <fsundvik@gmail.com>2016-11-06 22:11:24 +0200
commita377017c95b826d83ac7a46ef176d39a58294b44 (patch)
treeb8f9959f82ae34e80b7413011ddc70444d0dc38d /build_keyboard.mk
parentf519b94be7086852f2afe4ec248786b47968f7ff (diff)
downloadqmk_firmware-a377017c95b826d83ac7a46ef176d39a58294b44.tar.gz
Add possibility to control variable trace from make
Diffstat (limited to 'build_keyboard.mk')
-rw-r--r--build_keyboard.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk
index 461b17cd7..61aebf393 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -180,7 +180,13 @@ ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
VAPTH += $(SERIAL_PATH)
endif
-SRC += $(QUANTUM_DIR)/variable_trace.c
+ifneq ($(strip $(VARIABLE_TRACE)),)
+ SRC += $(QUANTUM_DIR)/variable_trace.c
+ OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
+ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
+ OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
+endif
+endif
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax