@@ -102,23 +102,25 @@ STENO_PROTOCOL ?= all
102102ifeq ($(strip $(STENO_ENABLE ) ) , yes)
103103 ifeq ($(filter $(STENO_PROTOCOL),$(VALID_STENO_PROTOCOL_TYPES)),)
104104 $(call CATASTROPHIC_ERROR,Invalid STENO_PROTOCOL,STENO_PROTOCOL="$(STENO_PROTOCOL)" is not a valid stenography protocol)
105- else
106- OPT_DEFS += -DSTENO_ENABLE
107- VIRTSER_ENABLE ?= yes
105+ endif
108106
109- ifeq ($(strip $(STENO_PROTOCOL)), geminipr)
110- OPT_DEFS += -DSTENO_ENABLE_GEMINI
111- endif
112- ifeq ($(strip $(STENO_PROTOCOL)), txbolt)
113- OPT_DEFS += -DSTENO_ENABLE_BOLT
114- endif
115- ifeq ($(strip $(STENO_PROTOCOL)), all)
116- OPT_DEFS += -DSTENO_ENABLE_ALL
117- OPT_DEFS += -DSTENO_ENABLE_GEMINI
118- OPT_DEFS += -DSTENO_ENABLE_BOLT
119- endif
107+ ifeq ($(strip $(STENO_PROTOCOL)), all)
108+ override STENO_PROTOCOL := $(filter-out all,$(VALID_STENO_PROTOCOL_TYPES ) )
109+ OPT_DEFS += -DSTENO_ENABLE_ALL
110+ endif
111+
112+ OPT_DEFS += -DNUM_STENO_PROTOCOLS=$(words $(sort $(STENO_PROTOCOL ) ) )
120113
121- SRC += $(QUANTUM_DIR ) /process_keycode/process_steno.c
114+ # for each supported protocol -> add deps
115+ ifneq ($(filter $(STENO_PROTOCOL),geminipr),)
116+ OPT_DEFS += -DSTENO_ENABLE_GEMINI
117+ SRC += $(QUANTUM_DIR ) /steno/steno_gemini.c
118+ VIRTSER_ENABLE ?= yes
119+ endif
120+ ifneq ($(filter $(STENO_PROTOCOL),txbolt),)
121+ OPT_DEFS += -DSTENO_ENABLE_BOLT
122+ SRC += $(QUANTUM_DIR ) /steno/steno_bolt.c
123+ VIRTSER_ENABLE ?= yes
122124 endif
123125endif
124126
0 commit comments