source: ada-examples/hello_world_ada/Makefile.pc386 @ 38b445a

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 38b445a was 7efcefa, checked in by Joel Sherrill <joel.sherrill@…>, on 04/20/99 at 13:05:42

base GNAT/RTEMS examples

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[7efcefa]1#
2#  Makefile for hello world example
3#
4
5MAIN=hello
6
7# Tool paths
8target=i386-rtems
9tooldir=/home/joel/gnat-3.10p/${target}/
10rtemsdir=${tooldir}/rtems/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) -Wl,--oformat,elf32-i386
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 -r \
35            -cargs $(CARGS) \
36            -largs $(CARGS) init.o
37        $(SIZE) $(MAIN).obj
38        $(NM) -g -n $(MAIN).obj >$(MAIN).num
39        $(OBJCOPY) -O a.out-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.