Changeset 3538a0c in ada-examples for hello_world_ada


Ignore:
Timestamp:
Sep 17, 2007, 9:49:50 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
ada-examples-4-10-branch, ada-examples-4-8-branch, ada-examples-4-9-branch, master
Children:
0855e87, fd0047e
Parents:
ed30e2b
Message:

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

  • Makefile.anybsp: pc86 now builds with Makefile.anybsp.
  • Makefile.pc386: Removed.
Location:
hello_world_ada
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • hello_world_ada/ChangeLog

    red30e2b r3538a0c  
     12007-09-17      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.anybsp: pc86 now builds with Makefile.anybsp.
     4        * Makefile.pc386: Removed.
     5
    162007-08-17      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • hello_world_ada/Makefile.anybsp

    red30e2b r3538a0c  
    11#
    2 #  Makefile for hello world example -- any BSP without special help
     2#  Makefile for Ada sockets example
    33#
    4 #  Directly produces an executable for any BSP which directly runs
     4#  Directly produces an executable for a BSP which directly runs
    55#  the format (usually ELF) produced by just linking an application.
     6#  There are a couple of BSP families which require just a bit of
     7#  assistance that this Makefile knows about -- gen5200 and pc386.
    68#  The executables produced by this Makefile should run on at least the
    79#  following BSPs:
    810#      arm/edb7312
     11#      i386/pc386
    912#      mips/jmr3904
     13#      powerpc/icecube
    1014#      powerpc/psim
    1115#      powerpc/score603e
    1216#      sparc/erc32
    13 #      sparc/sis
     17#      sparc/leon2
     18#      sparc/leon3
     19#
     20#  Some BSPs require extra manipulation of the ELF file before it can
     21#  be run on the target hardware.
    1422#
    1523
    16 MAIN=hello
     24PROGRAM=hello
    1725
    1826include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
    19 
    2027include $(RTEMS_CUSTOM)
    2128include $(PROJECT_ROOT)/make/leaf.cfg
    2229
     30# GEN5200 Specific Information
    2331ifeq ($(RTEMS_BSP_FAMILY),gen5200)
    24 LINKARGS+=-qnolinkcmds -T$(RTEMS_LINKCMDS)
     32  LINKARGS+=-qnolinkcmds -T$(RTEMS_LINKCMDS)
     33endif
     34
     35# PC386 Specific Information
     36ifeq ($(RTEMS_BSP_FAMILY),pc386)
     37  HEADERADDR=0x00097E00
     38  START16FILE=$(RTEMS_MAKEFILE_PATH)/lib/start16.bin
     39  START16ADDR=0x00097C00
     40  RELOCADDR=0x00100000
     41  LINKARGS+= -Wl,-Ttext,$(RELOCADDR)
    2542endif
    2643
    2744# Tool helpers
    28 rtemsdir=${RTEMS_MAKEFILE_PATH}
    2945GNATMAKE=$(AS:as=gnatmake)
    30 CARGS =-B${rtemsdir}/lib/ -specs bsp_specs -qrtems $(CPU_CFLAGS)
     46CARGS =-B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems $(CPU_CFLAGS)
    3147CARGS+=-DGNAT_MAIN_STACKSPACE=100
    3248
    33 all: init.o
    34         $(GNATMAKE) -v -O -gnata -gnatE -gnato $(MAIN) -g \
     49all:  $(PROGRAM)
     50
     51$(PROGRAM): init.o *.adb
     52        $(GNATMAKE) -v -O -gnata -gnatE -gnato $(@) -g \
     53            -I../src \
    3554            -bargs -Mgnat_main \
    3655            -largs $(CARGS) $(LINKARGS) init.o
    37         $(SIZE) $(MAIN)
     56        $(SIZE) $(@)
     57ifeq ($(RTEMS_BSP_FAMILY),pc386)
     58        mv $(@) $(@).obj
     59        $(OBJCOPY) -O elf32-i386 \
     60            --remove-section=.rodata \
     61            --remove-section=.comment \
     62            --remove-section=.note \
     63            --strip-unneeded $(@).obj $(@)
     64        $(OBJCOPY) -O binary $(@).obj $(@).bin
     65        $(RTEMS_MAKEFILE_PATH)/build-tools/bin2boot -v $(@).bt $(HEADERADDR) \
     66          $(START16FILE) $(START16ADDR) 0 $(@).bin $(RELOCADDR) 0
     67else
     68endif
    3869
    3970init.o: init.c
     
    4172
    4273clean:
    43         rm -f b~$(MAIN).*  *.o *.ali $(MAIN)
     74        rm -f b~*.*  *.o *.ali $(EXAMPLES)
    4475        rm -f *.num *.exe *.obj *.bin *.bt
Note: See TracChangeset for help on using the changeset viewer.