2021-10-17 22:37:48 +01: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/>.
|
|
|
|
|
|
|
|
GRAVE_ESC_ENABLE ?= yes
|
2023-11-09 02:01:44 +00:00
|
|
|
MAGIC_ENABLE ?= yes
|
|
|
|
SEND_STRING_ENABLE ?= yes
|
|
|
|
SPACE_CADET_ENABLE ?= yes
|
2021-10-17 22:37:48 +01:00
|
|
|
|
|
|
|
GENERIC_FEATURES = \
|
2023-11-09 02:01:44 +00:00
|
|
|
AUTO_SHIFT \
|
2022-09-17 00:50:54 -07:00
|
|
|
AUTOCORRECT \
|
2022-05-13 23:00:32 -07:00
|
|
|
CAPS_WORD \
|
2021-10-17 22:37:48 +01:00
|
|
|
COMBO \
|
|
|
|
COMMAND \
|
2023-11-09 02:01:44 +00:00
|
|
|
CRC \
|
2021-11-16 05:21:09 +11:00
|
|
|
DEFERRED_EXEC \
|
2021-10-17 22:37:48 +01:00
|
|
|
DIGITIZER \
|
|
|
|
DIP_SWITCH \
|
|
|
|
DYNAMIC_KEYMAP \
|
|
|
|
DYNAMIC_MACRO \
|
2023-11-09 02:01:44 +00:00
|
|
|
DYNAMIC_TAPPING_TERM \
|
2021-10-17 22:37:48 +01:00
|
|
|
GRAVE_ESC \
|
2021-10-18 12:55:44 +01:00
|
|
|
HAPTIC \
|
2021-10-17 22:37:48 +01:00
|
|
|
KEY_LOCK \
|
|
|
|
KEY_OVERRIDE \
|
|
|
|
LEADER \
|
2023-11-09 02:01:44 +00:00
|
|
|
MAGIC \
|
|
|
|
MOUSEKEY \
|
|
|
|
MUSIC \
|
|
|
|
OS_DETECTION \
|
2021-10-17 22:37:48 +01:00
|
|
|
PROGRAMMABLE_BUTTON \
|
2023-05-20 05:35:06 -07:00
|
|
|
REPEAT_KEY \
|
2022-04-16 19:13:05 +01:00
|
|
|
SECURE \
|
2023-11-09 02:01:44 +00:00
|
|
|
SEND_STRING \
|
|
|
|
SEQUENCER \
|
2021-10-17 22:37:48 +01:00
|
|
|
SPACE_CADET \
|
2021-10-29 11:16:19 +01:00
|
|
|
SWAP_HANDS \
|
2021-10-17 22:37:48 +01:00
|
|
|
TAP_DANCE \
|
2023-11-09 02:01:44 +00:00
|
|
|
TRI_LAYER \
|
|
|
|
VIA \
|
|
|
|
VIRTSER \
|
2021-10-17 22:37:48 +01:00
|
|
|
WPM \
|
|
|
|
|
|
|
|
define HANDLE_GENERIC_FEATURE
|
|
|
|
# $$(info "Processing: $1_ENABLE $2.c")
|
|
|
|
SRC += $$(wildcard $$(QUANTUM_DIR)/process_keycode/process_$2.c)
|
2023-11-04 20:33:52 +00:00
|
|
|
SRC += $$(wildcard $$(QUANTUM_DIR)/$2/$2.c)
|
2021-10-17 22:37:48 +01:00
|
|
|
SRC += $$(wildcard $$(QUANTUM_DIR)/$2.c)
|
2023-11-04 20:33:52 +00:00
|
|
|
VPATH += $$(wildcard $$(QUANTUM_DIR)/$2/)
|
2021-10-17 22:37:48 +01:00
|
|
|
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:]'))) \
|
|
|
|
) \
|
|
|
|
)
|