comparison target-utils/simagent/Makefile @ 769:f18db0f00ad8

target-utils: simagent application started
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 12 Mar 2021 06:40:24 +0000
parents target-utils/simtest/Makefile@58d3a0634272
children 81f9e4b4f55c
comparison
equal deleted inserted replaced
768:4e6837859c0b 769:f18db0f00ad8
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=/opt/freecalypso/target-bin
8
9 PROG= simagent
10 OBJS= crt0.o cmdtab.o main.o
11 LIBS= ../libcommon/libcommon.a ../libprintf/libprintf.a ../libbase/libbase.a \
12 ../libc/libc.a
13 LIBGCC= `${CC} -print-file-name=libgcc.a`
14 LDS= ../env/iram.lds
15
16 all: ${PROG}.srec
17
18 crt0.S:
19 ln -s ../env/crt0.S .
20
21 ${PROG}.elf: ${OBJS} ${LIBS} ${LDS}
22 ${LD} -N --defsym Base_addr=0x800750 --defsym stack_bottom=0x83FFFC \
23 -T ${LDS} -o $@ ${OBJS} ${LIBS} ${LIBGCC}
24
25 ${PROG}.srec: ${PROG}.elf
26 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@
27
28 install:
29 mkdir -p ${INSTDIR}
30 install -c -m 644 ${PROG}.srec ${INSTDIR}
31
32 clean:
33 rm -f *.o *errs *core *.elf *.bin *.srec crt0.S
34
35 FRC: