diff options
| author | Joel Challis <git@zvecr.com> | 2021-02-28 15:50:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-28 15:50:15 +0000 |
| commit | a3cbc8a004f6ec5b0e1df326353a2a2fc8221129 (patch) | |
| tree | a124699fd5e949703b24abea49df14c34b89f43a /common_features.mk | |
| parent | 02dc3b672217a4bc28b68c944863efd34dc28108 (diff) | |
Overhaul bootmagic logic to have single entrypoint (#8532)
* Relocate bootmagic logic to have single entrypoint
* Align init of layer state
Diffstat (limited to 'common_features.mk')
| -rw-r--r-- | common_features.mk | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/common_features.mk b/common_features.mk index d238b28124..109c50c5f4 100644 --- a/common_features.mk +++ b/common_features.mk | |||
| @@ -421,10 +421,6 @@ ifeq ($(strip $(TERMINAL_ENABLE)), yes) | |||
| 421 | OPT_DEFS += -DUSER_PRINT | 421 | OPT_DEFS += -DUSER_PRINT |
| 422 | endif | 422 | endif |
| 423 | 423 | ||
| 424 | ifeq ($(strip $(USB_HID_ENABLE)), yes) | ||
| 425 | include $(TMK_DIR)/protocol/usb_hid.mk | ||
| 426 | endif | ||
| 427 | |||
| 428 | ifeq ($(strip $(WPM_ENABLE)), yes) | 424 | ifeq ($(strip $(WPM_ENABLE)), yes) |
| 429 | SRC += $(QUANTUM_DIR)/wpm.c | 425 | SRC += $(QUANTUM_DIR)/wpm.c |
| 430 | OPT_DEFS += -DWPM_ENABLE | 426 | OPT_DEFS += -DWPM_ENABLE |
| @@ -458,6 +454,23 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes) | |||
| 458 | SRC += $(QUANTUM_DIR)/dip_switch.c | 454 | SRC += $(QUANTUM_DIR)/dip_switch.c |
| 459 | endif | 455 | endif |
| 460 | 456 | ||
| 457 | VALID_MAGIC_TYPES := yes full lite | ||
| 458 | BOOTMAGIC_ENABLE ?= no | ||
| 459 | ifneq ($(strip $(BOOTMAGIC_ENABLE)), no) | ||
| 460 | ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),) | ||
| 461 | $(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic) | ||
| 462 | endif | ||
| 463 | ifeq ($(strip $(BOOTMAGIC_ENABLE)), lite) | ||
| 464 | OPT_DEFS += -DBOOTMAGIC_LITE | ||
| 465 | QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c | ||
| 466 | else | ||
| 467 | OPT_DEFS += -DBOOTMAGIC_ENABLE | ||
| 468 | QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_full.c | ||
| 469 | endif | ||
| 470 | endif | ||
| 471 | COMMON_VPATH += $(QUANTUM_DIR)/bootmagic | ||
| 472 | QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c | ||
| 473 | |||
| 461 | VALID_CUSTOM_MATRIX_TYPES:= yes lite no | 474 | VALID_CUSTOM_MATRIX_TYPES:= yes lite no |
| 462 | 475 | ||
| 463 | CUSTOM_MATRIX ?= no | 476 | CUSTOM_MATRIX ?= no |
