source: ada-examples/Makefile.shared @ 54c65c0

ada-examples-4-10-branchada-examples-4-9-branch
Last change on this file since 54c65c0 was bc4db0b, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 23, 2008 at 3:51:49 PM

2008-07-23 Joel Sherrill <joel.sherrill@…>

  • Makefile.shared: Ignore .svn also.
  • Property mode set to 100644
File size: 2.2 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
30CFLAGS += $(DEFINES)
31
32all:  $(PROGRAM).exe
33
34$(PROGRAM).exe: rtems_init.o $(FILESYSTEM_OBJS) $(PROGRAM).adb $(EXTRA_OBJS)
35        $(AS:as=gnatmake) \
36            -g -I$(RTEMS_MAKEFILE_PATH)/lib/include/adainclude \
37            -v $(EXTRA_GNATFLAGS) \
38            -O -gnata -gnatE -gnato -g $(PROGRAM) -o $(@) \
39            -bargs -Mgnat_main \
40            -largs $(CARGS) $(LINKARGS) rtems_init.o $(FILESYSTEM_OBJS) \
41            $(EXTRA_OBJS)
42        $(SIZE) $(@)
43ifeq ($(RTEMS_BSP_FAMILY),pc386)
44        mv $(@) $(@).obj
45        $(OBJCOPY) -O elf32-i386 \
46            --remove-section=.rodata \
47            --remove-section=.comment \
48            --remove-section=.note \
49            --strip-unneeded $(@).obj $(@)
50        $(OBJCOPY) -O binary $(@).obj $(@).bin
51        $(RTEMS_MAKEFILE_PATH)/build-tools/bin2boot -v $(@).bt $(HEADERADDR) \
52          $(START16FILE) $(START16ADDR) 0 $(@).bin $(RELOCADDR) 0
53        # rm -f $(@).obj
54        rm -f $(@).bin
55endif
56
57rtems_init.o: ../rtems_init.c ../networkconfig.h $(FILESYSTEM_SRCS)
58        $(CC) $(CFLAGS) -I. $(CPU_CFLAGS) -c $<
59
60ifeq ($(NEED_ROOTFS_FOR_HOST_INFO),yes)
61FilesystemImage: ../rootfs/etc/host.conf ../rootfs/etc/hosts
62        (cd ../rootfs ; tar cf - \
63          --exclude CVS --exclude .cvsignore --exclude .svn .) >$(@)
64
65FilesystemImage.c FilesystemImage.h: FilesystemImage
66        $(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
67
68FilesystemImage.o: FilesystemImage.c
69        $(CC) $(CFLAGS) $(CPU_CFLAGS) -c $<
70endif
71
72clean:
73        rm -f b~*.*  *.o *.ali $(PROGRAM)
74        rm -f *.num *.exe *.obj *.bin *.bt *.gba
75
Note: See TracBrowser for help on using the repository browser.