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

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