summaryrefslogtreecommitdiffstats
path: root/build_keyboard.mk
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-08-21 13:53:36 +0300
committerFred Sundvik <fsundvik@gmail.com>2016-08-21 13:53:36 +0300
commit8f16403179dde51af1826fbc9b65ce0e29fd33ad (patch)
treefae6d8aa1200dab0b26fa383ff7e5b54851ae5c7 /build_keyboard.mk
parent1c69acb7d518893ee77e326342d4603da87470e5 (diff)
Change order of variable assignment
BUILD_DIR and TARGET was assigned too late, so the dfu-util target, which depends on them did not work.
Diffstat (limited to 'build_keyboard.mk')
-rw-r--r--build_keyboard.mk22
1 files changed, 13 insertions, 9 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk
index e8d8f3572b..a2a2871e6e 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -16,6 +16,19 @@ LIB_PATH = $(TOP_DIR)/lib
QUANTUM_DIR = quantum
QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)
+BUILD_DIR := $(TOP_DIR)/.build
+
+ifneq ($(SUBPROJECT),)
+ TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP)
+ KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)_$(SUBPROJECT)
+else
+ TARGET ?= $(KEYBOARD)_$(KEYMAP)
+ KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)
+endif
+
+# Force expansion
+TARGET := $(TARGET)
+
MASTER ?= left
ifdef master
@@ -93,15 +106,6 @@ else
$(error "$(MAIN_KEYMAP_C)/keymap.c" does not exist)
endif
-BUILD_DIR = $(TOP_DIR)/.build
-
-ifneq ($(SUBPROJECT),)
- TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP)
- KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)_$(SUBPROJECT)
-else
- TARGET ?= $(KEYBOARD)_$(KEYMAP)
- KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)
-endif
# Object files directory
# To put object files in current directory, use a dot (.), do NOT make