aboutsummaryrefslogtreecommitdiff
path: root/protocol/usb_hid/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'protocol/usb_hid/Makefile')
-rw-r--r--protocol/usb_hid/Makefile141
1 files changed, 141 insertions, 0 deletions
diff --git a/protocol/usb_hid/Makefile b/protocol/usb_hid/Makefile
new file mode 100644
index 000000000..ed3d6518d
--- /dev/null
+++ b/protocol/usb_hid/Makefile
@@ -0,0 +1,141 @@
1#----------------------------------------------------------------------------
2# On command line:
3#
4# make all = Make software.
5#
6# make clean = Clean out built project files.
7#
8# make coff = Convert ELF to AVR COFF.
9#
10# make extcoff = Convert ELF to AVR Extended COFF.
11#
12# make program = Download the hex file to the device.
13# Please customize your programmer settings(PROGRAM_CMD)
14#
15# make teensy = Download the hex file to the device, using teensy_loader_cli.
16# (must have teensy_loader_cli installed).
17#
18# make dfu = Download the hex file to the device, using dfu-programmer (must
19# have dfu-programmer installed).
20#
21# make flip = Download the hex file to the device, using Atmel FLIP (must
22# have Atmel FLIP installed).
23#
24# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
25# (must have dfu-programmer installed).
26#
27# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
28# (must have Atmel FLIP installed).
29#
30# make debug = Start either simulavr or avarice as specified for debugging,
31# with avr-gdb or avr-insight as the front end for debugging.
32#
33# make filename.s = Just compile filename.c into the assembler code only.
34#
35# make filename.i = Create a preprocessed source file for use in submitting
36# bug reports to the GCC project.
37#
38# To rebuild project do "make clean" then "make all".
39#----------------------------------------------------------------------------
40
41# Target file name (without extension).
42TARGET = usbkbd
43
44# Directory keyboard dependent files exist
45TARGET_DIR = .
46
47# MCU name
48MCU = atmega32u4
49
50
51# Processor frequency.
52# This will define a symbol, F_CPU, in all source code files equal to the
53# processor frequency in Hz. You can then use this symbol in your source code to
54# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
55# automatically to create a 32-bit value in your source code.
56#
57# This will be an integer division of F_USB below, as it is sourced by
58# F_USB after it has run through any CPU prescalers. Note that this value
59# does not *change* the processor frequency - it should merely be updated to
60# reflect the processor speed set externally so that the code can use accurate
61# software delays.
62F_CPU = 16000000
63
64
65
66
67ARDUINO_DIR = arduino-1.0.1/cores
68ARDUINO_SRC = \
69 arduino/Print.cpp \
70 arduino/Stream.cpp \
71 arduino/wiring.c
72
73# arduino/main.cpp \
74# arduino/USBCore.cpp \
75# arduino/CDC.cpp \
76# arduino/HID.cpp \
77# arduino/HardwareSerial.cpp \
78# arduino/IPAddress.cpp \
79# arduino/Tone.cpp \
80# arduino/WMath.cpp \
81# arduino/WInterrupts.c \
82# arduino/wiring_analog.c \
83# arduino/wiring_pulse.c \
84# arduino/wiring_shift.c
85# arduino/wiring_digital.c \
86# arduino/WString.cpp \
87# arduino/new.cpp \
88
89USB_HOST_DIR = ./USB_Host_Shield_2.0
90USB_HOST_SRC = \
91 Usb.cpp \
92 cdcacm.cpp \
93 cdcftdi.cpp \
94 cdcprolific.cpp \
95 hid.cpp \
96 hidboot.cpp \
97 hiduniversal.cpp \
98 hidusagetitlearrays.cpp \
99 hidescriptorparser.cpp \
100 message.cpp \
101 parsetools.cpp
102
103 #PS3BT.cpp \
104 #PS3USB.cpp \
105 #RFCOMM.cpp \
106 #XBOXUSB.cpp \
107 #adk.cpp \
108 #masstorage.cpp \
109 #max_LCD.cpp \
110 #usbhub.cpp
111
112#SRC = host_kbd.cpp
113SRC = main.cpp
114SRC += parser.cpp
115SRC += NullSerial.cpp
116SRC += $(USB_HOST_SRC)
117SRC += $(ARDUINO_SRC)
118
119OPT_DEFS = -DARDUINO=101 -DUSB_VID=0x2341 -DUSB_PID=0x8036
120
121# Search Path
122VPATH += $(TARGET_DIR)
123VPATH += $(USB_HOST_DIR)
124VPATH += $(ARDUINO_DIR)
125# for Arduino.h
126VPATH += arduino-1.0.1/cores/arduino
127# for pins_arduino.h
128VPATH += arduino-1.0.1/variants/leonardo
129
130
131# Ad hoc workaround to override original arduino/USBAPI.h with our own USBAPI.h.
132# Obsolete but needed in order to remove directory including the current input file from search list.
133# Option -iquote can't replace -I- for this purpose.
134EXTRAFLAGS += -I-
135
136
137# program Leonardo
138PROGRAM_CMD = avrdude -patmega32u4 -cavr109 -P$(DEV) -b57600 -Uflash:w:$(TARGET).hex
139
140
141include ../../rules.mk