comparison target-utils/loadagent/Makefile @ 104:f23aa34899a3

target-utils: loadagent converted to our own libc
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 01 Nov 2016 00:28:57 +0000
parents 2c9ea966edb9
children 58d3a0634272
comparison
equal deleted inserted replaced
103:40dea2dbc7e6 104:f23aa34899a3
7 INSTDIR=/opt/freecalypso/target-bin 7 INSTDIR=/opt/freecalypso/target-bin
8 8
9 PROG= loadagent 9 PROG= loadagent
10 OBJS= crt0.o cmdtab.o main.o mygetchar.o 10 OBJS= crt0.o cmdtab.o main.o mygetchar.o
11 LIBS= ../libload/libload.a ../libcommon/libcommon.a ../libprintf/libprintf.a \ 11 LIBS= ../libload/libload.a ../libcommon/libcommon.a ../libprintf/libprintf.a \
12 ../libbase/libbase.a 12 ../libbase/libbase.a ../libc/libc.a
13 LIBGCC= `${CC} -print-file-name=libgcc.a`
13 LDS= ../env/iram.lds 14 LDS= ../env/iram.lds
14
15 TC_LIBS=`${CC} -print-file-name=libc.a` \
16 `${CC} -print-file-name=libgcc.a`
17 15
18 all: ${PROG}.srec 16 all: ${PROG}.srec
19 17
20 crt0.S: ../env/crt0.S 18 crt0.S: ../env/crt0.S
21 ln -s $< . 19 ln -s $< .
22 20
23 ${PROG}.elf: ${OBJS} ${LIBS} ${LDS} 21 ${PROG}.elf: ${OBJS} ${LIBS} ${LDS}
24 ${LD} -N --defsym Base_addr=0x838000 --defsym stack_bottom=0x83FFFC \ 22 ${LD} -N --defsym Base_addr=0x838000 --defsym stack_bottom=0x83FFFC \
25 -T ${LDS} -o $@ ${OBJS} ${LIBS} \ 23 -T ${LDS} -o $@ ${OBJS} ${LIBS} ${LIBGCC}
26 --start-group ${TC_LIBS} --end-group
27 24
28 ${PROG}.srec: ${PROG}.elf 25 ${PROG}.srec: ${PROG}.elf
29 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@ 26 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@
30 27
31 install: 28 install: