]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/zinc/keymaps/default/rules.mk
Cleanup rules.mk for 32U4 keyboards, T-Z (#7190)
[qmk_firmware.git] / keyboards / zinc / keymaps / default / rules.mk
1 # Build Options
2 #   change to "no" to disable the options, or define them in the Makefile in
3 #   the appropriate keymap folder that will get included automatically
4 #
5 BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
6 MOUSEKEY_ENABLE = no       # Mouse keys(+4700)
7 EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
8 CONSOLE_ENABLE = no         # Console for debug(+400)
9 COMMAND_ENABLE = no        # Commands for debug and configuration
10 NKRO_ENABLE = no            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11 BACKLIGHT_ENABLE = no      # Enable keyboard backlight functionality
12 MIDI_ENABLE = no            # MIDI controls
13 AUDIO_ENABLE = no           # Audio output on port C6
14 UNICODE_ENABLE = no         # Unicode
15 BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
16 RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
17 SWAP_HANDS_ENABLE = no        # Enable one-hand typing
18
19 define ZINC_CUSTOMISE_MSG
20   $(info Zinc customize)
21   $(info -  LED_BACK_ENABLE=$(LED_BACK_ENABLE))
22   $(info -  LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE))
23   $(info -  LED_ANIMATION=$(LED_ANIMATIONS))
24   $(info -  IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE))
25 endef
26
27 # Zinc keyboard customize
28 LED_BACK_ENABLE = no        # LED backlight (Enable SK6812mini backlight)
29 LED_UNDERGLOW_ENABLE = no   # LED underglow (Enable WS2812 RGB underlight)
30 LED_ANIMATIONS = yes        # LED animations
31 IOS_DEVICE_ENABLE = no      # connect to IOS device (iPad,iPhone)
32 Link_Time_Optimization = no # if firmware size over limit, try this option
33
34 ####  LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE.
35 ####    Do not enable these with audio at the same time.
36
37 ### Zinc keyboard 'default' keymap: convenient command line option
38 ##    make ZINC=<options> zinc:defualt
39 ##    option= back | under | na | ios
40 ##    ex.
41 ##      make ZINC=under    zinc:defualt
42 ##      make ZINC=under,ios zinc:defualt
43 ##      make ZINC=back     zinc:default
44 ##      make ZINC=back,na  zinc:default
45 ##      make ZINC=back,ios zinc:default
46
47 ifneq ($(strip $(ZINC)),)
48   ifeq ($(findstring back,$(ZINC)), back)
49     LED_BACK_ENABLE = yes
50   else ifeq ($(findstring under,$(ZINC)), under)
51     LED_UNDERGLOW_ENABLE = yes
52   endif
53   ifeq ($(findstring na,$(ZINC)), na)
54     LED_ANIMATIONS = no
55   endif
56   ifeq ($(findstring ios,$(ZINC)), ios)
57     IOS_DEVICE_ENABLE = yes
58   endif
59   $(eval $(call ZINC_CUSTOMISE_MSG))
60   $(info )
61 endif
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 ZINC_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 else
73   RGBLIGHT_ENABLE = no
74 endif
75
76 ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
77     OPT_DEFS += -DIOS_DEVICE_ENABLE
78 endif
79
80 ifeq ($(strip $(LED_ANIMATIONS)), yes)
81 #    OPT_DEFS += -DRGBLIGHT_ANIMATIONS
82      OPT_DEFS += -DLED_ANIMATIONS
83
84 endif
85
86 ifeq ($(strip $(Link_Time_Optimization)),yes)
87     EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization
88 endif
89
90 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
91 SLEEP_LED_ENABLE = no    # Breathing sleep LED during USB suspend
92
93
94 # Uncomment these for debugging
95 # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE))
96 # $(info -- OPT_DEFS=$(OPT_DEFS))
97 # $(info )