annotate target-utils/helloapp/Makefile @ 11:40f607bb0a2c

target-utils refactored
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 01 May 2013 07:39:35 +0000
parents loadagent/Makefile@5eaafa83be60
children f0501c4a8790
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 CC= arm-elf-gcc
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 CFLAGS= -Os -fno-builtin
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
3 CPPFLAGS=-I../include
2
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 LD= arm-elf-ld
6
5eaafa83be60 loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 5
diff changeset
5 OBJCOPY=arm-elf-objcopy
2
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
7 PROG= helloapp
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
8 OBJS= crt0.o main.o mygetchar.o
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
9 LIBS= ../libprintf/libprintf.a ../libcommon/libcommon.a
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
10 LDS= ../env/iram.lds
2
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 TC_LIBS=`${CC} -print-file-name=libc.a` \
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 `${CC} -print-file-name=libgcc.a`
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
15 all: ${PROG}.srec
2
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
17 crt0.S: ../env/crt0.S
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
18 ln -s $< .
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
19
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
20 ${PROG}.elf: ${OBJS} ${LIBS} ${LDS}
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
21 ${LD} -N --defsym stack_bottom=0x83FFFC -T ${LDS} -o $@ ${OBJS} ${LIBS}\
2
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 --start-group ${TC_LIBS} --end-group
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
24 ${PROG}.srec: ${PROG}.elf
6
5eaafa83be60 loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 5
diff changeset
25 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@
5eaafa83be60 loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 5
diff changeset
26
2
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 clean:
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 6
diff changeset
28 rm -f *.o *errs *core *.elf *.bin *.srec crt0.S
5
4a7a325ed1b6 loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 2
diff changeset
29
4a7a325ed1b6 loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 2
diff changeset
30 FRC: