view loadagent/Makefile @ 5:4a7a325ed1b6

loadagent: printf hooked in
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 29 Apr 2013 17:53:54 +0000
parents ddda170fa6f4
children 5eaafa83be60
line wrap: on
line source

CC=	arm-elf-gcc
CFLAGS=	-Os -fno-builtin
LD=	arm-elf-ld

OBJS=	crt0.o main.o serio.o serwait.o
PRINTF=	libprintf/libprintf.a

TC_LIBS=`${CC} -print-file-name=libc.a` \
	`${CC} -print-file-name=libgcc.a`

all:	loadagent.elf

loadagent.elf:	${OBJS} ${PRINTF} loadagent.lds
	${LD} -N -T loadagent.lds -o $@ ${OBJS} ${PRINTF} \
		--start-group ${TC_LIBS} --end-group

${PRINTF}:	FRC
	cd libprintf; make ${MFLAGS}

clean:
	rm -f *.o *errs *core *.elf *.bin *.srec
	cd libprintf; make clean

FRC: