2021-10-17 21:37:48 +00:00
|
|
|
# Copyright 2021 QMK
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
SPACE_CADET_ENABLE ?= yes
|
|
|
|
GRAVE_ESC_ENABLE ?= yes
|
|
|
|
|
|
|
|
GENERIC_FEATURES = \
|
|
|
|
COMBO \
|
|
|
|
COMMAND \
|
2021-11-15 18:21:09 +00:00
|
|
|
DEFERRED_EXEC \
|
2021-10-17 21:37:48 +00:00
|
|
|
DIGITIZER \
|
|
|
|
DIP_SWITCH \
|
|
|
|
DYNAMIC_KEYMAP \
|
|
|
|
DYNAMIC_MACRO \
|
|
|
|
ENCODER \
|
2022-03-09 08:29:00 +00:00
|
|
|
ENCODER_MAP \
|
2021-10-17 21:37:48 +00:00
|
|
|
GRAVE_ESC \
|
2021-10-18 11:55:44 +00:00
|
|
|
HAPTIC \
|
2021-10-17 21:37:48 +00:00
|
|
|
KEY_LOCK \
|
|
|
|
KEY_OVERRIDE \
|
|
|
|
LEADER \
|
|
|
|
PROGRAMMABLE_BUTTON \
|
2022-04-10 23:43:18 +00:00
|
|
|
SECURE \
|
2021-10-17 21:37:48 +00:00
|
|
|
SPACE_CADET \
|
2021-10-29 10:16:19 +00:00
|
|
|
SWAP_HANDS \
|
2021-10-17 21:37:48 +00:00
|
|
|
TAP_DANCE \
|
|
|
|
VELOCIKEY \
|
|
|
|
WPM \
|
2021-11-25 20:06:50 +00:00
|
|
|
DYNAMIC_TAPPING_TERM \
|
2021-10-17 21:37:48 +00:00
|
|
|
|
|
|
|
define HANDLE_GENERIC_FEATURE
|
|
|
|
# $$(info "Processing: $1_ENABLE $2.c")
|
|
|
|
SRC += $$(wildcard $$(QUANTUM_DIR)/process_keycode/process_$2.c)
|
|
|
|
SRC += $$(wildcard $$(QUANTUM_DIR)/$2.c)
|
|
|
|
OPT_DEFS += -D$1_ENABLE
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach F,$(GENERIC_FEATURES),\
|
|
|
|
$(if $(filter yes, $(strip $($(F)_ENABLE))),\
|
|
|
|
$(eval $(call HANDLE_GENERIC_FEATURE,$(F),$(shell echo $(F) | tr '[:upper:]' '[:lower:]'))) \
|
|
|
|
) \
|
|
|
|
)
|