summaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/common_features.mk25
-rw-r--r--builddefs/show_options.mk1
2 files changed, 23 insertions, 3 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 83505596d2..b9ee0a30a7 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -92,10 +92,29 @@ 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)
- OPT_DEFS += -DSTENO_ENABLE
- VIRTSER_ENABLE ?= yes
- SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
+ ifeq ($(filter $(STENO_PROTOCOL),$(VALID_STENO_PROTOCOL_TYPES)),)
+ $(call CATASTROPHIC_ERROR,Invalid STENO_PROTOCOL,STENO_PROTOCOL="$(STENO_PROTOCOL)" is not a valid stenography protocol)
+ else
+ OPT_DEFS += -DSTENO_ENABLE
+ VIRTSER_ENABLE ?= yes
+
+ ifeq ($(strip $(STENO_PROTOCOL)), geminipr)
+ OPT_DEFS += -DSTENO_ENABLE_GEMINI
+ endif
+ ifeq ($(strip $(STENO_PROTOCOL)), txbolt)
+ OPT_DEFS += -DSTENO_ENABLE_BOLT
+ endif
+ ifeq ($(strip $(STENO_PROTOCOL)), all)
+ OPT_DEFS += -DSTENO_ENABLE_ALL
+ OPT_DEFS += -DSTENO_ENABLE_GEMINI
+ OPT_DEFS += -DSTENO_ENABLE_BOLT
+ endif
+
+ SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
+ endif
endif
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk
index 1c1c189f27..98537e6da2 100644
--- a/builddefs/show_options.mk
+++ b/builddefs/show_options.mk
@@ -45,6 +45,7 @@ OTHER_OPTION_NAMES = \
LEADER_ENABLE \
PRINTING_ENABLE \
STENO_ENABLE \
+ STENO_PROTOCOL \
TAP_DANCE_ENABLE \
VIRTSER_ENABLE \
OLED_ENABLE \