Mercurial > ~darius > hgwebdir.cgi > avr
view Makefile.avr @ 32:b0cb873c0206
Isolate the bus frobbing parts and the delays into a separate header.
This means the user only has to edit a single file to suit their
situation and allows the code to work with active drive systems as
well as passive pullups (ie 1 vs 2 IO pins)
author | darius |
---|---|
date | Sun, 23 Apr 2006 22:57:16 +0930 |
parents | 59c7fcf10ea0 |
children | 2b8278ec5adb |
line wrap: on
line source
# # $Id$ # .SUFFIXES: .hex .out .c .o .elf .dmp .s # Programs AS=avr-as CC=avr-gcc OBJCOPY=avr-objcopy OBJDUMP=avr-objdump CPPFLAGS+=-Wa,-adhlmsn=${<:S/.c/.lst/} MCU?=at90s8515 CFLAGS+=-mmcu=${MCU} LDFLAGS+=-Wl,-Map=${PROG}.map,--cref LDFLAGS+=${LDADD} RM=rm -f PROGRAMMER=avrdude PROGOPTS=-p ${PART} -c alf -E vcc,noreset -q .if !defined(SRCS) SRCS= ${PROG}.c .endif OBJS+= ${SRCS:N*.h:R:S/$/.o/g} all: ${PROG}.hex ${PROG}.dmp .c.o: ${CC} ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC} -o ${.PREFIX}.o ${PROG}.elf: ${OBJS} ${CC} ${CFLAGS} ${LDFLAGS} -g ${OBJS} -o ${PROG}.elf ${LDADD} .elf.hex: ${OBJCOPY} -j .text -j .data -j .bss -j .noinit -O ihex $> $@ .elf.dmp: ${OBJDUMP} -S ${.IMPSRC} > ${.PREFIX}.dmp clean: ${RM} ${PROG}.hex ${PROG}.out ${PROG}.elf ${PROG}.map ${OBJS} ${OBJS:S/.o/.lst/} ${PROG}.dmp prog: all ${PROGRAMMER} -U flash:w:${PROG}.hex ${PROGOPTS}