comparison target-utils/helloapp/Makefile @ 103:40dea2dbc7e6

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