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 = \
|
2022-09-17 07:50:54 +00:00
|
|
|
AUTOCORRECT \
|
2022-05-14 06:00:32 +00:00
|
|
|
CAPS_WORD \
|
2021-10-17 21:37:48 +00:00
|
|
|
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 \
|
|
|
|
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 \
|
2023-05-20 12:35:06 +00:00
|
|
|
REPEAT_KEY \
|
2022-04-16 18:13:05 +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 \
|
|
|
|
WPM \
|
2021-11-25 20:06:50 +00:00
|
|
|
DYNAMIC_TAPPING_TERM \
|
2023-02-11 23:23:07 +00:00
|
|
|
TRI_LAYER
|
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:]'))) \
|
|
|
|
) \
|
|
|
|
)
|