summaryrefslogtreecommitdiff
path: root/builddefs/common_features.mk
diff options
context:
space:
mode:
Diffstat (limited to 'builddefs/common_features.mk')
-rw-r--r--builddefs/common_features.mk58
1 files changed, 23 insertions, 35 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index cb2ab3d778..e597924469 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -64,6 +64,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_DRIVER_PWM
endif
OPT_DEFS += -DAUDIO_ENABLE
+ COMMON_VPATH += $(QUANTUM_PATH)/audio
MUSIC_ENABLE = yes
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
@@ -136,6 +137,7 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
VPATH += $(QUANTUM_DIR)/pointing_device
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_drivers.c
+ SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_auto_mouse.c
ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom)
SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]'))
@@ -512,12 +514,6 @@ ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
endif
-ifeq ($(strip $(PRINTING_ENABLE)), yes)
- OPT_DEFS += -DPRINTING_ENABLE
- SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
- QUANTUM_LIB_SRC += uart.c
-endif
-
VARIABLE_TRACE ?= no
ifneq ($(strip $(VARIABLE_TRACE)),no)
SRC += $(QUANTUM_DIR)/variable_trace.c
@@ -537,11 +533,7 @@ endif
VALID_BACKLIGHT_TYPES := pwm timer software custom
BACKLIGHT_ENABLE ?= no
-ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
- BACKLIGHT_DRIVER ?= software
-else
- BACKLIGHT_DRIVER ?= pwm
-endif
+BACKLIGHT_DRIVER ?= pwm
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid BACKLIGHT_DRIVER,BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
@@ -773,8 +765,10 @@ endif
ifeq ($(strip $(UNICODE_COMMON)), yes)
OPT_DEFS += -DUNICODE_COMMON_ENABLE
+ COMMON_VPATH += $(QUANTUM_DIR)/unicode
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c \
- $(QUANTUM_DIR)/utf8.c
+ $(QUANTUM_DIR)/unicode/unicode.c \
+ $(QUANTUM_DIR)/unicode/utf8.c
endif
MAGIC_ENABLE ?= yes
@@ -805,31 +799,25 @@ ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes)
OPT_DEFS += -DMOUSE_ENABLE
endif
-ifeq ($(strip $(PS2_USE_BUSYWAIT)), yes)
- PS2_ENABLE := yes
- SRC += ps2_busywait.c
- SRC += ps2_io.c
- OPT_DEFS += -DPS2_USE_BUSYWAIT
-endif
+VALID_PS2_DRIVER_TYPES := busywait interrupt usart vendor
-ifeq ($(strip $(PS2_USE_INT)), yes)
- PS2_ENABLE := yes
- SRC += ps2_interrupt.c
- SRC += ps2_io.c
- OPT_DEFS += -DPS2_USE_INT
-endif
+PS2_DRIVER ?= busywait
+ifeq ($(strip $(PS2_ENABLE)), yes)
+ ifeq ($(filter $(PS2_DRIVER),$(VALID_PS2_DRIVER_TYPES)),)
+ $(call CATASTROPHIC_ERROR,Invalid PS2_DRIVER,PS2_DRIVER="$(PS2_DRIVER)" is not a valid PS/2 driver)
+ endif
-ifeq ($(strip $(PS2_USE_USART)), yes)
- PS2_ENABLE := yes
- SRC += ps2_usart.c
- SRC += ps2_io.c
- OPT_DEFS += -DPS2_USE_USART
-endif
+ OPT_DEFS += -DPS2_DRIVER_$(strip $(shell echo $(PS2_DRIVER) | tr '[:lower:]' '[:upper:]'))
-ifeq ($(strip $(PS2_ENABLE)), yes)
COMMON_VPATH += $(DRIVER_PATH)/ps2
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/ps2
OPT_DEFS += -DPS2_ENABLE
+
+ ifneq ($(strip $(PS2_DRIVER)), vendor)
+ SRC += ps2_io.c
+ endif
+
+ SRC += ps2_$(strip $(PS2_DRIVER)).c
endif
JOYSTICK_ENABLE ?= no
@@ -885,17 +873,17 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
OPT_DEFS += -DBLUETOOTH_ENABLE
NO_USB_STARTUP_CHECK := yes
COMMON_VPATH += $(DRIVER_PATH)/bluetooth
- SRC += outputselect.c
+ SRC += outputselect.c bluetooth.c
ifeq ($(strip $(BLUETOOTH_DRIVER)), BluefruitLE)
- OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE
- SRC += analog.c
+ OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE -DHAL_USE_SPI=TRUE
SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp
+ QUANTUM_LIB_SRC += analog.c
QUANTUM_LIB_SRC += spi_master.c
endif
ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42)
- OPT_DEFS += -DBLUETOOTH_RN42
+ OPT_DEFS += -DBLUETOOTH_RN42 -DHAL_USE_SERIAL=TRUE
SRC += $(DRIVER_PATH)/bluetooth/rn42.c
QUANTUM_LIB_SRC += uart.c
endif