logo

qmk_firmware

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

post_rules.mk (2523B)


  1. #
  2. # post_rules.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. -include $(strip $(HELIX_TOP_DIR)/pico/override_helix_options.mk) ## File dedicated to maintenance
  8. # Parse 'HELIX=xx,yy,zz' option
  9. ifneq ($(strip $(HELIX)),)
  10. # make HELIX=ios helix/pico:AKEYMAP
  11. # make HELIX=no-ani helix/pico:AKEYMAP
  12. # make HELIX=ios,no-ani helix/pico:AKEYMAP
  13. define HELIX_OPTION_PARSE
  14. # parce 'no-ani' 'ios'
  15. $(if $(SHOW_PARCE),$(info parse .$1.)) #debug
  16. $(if $(HELIX_OVERRIDE_PARSE),$(call HELIX_OVERRIDE_PARSE,$1))
  17. ifeq ($(strip $1),ios)
  18. IOS_DEVICE_ENABLE = yes
  19. endif
  20. ifneq ($(filter na no_ani no-ani,$(strip $1)),)
  21. LED_ANIMATIONS = no
  22. endif
  23. endef # end of HELIX_OPTION_PARSE
  24. COMMA=,
  25. $(eval $(foreach A_OPTION_NAME,$(subst $(COMMA), ,$(HELIX)), \
  26. $(call HELIX_OPTION_PARSE,$(A_OPTION_NAME))))
  27. SHOW_HELIX_OPTIONS = yes
  28. endif
  29. ########
  30. # convert Helix-specific options (that represent combinations of standard options)
  31. # into QMK standard options.
  32. ifeq ($(strip $(LED_BACK_ENABLE)), yes)
  33. RGBLIGHT_ENABLE = yes
  34. OPT_DEFS += -DRGBLED_BACK
  35. ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
  36. $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes')
  37. endif
  38. else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
  39. RGBLIGHT_ENABLE = yes
  40. endif
  41. ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
  42. OPT_DEFS += -DIOS_DEVICE_ENABLE
  43. endif
  44. ifeq ($(strip $(LED_ANIMATIONS)), yes)
  45. OPT_DEFS += -DLED_ANIMATIONS
  46. endif
  47. ifeq ($(strip $(AUDIO_ENABLE)),yes)
  48. ifeq ($(strip $(RGBLIGHT_ENABLE)),yes)
  49. LTO_ENABLE = yes
  50. endif
  51. endif
  52. ifneq ($(strip $(SHOW_HELIX_OPTIONS)),)
  53. $(info Helix Spacific Build Options)
  54. $(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE))
  55. $(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE))
  56. $(info - LED_ANIMATIONS = $(LED_ANIMATIONS))
  57. $(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE))
  58. $(info )
  59. $(info QMK Build Options)
  60. $(info -- SPLIT_KEYBOARD = $(SPLIT_KEYBOARD))
  61. $(info -- AUDIO_ENABLE = $(AUDIO_ENABLE))
  62. $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE))
  63. $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE))
  64. $(info -- OPT_DEFS = $(OPT_DEFS))
  65. $(info -- LTO_ENABLE = $(LTO_ENABLE))
  66. $(info -- DEBUG_MATRIX_SCAN_RATE_ENABLE = $(DEBUG_MATRIX_SCAN_RATE_ENABLE))
  67. $(info )
  68. endif