2
0

rules.mk 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. define ZINC_CUSTOMISE_MSG
  19. $(info Zinc customize)
  20. $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE))
  21. $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE))
  22. $(info - LED_ANIMATION=$(LED_ANIMATIONS))
  23. $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE))
  24. endef
  25. # Zinc keyboard customize
  26. LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight)
  27. LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight)
  28. LED_ANIMATIONS = yes # LED animations
  29. IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
  30. Link_Time_Optimization = no # if firmware size over limit, try this option
  31. #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE.
  32. #### Do not enable these with audio at the same time.
  33. ### Zinc keyboard 'default' keymap: convenient command line option
  34. ## make ZINC=<options> zinc:defualt
  35. ## option= back | under | na | ios
  36. ## ex.
  37. ## make ZINC=under zinc:defualt
  38. ## make ZINC=under,ios zinc:defualt
  39. ## make ZINC=back zinc:default
  40. ## make ZINC=back,na zinc:default
  41. ## make ZINC=back,ios zinc:default
  42. ifneq ($(strip $(ZINC)),)
  43. ifeq ($(findstring back,$(ZINC)), back)
  44. LED_BACK_ENABLE = yes
  45. else ifeq ($(findstring under,$(ZINC)), under)
  46. LED_UNDERGLOW_ENABLE = yes
  47. endif
  48. ifeq ($(findstring na,$(ZINC)), na)
  49. LED_ANIMATIONS = no
  50. endif
  51. ifeq ($(findstring ios,$(ZINC)), ios)
  52. IOS_DEVICE_ENABLE = yes
  53. endif
  54. $(eval $(call ZINC_CUSTOMISE_MSG))
  55. $(info )
  56. endif
  57. ifeq ($(strip $(LED_BACK_ENABLE)), yes)
  58. RGBLIGHT_ENABLE = yes
  59. OPT_DEFS += -DRGBLED_BACK
  60. ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
  61. $(eval $(call ZINC_CUSTOMISE_MSG))
  62. $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes')
  63. endif
  64. else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
  65. RGBLIGHT_ENABLE = yes
  66. else
  67. RGBLIGHT_ENABLE = no
  68. endif
  69. ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
  70. OPT_DEFS += -DIOS_DEVICE_ENABLE
  71. endif
  72. ifeq ($(strip $(LED_ANIMATIONS)), yes)
  73. # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
  74. OPT_DEFS += -DLED_ANIMATIONS
  75. endif
  76. ifeq ($(strip $(Link_Time_Optimization)),yes)
  77. EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization
  78. endif
  79. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
  80. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
  81. # Uncomment these for debugging
  82. # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE))
  83. # $(info -- OPT_DEFS=$(OPT_DEFS))
  84. # $(info )