From 5917a1dcd57263e9d92f1d8baa11d0905ff5cb99 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 3 Sep 2024 17:12:48 +1000 Subject: [PATCH] `generic_features.mk` to automatically pick up nvm repositories --- builddefs/common_features.mk | 8 -------- builddefs/generic_features.mk | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 33bb4d3ac60..e4a630ee158 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -627,9 +627,6 @@ ifeq ($(strip $(VIA_ENABLE)), yes) RAW_ENABLE := yes BOOTMAGIC_ENABLE := yes TRI_LAYER_ENABLE := yes - - QUANTUM_SRC += \ - nvm_via.c endif VALID_CUSTOM_MATRIX_TYPES:= yes lite no @@ -984,8 +981,3 @@ ifeq ($(strip $(UART_DRIVER_REQUIRED)), yes) QUANTUM_LIB_SRC += uart.c endif endif - -DYNAMIC_KEYMAP_ENABLE ?= no -ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes) - QUANTUM_LIB_SRC += nvm_dynamic_keymap.c -endif diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk index dc34a642307..c6b760a9d69 100644 --- a/builddefs/generic_features.mk +++ b/builddefs/generic_features.mk @@ -59,6 +59,7 @@ define HANDLE_GENERIC_FEATURE SRC += $$(wildcard $$(QUANTUM_DIR)/process_keycode/process_$2.c) SRC += $$(wildcard $$(QUANTUM_DIR)/$2/$2.c) SRC += $$(wildcard $$(QUANTUM_DIR)/$2.c) + SRC += $$(wildcard $$(QUANTUM_DIR)/nvm/$(NVM_DRIVER_LOWER)/nvm_$2.c) VPATH += $$(wildcard $$(QUANTUM_DIR)/$2/) OPT_DEFS += -D$1_ENABLE endef