FreeCalypso > hg > freecalypso-citrine
comparison finlink/Makefile @ 0:75a11d740a02
initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 09 Jun 2016 00:02:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:75a11d740a02 |
---|---|
1 CC= arm-elf-gcc | |
2 LD= arm-elf-ld | |
3 OBJCOPY=arm-elf-objcopy | |
4 | |
5 FLASH_TARGET= flashImage.bin | |
6 RAM_TARGET= ramImage.srec | |
7 | |
8 LIBC_A= `${CC} -print-file-name=libc.a -mthumb-interwork` | |
9 LIBC_T= `${CC} -print-file-name=libc.a -mthumb-interwork -mthumb` | |
10 LIBGCC_A= `${CC} -print-file-name=libgcc.a -mthumb-interwork` | |
11 LIBGCC_T= `${CC} -print-file-name=libgcc.a -mthumb-interwork -mthumb` | |
12 | |
13 sinclude ../include/config.mk | |
14 | |
15 BASE_LIBS= ../riviera/librv.a ../nucleus/libplus.xip.a \ | |
16 ../nucleus/libplus.iram.a ../sprintf/libsprintf.a \ | |
17 ../libiram/libiram.a | |
18 LIB_DEPEND= ${BASE_LIBS} | |
19 | |
20 ifeq (${CONFIG_INCLUDE_PS},1) | |
21 PS_LIBS= ../g23m-aci/dti/libdti.a ../g23m-glue/gdi/libgdi.a \ | |
22 ../comlib/comlib.a ../ccd/libccd.a | |
23 LIB_LINK_ORDER+=${PS_LIBS} | |
24 LIB_DEPEND+= ${PS_LIBS} | |
25 endif | |
26 | |
27 ifeq (${CONFIG_INCLUDE_GPF},1) | |
28 GPF_LIBS= ../gpf/libs/libgpf.xip.a ../gpf/libs/libgpf.iram.a | |
29 LIB_LINK_ORDER+= --start-group ${GPF_LIBS} --end-group | |
30 LIB_DEPEND+= ${GPF_LIBS} | |
31 endif | |
32 | |
33 ifeq (${CONFIG_INCLUDE_L1},1) | |
34 LIB_LINK_ORDER+=../L1/dsp/libdsp.a | |
35 LIB_DEPEND+= ../L1/dsp/libdsp.a | |
36 endif | |
37 | |
38 LIB_LINK_ORDER+= ${BASE_LIBS} | |
39 LIB_LINK_ORDER+= --start-group ${LIBC_A} ${LIBGCC_A} --end-group | |
40 | |
41 INT_PIECES= ../bsp/iramcode.o | |
42 EXT_PIECES= ../bsp/xipcode.o ../serial/xipcode.o ../sysglue/xipcode.o \ | |
43 ../services/ffs/xipcode.o ../services/dar/xipcode.o | |
44 ifeq (${FLASH_IS_INTEL_ONEBANK},1) | |
45 INT_PIECES+= ../services/ffs/intelsbdrv.o | |
46 endif | |
47 ifeq (${CONFIG_INCLUDE_GPF},1) | |
48 EXT_PIECES+= ../gpf/conf/xipcode.o | |
49 endif | |
50 ifeq (${CONFIG_INCLUDE_L1},1) | |
51 INT_PIECES+= ../L1/iramcode.o | |
52 EXT_PIECES+= ../L1/xipcode.o | |
53 endif | |
54 ifeq (${CONFIG_INCLUDE_PS},1) | |
55 EXT_PIECES+= ../g23m-aci/xipcode.o ../g23m-gsm/xipcode.o | |
56 EXT_PIECES+= ../g23m-glue/cst/xipcode.o | |
57 endif | |
58 ifeq (${CONFIG_INCLUDE_PCM},1) | |
59 EXT_PIECES+= ../services/pcm/xipcode.o | |
60 endif | |
61 ifeq (${RVM_ETM_SWE},1) | |
62 EXT_PIECES+= ../services/etm/xipcode.o | |
63 endif | |
64 ifeq (${CONFIG_LLDBG},1) | |
65 EXT_PIECES+= ../lldbg/xipcode.o | |
66 endif | |
67 | |
68 flashImage: ${FLASH_TARGET} | |
69 ramImage: ${RAM_TARGET} | |
70 | |
71 iramcode.o: ${INT_PIECES} | |
72 ${LD} -r -o $@ ${INT_PIECES} | |
73 | |
74 xipcode.o: ${EXT_PIECES} | |
75 ${LD} -r -o $@ ${EXT_PIECES} | |
76 | |
77 flashImage.ld: ld-script.src flash.m4 ../include/config.m4 | |
78 m4 flash.m4 ld-script.src > $@ | |
79 | |
80 flashImage.elf: iramcode.o xipcode.o ../sysglue/flashboot.o ${LIB_DEPEND} \ | |
81 flashImage.ld | |
82 ${LD} -N -T flashImage.ld -o $@ -Map flashImage.map \ | |
83 iramcode.o xipcode.o ../sysglue/flashboot.o \ | |
84 ${LIB_LINK_ORDER} | |
85 | |
86 flashImage.bin: flashImage.elf | |
87 ${OBJCOPY} -O binary $< $@ | |
88 | |
89 ramImage.ld: ld-script.src xram.m4 ../include/config.m4 | |
90 m4 xram.m4 ld-script.src > $@ | |
91 | |
92 ramImage.elf: iramcode.o xipcode.o ${LIB_DEPEND} ramImage.ld | |
93 ${LD} -N -T ramImage.ld -o $@ -Map ramImage.map iramcode.o xipcode.o \ | |
94 ${LIB_LINK_ORDER} | |
95 | |
96 ramImage.srec: ramImage.elf | |
97 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@ | |
98 | |
99 clean: | |
100 rm -f *.o *errs *core *.elf *.bin *.srec *.ld *.map | |
101 | |
102 FRC: |