FreeCalypso > hg > freecalypso-sw
annotate nuc-fw/finlink/Makefile @ 80:39b1c369b67f
nuc-fw: links to an ELF image
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 16 Aug 2013 02:25:58 +0000 |
parents | |
children | 147861b15cda |
rev | line source |
---|---|
80
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 CC= arm-elf-gcc |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 LD= arm-elf-ld |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 OBJCOPY=arm-elf-objcopy |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 RAM_TARGET= ramImage.elf |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 LIBC_A= `${CC} -print-file-name=libc.a -mthumb-interwork` |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 LIBC_T= `${CC} -print-file-name=libc.a -mthumb-interwork -mthumb` |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 LIBGCC_A= `${CC} -print-file-name=libgcc.a -mthumb-interwork` |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 LIBGCC_T= `${CC} -print-file-name=libgcc.a -mthumb-interwork -mthumb` |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 LOCAL_LIBS= ../nucleus/libplus.iram.a ../nucleus/libplus.xip.a \ |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 ../sprintf/libsprintf.a |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 INT_PIECES= ../sysglue/sysinit.o |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 EXT_PIECES= ../nucdemo/demo.o |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 all: ${RAM_TARGET} |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 ramImage: ${RAM_TARGET} |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 iramcode.o: ${INT_PIECES} |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 ${LD} -r -o $@ ${INT_PIECES} |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 xipcode.o: ${EXT_PIECES} |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 ${LD} -r -o $@ ${EXT_PIECES} |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 ramImage.elf: iramcode.o xipcode.o ${LOCAL_LIBS} xram.lds |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 ${LD} -N -T xram.lds -o $@ -Map ramImage.map iramcode.o xipcode.o \ |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 --start-group ${LOCAL_LIBS} --end-group \ |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 --start-group ${LIBC_A} ${LIBGCC_A} --end-group |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 clean: |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 rm -f *.o *errs *core *.elf *.bin *.srec |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 |
39b1c369b67f
nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 FRC: |