rules.mk 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # Build Options
  2. # change yes to no to disable
  3. #
  4. BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
  5. MOUSEKEY_ENABLE = no # Mouse keys
  6. EXTRAKEY_ENABLE = yes # Audio control and System control
  7. CONSOLE_ENABLE = no # Console for debug
  8. COMMAND_ENABLE = no # Commands for debug and configuration
  9. NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
  10. BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
  11. MIDI_ENABLE = no # MIDI controls
  12. AUDIO_ENABLE = no # Audio output on port C6
  13. UNICODE_ENABLE = no # Unicode
  14. BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
  15. RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
  16. SWAP_HANDS_ENABLE = no # Enable one-hand typing
  17. define ZINC_CUSTOMISE_MSG
  18. $(info Zinc customize)
  19. $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE))
  20. $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE))
  21. $(info - LED_ANIMATION=$(LED_ANIMATIONS))
  22. $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE))
  23. endef
  24. # Zinc keyboard customize
  25. LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight)
  26. LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight)
  27. LED_ANIMATIONS = yes # LED animations
  28. IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
  29. Link_Time_Optimization = no # if firmware size over limit, try this option
  30. #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE.
  31. #### Do not enable these with audio at the same time.
  32. ### Zinc keyboard 'default' keymap: convenient command line option
  33. ## make ZINC=<options> zinc:defualt
  34. ## option= back | under | na | ios
  35. ## ex.
  36. ## make ZINC=under zinc:defualt
  37. ## make ZINC=under,ios zinc:defualt
  38. ## make ZINC=back zinc:default
  39. ## make ZINC=back,na zinc:default
  40. ## make ZINC=back,ios zinc:default
  41. ifneq ($(strip $(ZINC)),)
  42. ifeq ($(findstring back,$(ZINC)), back)
  43. LED_BACK_ENABLE = yes
  44. else ifeq ($(findstring under,$(ZINC)), under)
  45. LED_UNDERGLOW_ENABLE = yes
  46. endif
  47. ifeq ($(findstring na,$(ZINC)), na)
  48. LED_ANIMATIONS = no
  49. endif
  50. ifeq ($(findstring ios,$(ZINC)), ios)
  51. IOS_DEVICE_ENABLE = yes
  52. endif
  53. $(eval $(call ZINC_CUSTOMISE_MSG))
  54. $(info )
  55. endif
  56. ifeq ($(strip $(LED_BACK_ENABLE)), yes)
  57. RGBLIGHT_ENABLE = yes
  58. OPT_DEFS += -DRGBLED_BACK
  59. ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
  60. $(eval $(call ZINC_CUSTOMISE_MSG))
  61. $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes')
  62. endif
  63. else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
  64. RGBLIGHT_ENABLE = yes
  65. else
  66. RGBLIGHT_ENABLE = no
  67. endif
  68. ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
  69. OPT_DEFS += -DIOS_DEVICE_ENABLE
  70. endif
  71. ifeq ($(strip $(LED_ANIMATIONS)), yes)
  72. # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
  73. OPT_DEFS += -DLED_ANIMATIONS
  74. endif
  75. ifeq ($(strip $(Link_Time_Optimization)),yes)
  76. EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization
  77. endif
  78. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
  79. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
  80. # Uncomment these for debugging
  81. # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE))
  82. # $(info -- OPT_DEFS=$(OPT_DEFS))
  83. # $(info )