source: avrstuff/grip2hid/Makefile@ 5b8020c

main
Last change on this file since 5b8020c was 5b8020c, checked in by Adrien Destugues <pulkomandy@…>, 5 years ago

grip2hid: make it work with 2 pads

The CPU on the AT90USBKEY is apparently too slow to manage two pads in
parallel, so scan them one at a time instead.

  • Property mode set to 100644
File size: 748 bytes
Line 
1#Set vars
2PROJECT=grip2hid
3FCPU=1000000
4BAUD=9600
5
6PROG=flip1 -u
7MCU=at90usb1287
8
9#MCU=atmega8
10#PROG=avr109 -P /dev/ports/usb0 -b $(BAUD) -u
11
12# You should not need to change anything below
13# -----------------------------------------------------------------------------
14COMPILE = avr-g++ -Wall -Wextra -Werror -O3 -mmcu=$(MCU) -DF_CPU=$(FCPU) -DBAUD=$(BAUD)
15
16#Rules
17$(PROJECT).hex: $(PROJECT).bin
18 avr-objcopy -j .text -j .data -O ihex $^ $@
19
20$(PROJECT).bin: main.o usart.o
21 $(COMPILE) $^ -o $@
22
23#Generic rules
24.S.o:
25 $(COMPILE) -x assembler-with-cpp -c $< -o $@
26
27.cpp.o:
28 $(COMPILE) -c $< -o $@
29
30usart.o: ../libs/usart/usart.c
31 $(COMPILE) -c $< -o $@
32
33flash: $(PROJECT).hex
34 avrdude -u -c $(PROG) -p $(MCU) -Uflash:w:$^
35
36clean:
37 rm *.bin *.hex *.o
Note: See TracBrowser for help on using the repository browser.