rules.mk 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Enable Bootmagic Lite for keyboards that don't have an easily accessible
  2. # reset button, but keep it disabled for all others to reduce firmware size.
  3. ifneq ($(filter $(strip $(KEYBOARD)),ai03/polaris dz60 kbdfans/kbd67/hotswap yanghu/unicorne/f411),)
  4. BOOTMAGIC_ENABLE = yes
  5. else
  6. BOOTMAGIC_ENABLE = no
  7. endif
  8. # Enable media keys on all keyboards.
  9. EXTRAKEY_ENABLE = yes
  10. # Enable N-key rollover on all keyboards. In addition to its intended
  11. # functionality, as of July 2020, this is required for Chrome OS to process
  12. # media keys. (It appears that Chrome OS filters out key events from the second
  13. # USB endpoint's consumer and system control devices unless that endpoint also
  14. # reports a keyboard or mouse device.)
  15. NKRO_ENABLE = yes
  16. # Enable link-time optimization to reduce binary size.
  17. LTO_ENABLE = yes
  18. # Include common utilities shared across all our keymaps.
  19. SRC += bcat.c
  20. # Include additional utilities that extend optional QMK features only enabled
  21. # on some keyboards.
  22. ifeq ($(strip $(OLED_ENABLE)), yes)
  23. SRC += bcat_oled.c
  24. WPM_ENABLE = yes # for WPM and animated "keyboard pet" widgets
  25. # OLED pets (animated critters that react to typing) take up a lot of
  26. # firmware space, so only compile one, and only if requested.
  27. BCAT_OLED_PET ?= no
  28. ifneq ($(strip $(BCAT_OLED_PET)), no)
  29. SRC += bcat_oled_pet_$(strip $(BCAT_OLED_PET)).c
  30. OPT_DEFS += -DBCAT_OLED_PET
  31. endif
  32. endif
  33. ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
  34. SRC += bcat_rgblight.c
  35. endif
  36. # Disable unwanted build options on all keyboards. (Mouse keys are turned off
  37. # due to https://github.com/qmk/qmk_firmware/issues/8323, and the rest are
  38. # turned off to reduce firmware size.)
  39. COMMAND_ENABLE = no
  40. CONSOLE_ENABLE = no
  41. MOUSEKEY_ENABLE = no
  42. # Disable unwanted hardware options on all keyboards. (Some keyboards turn
  43. # these features on by default even though they aren't actually required.)
  44. MIDI_ENABLE = no
  45. SLEEP_LED_ENABLE = no
  46. # Disable other unused options on all keyboards.
  47. AUTO_SHIFT_ENABLE = no
  48. COMBO_ENABLE = no
  49. GRAVE_ESC_ENABLE = no
  50. KEY_LOCK_ENABLE = no
  51. LEADER_ENABLE = no
  52. MAGIC_ENABLE = no
  53. SPACE_CADET_ENABLE = no
  54. SWAP_HANDS_ENABLE = no
  55. TAP_DANCE_ENABLE = no
  56. UCIS_ENABLE = no
  57. UNICODEMAP_ENABLE = no
  58. UNICODE_ENABLE = no