rules.mk 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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/keyboards/helix/rules.mk for a list of options that can be set.
  6. # See TOP/docs/config_options.md for more information.
  7. #
  8. CONSOLE_ENABLE = no # Console for debug
  9. COMMAND_ENABLE = no # Commands for debug and configuration
  10. # CONSOLE_ENABLE and COMMAND_ENABLE
  11. # yes, no +1500
  12. # yes, yes +3200
  13. # no, yes +400
  14. LTO_ENABLE = no # if firmware size over limit, try this option
  15. LED_ANIMATIONS = yes
  16. # Helix Spacific Build Options
  17. # you can uncomment and edit follows 7 Variables
  18. # jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
  19. HELIX_ROWS = 5 # Helix Rows is 4 or 5
  20. # OLED_ENABLE = no # OLED_ENABLE
  21. # LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
  22. # LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
  23. # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
  24. # LED_ANIMATIONS = yes # LED animations
  25. # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
  26. ifneq ($(strip $(HELIX)),)
  27. define KEYMAP_OPTION_PARSE
  28. # parse 'dispoff', 'consloe', 'na', 'ani', 'mini-ani'
  29. $(if $(SHOW_PARCE),$(info parse -$1-)) #debug
  30. ifeq ($(strip $1),dispoff)
  31. OLED_ENABLE = no
  32. OLED_DRIVER_ENABLE = no
  33. LED_BACK_ENABLE = no
  34. LED_UNDERGLOW_ENABLE = no
  35. endif
  36. ifeq ($(strip $1),console)
  37. CONSOLE_ENABLE = yes
  38. endif
  39. ifeq ($(strip $1),debug)
  40. DEBUG_CONFIG = yes
  41. endif
  42. ifneq ($(filter nodebug no-debug no_debug,$(strip $1)),)
  43. DEBUG_CONFIG = no
  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. endef # end of KEYMAP_OPTION_PARSE
  61. COMMA=,
  62. $(eval $(foreach A_OPTION_NAME,$(subst $(COMMA), ,$(HELIX)), \
  63. $(call KEYMAP_OPTION_PARSE,$(A_OPTION_NAME))))
  64. endif
  65. ifeq ($(strip $(LED_ANIMATIONS)), yes)
  66. OPT_DEFS += -DLED_ANIMATIONS_LEVEL=2
  67. endif
  68. ifeq ($(strip $(LED_ANIMATIONS)), mini)
  69. OPT_DEFS += -DLED_ANIMATIONS_LEVEL=1
  70. LED_ANIMATIONS = yes
  71. endif
  72. ifeq ($(strip $(DEBUG_CONFIG)), yes)
  73. OPT_DEFS += -DDEBUG_CONFIG
  74. endif
  75. # convert Helix-specific options (that represent combinations of standard options)
  76. # into QMK standard options.
  77. include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
  78. ifeq ($(strip $(OLED_ENABLE)), yes)
  79. SRC += oled_display.c
  80. endif