blob: b08c634a5a3f361613ef3f6e245b9dc5c7d2c2d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
.POSIX:
.SUFFIXES: .ihx .out
CC = avr-gcc
CFLAGS = -Wall -std=c99 -mmcu=avr5 -O2
LD = avr-ld
LDFLAGS =
OBJCOPY = avr-objcopy
OBJS = on.o
send: a.ihx
avrdude -patmega328p -carduino -U flash:w:a.ihx:i -P/dev/ttyACM0 -v
touch send
clean:
rm -f $(OBJS) a.out a.ihx send
.out.ihx:
$(OBJCOPY) $< $@ --output-target ihex
a.ihx: a.out
a.out: $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $@
on.o: on.c
|