aboutsummaryrefslogtreecommitdiffstats
path: root/builddefs/common_features.mk
diff options
context:
space:
mode:
authorJoel Challis2023-11-09 03:01:44 +0100
committerGitHub2023-11-09 03:01:44 +0100
commit147865cf57feaf9dfb59aeeffa8b1d541c064d93 (patch)
treedb1ac7a65897d8a858dd3c58040b7e516cc5d997 /builddefs/common_features.mk
parent4e577cbbea4c9cb63b9d4e352262ab8dbfb7eead (diff)
Migrate some common features to generic (#22403)
Diffstat (limited to 'builddefs/common_features.mk')
-rw-r--r--builddefs/common_features.mk72
1 files changed, 12 insertions, 60 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 84a0300579..b6f888d30d 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -75,10 +75,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
endif
ifeq ($(strip $(SEQUENCER_ENABLE)), yes)
- OPT_DEFS += -DSEQUENCER_ENABLE
MUSIC_ENABLE = yes
- SRC += $(QUANTUM_DIR)/sequencer/sequencer.c
- SRC += $(QUANTUM_DIR)/process_keycode/process_sequencer.c
endif
ifeq ($(strip $(MIDI_ENABLE)), yes)
@@ -94,11 +91,6 @@ ifeq ($(strip $(MIDI_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
endif
-MUSIC_ENABLE ?= no
-ifeq ($(MUSIC_ENABLE), yes)
- SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
-endif
-
VALID_STENO_PROTOCOL_TYPES := geminipr txbolt all
STENO_PROTOCOL ?= all
ifeq ($(strip $(STENO_ENABLE)), yes)
@@ -124,14 +116,8 @@ ifeq ($(strip $(STENO_ENABLE)), yes)
endif
endif
-ifeq ($(strip $(VIRTSER_ENABLE)), yes)
- OPT_DEFS += -DVIRTSER_ENABLE
-endif
-
ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
- OPT_DEFS += -DMOUSEKEY_ENABLE
MOUSE_ENABLE := yes
- SRC += $(QUANTUM_DIR)/mousekey.c
endif
VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3320 pmw3360 pmw3389 pimoroni_trackball custom
@@ -360,10 +346,7 @@ ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
endif
OPT_DEFS += -DLED_MATRIX_ENABLE
OPT_DEFS += -DLED_MATRIX_$(strip $(shell echo $(LED_MATRIX_DRIVER) | tr '[:lower:]' '[:upper:]'))
-ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
- # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
- OPT_DEFS += -DLIB8_ATTINY
-endif
+
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners
@@ -371,7 +354,7 @@ endif
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
SRC += $(QUANTUM_DIR)/led_matrix/led_matrix.c
SRC += $(QUANTUM_DIR)/led_matrix/led_matrix_drivers.c
- SRC += $(LIB_PATH)/lib8tion/lib8tion.c
+ LIB8TION_ENABLE := yes
CIE1931_CURVE := yes
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3218)
@@ -463,10 +446,7 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
endif
OPT_DEFS += -DRGB_MATRIX_ENABLE
OPT_DEFS += -DRGB_MATRIX_$(strip $(shell echo $(RGB_MATRIX_DRIVER) | tr '[:lower:]' '[:upper:]'))
-ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
- # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
- OPT_DEFS += -DLIB8_ATTINY
-endif
+
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
@@ -474,7 +454,7 @@ endif
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c
- SRC += $(LIB_PATH)/lib8tion/lib8tion.c
+ LIB8TION_ENABLE := yes
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
@@ -632,8 +612,6 @@ ifeq ($(strip $(VIA_ENABLE)), yes)
RAW_ENABLE := yes
BOOTMAGIC_ENABLE := yes
TRI_LAYER_ENABLE := yes
- SRC += $(QUANTUM_DIR)/via.c
- OPT_DEFS += -DVIA_ENABLE
endif
VALID_MAGIC_TYPES := yes
@@ -718,17 +696,20 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif
-ifeq ($(strip $(CRC_ENABLE)), yes)
- OPT_DEFS += -DCRC_ENABLE
- SRC += crc.c
-endif
-
ifeq ($(strip $(FNV_ENABLE)), yes)
OPT_DEFS += -DFNV_ENABLE
VPATH += $(LIB_PATH)/fnv
SRC += qmk_fnv_type_validation.c hash_32a.c hash_64a.c
endif
+ifeq ($(strip $(LIB8TION_ENABLE)), yes)
+ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
+ # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
+ OPT_DEFS += -DLIB8_ATTINY
+ endif
+ SRC += $(LIB_PATH)/lib8tion/lib8tion.c
+endif
+
VALID_HAPTIC_DRIVER_TYPES := drv2605l solenoid
ifeq ($(strip $(HAPTIC_ENABLE)),yes)
ifeq ($(filter $(HAPTIC_DRIVER),$(VALID_HAPTIC_DRIVER_TYPES)),)
@@ -819,27 +800,6 @@ ifeq ($(strip $(UNICODE_COMMON)), yes)
$(QUANTUM_DIR)/unicode/utf8.c
endif
-MAGIC_ENABLE ?= yes
-ifeq ($(strip $(MAGIC_ENABLE)), yes)
- SRC += $(QUANTUM_DIR)/process_keycode/process_magic.c
- OPT_DEFS += -DMAGIC_KEYCODE_ENABLE
-endif
-
-SEND_STRING_ENABLE ?= yes
-ifeq ($(strip $(SEND_STRING_ENABLE)), yes)
- OPT_DEFS += -DSEND_STRING_ENABLE
- COMMON_VPATH += $(QUANTUM_DIR)/send_string
- SRC += $(QUANTUM_DIR)/send_string/send_string.c
-endif
-
-ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
- SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
- OPT_DEFS += -DAUTO_SHIFT_ENABLE
- ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
- OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
- endif
-endif
-
ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes)
PS2_ENABLE := yes
MOUSE_ENABLE := yes
@@ -946,14 +906,6 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
endif
endif
-ifeq ($(strip $(OS_DETECTION_ENABLE)), yes)
- SRC += $(QUANTUM_DIR)/os_detection.c
- OPT_DEFS += -DOS_DETECTION_ENABLE
- ifeq ($(strip $(OS_DETECTION_DEBUG_ENABLE)), yes)
- OPT_DEFS += -DOS_DETECTION_DEBUG_ENABLE
- endif
-endif
-
VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor
WS2812_DRIVER ?= bitbang