annotate nuc-fw/finlink/Makefile @ 84:ccc5161848c7

loadtools: support building for GTA0x AP
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 20 Aug 2013 04:51:15 +0000
parents 147861b15cda
children f459043fae0c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
81
147861b15cda nuc-fw: ramImage.srec built, nucdemo runs
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 80
diff changeset
5 RAM_TARGET= ramImage.srec
80
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
81
147861b15cda nuc-fw: ramImage.srec built, nucdemo runs
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 80
diff changeset
32 ramImage.srec: ramImage.elf
147861b15cda nuc-fw: ramImage.srec built, nucdemo runs
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 80
diff changeset
33 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@
147861b15cda nuc-fw: ramImage.srec built, nucdemo runs
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 80
diff changeset
34
80
39b1c369b67f nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 clean:
39b1c369b67f nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 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
37
39b1c369b67f nuc-fw: links to an ELF image
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 FRC: