FreeCalypso > hg > fc-selenite
comparison gcc/makefile-body @ 94:e5cbc745543b
gcc/makefile-body: a few fixes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 21 Jul 2018 01:03:53 +0000 |
parents | 081dd22ca6a2 |
children | 5ba0bee90efa |
comparison
equal
deleted
inserted
replaced
93:26237514cae7 | 94:e5cbc745543b |
---|---|
1 CC= arm-elf-gcc | 1 CC= arm-elf-gcc |
2 LD= arm-elf-ld | 2 LD= arm-elf-ld |
3 OBJCOPY=arm-elf-objcopy | 3 OBJCOPY=arm-elf-objcopy |
4 | 4 |
5 CFLAGS= -mthumb-interwork | |
6 | |
5 LIBC_A= `${CC} -print-file-name=libc.a -mthumb-interwork` | 7 LIBC_A= `${CC} -print-file-name=libc.a -mthumb-interwork` |
6 LIBGCC_A= `${CC} -print-file-name=libgcc.a -mthumb-interwork` | 8 LIBGCC_A= `${CC} -print-file-name=libgcc.a -mthumb-interwork` |
7 LIBM_T= `${CC} -print-file-name=libc.a -mthumb-interwork -mthumb` | 9 LIBM_T= `${CC} -print-file-name=libm.a -mthumb-interwork -mthumb` |
8 | 10 |
9 all: fwimage.bin flash-script | 11 all: fwimage.bin flash-script |
10 ram: ramimage.srec | 12 ram: ramimage.srec |
11 | 13 |
12 ${SUBDIR}: FRC | 14 ${SUBDIR}: FRC |
14 | 16 |
15 ${LIBS}: ${SUBDIR} | 17 ${LIBS}: ${SUBDIR} |
16 @true | 18 @true |
17 | 19 |
18 bootentry-flash.o: ../src/cs/system/main/gcc/bootentry.S | 20 bootentry-flash.o: ../src/cs/system/main/gcc/bootentry.S |
19 ${CC} -c -mthumb-interwork -DFLASH -Iconfig -I../src/nucleus/gcc $< | 21 ${CC} -c -o $@ ${CFLAGS} -DFLASH -Iconfig -I../src/nucleus/gcc $< |
20 | 22 |
21 bootentry-xram.o: ../src/cs/system/main/gcc/bootentry.S | 23 bootentry-xram.o: ../src/cs/system/main/gcc/bootentry.S |
22 ${CC} -c -mthumb-interwork -DXRAM -Iconfig -I../src/nucleus/gcc $< | 24 ${CC} -c -o $@ ${CFLAGS} -DXRAM -Iconfig -I../src/nucleus/gcc $< |
23 | 25 |
24 ramvecs.o: ../src/cs/system/main/gcc/ramvecs.S | 26 ramvecs.o: ../src/cs/system/main/gcc/ramvecs.S |
25 ${CC} -c -mthumb-interwork $< | 27 ${CC} -c ${CFLAGS} $< |
26 | 28 |
27 build_date.c: ${LIBS} bootentry-flash.o bootentry-xram.o ramvecs.o | 29 build_date.c: ${LIBS} bootentry-flash.o bootentry-xram.o ramvecs.o Makefile |
28 ../helpers/build-date gcc > $@ | 30 ../helpers/build-date gcc > $@ |
29 | 31 |
30 build_date.o: build_date.c | 32 build_date.o: build_date.c |
31 ${CC} -c -mthumb-interwork build_date.c | 33 ${CC} -c ${CFLAGS} build_date.c |
32 | 34 |
33 fwimage.ld: ../targets/${TARGET}.m4 ../gcc/flash.m4 ../gcc/ld-script.src | 35 fwimage.ld: ../targets/${TARGET}.m4 ../gcc/flash.m4 ../gcc/ld-script.src |
34 m4 $^ > $@ | 36 m4 $^ > $@ |
35 | 37 |
36 fwimage.elf: ${LIBS} bootentry-flash.o ramvecs.o build_date.o fwimage.ld | 38 fwimage.elf: ${LIBS} bootentry-flash.o ramvecs.o build_date.o fwimage.ld |
55 | 57 |
56 ramimage.srec: ramimage.elf | 58 ramimage.srec: ramimage.elf |
57 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@ | 59 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@ |
58 | 60 |
59 clean: FRC | 61 clean: FRC |
60 rm -f fwimage.* ramimage.* bootentry-*.o ramvecs.o | 62 rm -f fwimage.* ramimage.* bootentry*.o ramvecs.o |
61 rm -f build_date.* flash-script | 63 rm -f build_date.* flash-script |
62 for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done | 64 for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done |
63 | 65 |
64 FRC: | 66 FRC: |