summaryrefslogtreecommitdiffstats
path: root/build_keyboard.mk
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-08-15 09:07:32 +0300
committerFred Sundvik <fsundvik@gmail.com>2016-08-20 03:56:42 +0300
commit3442e216dcec3ce6c8ba1c755b0d647a7f384f01 (patch)
treefef516e99f2b01e49b0d8b0f4cf1546b1e751ce1 /build_keyboard.mk
parent9028a412eaf95e37e98a9f2e4573653ec70d7e18 (diff)
Move bootloader_defs include to build_keyboard
Also fix it for subprojects
Diffstat (limited to 'build_keyboard.mk')
-rw-r--r--build_keyboard.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk
index a6b578efbc..e8d8f3572b 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -54,6 +54,15 @@ ifeq ($(PLATFORM),CHIBIOS)
include $(TMK_PATH)/protocol/chibios.mk
include $(TMK_PATH)/chibios.mk
OPT_OS = chibios
+ ifneq ("$(wildcard $(SUBPROJECT_PATH)/bootloader_defs.h)","")
+ OPT_DEFS += -include $(SUBPROJECT_PATH)/bootloader_defs.h
+ else ifneq ("$(wildcard $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
+ OPT_DEFS += -include $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h
+ else ifneq ("$(wildcard $(KEYBOARD_PATH)/bootloader_defs.h)","")
+ OPT_DEFS += -include $(KEYBOARD_PATH)/bootloader_defs.h
+ else ifneq ("$(wildcard $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
+ OPT_DEFS += -include $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h
+ endif
endif
CONFIG_H = $(KEYBOARD_PATH)/config.h