source: ada-examples/hello_world_ada/Makefile.pc386 @ 4ad07d0

ada-examples-4-10-branchada-examples-4-8-branchada-examples-4-9-branch
Last change on this file since 4ad07d0 was 4ad07d0, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 17, 2007 at 7:12:31 PM

2007-07-17 Joel Sherrill <joel.sherrill@…>

  • hello_world_ada/Makefile.anybsp, hello_world_ada/Makefile.pc386, hello_world_ada/Makefile.score603e, hello_world_ada/init.c: Clean up GNAT_MAIN_STACKSIZE.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1#
2#  Makefile for hello world example
3#
4
5MAIN=hello
6
7
8include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
9
10include $(RTEMS_CUSTOM)
11include $(PROJECT_ROOT)/make/leaf.cfg
12
13# Constants for relocating
14HEADERADDR=0x00097E00
15START16FILE=$(rtemsdir)/lib/start16.bin
16START16ADDR=0x00097C00
17RELOCADDR=0x00100000
18
19# Tool helpers
20rtemsdir=${RTEMS_MAKEFILE_PATH}
21GNATMAKE=$(AS:as=gnatmake)
22CARGS=-B${rtemsdir}/lib/ -specs bsp_specs -qrtems $(CPU_CFLAGS) \
23   -Wl,-Ttext,$(RELOCADDR)
24CARGS+=-DGNAT_MAIN_STACKSPACE=100
25
26all: init.o $(MAIN)
27
28$(MAIN): $(MAIN).exe
29        ln $(MAIN).exe $(MAIN)
30
31$(MAIN).exe: init.o
32        $(GNATMAKE) -v -O -gnata -gnatE -gnato $(MAIN) -g -o $(MAIN).obj \
33            -bargs -Mgnat_main \
34            -cargs $(CARGS) \
35            -largs $(CARGS) init.o
36        $(SIZE) $(MAIN).obj
37        $(NM) -g -n $(MAIN).obj >$(MAIN).num
38        $(OBJCOPY) -O elf32-i386 \
39            --remove-section=.rodata \
40            --remove-section=.comment \
41            --remove-section=.note \
42            --strip-unneeded $(MAIN).obj $@
43        $(OBJCOPY) -O binary $(MAIN).obj $(MAIN).bin
44        $(rtemsdir)/build-tools/bin2boot -v $(MAIN).bt $(HEADERADDR) \
45          $(START16FILE) $(START16ADDR) 0 $(MAIN).bin $(RELOCADDR) 0
46
47init.o: init.c
48        $(CC) $(CFLAGS) -c init.c
49
50clean:
51        rm -f b_$(MAIN).c b_$(MAIN).o *.o *.ali $(MAIN)
Note: See TracBrowser for help on using the repository browser.