aboutsummaryrefslogtreecommitdiff
path: root/builddefs/show_options.mk
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-10-28 01:07:53 +0100
committerGitHub <noreply@github.com>2021-10-28 01:07:53 +0100
commitb780c797beb726839e99e3f4054f9b4c33331cdc (patch)
tree019aed772e8204149727afb0841f9043a7084eda /builddefs/show_options.mk
parent6c507afcf212165dd5f3c3f6c026b517295c5090 (diff)
downloadqmk_firmware-b780c797beb726839e99e3f4054f9b4c33331cdc.tar.gz
qmk_firmware-b780c797beb726839e99e3f4054f9b4c33331cdc.zip
Migrate makefile utilities to sub-directory (#14917)
Diffstat (limited to 'builddefs/show_options.mk')
-rw-r--r--builddefs/show_options.mk147
1 files changed, 147 insertions, 0 deletions
diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk
new file mode 100644
index 000000000..ee60597e1
--- /dev/null
+++ b/builddefs/show_options.mk
@@ -0,0 +1,147 @@
1BUILD_OPTION_NAMES = \
2 BOOTMAGIC_ENABLE \
3 MOUSEKEY_ENABLE \
4 EXTRAKEY_ENABLE \
5 CONSOLE_ENABLE \
6 COMMAND_ENABLE \
7 NKRO_ENABLE \
8 TERMINAL_ENABLE \
9 CUSTOM_MATRIX \
10 DEBOUNCE_TYPE \
11 SPLIT_KEYBOARD \
12 DYNAMIC_KEYMAP_ENABLE \
13 USB_HID_ENABLE \
14 VIA_ENABLE
15
16HARDWARE_OPTION_NAMES = \
17 SLEEP_LED_ENABLE \
18 BACKLIGHT_ENABLE \
19 BACKLIGHT_DRIVER \
20 RGBLIGHT_ENABLE \
21 RGBLIGHT_CUSTOM_DRIVER \
22 RGB_MATRIX_ENABLE \
23 RGB_MATRIX_DRIVER \
24 CIE1931_CURVE \
25 MIDI_ENABLE \
26 BLUETOOTH_ENABLE \
27 BLUETOOTH_DRIVER \
28 AUDIO_ENABLE \
29 HD44780_ENABLE \
30 ENCODER_ENABLE \
31 LED_TABLES \
32 POINTING_DEVICE_ENABLE \
33 DIP_SWITCH_ENABLE
34
35OTHER_OPTION_NAMES = \
36 UNICODE_ENABLE \
37 UCIS_ENABLE \
38 UNICODEMAP_ENABLE \
39 UNICODE_COMMON \
40 AUTO_SHIFT_ENABLE \
41 AUTO_SHIFT_MODIFIERS \
42 COMBO_ENABLE \
43 KEY_LOCK_ENABLE \
44 KEY_OVERRIDE_ENABLE \
45 LEADER_ENABLE \
46 PRINTING_ENABLE \
47 STENO_ENABLE \
48 TAP_DANCE_ENABLE \
49 VIRTSER_ENABLE \
50 OLED_ENABLE \
51 OLED_DRIVER \
52 LED_BACK_ENABLE \
53 LED_UNDERGLOW_ENABLE \
54 LED_ANIMATIONS \
55 IOS_DEVICE_ENABLE \
56 HELIX ZINC \
57 AUTOLOG_ENABLE \
58 DEBUG_ENABLE \
59 ENCODER_ENABLE_CUSTOM \
60 GERMAN_ENABLE \
61 HAPTIC_ENABLE \
62 HHKB_RN42_ENABLE \
63 ISSI_ENABLE \
64 KEYLOGGER_ENABLE \
65 LCD_BACKLIGHT_ENABLE \
66 MACROS_ENABLED \
67 PS2_MOUSE_ENABLE \
68 RAW_ENABLE \
69 SWAP_HANDS_ENABLE \
70 RING_BUFFERED_6KRO_REPORT_ENABLE \
71 WATCHDOG_ENABLE \
72 ERGOINU \
73 NO_USB_STARTUP_CHECK \
74 DISABLE_PROMICRO_LEDs \
75 MITOSIS_DATAGROK_BOTTOMSPACE \
76 MITOSIS_DATAGROK_SLOWUART \
77 RGB_MATRIX_KEYPRESSES \
78 LED_MIRRORED \
79 RGBLIGHT_FULL_POWER \
80 LTO_ENABLE \
81 PROGRAMMABLE_BUTTON_ENABLE
82
83define NAME_ECHO
84 @printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)"
85
86endef
87
88define YAML_NAME_ECHO
89 @echo ' $1 : "$(strip $($1))"'
90
91endef
92
93.PHONY: show_build_options0 show_build_options
94show_build_options0:
95 @echo " KEYBOARD = $(KEYBOARD)"
96 @echo " KEYMAP = $(KEYMAP)"
97 @echo " MCU = $(MCU)"
98 @echo " MCU_SERIES = $(MCU_SERIES)"
99 @echo " PLATFORM = $(PLATFORM)"
100 @echo " BOOTLOADER = $(BOOTLOADER)"
101 @echo " FIRMWARE_FORMAT = $(FIRMWARE_FORMAT)"
102 @echo
103 @echo "Build Options:"
104 $(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\
105 $(call NAME_ECHO,$(A_OPTION_NAME)))
106
107show_build_options: show_build_options0
108 @echo
109 @echo "If you want to know more, please try 'show_all_features' or 'show_full_features'"
110 @echo
111
112.PHONY: show_all_features
113show_all_features: show_build_options0
114 @echo
115 @echo "Hardware Options:"
116 $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\
117 $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME))))
118 @echo
119 @echo "Other Options:"
120 $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\
121 $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME))))
122
123.PHONY: show_full_features
124show_full_features: show_build_options0
125 @echo
126 @echo "Hardware Options:"
127 $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\
128 $(call NAME_ECHO,$(A_OPTION_NAME)))
129 @echo
130 @echo "Other Options:"
131 $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\
132 $(call NAME_ECHO,$(A_OPTION_NAME)))
133
134.PHONY: yaml_build_options
135yaml_build_options:
136 @echo '- KEYBOARD : "$(KEYBOARD)"'
137 @echo ' KEYMAP : "$(KEYMAP)"'
138 @echo ' MCU : "$(MCU)"'
139 @echo ' MCU_SERIES : "$(MCU_SERIES)"'
140 @echo ' PLATFORM : "$(PLATFORM)"'
141 @echo ' FIRMWARE_FORMAT : "$(FIRMWARE_FORMAT)"'
142 $(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\
143 $(call YAML_NAME_ECHO,$(A_OPTION_NAME)))
144 $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\
145 $(if $($(A_OPTION_NAME)),$(call YAML_NAME_ECHO,$(A_OPTION_NAME))))
146 $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\
147 $(if $($(A_OPTION_NAME)),$(call YAML_NAME_ECHO,$(A_OPTION_NAME))))