Skip to content

Commit

Permalink
Merge branch 'feature_supported' into post_keymap_demo
Browse files Browse the repository at this point in the history
  • Loading branch information
vomindoraan committed May 13, 2020
2 parents bc4b8e0 + d6ae54c commit 757ceeb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ ifneq ("$(wildcard $(USER_PATH)/config.h)","")
CONFIG_H += $(USER_PATH)/config.h
endif

# Disable features that a keyboard doesn't support
-include disable_features.mk

# Object files directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
Expand Down
28 changes: 28 additions & 0 deletions disable_features.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Unconditionally disable features that a keyboard advertises it doesn't support

FEATURE_NAMES :=
FEATURE_NAMES += ADAFRUIT_BLE
FEATURE_NAMES += AUDIO
FEATURE_NAMES += BACKLIGHT
FEATURE_NAMES += BLUETOOTH
FEATURE_NAMES += DIP_SWITCH
FEATURE_NAMES += DYNAMIC_KEYMAP
FEATURE_NAMES += ENCODER
FEATURE_NAMES += HAPTIC
FEATURE_NAMES += HD44780
FEATURE_NAMES += IOS_DEVICE
FEATURE_NAMES += LCD_BACKLIGHT
FEATURE_NAMES += LCD
FEATURE_NAMES += OLED
FEATURE_NAMES += PRINTING
FEATURE_NAMES += PS2_MOUSE
FEATURE_NAMES += RGBLIGHT
FEATURE_NAMES += RGB_MATRIX
FEATURE_NAMES += STENO
FEATURE_NAMES += SWAP_HANDS
FEATURE_NAMES += VISUALIZER
FEATURE_NAMES += WATCHDOG
FEATURE_NAMES += XT

$(foreach AFEATURE,$(FEATURE_NAMES),\
$(if $(filter $($(AFEATURE)_SUPPORTED),no),$(eval $(AFEATURE)_ENABLE=no)))
2 changes: 2 additions & 0 deletions keyboards/clueboard/66_hotswap/gen1/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ AUDIO_ENABLE = yes
# project specific files
SRC = led.c
LAYOUTS += 66_ansi

AUDIO_SUPPORTED = no

0 comments on commit 757ceeb

Please sign in to comment.