view Makefile @ 1:83c649cc59af DANIEL AVR_1_1

Import AVR test code.
author darius
date Sun, 11 Jul 2004 00:45:50 +0930
parents ffeab3c04e83
children 288d801a47ff
line wrap: on
line source

# Programs
PROG=avrdude
CC=avr-gcc
OBJCOPY=avr-objcopy

# Options
PART=8515
MCU=at90s${PART}
CFLAGS=-Os -g -mmcu=${MCU} -Wa,-adhlmsn=$(<:.c=.lst) -Wall
LDFLAGS=
LDADD=
RM=rm -f

all: testavr.hex

testavr.hex: testavr.out
	${OBJCOPY} -j .text -j .data -j .bss -O ihex $> $@
#	${OBJCOPY} -j .text -O ihex $> $@

testavr.out: testavr.o 1wire.o
	${CC} ${LDFLAGS} -g -mmcu=${MCU} -o $@ $>

.c.o:
	${CC} ${CFLAGS} -c $> -o $@

clean:
	${RM} testavr.hex testavr.out testavr.o

prog: testavr.hex
	${PROG} -U flash:w:$> -p ${PART} -c alf -E vcc,noreset -q