summaryrefslogtreecommitdiff
path: root/builddefs/build_keyboard.mk
diff options
context:
space:
mode:
Diffstat (limited to 'builddefs/build_keyboard.mk')
-rw-r--r--builddefs/build_keyboard.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk
index b5616a438f..fe95dcaf15 100644
--- a/builddefs/build_keyboard.mk
+++ b/builddefs/build_keyboard.mk
@@ -400,6 +400,12 @@ endif
OPT_DEFS += -DKEYMAP_C=\"$(KEYMAP_C)\"
+# If a keymap or userspace places their keymap array in another file instead, allow for it to be included
+# !!NOTE!! -- For this to work, the source file cannot be part of $(SRC), so users should not add it via `SRC += <file>`
+ifneq ($(strip $(INTROSPECTION_KEYMAP_C)),)
+OPT_DEFS += -DINTROSPECTION_KEYMAP_C=\"$(strip $(INTROSPECTION_KEYMAP_C))\"
+endif
+
# project specific files
SRC += \
$(KEYBOARD_SRC) \