You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.6 KiB

  1. SRC += \
  2. $(PROTOCOL_DIR)/host.c \
  3. $(PROTOCOL_DIR)/report.c \
  4. $(PROTOCOL_DIR)/usb_device_state.c \
  5. $(PROTOCOL_DIR)/usb_util.c \
  6. SHARED_EP_ENABLE = no
  7. MOUSE_SHARED_EP ?= yes
  8. ifeq ($(strip $(KEYBOARD_SHARED_EP)), yes)
  9. OPT_DEFS += -DKEYBOARD_SHARED_EP
  10. SHARED_EP_ENABLE = yes
  11. # With the current usb_descriptor.c code,
  12. # you can't share kbd without sharing mouse;
  13. # that would be a very unexpected use case anyway
  14. MOUSE_SHARED_EP = yes
  15. endif
  16. ifeq ($(strip $(MOUSE_ENABLE)), yes)
  17. OPT_DEFS += -DMOUSE_ENABLE
  18. ifeq ($(strip $(MOUSE_SHARED_EP)), yes)
  19. OPT_DEFS += -DMOUSE_SHARED_EP
  20. SHARED_EP_ENABLE = yes
  21. endif
  22. endif
  23. ifeq ($(strip $(EXTRAKEY_ENABLE)), yes)
  24. OPT_DEFS += -DEXTRAKEY_ENABLE
  25. SHARED_EP_ENABLE = yes
  26. endif
  27. ifeq ($(strip $(PROGRAMMABLE_BUTTON_ENABLE)), yes)
  28. OPT_DEFS += -DPROGRAMMABLE_BUTTON_ENABLE
  29. SHARED_EP_ENABLE = yes
  30. endif
  31. ifeq ($(strip $(RAW_ENABLE)), yes)
  32. OPT_DEFS += -DRAW_ENABLE
  33. endif
  34. ifeq ($(strip $(CONSOLE_ENABLE)), yes)
  35. OPT_DEFS += -DCONSOLE_ENABLE
  36. else
  37. # TODO: decouple this so other print backends can exist
  38. OPT_DEFS += -DNO_PRINT
  39. OPT_DEFS += -DNO_DEBUG
  40. endif
  41. ifeq ($(strip $(NKRO_ENABLE)), yes)
  42. ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
  43. $(info NKRO is not currently supported with Bluetooth, and has been disabled.)
  44. else
  45. OPT_DEFS += -DNKRO_ENABLE
  46. SHARED_EP_ENABLE = yes
  47. endif
  48. endif
  49. ifeq ($(strip $(RING_BUFFERED_6KRO_REPORT_ENABLE)), yes)
  50. OPT_DEFS += -DRING_BUFFERED_6KRO_REPORT_ENABLE
  51. endif
  52. ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes)
  53. OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
  54. endif
  55. ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes)
  56. OPT_DEFS += -DNO_USB_STARTUP_CHECK
  57. endif
  58. ifeq ($(strip $(USB_WAIT_FOR_ENUMERATION)), yes)
  59. OPT_DEFS += -DUSB_WAIT_FOR_ENUMERATION
  60. endif
  61. ifeq ($(strip $(JOYSTICK_SHARED_EP)), yes)
  62. OPT_DEFS += -DJOYSTICK_SHARED_EP
  63. SHARED_EP_ENABLE = yes
  64. endif
  65. ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
  66. OPT_DEFS += -DJOYSTICK_ENABLE
  67. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  68. OPT_DEFS += -DJOYSTICK_SHARED_EP
  69. SHARED_EP_ENABLE = yes
  70. endif
  71. endif
  72. ifeq ($(strip $(DIGITIZER_SHARED_EP)), yes)
  73. OPT_DEFS += -DDIGITIZER_SHARED_EP
  74. SHARED_EP_ENABLE = yes
  75. endif
  76. ifeq ($(strip $(DIGITIZER_ENABLE)), yes)
  77. OPT_DEFS += -DDIGITIZER_ENABLE
  78. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  79. OPT_DEFS += -DDIGITIZER_SHARED_EP
  80. SHARED_EP_ENABLE = yes
  81. endif
  82. endif
  83. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  84. OPT_DEFS += -DSHARED_EP_ENABLE
  85. endif
  86. ifeq ($(strip $(USB_HID_ENABLE)), yes)
  87. include $(TMK_DIR)/protocol/usb_hid/usb_hid.mk
  88. endif
  89. # Search Path
  90. VPATH += $(TMK_DIR)/protocol