aboutsummaryrefslogtreecommitdiff
path: root/common_features.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk37
1 files changed, 26 insertions, 11 deletions
diff --git a/common_features.mk b/common_features.mk
index 8c9d0a90c..2e2991c64 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -223,14 +223,16 @@ VALID_LED_MATRIX_TYPES := IS31FL3731 custom
223 223
224ifeq ($(strip $(LED_MATRIX_ENABLE)), yes) 224ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
225 ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),) 225 ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
226 $(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type) 226 $(error "$(LED_MATRIX_DRIVER)" is not a valid matrix type)
227 else
228 BACKLIGHT_ENABLE = yes
229 BACKLIGHT_DRIVER = custom
230 OPT_DEFS += -DLED_MATRIX_ENABLE
231 SRC += $(QUANTUM_DIR)/led_matrix.c
232 SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
233 endif 227 endif
228 OPT_DEFS += -DLED_MATRIX_ENABLE
229ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
230 # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
231 OPT_DEFS += -DLIB8_ATTINY
232endif
233 SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
234 SRC += $(QUANTUM_DIR)/led_matrix.c
235 SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
234 236
235 ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731) 237 ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
236 OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE 238 OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
@@ -422,10 +424,6 @@ ifeq ($(strip $(TERMINAL_ENABLE)), yes)
422 OPT_DEFS += -DUSER_PRINT 424 OPT_DEFS += -DUSER_PRINT
423endif 425endif
424 426
425ifeq ($(strip $(USB_HID_ENABLE)), yes)
426 include $(TMK_DIR)/protocol/usb_hid.mk
427endif
428
429ifeq ($(strip $(WPM_ENABLE)), yes) 427ifeq ($(strip $(WPM_ENABLE)), yes)
430 SRC += $(QUANTUM_DIR)/wpm.c 428 SRC += $(QUANTUM_DIR)/wpm.c
431 OPT_DEFS += -DWPM_ENABLE 429 OPT_DEFS += -DWPM_ENABLE
@@ -459,6 +457,23 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
459 SRC += $(QUANTUM_DIR)/dip_switch.c 457 SRC += $(QUANTUM_DIR)/dip_switch.c
460endif 458endif
461 459
460VALID_MAGIC_TYPES := yes full lite
461BOOTMAGIC_ENABLE ?= no
462ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
463 ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
464 $(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
465 endif
466 ifeq ($(strip $(BOOTMAGIC_ENABLE)), lite)
467 OPT_DEFS += -DBOOTMAGIC_LITE
468 QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
469 else
470 OPT_DEFS += -DBOOTMAGIC_ENABLE
471 QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_full.c
472 endif
473endif
474COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
475QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c
476
462VALID_CUSTOM_MATRIX_TYPES:= yes lite no 477VALID_CUSTOM_MATRIX_TYPES:= yes lite no
463 478
464CUSTOM_MATRIX ?= no 479CUSTOM_MATRIX ?= no