summaryrefslogtreecommitdiffstats
path: root/builddefs
diff options
context:
space:
mode:
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/build_keyboard.mk8
-rw-r--r--builddefs/common_features.mk18
-rw-r--r--builddefs/converters.mk11
3 files changed, 23 insertions, 14 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk
index 5fd61a96ce..91c9541be5 100644
--- a/builddefs/build_keyboard.mk
+++ b/builddefs/build_keyboard.mk
@@ -446,6 +446,14 @@ $(eval $(call add_qmk_prefix_defs,MCU_FAMILY,MCU_FAMILY))
$(eval $(call add_qmk_prefix_defs,MCU_SERIES,MCU_SERIES))
$(eval $(call add_qmk_prefix_defs,BOARD,BOARD))
+# Control whether intermediate file listings are generated
+# e.g.:
+# make handwired/onekey/blackpill_f411:default KEEP_INTERMEDIATES=yes
+# cat .build/obj_handwired_onekey_blackpill_f411_default/quantum/quantum.i | sed -e 's@^#.*@@g' -e 's@^\s*//.*@@g' -e '/^\s*$/d' | clang-format
+ifeq ($(strip $(KEEP_INTERMEDIATES)), yes)
+ OPT_DEFS += -save-temps=obj
+endif
+
# TODO: remove this bodge?
PROJECT_DEFS := $(OPT_DEFS)
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 0880934e95..dc64ed2394 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -134,7 +134,7 @@ ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/mousekey.c
endif
-VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3360 pmw3389 pimoroni_trackball custom
+VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3320 pmw3360 pmw3389 pimoroni_trackball custom
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
ifeq ($(filter $(POINTING_DEVICE_DRIVER),$(VALID_POINTING_DEVICE_DRIVER_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid POINTING_DEVICE_DRIVER,POINTING_DEVICE_DRIVER="$(POINTING_DEVICE_DRIVER)" is not a valid pointing device type)
@@ -574,7 +574,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
endif
endif
-VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c vendor
+VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor
WS2812_DRIVER ?= bitbang
ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
@@ -584,15 +584,11 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
OPT_DEFS += -DWS2812_DRIVER_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
- ifeq ($(strip $(WS2812_DRIVER)), bitbang)
- SRC += ws2812.c
- else
- SRC += ws2812_$(strip $(WS2812_DRIVER)).c
+ SRC += ws2812_$(strip $(WS2812_DRIVER)).c
- ifeq ($(strip $(PLATFORM)), CHIBIOS)
- ifeq ($(strip $(WS2812_DRIVER)), pwm)
- OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
- endif
+ ifeq ($(strip $(PLATFORM)), CHIBIOS)
+ ifeq ($(strip $(WS2812_DRIVER)), pwm)
+ OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
endif
endif
@@ -813,9 +809,9 @@ endif
ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes)
PS2_ENABLE := yes
+ MOUSE_ENABLE := yes
SRC += ps2_mouse.c
OPT_DEFS += -DPS2_MOUSE_ENABLE
- OPT_DEFS += -DMOUSE_ENABLE
endif
VALID_PS2_DRIVER_TYPES := busywait interrupt usart vendor
diff --git a/builddefs/converters.mk b/builddefs/converters.mk
index 17b1c3b6ee..a3548afd60 100644
--- a/builddefs/converters.mk
+++ b/builddefs/converters.mk
@@ -7,7 +7,12 @@ endif
# TODO: opt in rather than assume everything uses a pro micro
PIN_COMPATIBLE ?= promicro
+
+# Remove whitespace from any rule.mk provided vars
+# - env cannot be overwritten but cannot have whitespace anyway
+CONVERT_TO:=$(strip $(CONVERT_TO))
ifneq ($(CONVERT_TO),)
+
# stash so we can overwrite env provided vars if needed
ACTIVE_CONVERTER=$(CONVERT_TO)
@@ -23,13 +28,13 @@ ifneq ($(CONVERT_TO),)
TARGET := $(TARGET)_$(CONVERT_TO)
# Configure any defaults
- OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]'))
- OPT_DEFS += -DCONVERTER_TARGET=\"$(strip $(CONVERT_TO))\"
+ OPT_DEFS += -DCONVERT_TO_$(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]')
+ OPT_DEFS += -DCONVERTER_TARGET=\"$(CONVERT_TO)\"
OPT_DEFS += -DCONVERTER_ENABLED
VPATH += $(CONVERTER)
# Configure for "alias" - worst case it produces an idential define
- OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(ACTIVE_CONVERTER) | tr '[:lower:]' '[:upper:]'))
+ OPT_DEFS += -DCONVERT_TO_$(shell echo $(ACTIVE_CONVERTER) | tr '[:lower:]' '[:upper:]')
# Finally run any converter specific logic
include $(CONVERTER)/converter.mk