From 33fbd3be36bf58c6a02fb6b4ae99dc5bca7c8e58 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Mon, 15 Aug 2016 08:45:36 +0300 Subject: Output specific include paths --- build_keyboard.mk | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'build_keyboard.mk') diff --git a/build_keyboard.mk b/build_keyboard.mk index d10412ea57..0debc49259 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -43,8 +43,22 @@ ifneq ($(SUBPROJECT),) endif endif -# Save the defs here, so we don't include any keymap specific ones +# We can assume a ChibiOS target When MCU_FAMILY is defined, since it's not used for LUFA +ifdef MCU_FAMILY + PLATFORM=CHIBIOS +else + PLATFORM=AVR +endif + +ifeq ($(PLATFORM),CHIBIOS) + include $(TMK_PATH)/protocol/chibios.mk + include $(TMK_PATH)/chibios.mk + OPT_OS = chibios +endif + +# Save the defines and includes here, so we don't include any keymap specific ones PROJECT_DEFS := $(OPT_DEFS) +PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH) MAIN_KEYMAP_PATH := $(KEYBOARD_PATH)/keymaps/$(KEYMAP) MAIN_KEYMAP_C := $(MAIN_KEYMAP_PATH)/keymap.c @@ -72,19 +86,6 @@ else KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD) endif -# We can assume a ChibiOS target When MCU_FAMILY is defined, since it's not used for LUFA -ifdef MCU_FAMILY - PLATFORM=CHIBIOS -else - PLATFORM=AVR -endif - -ifeq ($(PLATFORM),CHIBIOS) - include $(TMK_PATH)/protocol/chibios.mk - include $(TMK_PATH)/chibios.mk - OPT_OS = chibios -endif - # Object files directory # To put object files in current directory, use a dot (.), do NOT make # this an empty or blank macro! @@ -190,8 +191,10 @@ endif OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) $(KEYMAP_OUTPUT)_SRC := $(SRC) $(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" +$(KEYMAP_OUTPUT)_INC := $(EXTRAINCDIRS) $(VPATH) $(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) +$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) include $(TMK_PATH)/rules.mk -- cgit v1.2.3