source: ada-examples/Makefile.shared @ 92f495a

ada-examples-4-10-branch
Last change on this file since 92f495a was 7dbdc98, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 17, 2009 at 6:13:41 PM

2009-09-17 Joel Sherrill <joel.sherrill@…>

  • Makefile.shared, networkconfig-qemu.h, cpuuse/Makefile, empty/Makefile, empty/empty.adb, exception_test2/Makefile, exception_test2/exceptiontest2.adb, exception_test3/Makefile, exception_test3/exceptiontest3.adb, hello_via_task/Makefile, hello_via_task/hello.adb, irq_test_c/Makefile: Make follow standard RTEMS test output format. Add output screens where appropriate.
  • exception_test2/exception_test2.scn, exception_test3/exception_test3.scn, hello_via_task/hello_via_task.scn: New files.
  • Property mode set to 100644
File size: 2.7 KB
Line 
1#
2#  Subdirectory makefiles do some setup, then we get here
3#
4#  $Id$
5#
6
7# Tool helpers
8SPECFLAGS =-B${RTEMS_MAKEFILE_PATH}/lib/ -specs=bsp_specs -qrtems
9CFLAGS = $(CPU_CFLAGS)
10
11# GEN5200 Specific Information
12ifeq ($(RTEMS_BSP_FAMILY),gen5200)
13  LINKARGS+=-qnolinkcmds -T$(RTEMS_LINKCMDS)
14endif
15
16# PC386 Specific Information
17ifeq ($(RTEMS_BSP_FAMILY),pc386)
18  HEADERADDR=0x00097E00
19  START16FILE=$(RTEMS_MAKEFILE_PATH)/lib/start16.bin
20  START16ADDR=0x00097C00
21  RELOCADDR=0x00100000
22  LINKARGS+= -Wl,-Ttext,$(RELOCADDR)
23endif
24
25# Some tests need to be able to do a gethostbyname
26ifeq ($(NEED_ROOTFS_FOR_HOST_INFO),yes)
27  CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
28  FILESYSTEM_OBJS  = FilesystemImage.o
29  FILESYSTEM_SRCS  = FilesystemImage.h
30  CFLAGS          += -DENABLE_UNTAR_ROOT_FILESYSTEM -I.
31endif
32
33ifeq ($(NEED_NETWORK),yes)
34#NETWORK_HFILE= ../networkconfig_$(RTEMS_BSP).h
35#NETWORK_HFILE= ../networkconfig.h
36endif
37
38
39DEFINES += -D$(RTEMS_BSP)
40CFLAGS += $(DEFINES)
41
42RTS= --RTS=$(shell $(CC) -print-multi-directory $(CFLAGS))
43
44all:  $(PROGRAM).exe
45
46joel:
47        @echo CFLAGS=$(CFLAGS)
48        @echo CC=$(CC)
49        @echo RTS=$(RTS)
50        $(CC) -print-multi-directory $(CFLAGS)
51        $(CC) -mcpu=403 -print-multi-directory
52
53$(PROGRAM).exe: rtems_init.o $(FILESYSTEM_OBJS) $(EXTRA_OBJS)
54        $(AS:as=gnatmake) $(CPU_CFLAGS) -g -v $(EXTRA_GNATFLAGS) \
55            -I$(RTEMS_MAKEFILE_PATH)/lib/include/adainclude \
56            -O -gnata -gnatE -gnato -g $(PROGRAM) -o $(@) \
57            -bargs -Mgnat_main \
58            -largs $(SPECFLAGS) $(CFLAGS) $(LINKARGS) \
59                rtems_init.o $(FILESYSTEM_OBJS) \
60             $(EXTRA_OBJS)
61ifeq ($(RTEMS_BSP_FAMILY),pc386)
62        $(OBJCOPY) -O binary $(@) $(@).bin
63        $(RTEMS_MAKEFILE_PATH)/build-tools/bin2boot -v $(@).bt $(HEADERADDR) \
64          $(START16FILE) $(START16ADDR) 0 $(@).bin $(RELOCADDR) 0
65endif
66ifeq ($(RTEMS_BSP),icecube)
67        $(OBJCOPY) -R -S -O binary obj/$(PROGRAM) obj/$(PROGRAM).bin
68        cat obj/$(PROGRAM).bin | gzip -9 >obj/$(PROGRAM).gz
69        mkimage \
70          -A ppc -O rtems -T kernel -a 0x40000 -e 0x40000 -n "RTEMS" \
71          -d obj/$(PROGRAM).gz obj/$(PROGRAM).img
72        cp obj/$(PROGRAM).img ../../../../tftpboot/main.img
73        rm -f obj/$(PROGRAM).gz obj/$(PROGRAM).img
74endif
75
76rtems_init.o: ../rtems_init.c $(FILESYSTEM_SRCS) $(NETWORK_HFILE)
77        $(CC) $(CFLAGS) -I. $(CPU_CFLAGS) -c $<
78
79ifeq ($(NEED_ROOTFS_FOR_HOST_INFO),yes)
80FilesystemImage: ../rootfs/etc/host.conf ../rootfs/etc/hosts
81        (cd ../rootfs ; tar cf - \
82          --exclude CVS --exclude .cvsignore --exclude .svn .) >$(@)
83
84FilesystemImage.c FilesystemImage.h: FilesystemImage
85        $(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
86
87FilesystemImage.o: FilesystemImage.c
88        $(CC) $(CFLAGS) $(CPU_CFLAGS) -c $<
89endif
90
91clean:
92        rm -f obj/*
93        rm -f b~*.*  *.o *.ali $(PROGRAM)
94        rm -f *.num *.exe *.obj *.bin *.bt *.gba
Note: See TracBrowser for help on using the repository browser.