scoutece / paintboard / code / Makefile @ fcddafaf
History | View | Annotate | Download (367 Bytes)
1 |
SRC = main.c twi.c motor.c servo.c sol.c |
---|---|
2 |
HDR = twi.h motor.h servo.h sol.h |
3 |
|
4 |
paint: paint.hex |
5 |
@ |
6 |
|
7 |
%.hex: %.elf |
8 |
avr-objcopy -j .text -j .data -O ihex $< $@ |
9 |
|
10 |
paint.elf: $(SRC) $(HDR) |
11 |
avr-gcc -mmcu=atmega328 -DF_CPU=8000000UL $(SRC) -o paint.elf -Os |
12 |
|
13 |
program: paint.hex |
14 |
avrdude -c avrispmkII -p m328 -P usb -B 1 -U flash:w:paint.hex |
15 |
|
16 |
clean: |
17 |
rm -f paint.elf paint.hex |