aboutsummaryrefslogtreecommitdiff
path: root/common_features.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk40
1 files changed, 28 insertions, 12 deletions
diff --git a/common_features.mk b/common_features.mk
index 8c9d0a90c..5a1231de4 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -223,14 +223,17 @@ 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
236 CIE1931_CURVE := yes
234 237
235 ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731) 238 ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
236 OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE 239 OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
@@ -422,10 +425,6 @@ ifeq ($(strip $(TERMINAL_ENABLE)), yes)
422 OPT_DEFS += -DUSER_PRINT 425 OPT_DEFS += -DUSER_PRINT
423endif 426endif
424 427
425ifeq ($(strip $(USB_HID_ENABLE)), yes)
426 include $(TMK_DIR)/protocol/usb_hid.mk
427endif
428
429ifeq ($(strip $(WPM_ENABLE)), yes) 428ifeq ($(strip $(WPM_ENABLE)), yes)
430 SRC += $(QUANTUM_DIR)/wpm.c 429 SRC += $(QUANTUM_DIR)/wpm.c
431 OPT_DEFS += -DWPM_ENABLE 430 OPT_DEFS += -DWPM_ENABLE
@@ -459,6 +458,23 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
459 SRC += $(QUANTUM_DIR)/dip_switch.c 458 SRC += $(QUANTUM_DIR)/dip_switch.c
460endif 459endif
461 460
461VALID_MAGIC_TYPES := yes full lite
462BOOTMAGIC_ENABLE ?= no
463ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
464 ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
465 $(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
466 endif
467 ifneq ($(strip $(BOOTMAGIC_ENABLE)), full)
468 OPT_DEFS += -DBOOTMAGIC_LITE
469 QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
470 else
471 OPT_DEFS += -DBOOTMAGIC_ENABLE
472 QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_full.c
473 endif
474endif
475COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
476QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c
477
462VALID_CUSTOM_MATRIX_TYPES:= yes lite no 478VALID_CUSTOM_MATRIX_TYPES:= yes lite no
463 479
464CUSTOM_MATRIX ?= no 480CUSTOM_MATRIX ?= no
@@ -673,4 +689,4 @@ ifeq ($(strip $(USBPD_ENABLE)), yes)
673 # Board designers can add their own driver to $(SRC) 689 # Board designers can add their own driver to $(SRC)
674 endif 690 endif
675 endif 691 endif
676endif \ No newline at end of file 692endif