source: ada-examples/hello_world_ada/Makefile.pc386 @ 0310abc

ada-examples-4-10-branchada-examples-4-6-branchada-examples-4-7-branchada-examples-4-8-branchada-examples-4-9-branch
Last change on this file since 0310abc was 0310abc, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 29, 2003 at 2:01:39 PM

2003-01-29 Joel Sherrill <joel@…>

  • hello_world_ada/Makefile.pc386: Updated to work with gnat in gcc 3.2.1.
  • Property mode set to 100644
File size: 1.3 KB
Line 
1#
2#  Makefile for hello world example
3#
4
5MAIN=hello
6
7# Tool paths
8target=i386-rtems
9tooldir=/opt/rtems/
10rtemsdir=${tooldir}/$(target)/pc386
11
12# Tool names
13GCC=${tooldir}/bin/${target}-gcc
14GNATMAKE=${tooldir}/bin/${target}-gnatmake
15SIZE=${tooldir}/bin/${target}-size
16OBJCOPY=${tooldir}/bin/${target}-objcopy
17NM=${tooldir}/bin/${target}-nm
18
19HEADERADDR=0x00097E00
20START16FILE=$(rtemsdir)/lib/start16.bin
21START16ADDR=0x00097C00
22RELOCADDR=0x00100000
23
24CARGS=-B${rtemsdir}/lib/ -specs bsp_specs -qrtems \
25   -Wl,-Ttext,$(RELOCADDR)
26
27all: init.o $(MAIN)
28
29$(MAIN): $(MAIN).exe
30        ln $(MAIN).exe $(MAIN)
31
32$(MAIN).exe: init.o
33        $(GNATMAKE) -v -O -gnata -gnatE -gnato $(MAIN) -g -o $(MAIN).obj \
34            -bargs -Mgnat_main \
35            -cargs $(CARGS) \
36            -largs $(CARGS) init.o
37        $(SIZE) $(MAIN).obj
38        $(NM) -g -n $(MAIN).obj >$(MAIN).num
39        $(OBJCOPY) -O elf32-i386 \
40            --remove-section=.rodata \
41            --remove-section=.comment \
42            --remove-section=.note \
43            --strip-unneeded $(MAIN).obj $@
44        $(OBJCOPY) -O binary $(MAIN).obj $(MAIN).bin
45        $(rtemsdir)/build-tools/bin2boot -v $(MAIN).bt $(HEADERADDR) \
46          $(START16FILE) $(START16ADDR) 0 $(MAIN).bin $(RELOCADDR) 0
47
48
49init.o: init.c
50        $(GCC) -O4 -g  -Wall -ansi -fasm $(CARGS) \
51            -DGNAT_MAIN_STACKSPACE=16 -c init.c
52
53clean:
54        rm -f b_$(MAIN).c b_$(MAIN).o *.o *.ali $(MAIN)
Note: See TracBrowser for help on using the repository browser.