aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/common.mk
diff options
context:
space:
mode:
authorGravatar Drashna Jaelre <drashna@live.com>2018-10-27 11:53:50 -0700
committerGravatar Jack Humbert <jack.humb@gmail.com>2018-10-27 14:53:50 -0400
commit4ffcacd92086870eb7a3102d54178a7af64edb0c (patch)
treeb30479a70abc0d0dcd6c287383eb64e8f2fee104 /tmk_core/common.mk
parent5be438f03d0ae3ebdb9e24d249fdfd7f5c573634 (diff)
downloadqmk_firmware-4ffcacd92086870eb7a3102d54178a7af64edb0c.tar.gz
Add Bootmagic Lite to QMK (#4215)
* Preliminary additon of bootmagic lite functionality * Cleanup code * Clean up bootmagic code * Add documentation and clean up code * Make 'lite' an option for BOOTMAGIC_ENABLE * Update Templates with note about Bootmagic Lite option * Detect Debounce variable * Make sure debounce is a non-zero number * Capitalize Bootmagic * Capitalize bootmagic * Update wording * Re-add EEPROM reset, by popular demand And add eeprom-less version to drashna userspace for his sanity * Fix spacing * Set BOOTMAGIC_ENABLE to use full/lite/off And default yes to "full" for compatibility * Add Bootmagic lite info to templates * Remove text from makefiles * Cleanup of makefile * mention yes in bootmagic docs * Wordsmitthing the docs * Fix white spaces * Readd default bootmagic setting, because it's necessary
Diffstat (limited to 'tmk_core/common.mk')
-rw-r--r--tmk_core/common.mk14
1 files changed, 13 insertions, 1 deletions
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index 33bcc97b2..3844b13d4 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -61,14 +61,26 @@ endif
# Option modules
-ifeq ($(strip $(BOOTMAGIC_ENABLE)), yes)
+BOOTMAGIC_ENABLE ?= no
+VALID_MAGIC_TYPES := yes full lite
+ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
+ ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
+ $(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
+ endif
+ ifeq ($(strip $(BOOTMAGIC_ENABLE)), lite)
+ TMK_COMMON_DEFS += -DBOOTMAGIC_LITE
+ TMK_COMMON_DEFS += -DMAGIC_ENABLE
+ TMK_COMMON_SRC += $(COMMON_DIR)/magic.c
+ else
TMK_COMMON_DEFS += -DBOOTMAGIC_ENABLE
TMK_COMMON_SRC += $(COMMON_DIR)/bootmagic.c
+ endif
else
TMK_COMMON_DEFS += -DMAGIC_ENABLE
TMK_COMMON_SRC += $(COMMON_DIR)/magic.c
endif
+
ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
TMK_COMMON_SRC += $(COMMON_DIR)/mousekey.c
TMK_COMMON_DEFS += -DMOUSEKEY_ENABLE