diff options
Diffstat (limited to 'keyboards/helix/rev2/local_features.mk')
-rw-r--r-- | keyboards/helix/rev2/local_features.mk | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/keyboards/helix/rev2/local_features.mk b/keyboards/helix/rev2/local_features.mk new file mode 100644 index 000000000..0f4285eea --- /dev/null +++ b/keyboards/helix/rev2/local_features.mk | |||
@@ -0,0 +1,98 @@ | |||
1 | # | ||
2 | # local_features.mk contains post-processing rules for the Helix keyboard. | ||
3 | # | ||
4 | # Post-processing rules convert keyboard-specific shortcuts (that represent | ||
5 | # combinations of standard options) into QMK standard options. | ||
6 | # | ||
7 | |||
8 | define HELIX_CUSTOMISE_MSG | ||
9 | $(info Helix Spacific Build Options) | ||
10 | $(info - OLED_ENABLE = $(OLED_ENABLE)) | ||
11 | $(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE)) | ||
12 | $(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE)) | ||
13 | $(info - LED_ANIMATION = $(LED_ANIMATIONS)) | ||
14 | $(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE)) | ||
15 | $(info ) | ||
16 | endef | ||
17 | |||
18 | ifneq ($(strip $(HELIX)),) | ||
19 | ### Helix keyboard keymap: convenient command line option | ||
20 | ## make HELIX=<options> helix:<keymap> | ||
21 | ## option= oled | back | under | na | ios | ||
22 | ## ex. | ||
23 | ## make HELIX=oled helix:<keymap> | ||
24 | ## make HELIX=oled,back helix:<keymap> | ||
25 | ## make HELIX=oled,under helix:<keymap> | ||
26 | ## make HELIX=oled,back,na helix:<keymap> | ||
27 | ## make HELIX=oled,back,ios helix:<keymap> | ||
28 | ## | ||
29 | ifeq ($(findstring oled,$(HELIX)), oled) | ||
30 | OLED_ENABLE = yes | ||
31 | endif | ||
32 | ifeq ($(findstring back,$(HELIX)), back) | ||
33 | LED_BACK_ENABLE = yes | ||
34 | else ifeq ($(findstring under,$(HELIX)), under) | ||
35 | LED_UNDERGLOW_ENABLE = yes | ||
36 | endif | ||
37 | ifeq ($(findstring na,$(HELIX)), na) | ||
38 | LED_ANIMATIONS = no | ||
39 | endif | ||
40 | ifeq ($(findstring no_ani,$(HELIX)), no_ani) | ||
41 | LED_ANIMATIONS = no | ||
42 | endif | ||
43 | ifeq ($(findstring ios,$(HELIX)), ios) | ||
44 | IOS_DEVICE_ENABLE = yes | ||
45 | endif | ||
46 | ifeq ($(findstring verbose,$(HELIX)), verbose) | ||
47 | SHOW_VERBOSE_INFO = yes | ||
48 | endif | ||
49 | SHOW_HELIX_OPTIONS = yes | ||
50 | endif | ||
51 | |||
52 | ######## | ||
53 | # convert Helix-specific options (that represent combinations of standard options) | ||
54 | # into QMK standard options. | ||
55 | |||
56 | ifneq ($(strip $(HELIX_ROWS)), 4) | ||
57 | ifneq ($(strip $(HELIX_ROWS)), 5) | ||
58 | $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) | ||
59 | endif | ||
60 | endif | ||
61 | OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) | ||
62 | |||
63 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) | ||
64 | RGBLIGHT_ENABLE = yes | ||
65 | OPT_DEFS += -DRGBLED_BACK | ||
66 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | ||
67 | $(eval $(call HELIX_CUSTOMISE_MSG)) | ||
68 | $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') | ||
69 | endif | ||
70 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | ||
71 | RGBLIGHT_ENABLE = yes | ||
72 | endif | ||
73 | |||
74 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) | ||
75 | OPT_DEFS += -DIOS_DEVICE_ENABLE | ||
76 | endif | ||
77 | |||
78 | ifeq ($(strip $(LED_ANIMATIONS)), yes) | ||
79 | OPT_DEFS += -DLED_ANIMATIONS | ||
80 | endif | ||
81 | |||
82 | ifeq ($(strip $(OLED_ENABLE)), yes) | ||
83 | OPT_DEFS += -DOLED_ENABLE | ||
84 | endif | ||
85 | |||
86 | ifeq ($(strip $(LOCAL_GLCDFONT)), yes) | ||
87 | OPT_DEFS += -DLOCAL_GLCDFONT | ||
88 | endif | ||
89 | |||
90 | ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) | ||
91 | $(eval $(call HELIX_CUSTOMISE_MSG)) | ||
92 | ifneq ($(strip $(SHOW_VERBOSE_INFO)),) | ||
93 | $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE)) | ||
94 | $(info -- OPT_DEFS = $(OPT_DEFS)) | ||
95 | $(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE)) | ||
96 | $(info ) | ||
97 | endif | ||
98 | endif | ||