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.

88 lines
2.3 KiB

  1. TMK_COMMON_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. TMK_COMMON_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. TMK_COMMON_DEFS += -DMOUSE_SHARED_EP
  20. SHARED_EP_ENABLE = yes
  21. endif
  22. endif
  23. ifeq ($(strip $(EXTRAKEY_ENABLE)), yes)
  24. TMK_COMMON_DEFS += -DEXTRAKEY_ENABLE
  25. SHARED_EP_ENABLE = yes
  26. endif
  27. ifeq ($(strip $(RAW_ENABLE)), yes)
  28. TMK_COMMON_DEFS += -DRAW_ENABLE
  29. endif
  30. ifeq ($(strip $(CONSOLE_ENABLE)), yes)
  31. TMK_COMMON_DEFS += -DCONSOLE_ENABLE
  32. else
  33. # TODO: decouple this so other print backends can exist
  34. TMK_COMMON_DEFS += -DNO_PRINT
  35. TMK_COMMON_DEFS += -DNO_DEBUG
  36. endif
  37. ifeq ($(strip $(NKRO_ENABLE)), yes)
  38. ifeq ($(PROTOCOL), VUSB)
  39. $(info NKRO is not currently supported on V-USB, and has been disabled.)
  40. else ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
  41. $(info NKRO is not currently supported with Bluetooth, and has been disabled.)
  42. else
  43. TMK_COMMON_DEFS += -DNKRO_ENABLE
  44. SHARED_EP_ENABLE = yes
  45. endif
  46. endif
  47. ifeq ($(strip $(RING_BUFFERED_6KRO_REPORT_ENABLE)), yes)
  48. TMK_COMMON_DEFS += -DRING_BUFFERED_6KRO_REPORT_ENABLE
  49. endif
  50. ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes)
  51. TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN
  52. endif
  53. ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes)
  54. TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
  55. endif
  56. ifeq ($(strip $(DIGITIZER_SHARED_EP)), yes)
  57. TMK_COMMON_DEFS += -DDIGITIZER_SHARED_EP
  58. SHARED_EP_ENABLE = yes
  59. endif
  60. ifeq ($(strip $(DIGITIZER_ENABLE)), yes)
  61. TMK_COMMON_DEFS += -DDIGITIZER_ENABLE
  62. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  63. TMK_COMMON_DEFS += -DDIGITIZER_SHARED_EP
  64. SHARED_EP_ENABLE = yes
  65. endif
  66. endif
  67. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  68. TMK_COMMON_DEFS += -DSHARED_EP_ENABLE
  69. endif
  70. ifeq ($(strip $(USB_HID_ENABLE)), yes)
  71. include $(TMK_DIR)/protocol/usb_hid.mk
  72. endif
  73. # Search Path
  74. VPATH += $(TMK_DIR)/protocol