logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

local_features.mk (2885B)


  1. #
  2. # local_features.mk contains post-processing rules for the Helix keyboard.
  3. #
  4. # Post-processing rules convert keyboard-specific shortcuts (that represent
  5. # combinations of standard options) into QMK standard options.
  6. #
  7. KEYBOARD_LOCAL_FEATURES_MK :=
  8. -include $(strip $(HELIX_TOP_DIR)/rev2/override_helix_options.mk) ## File dedicated to maintenance
  9. # Parse 'HELIX=xx,yy,zz' option
  10. ifneq ($(strip $(HELIX)),)
  11. # make HELIX=ios helix/pico:AKEYMAP
  12. # make HELIX=no-ani helix/pico:AKEYMAP
  13. # make HELIX=no-oled helix/pico:AKEYMAP
  14. # make HELIX=ios,no-ani,no-oled helix/pico:AKEYMAP
  15. define HELIX_OPTION_PARSE
  16. # parce 'no-ani' 'ios' 'no-oled'
  17. $(if $(SHOW_PARCE),$(info parse .$1.)) #debug
  18. $(if $(HELIX_OVERRIDE_PARSE),$(call HELIX_OVERRIDE_PARSE,$1))
  19. ifeq ($(strip $1),ios)
  20. IOS_DEVICE_ENABLE = yes
  21. endif
  22. ifneq ($(filter na no_ani no-ani,$(strip $1)),)
  23. LED_ANIMATIONS = no
  24. endif
  25. ifneq ($(filter nooled no-oled,$(strip $1)),)
  26. OLED_ENABLE = no
  27. endif
  28. ifeq ($(strip $1),oled)
  29. OLED_ENABLE = yes
  30. endif
  31. endef # end of HELIX_OPTION_PARSE
  32. COMMA=,
  33. $(eval $(foreach A_OPTION_NAME,$(subst $(COMMA), ,$(HELIX)), \
  34. $(call HELIX_OPTION_PARSE,$(A_OPTION_NAME))))
  35. SHOW_HELIX_OPTIONS = yes
  36. endif
  37. ########
  38. # convert Helix-specific options (that represent combinations of standard options)
  39. # into QMK standard options.
  40. ifeq ($(strip $(LED_BACK_ENABLE)), yes)
  41. RGBLIGHT_ENABLE = yes
  42. OPT_DEFS += -DRGBLED_BACK
  43. ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
  44. $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes')
  45. endif
  46. else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
  47. RGBLIGHT_ENABLE = yes
  48. endif
  49. ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
  50. OPT_DEFS += -DIOS_DEVICE_ENABLE
  51. endif
  52. ifeq ($(strip $(LED_ANIMATIONS)), yes)
  53. OPT_DEFS += -DLED_ANIMATIONS
  54. endif
  55. ifeq ($(strip $(OLED_ENABLE)), yes)
  56. ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
  57. OPT_DEFS += -DOLED_FONT_H=\<helixfont.h\>
  58. else
  59. OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\"
  60. endif
  61. endif
  62. ifneq ($(strip $(SHOW_HELIX_OPTIONS)),)
  63. $(info Helix Spacific Build Options)
  64. $(info - OLED_ENABLE = $(OLED_ENABLE))
  65. $(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE))
  66. $(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE))
  67. $(info - LED_ANIMATIONS = $(LED_ANIMATIONS))
  68. $(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE))
  69. $(info )
  70. $(info QMK Build Options)
  71. $(info -- SPLIT_KEYBOARD = $(SPLIT_KEYBOARD))
  72. $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE))
  73. $(info -- OLED_DRIVER = $(OLED_DRIVER))
  74. $(info -- OLED_LOCAL_ENABLE = $(OLED_LOCAL_ENABLE))
  75. $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE))
  76. $(info -- OPT_DEFS = $(OPT_DEFS))
  77. $(info -- LTO_ENABLE = $(LTO_ENABLE))
  78. $(info )
  79. endif