FreeCalypso > hg > freecalypso-sw
annotate loadagent/Makefile @ 6:5eaafa83be60
loadagent: generate binary and srec images
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 29 Apr 2013 19:30:43 +0000 |
parents | 4a7a325ed1b6 |
children |
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 |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 LD= arm-elf-ld |
6
5eaafa83be60
loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
4 OBJCOPY=arm-elf-objcopy |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 OBJS= crt0.o main.o serio.o serwait.o |
5
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
7 PRINTF= libprintf/libprintf.a |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 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
|
10 `${CC} -print-file-name=libgcc.a` |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 |
6
5eaafa83be60
loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
12 all: loadagent.bin loadagent.srec |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 |
5
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
14 loadagent.elf: ${OBJS} ${PRINTF} loadagent.lds |
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
15 ${LD} -N -T loadagent.lds -o $@ ${OBJS} ${PRINTF} \ |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 --start-group ${TC_LIBS} --end-group |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 |
6
5eaafa83be60
loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
18 loadagent.bin: loadagent.elf |
5eaafa83be60
loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
19 ${OBJCOPY} -O binary $< $@ |
5eaafa83be60
loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
20 |
5eaafa83be60
loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
21 loadagent.srec: loadagent.elf |
5eaafa83be60
loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
22 ${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
|
23 |
5
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
24 ${PRINTF}: FRC |
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
25 cd libprintf; make ${MFLAGS} |
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
26 |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 clean: |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 rm -f *.o *errs *core *.elf *.bin *.srec |
5
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
29 cd libprintf; make clean |
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
30 |
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
31 FRC: |