logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

protocol.mk (2355B)


  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 $(CONSOLE_ENABLE)), yes)
  32. OPT_DEFS += -DCONSOLE_ENABLE
  33. else
  34. # TODO: decouple this so other print backends can exist
  35. OPT_DEFS += -DNO_PRINT
  36. OPT_DEFS += -DNO_DEBUG
  37. endif
  38. ifeq ($(strip $(NKRO_ENABLE)), yes)
  39. OPT_DEFS += -DNKRO_ENABLE
  40. SHARED_EP_ENABLE = yes
  41. endif
  42. ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes)
  43. OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
  44. endif
  45. ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes)
  46. OPT_DEFS += -DNO_USB_STARTUP_CHECK
  47. endif
  48. ifeq ($(strip $(USB_WAIT_FOR_ENUMERATION)), yes)
  49. OPT_DEFS += -DUSB_WAIT_FOR_ENUMERATION
  50. endif
  51. ifeq ($(strip $(JOYSTICK_SHARED_EP)), yes)
  52. OPT_DEFS += -DJOYSTICK_SHARED_EP
  53. SHARED_EP_ENABLE = yes
  54. endif
  55. ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
  56. OPT_DEFS += -DJOYSTICK_ENABLE
  57. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  58. OPT_DEFS += -DJOYSTICK_SHARED_EP
  59. SHARED_EP_ENABLE = yes
  60. endif
  61. endif
  62. ifeq ($(strip $(DIGITIZER_SHARED_EP)), yes)
  63. OPT_DEFS += -DDIGITIZER_SHARED_EP
  64. SHARED_EP_ENABLE = yes
  65. endif
  66. ifeq ($(strip $(DIGITIZER_ENABLE)), yes)
  67. OPT_DEFS += -DDIGITIZER_ENABLE
  68. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  69. OPT_DEFS += -DDIGITIZER_SHARED_EP
  70. SHARED_EP_ENABLE = yes
  71. endif
  72. endif
  73. ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
  74. OPT_DEFS += -DSHARED_EP_ENABLE
  75. endif
  76. ifeq ($(strip $(USB_HID_ENABLE)), yes)
  77. include $(TMK_DIR)/protocol/usb_hid/usb_hid.mk
  78. endif
  79. # Search Path
  80. VPATH += $(TMK_DIR)/protocol