source: ada-examples/Makefile.shared @ 14f44a3

ada-examples-4-10-branchada-examples-4-9-branch
Last change on this file since 14f44a3 was 14f44a3, checked in by Joel Sherrill <joel.sherrill@…>, on 10/17/07 at 20:55:06

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

  • Makefile, Makefile.shared, rtems_init.c, irq_test/interrupt_pkg.adb, irq_test/interrupt_pkg.ads, irq_test/irqforce.c, irq_test/irqtest.adb, rootfs/etc/hosts: Adding new tests as improvements are made to the RTEMS port of the GNAT run-time.
  • empty/Makefile, empty/README, empty/empty.adb, hello_via_task/.cvsignore, hello_via_task/Makefile, hello_via_task/hello.adb, irq_test/.cvsignore, irq_test/Makefile, irq_test/README, irq_test_c/.cvsignore, irq_test_c/Makefile, irq_test_c/README, irq_test_c/init.c, irq_test_c/irqforce.c: New files.
  • Property mode set to 100644
File size: 2.1 KB
Line 
1#
2#  Subdirectory makefiles do some setup, then we get here
3#
4
5# Tool helpers
6CARGS =-B${RTEMS_MAKEFILE_PATH}/lib/ -specs=bsp_specs -qrtems $(CPU_CFLAGS)
7
8# GEN5200 Specific Information
9ifeq ($(RTEMS_BSP_FAMILY),gen5200)
10  LINKARGS+=-qnolinkcmds -T$(RTEMS_LINKCMDS)
11endif
12
13# PC386 Specific Information
14ifeq ($(RTEMS_BSP_FAMILY),pc386)
15  HEADERADDR=0x00097E00
16  START16FILE=$(RTEMS_MAKEFILE_PATH)/lib/start16.bin
17  START16ADDR=0x00097C00
18  RELOCADDR=0x00100000
19  LINKARGS+= -Wl,-Ttext,$(RELOCADDR)
20endif
21
22# Some tests need to be able to do a gethostbyname
23ifeq ($(NEED_ROOTFS_FOR_HOST_INFO),yes)
24  CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
25  FILESYSTEM_OBJS  = FilesystemImage.o
26  FILESYSTEM_SRCS  = FilesystemImage.h
27  CFLAGS          += -DENABLE_UNTAR_ROOT_FILESYSTEM -I.
28endif
29
30all:  $(PROGRAM).exe
31
32$(PROGRAM).exe: rtems_init.o $(FILESYSTEM_OBJS) $(PROGRAM).adb $(EXTRA_OBJS)
33        $(AS:as=gnatmake) -v $(EXTRA_GNATFLAGS) \
34            -O -gnata -gnatE -gnato -g $(PROGRAM) -o $(@) \
35            -bargs -Mgnat_main \
36            -largs $(CARGS) $(LINKARGS) rtems_init.o $(FILESYSTEM_OBJS) \
37            $(EXTRA_OBJS)
38        $(SIZE) $(@)
39ifeq ($(RTEMS_BSP_FAMILY),pc386)
40        mv $(@) $(@).obj
41        $(OBJCOPY) -O elf32-i386 \
42            --remove-section=.rodata \
43            --remove-section=.comment \
44            --remove-section=.note \
45            --strip-unneeded $(@).obj $(@)
46        $(OBJCOPY) -O binary $(@).obj $(@).bin
47        $(RTEMS_MAKEFILE_PATH)/build-tools/bin2boot -v $(@).bt $(HEADERADDR) \
48          $(START16FILE) $(START16ADDR) 0 $(@).bin $(RELOCADDR) 0
49        rm -f $(@).obj $(@).bin
50endif
51
52rtems_init.o: ../rtems_init.c ../networkconfig.h $(FILESYSTEM_SRCS)
53        $(CC) $(CFLAGS) $(CPU_CFLAGS) -c $<
54
55ifeq ($(NEED_ROOTFS_FOR_HOST_INFO),yes)
56FilesystemImage: ../rootfs/etc/host.conf ../rootfs/etc/hosts
57        (cd ../rootfs ; tar cf - --exclude CVS --exclude .cvsignore .) >$(@)
58
59FilesystemImage.c FilesystemImage.h: FilesystemImage
60        $(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
61
62FilesystemImage.o: FilesystemImage.c
63        $(CC) $(CFLAGS) $(CPU_CFLAGS) -c $<
64endif
65
66clean:
67        rm -f b~*.*  *.o *.ali $(PROGRAM)
68        rm -f *.num *.exe *.obj *.bin *.bt *.gba
69
Note: See TracBrowser for help on using the repository browser.