source: avrstuff/test_uart/Makefile@ e5dd493

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

usart: some cleanups.

  • Property mode set to 100644
File size: 633 bytes
Line 
1MCU=atmega8
2BAUD=57600
3FCPU=16000000
4PROG=avr109 -P /dev/ports/usb0 -b $(BAUD) -u
5
6testusart.hex: testusart.bin
7 avr-objcopy -j .text -j .data -O ihex testusart.bin testusart.hex
8
9testusart.bin: usart.o main.o
10 avr-gcc usart.o main.o -o testusart.bin -mmcu=$(MCU) -Os
11
12main.o: testuart.c ../libs/usart/usart.h
13 avr-gcc -c testuart.c -mmcu=$(MCU) -Os -o main.o
14
15usart.o: ../libs/usart/usart.c ../libs/usart/usart.h
16 avr-gcc -c ../libs/usart/usart.c -o usart.o -mmcu=$(MCU) -DBAUD=$(BAUD) -DF_CPU=$(FCPU) -Os
17
18flash: testusart.hex
19 avrdude -c $(PROG) -p $(MCU) -Uflash:w:testusart.hex
20
21clean:
22 rm *.bin *.o *.hex
Note: See TracBrowser for help on using the repository browser.