rules.mk 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. LED_BACK_ENABLE = no
  33. LED_UNDERGLOW_ENABLE = no
  34. endif
  35. ifneq ($(filter nooled no-oled,$(strip $1)),)
  36. OLED_ENABLE = no
  37. endif
  38. ifeq ($(strip $1),oled)
  39. OLED_ENABLE = yes
  40. endif
  41. ifneq ($(filter core-oled core_oled newoled new-oled olednew oled-new,$(strip $1)),)
  42. OLED_ENABLE = yes
  43. OLED_SELECT = core
  44. endif
  45. ifneq ($(filter local-oled local_oled oldoled old-oled oledold oled-old,$(strip $1)),)
  46. OLED_ENABLE = yes
  47. OLED_SELECT = local
  48. endif
  49. ifeq ($(strip $1),console)
  50. CONSOLE_ENABLE = yes
  51. endif
  52. ifeq ($(strip $1),debug)
  53. DEBUG_CONFIG = yes
  54. endif
  55. ifneq ($(filter nodebug no-debug no_debug,$(strip $1)),)
  56. DEBUG_CONFIG = no
  57. endif
  58. ifneq ($(filter na no_ani no-ani,$(strip $1)),)
  59. LED_ANIMATIONS = no
  60. endif
  61. ifneq ($(filter mini-ani mini_ani,$(strip $1)),)
  62. LED_ANIMATIONS = mini
  63. endif
  64. ifneq ($(filter ani animation,$(strip $1)),)
  65. LED_ANIMATIONS = yes
  66. endif
  67. ifeq ($(strip $1),lto)
  68. LTO_ENABLE = yes
  69. endif
  70. ifneq ($(filter nolto no-lto no_lto,$(strip $1)),)
  71. LTO_ENABLE = no
  72. endif
  73. endef # end of KEYMAP_OPTION_PARSE
  74. COMMA=,
  75. $(eval $(foreach A_OPTION_NAME,$(subst $(COMMA), ,$(HELIX)), \
  76. $(call KEYMAP_OPTION_PARSE,$(A_OPTION_NAME))))
  77. endif
  78. ifeq ($(strip $(LED_ANIMATIONS)), yes)
  79. OPT_DEFS += -DLED_ANIMATIONS_LEVEL=2
  80. endif
  81. ifeq ($(strip $(LED_ANIMATIONS)), mini)
  82. OPT_DEFS += -DLED_ANIMATIONS_LEVEL=1
  83. LED_ANIMATIONS = yes
  84. endif
  85. ifeq ($(strip $(DEBUG_CONFIG)), yes)
  86. OPT_DEFS += -DDEBUG_CONFIG
  87. endif
  88. ifeq ($(strip $(OLED_ENABLE)), yes)
  89. SRC += oled_display.c
  90. endif