annotate Makefile @ 0:ffeab3c04e83

Initial revision
author darius
date Sun, 11 Jul 2004 00:45:50 +0930
parents
children 288d801a47ff
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
1 # Programs
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
2 PROG=avrdude
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
3 CC=avr-gcc
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
4 OBJCOPY=avr-objcopy
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
5
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
6 # Options
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
7 PART=8515
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
8 MCU=at90s${PART}
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
9 CFLAGS=-Os -g -mmcu=${MCU} -Wa,-adhlmsn=$(<:.c=.lst) -Wall
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
10 LDFLAGS=
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
11 LDADD=
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
12 RM=rm -f
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
13
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
14 all: testavr.hex
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
15
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
16 testavr.hex: testavr.out
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
17 ${OBJCOPY} -j .text -j .data -j .bss -O ihex $> $@
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
18 # ${OBJCOPY} -j .text -O ihex $> $@
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
19
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
20 testavr.out: testavr.o 1wire.o
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
21 ${CC} ${LDFLAGS} -g -mmcu=${MCU} -o $@ $>
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
22
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
23 .c.o:
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
24 ${CC} ${CFLAGS} -c $> -o $@
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
25
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
26 clean:
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
27 ${RM} testavr.hex testavr.out testavr.o
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
28
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
29 prog: testavr.hex
ffeab3c04e83 Initial revision
darius
parents:
diff changeset
30 ${PROG} -U flash:w:$> -p ${PART} -c alf -E vcc,noreset -q