Move bootloader_defs include to build_keyboard

Also fix it for subprojects
This commit is contained in:
Fred Sundvik 2016-08-15 09:07:32 +03:00
parent 9028a412ea
commit 3442e216dc
2 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -143,14 +143,6 @@ MCUFLAGS = -mcpu=$(MCU)
DEBUG = gdb
# Define ASM defines here
# bootloader definitions may be used in the startup .s file
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
# List any extra directories to look for libraries here.
EXTRALIBDIRS = $(RULESPATH)/ld