FreeCalypso > hg > freecalypso-tools
comparison target-utils/helloapp/Makefile @ 516:8bdbae4c0e53
target-utils/helloapp: build boot-ROM-based and fixed-UART versions
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 29 May 2019 05:40:51 +0000 |
parents | 58d3a0634272 |
children | bfddfecc52b2 |
comparison
equal
deleted
inserted
replaced
515:455c394c014d | 516:8bdbae4c0e53 |
---|---|
2 CFLAGS= -Os -fno-builtin | 2 CFLAGS= -Os -fno-builtin |
3 CPPFLAGS=-I../include | 3 CPPFLAGS=-I../include |
4 LD= arm-elf-ld | 4 LD= arm-elf-ld |
5 OBJCOPY=arm-elf-objcopy | 5 OBJCOPY=arm-elf-objcopy |
6 | 6 |
7 PROG= helloapp | 7 BOOTROM_OBJS= crt0.o cmdtab.o main-bootrom.o mygetchar.o |
8 OBJS= crt0.o cmdtab.o main.o mygetchar.o | 8 IRDA_OBJS= crt0.o cmdtab.o main-fixeduart.o mygetchar.o uartbase-irda.o |
9 MODEM_OBJS= crt0.o cmdtab.o main-fixeduart.o mygetchar.o uartbase-modem.o | |
10 | |
9 LIBS= ../libcommon/libcommon.a ../libprintf/libprintf.a ../libbase/libbase.a \ | 11 LIBS= ../libcommon/libcommon.a ../libprintf/libprintf.a ../libbase/libbase.a \ |
10 ../libc/libc.a | 12 ../libc/libc.a |
11 LIBGCC= `${CC} -print-file-name=libgcc.a` | 13 LIBGCC= `${CC} -print-file-name=libgcc.a` |
12 LDS= ../env/iram.lds | 14 LDS= ../env/iram.lds |
13 | 15 |
14 all: ${PROG}.srec | 16 all: helloapp-bootrom.srec helloapp-irda.srec helloapp-modem.srec |
17 | |
18 .SUFFIXES: .elf .srec | |
19 | |
20 .elf.srec: | |
21 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@ | |
15 | 22 |
16 crt0.S: | 23 crt0.S: |
17 ln -s ../env/crt0.S . | 24 ln -s ../env/crt0.S . |
18 | 25 |
19 ${PROG}.elf: ${OBJS} ${LIBS} ${LDS} | 26 helloapp-bootrom.elf: ${BOOTROM_OBJS} ${LIBS} ${LDS} |
20 ${LD} -N --defsym Base_addr=0x800750 --defsym stack_bottom=0x83FFFC \ | 27 ${LD} -N --defsym Base_addr=0x800750 --defsym stack_bottom=0x83FFFC \ |
21 -T ${LDS} -o $@ ${OBJS} ${LIBS} ${LIBGCC} | 28 -T ${LDS} -o $@ ${BOOTROM_OBJS} ${LIBS} ${LIBGCC} |
22 | 29 |
23 ${PROG}.srec: ${PROG}.elf | 30 helloapp-irda.elf: ${IRDA_OBJS} ${LIBS} ${LDS} |
24 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@ | 31 ${LD} -N --defsym Base_addr=0x820000 --defsym stack_bottom=0x83FFFC \ |
32 -T ${LDS} -o $@ ${IRDA_OBJS} ${LIBS} ${LIBGCC} | |
33 | |
34 helloapp-modem.elf: ${MODEM_OBJS} ${LIBS} ${LDS} | |
35 ${LD} -N --defsym Base_addr=0x820000 --defsym stack_bottom=0x83FFFC \ | |
36 -T ${LDS} -o $@ ${MODEM_OBJS} ${LIBS} ${LIBGCC} | |
25 | 37 |
26 clean: | 38 clean: |
27 rm -f *.o *errs *core *.elf *.bin *.srec crt0.S | 39 rm -f *.o *errs *core *.elf *.bin *.srec crt0.S |
28 | 40 |
29 FRC: | 41 FRC: |