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.

104 lines
2.5 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 $(JOYSTICK_SHARED_EP)), yes)
  59. OPT_DEFS += -DJOYSTICK_SHARED_EP
  60. SHARED_EP_ENABLE = yes
  61. endif
  62. ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
  63. OPT_DEFS += -DJOYSTICK_ENABLE
  64. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  65. OPT_DEFS += -DJOYSTICK_SHARED_EP
  66. SHARED_EP_ENABLE = yes
  67. endif
  68. endif
  69. ifeq ($(strip $(DIGITIZER_SHARED_EP)), yes)
  70. OPT_DEFS += -DDIGITIZER_SHARED_EP
  71. SHARED_EP_ENABLE = yes
  72. endif
  73. ifeq ($(strip $(DIGITIZER_ENABLE)), yes)
  74. OPT_DEFS += -DDIGITIZER_ENABLE
  75. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  76. OPT_DEFS += -DDIGITIZER_SHARED_EP
  77. SHARED_EP_ENABLE = yes
  78. endif
  79. endif
  80. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  81. OPT_DEFS += -DSHARED_EP_ENABLE
  82. endif
  83. ifeq ($(strip $(USB_HID_ENABLE)), yes)
  84. include $(TMK_DIR)/protocol/usb_hid/usb_hid.mk
  85. endif
  86. # Search Path
  87. VPATH += $(TMK_DIR)/protocol