Keyboard firmwares for Atmel AVR and Cortex-M
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.

usb_hid.mk 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. USB_HID_DIR = protocol/usb_hid
  2. #
  3. # USB Host Shield
  4. #
  5. USB_HOST_SHIELD_DIR = $(USB_HID_DIR)/USB_Host_Shield_2.0
  6. USB_HOST_SHIELD_SRC = \
  7. $(USB_HOST_SHIELD_DIR)/Usb.cpp \
  8. $(USB_HOST_SHIELD_DIR)/hid.cpp \
  9. $(USB_HOST_SHIELD_DIR)/parsetools.cpp \
  10. $(USB_HOST_SHIELD_DIR)/message.cpp
  11. #
  12. # Arduino
  13. #
  14. ARDUINO_DIR = $(USB_HID_DIR)/arduino-1.0.1
  15. ARDUINO_CORES_DIR = $(ARDUINO_DIR)/cores/arduino
  16. ARDUINO_CORES_SRC = \
  17. $(ARDUINO_CORES_DIR)/Print.cpp \
  18. $(ARDUINO_CORES_DIR)/Stream.cpp
  19. # replaced with override_Serial.c
  20. # $(ARDUINO_CORES_DIR)/CDC.cpp \
  21. # $(ARDUINO_CORES_DIR)/HID.cpp \
  22. # $(ARDUINO_CORES_DIR)/USBCore.cpp \
  23. # replaced with override_wiring.c and common/timer.c
  24. # $(ARDUINO_CORES_DIR)/wiring.c \
  25. #
  26. # HID parser
  27. #
  28. SRC += $(USB_HID_DIR)/parser.cpp
  29. # replace arduino/CDC.cpp
  30. SRC += $(USB_HID_DIR)/override_Serial.cpp
  31. # replace arduino/wiring.c
  32. SRC += $(USB_HID_DIR)/override_wiring.c
  33. SRC += common/timer.c
  34. SRC += $(USB_HOST_SHIELD_SRC)
  35. SRC += $(ARDUINO_CORES_SRC)
  36. OPT_DEFS += -DARDUINO=101
  37. # Arduino USBCore needs USB_VID and USB_PID.
  38. #OPT_DEFS += -DARDUINO=101 -DUSB_VID=0x2341 -DUSB_PID=0x8036
  39. #
  40. # Search Path
  41. #
  42. VPATH += $(TOP_DIR)/$(USB_HID_DIR)
  43. VPATH += $(TOP_DIR)/$(USB_HOST_SHIELD_DIR)
  44. # for #include "Arduino.h"
  45. VPATH += $(TOP_DIR)/$(ARDUINO_CORES_DIR)
  46. # for #include "pins_arduino.h"
  47. VPATH += $(TOP_DIR)/$(ARDUINO_DIR)/variants/leonardo
  48. # ad hoc workaround for compile problem on Windows:
  49. # Windows doesn't know difference between common/print.h and arduino/Print.h.
  50. # On Linux no problem.
  51. # Change file name common/print.h to console.h ?
  52. VPATH := $(TOP_DIR)/common $(VPATH)