source: ada-examples/hello_world_ada/Makefile.pc386 @ 8b09de0

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

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

  • hello_world_ada/Makefile.pc386, hello_world_ada/init.c: Update to gcc 4.2.0 and rtems 4.8.
  • hello_world_ada/Makefile.anybsp: New file.
  • hello_world_ada/Makefile.erc32, hello_world_ada/Makefile.jmr3904, hello_world_ada/Makefile.psim: Removed.
  • 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)
24
25all: init.o $(MAIN)
26
27$(MAIN): $(MAIN).exe
28        ln $(MAIN).exe $(MAIN)
29
30$(MAIN).exe: init.o
31        $(GNATMAKE) -v -O -gnata -gnatE -gnato $(MAIN) -g -o $(MAIN).obj \
32            -bargs -Mgnat_main \
33            -cargs $(CARGS) \
34            -largs $(CARGS) init.o
35        $(SIZE) $(MAIN).obj
36        $(NM) -g -n $(MAIN).obj >$(MAIN).num
37        $(OBJCOPY) -O elf32-i386 \
38            --remove-section=.rodata \
39            --remove-section=.comment \
40            --remove-section=.note \
41            --strip-unneeded $(MAIN).obj $@
42        $(OBJCOPY) -O binary $(MAIN).obj $(MAIN).bin
43        $(rtemsdir)/build-tools/bin2boot -v $(MAIN).bt $(HEADERADDR) \
44          $(START16FILE) $(START16ADDR) 0 $(MAIN).bin $(RELOCADDR) 0
45
46init.o: init.c
47        $(CC) $(CFLAGS) -c init.c
48
49clean:
50        rm -f b_$(MAIN).c b_$(MAIN).o *.o *.ali $(MAIN)
Note: See TracBrowser for help on using the repository browser.