rules.mk 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # QMK Standard 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. # See TOP/docs/config_options.md for more information.
  6. #
  7. CONSOLE_ENABLE = no # Console for debug
  8. COMMAND_ENABLE = no # Commands for debug and configuration
  9. # CONSOLE_ENABLE and COMMAND_ENABLE
  10. # yes, no +1500
  11. # yes, yes +3200
  12. # no, yes +400
  13. ENCODER_ENABLE = no
  14. LTO_ENABLE = no # if firmware size over limit, try this option
  15. LED_ANIMATIONS = yes
  16. ifneq ($(strip $(HELIX)),)
  17. define KEYMAP_OPTION_PARSE
  18. # parse 'dispoff', 'consle', 'back', 'oled', 'no-ani', 'mini-ani', 'lto', 'no-lto', 'no-enc', 'scan'
  19. $(if $(SHOW_PARCE),$(info parse .$1.)) #debug
  20. ifeq ($(strip $1),dispoff)
  21. OLED_DRIVER_ENABLE = no
  22. RGBLIGHT_ENABLE = no
  23. endif
  24. ifeq ($(strip $1),console)
  25. CONSOLE_ENABLE = yes
  26. endif
  27. ifeq ($(strip $1),debug)
  28. DEBUG_CONFIG = yes
  29. endif
  30. ifneq ($(filter nodebug no-debug no_debug,$(strip $1)),)
  31. DEBUG_CONFIG = no
  32. endif
  33. ifneq ($(filter enc,$(strip $1)),)
  34. ENCODER_ENABLE = yes
  35. endif
  36. ifneq ($(filter noenc no-enc no_enc,$(strip $1)),)
  37. ENCODER_ENABLE = no
  38. endif
  39. ifeq ($(strip $1),oled)
  40. OLED_DRIVER_ENABLE = yes
  41. endif
  42. ifeq ($(strip $1),back)
  43. RGBLIGHT_ENABLE = yes
  44. endif
  45. ifneq ($(filter na no_ani no-ani,$(strip $1)),)
  46. LED_ANIMATIONS = no
  47. endif
  48. ifneq ($(filter mini-ani mini_ani,$(strip $1)),)
  49. LED_ANIMATIONS = mini
  50. endif
  51. ifneq ($(filter ani animation,$(strip $1)),)
  52. LED_ANIMATIONS = yes
  53. endif
  54. ifeq ($(strip $1),lto)
  55. LTO_ENABLE = yes
  56. endif
  57. ifneq ($(filter nolto no-lto no_lto,$(strip $1)),)
  58. LTO_ENABLE = no
  59. endif
  60. ifeq ($(strip $1),scan)
  61. # use DEBUG_MATRIX_SCAN_RATE
  62. # see docs/newbs_testing_debugging.md
  63. DEBUG_MATRIX_SCAN_RATE_ENABLE = yes
  64. endif
  65. endef # end of KEYMAP_OPTION_PARSE
  66. COMMA=,
  67. $(eval $(foreach A_OPTION_NAME,$(subst $(COMMA), ,$(HELIX)), \
  68. $(call KEYMAP_OPTION_PARSE,$(A_OPTION_NAME))))
  69. endif
  70. ifeq ($(strip $(LED_ANIMATIONS)), yes)
  71. OPT_DEFS += -DLED_ANIMATIONS
  72. OPT_DEFS += -DLED_ANIMATIONS_LEVEL=2
  73. endif
  74. ifeq ($(strip $(LED_ANIMATIONS)), mini)
  75. OPT_DEFS += -DLED_ANIMATIONS
  76. OPT_DEFS += -DLED_ANIMATIONS_LEVEL=1
  77. endif
  78. ifeq ($(strip $(DEBUG_CONFIG)), yes)
  79. OPT_DEFS += -DDEBUG_CONFIG
  80. endif