comparison target-utils/loadagent/Makefile @ 0:e7502631a0f9

initial import from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 11 Jun 2016 00:13:35 +0000
parents
children b301b75de0e0
comparison
equal deleted inserted replaced
-1:000000000000 0:e7502631a0f9
1 CC= arm-elf-gcc
2 CFLAGS= -Os -fno-builtin
3 CPPFLAGS=-I../include
4 LD= arm-elf-ld
5 OBJCOPY=arm-elf-objcopy
6
7 INSTDIR=/usr/local/share/freecalypso
8
9 PROG= loadagent
10 OBJS= crt0.o cmdtab.o main.o mygetchar.o
11 LIBS= ../libload/libload.a ../libcommon/libcommon.a ../libprintf/libprintf.a \
12 ../libbase/libbase.a
13 LDS= ../env/iram.lds
14
15 TC_LIBS=`${CC} -print-file-name=libc.a` \
16 `${CC} -print-file-name=libgcc.a`
17
18 all: ${PROG}.srec
19
20 crt0.S: ../env/crt0.S
21 ln -s $< .
22
23 ${PROG}.elf: ${OBJS} ${LIBS} ${LDS}
24 ${LD} -N --defsym Base_addr=0x838000 --defsym stack_bottom=0x83FFFC \
25 -T ${LDS} -o $@ ${OBJS} ${LIBS} \
26 --start-group ${TC_LIBS} --end-group
27
28 ${PROG}.srec: ${PROG}.elf
29 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@
30
31 install:
32 mkdir -p ${INSTDIR}
33 install -c ${PROG}.srec ${INSTDIR}
34
35 clean:
36 rm -f *.o *errs *core *.elf *.bin *.srec crt0.S
37
38 FRC: