rules.mk 3.3 KB

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