summaryrefslogtreecommitdiff
path: root/build_keyboard.mk
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-06-16 22:14:47 +0300
committerFred Sundvik <fsundvik@gmail.com>2017-06-18 21:22:22 +0300
commit1c0fe956ac242b1c85a9b024b9b3966020b862ed (patch)
treed685fb2f8867e666d4593a6c6cbd31e3c771cb20 /build_keyboard.mk
parentd29906cb64f3c49da43c209ce341e577278e5fad (diff)
downloadqmk_firmware-1c0fe956ac242b1c85a9b024b9b3966020b862ed.tar.gz
qmk_firmware-1c0fe956ac242b1c85a9b024b9b3966020b862ed.zip
Split common.mk into common.mk and common_features.mk
To support including keyboard/keymap specific rules before it
Diffstat (limited to 'build_keyboard.mk')
-rw-r--r--build_keyboard.mk15
1 files changed, 3 insertions, 12 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk
index f13d5b6d69..3ec389ac9f 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -31,8 +31,6 @@ $(error MASTER does not have a valid value(left/right))
endif
endif
-
-
KEYBOARD_PATH := keyboards/$(KEYBOARD)
KEYBOARD_C := $(KEYBOARD_PATH)/$(KEYBOARD).c
@@ -42,7 +40,6 @@ else
$(error "$(KEYBOARD_C)" does not exist)
endif
-
ifneq ($(SUBPROJECT),)
SUBPROJECT_PATH := keyboards/$(KEYBOARD)/$(SUBPROJECT)
SUBPROJECT_C := $(SUBPROJECT_PATH)/$(SUBPROJECT).c
@@ -118,19 +115,12 @@ endif
# # project specific files
SRC += $(KEYBOARD_C) \
$(KEYMAP_C) \
- $(QUANTUM_DIR)/quantum.c \
- $(QUANTUM_DIR)/keymap_common.c \
- $(QUANTUM_DIR)/keycode_config.c \
- $(QUANTUM_DIR)/process_keycode/process_leader.c
+ $(QUANTUM_SRC)
ifneq ($(SUBPROJECT),)
SRC += $(SUBPROJECT_C)
endif
-ifndef CUSTOM_MATRIX
- SRC += $(QUANTUM_DIR)/matrix.c
-endif
-
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
@@ -142,9 +132,10 @@ endif
VPATH += $(KEYBOARD_PATH)
VPATH += $(COMMON_VPATH)
+include common_features.mk
include $(TMK_PATH)/protocol.mk
-
include $(TMK_PATH)/common.mk
+
SRC += $(TMK_COMMON_SRC)
OPT_DEFS += $(TMK_COMMON_DEFS)
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)