rules.mk 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. SRC += drashna.c \
  2. process_records.c
  3. ifneq ($(PLATFORM),CHIBIOS)
  4. ifneq ($(strip $(LTO_SUPPORTED)), no)
  5. LTO_ENABLE = yes
  6. endif
  7. endif
  8. SPACE_CADET_ENABLE = no
  9. GRAVE_ESC_ENABLE = no
  10. ifneq ($(strip $(NO_SECRETS)), yes)
  11. ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
  12. SRC += secrets.c
  13. endif
  14. ifeq ($(strip $(NO_SECRETS)), lite)
  15. OPT_DEFS += -DNO_SECRETS
  16. endif
  17. endif
  18. CUSTOM_TAP_DANCE ?= yes
  19. ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
  20. ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
  21. SRC += tap_dances.c
  22. endif
  23. endif
  24. CUSTOM_RGBLIGHT ?= yes
  25. ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
  26. ifeq ($(strip $(CUSTOM_RGBLIGHT)), yes)
  27. SRC += rgb_stuff.c
  28. ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes)
  29. OPT_DEFS += -DRGBLIGHT_NOEEPROM
  30. endif
  31. ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes)
  32. OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION
  33. endif
  34. endif
  35. endif
  36. CUSTOM_RGB_MATRIX ?= yes
  37. ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
  38. ifeq ($(strip $(CUSTOM_RGB_MATRIX)), yes)
  39. SRC += rgb_matrix_stuff.c
  40. endif
  41. endif
  42. KEYLOGGER_ENABLE ?= no
  43. ifdef CONSOLE_ENABLE
  44. ifeq ($(strip $(KEYLOGGER_ENABLE)), yes)
  45. OPT_DEFS += -DKEYLOGGER_ENABLE
  46. endif
  47. endif
  48. ifeq ($(strip $(MAKE_BOOTLOADER)), yes)
  49. OPT_DEFS += -DMAKE_BOOTLOADER
  50. endif
  51. # At least until build.mk or the like drops, this is here to prevent
  52. # VUSB boards from enabling NKRO, as they do not support it. Ideally
  53. # this should be handled per keyboard, but until that happens ...
  54. ifeq ($(strip $(PROTOCOL)), VUSB)
  55. NKRO_ENABLE = no
  56. endif
  57. CUSTOM_OLED_DRIVER ?= yes
  58. ifeq ($(strip $(OLED_ENABLE)), yes)
  59. ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes)
  60. SRC += oled_stuff.c
  61. OPT_DEFS += -DCUSTOM_OLED_DRIVER_CODE
  62. endif
  63. endif
  64. ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
  65. POINTING_DEVICE_ENABLE := yes
  66. OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
  67. SRC += drivers/sensors/pimoroni_trackball.c
  68. QUANTUM_LIB_SRC += i2c_master.c
  69. endif
  70. CUSTOM_SPLIT_TRANSPORT_SYNC ?= yes
  71. ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT_SYNC)), yes)
  72. ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
  73. QUANTUM_LIB_SRC += transport_sync.c
  74. OPT_DEFS += -DCUSTOM_SPLIT_TRANSPORT_SYNC
  75. endif
  76. endif
  77. # DEBUG_MATRIX_SCAN_RATE_ENABLE = api