[Patch] Makefile / cfg changes for EXEEXT, LD_PATHS and source subdirectories

Gedare Bloom gedare at rtems.org
Fri Jul 5 01:31:06 UTC 2013


Did you see how the examples-v2 (git module) uses RTEMS application
makefiles?
On Jul 4, 2013 9:24 PM, "Nick Withers" <nick.withers at anu.edu.au> wrote:

> Hey all!
>
> I discovered make/Templates/Makefile.leaf the other day and decided it'd
> probably be a good idea for me to use that as a base, in place of the
> Makefile I'd clobbered together.
>
> There were a few things that slowed me down a bit getting things back to
> where I had 'em:
>   - My LD_PATHS settings appeared to have no effect
>   - I've application sources in subdirectories (not with Makefiles in
> them, mind you, just .c / .h) and these weren't created in the
> o-optimize / o-debug output directories, making GCC unhappy
>   - I didn't want to use the ".exe" extension but that was hardcoded
>
> ...So I knocked up the diffs at the end of this email.
>
> Any feedback / concerns / things I've missed? Would it be possible to
> merge these (or similar) or a subset in for 4.11? Would you like
> individual patches for each "issue" addressed?
>
> Thanks!
>
>
> P.S.: "ARCH" struck me as a a bit of an unusual variable to use to mean
> "object directory" (maybe OBJDIR would be more clear...?). I'd have
> thought "ARCH" would refer to the processor architecture, or perhaps the
> RTEMS target architecture (maybe it's 'coz the architecture used to be
> part of the directory structure?). Happy to submit patches to do so, if
> that's the will of the council.
> __
>
>
> Righto, the patch for LD_PATHS [1] (all of these were generated with
> "git diff" in the rtems.git root):
> ____
>
> diff --git a/c/src/make/compilers/gcc-target-default.cfg
> b/c/src/make/compilers/gcc-target-default.cfg
> index 813bd5c..a70681d 100644
> --- a/c/src/make/compilers/gcc-target-default.cfg
> +++ b/c/src/make/compilers/gcc-target-default.cfg
> @@ -65,13 +65,12 @@ CXXFLAGS += $(CXXFLAGS_OPTIMIZE) $(CXXFLAGS_DEBUG)
>  endif
>
>  # List of library paths without -L
> -LD_PATHS= $(PROJECT_RELEASE)/lib
> +LD_PATHS+= $(PROJECT_RELEASE)/lib
>
>  # ld flag for incomplete link
>  LDFLAGS_INCOMPLETE = -r
>
> -# LDFLAGS=$(LDFLAGS_DEBUG) $(LD_PATHS:%=-L%)
> -LDFLAGS += $(LDFLAGS_DEBUG)
> +LDFLAGS+=$(LDFLAGS_DEBUG) $(LD_PATHS:%=-L%)
>
>  #
>  # Stuff to clean and clobber for the compiler and its tools
> ____
>
> [1] See
>
> http://git.rtems.org/rtems/commit/c/src/make/compilers/gcc-target-default.cfg?id=ea9f76742163cccf98eb326db7459c18d2fad1b6for why LD_PATHS had been commented ("Now implicitly handled by gcc-spec").
> I've got an extra library to pull in, though (RTEMS_gdb_stub), and
> Makefile.leaf advertises it should be used, so I think putting it back is
> the right thing to do...?
>
>
> The patch for source subdirectories:
> ____
>
> diff --git a/make/main.cfg b/make/main.cfg
> index 1a712de..e9219b4 100644
> --- a/make/main.cfg
> +++ b/make/main.cfg
> @@ -40,8 +40,15 @@ ARCH_DEBUG_V = o-debug
>  ARCH__V = $(ARCH_OPTIMIZE_V)
>  ARCH = $(ARCH_$(VARIANT_V)_V)
>
> +ARCH_DIRS = $(filter-out ./, $(dir $(C_FILES)))
> +
>  $(ARCH):
>         test -d ${ARCH} || mkdir $(ARCH)
> +
> +ifneq ($(strip ARCH_DIRS),)
> +       mkdir -p ${ARCH_DIRS:%=${ARCH}/%}
> +endif
> +
>  #
>  # Default makefile name
>  # May be overridden by command line macro assignment
> ____
>
> ...and the far longer patch for EXEEXT (in which I also replaced ".ralf"
> with "$(DOWNEXT)" in
> c/src/lib/libbsp/arm/lm3s69xx/make/custom/lm3s69xx.inc):
> ____
>
> diff --git a/c/src/lib/libbsp/arm/gba/make/custom/gba.cfg
> b/c/src/lib/libbsp/arm/gba/make/custom/gba.cfg
> index ee9be6a..1ae2fb8 100644
> --- a/c/src/lib/libbsp/arm/gba/make/custom/gba.cfg
> +++ b/c/src/lib/libbsp/arm/gba/make/custom/gba.cfg
> @@ -20,6 +20,6 @@ CFLAGS_OPTIMIZE_V = -O2 -g
>  define bsp-post-link
>         $(OBJCOPY) -O binary --remove-section=.comment \
>             --remove-section=.note --strip-unneeded \
> -           $(basename $@).exe $(basename $@)$(DOWNEXT)
> +           $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>         $(default-bsp-post-link)
>  endef
> diff --git a/c/src/lib/libbsp/arm/gp32/make/custom/gp32.cfg
> b/c/src/lib/libbsp/arm/gp32/make/custom/gp32.cfg
> index f287310..a558362 100644
> --- a/c/src/lib/libbsp/arm/gp32/make/custom/gp32.cfg
> +++ b/c/src/lib/libbsp/arm/gp32/make/custom/gp32.cfg
> @@ -16,6 +16,6 @@ CPU_CFLAGS = -mstructure-size-boundary=32 -mcpu=arm920t
> -mfpu=vfp -mfloat-abi=so
>  CFLAGS_OPTIMIZE_V = -O2 -g
>
>  define bsp-post-link
> -       $(OBJCOPY) -O binary $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O binary $(basename $@)$(EXEEXT) $(basename
> $@)$(DOWNEXT)
>         $(default-bsp-post-link)
>  endef
> diff --git a/c/src/lib/libbsp/arm/lm3s69xx/make/custom/lm3s69xx.inc
> b/c/src/lib/libbsp/arm/lm3s69xx/make/custom/lm3s69xx.inc
> index 4387c19..362d9f4 100644
> --- a/c/src/lib/libbsp/arm/lm3s69xx/make/custom/lm3s69xx.inc
> +++ b/c/src/lib/libbsp/arm/lm3s69xx/make/custom/lm3s69xx.inc
> @@ -12,5 +12,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary $(basename $@).exe $(basename $@).ralf
> +       $(OBJCOPY) -O binary $(basename $@)$(EXEEXT) $(basename
> $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/arm/nds/make/custom/nds.cfg
> b/c/src/lib/libbsp/arm/nds/make/custom/nds.cfg
> index 9e4844d..78172e6 100644
> --- a/c/src/lib/libbsp/arm/nds/make/custom/nds.cfg
> +++ b/c/src/lib/libbsp/arm/nds/make/custom/nds.cfg
> @@ -28,7 +28,7 @@ endif
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary $(basename $@).exe $(basename $@).bin
> +       $(OBJCOPY) -O binary $(basename $@)$(EXEEXT) $(basename $@).bin
>         $(NDSTOOL) -c $(basename $@).nds -9 $(basename $@).bin \
>             -7 $(COPROC_ELF_PATH)/coproc.bin
>         rm -f $(basename $@).bin
> diff --git a/c/src/lib/libbsp/arm/raspberrypi/make/custom/raspberrypi.cfg
> b/c/src/lib/libbsp/arm/raspberrypi/make/custom/raspberrypi.cfg
> index 9751658..6b47ea2 100644
> --- a/c/src/lib/libbsp/arm/raspberrypi/make/custom/raspberrypi.cfg
> +++ b/c/src/lib/libbsp/arm/raspberrypi/make/custom/raspberrypi.cfg
> @@ -16,7 +16,7 @@ CFLAGS_OPTIMIZE_V = -O2 -g
>  # is currently required.
>  define bsp-post-link
>      $(OBJCOPY) -O binary --strip-all \
> -        $(basename $@).exe $(basename $@)$(DOWNEXT)
> -    $(SIZE) $(basename $@).exe
> +        $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
> +    $(SIZE) $(basename $@)$(EXEEXT)
>  endef
>
> diff --git a/c/src/lib/libbsp/i386/pc386/make/custom/pc386.cfg
> b/c/src/lib/libbsp/i386/pc386/make/custom/pc386.cfg
> index e827d87..9f7428d 100644
> --- a/c/src/lib/libbsp/i386/pc386/make/custom/pc386.cfg
> +++ b/c/src/lib/libbsp/i386/pc386/make/custom/pc386.cfg
> @@ -46,7 +46,7 @@ define bsp-post-link
>         $(OBJCOPY) -O elf32-i386 \
>             --remove-section=.comment \
>             --remove-section=.note \
> -           --strip-unneeded $(basename $@).exe $(basename $@).nxe
> +           --strip-unneeded $(basename $@)$(EXEEXT) $(basename $@).nxe
>         $(OBJCOPY) -O binary $(basename $@).nxe $(basename $@).bin
>         $(PROJECT_TOOLS)/bin2boot -v $(basename $@)$(DOWNEXT)
> $(HEADERADDR)\
>           $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
> diff --git a/c/src/lib/libbsp/lm32/lm32_evr/make/custom/lm32_evr.cfg
> b/c/src/lib/libbsp/lm32/lm32_evr/make/custom/lm32_evr.cfg
> index d70ff80..c1951d0 100644
> --- a/c/src/lib/libbsp/lm32/lm32_evr/make/custom/lm32_evr.cfg
> +++ b/c/src/lib/libbsp/lm32/lm32_evr/make/custom/lm32_evr.cfg
> @@ -21,7 +21,7 @@ CPU_CFLAGS =
>  CFLAGS_OPTIMIZE_V = -O0 -g
>
>  define bsp-post-link
> -       $(OBJCOPY) -O binary --strip-all $(basename $@).exe \
> +       $(OBJCOPY) -O binary --strip-all $(basename $@)$(EXEEXT) \
>             -R entry -R exceptions $(basename $@)$(DOWNEXT)
>         $(default-bsp-post-link)
>  endef
> diff --git a/c/src/lib/libbsp/lm32/milkymist/make/custom/milkymist.cfg
> b/c/src/lib/libbsp/lm32/milkymist/make/custom/milkymist.cfg
> index 5a44658..ae691eb 100644
> --- a/c/src/lib/libbsp/lm32/milkymist/make/custom/milkymist.cfg
> +++ b/c/src/lib/libbsp/lm32/milkymist/make/custom/milkymist.cfg
> @@ -21,7 +21,7 @@ CPU_CFLAGS = -mbarrel-shift-enabled -mmultiply-enabled \
>  CFLAGS_OPTIMIZE_V = -O2 -g
>
>  define bsp-post-link
> -       $(OBJCOPY) -O binary --strip-all $(basename $@).exe \
> +       $(OBJCOPY) -O binary --strip-all $(basename $@)$(EXEEXT) \
>             -R entry -R exceptions $(basename $@)$(DOWNEXT)
>         $(default-bsp-post-link)
>  endef
> diff --git a/c/src/lib/libbsp/m68k/av5282/make/custom/av5282.cfg
> b/c/src/lib/libbsp/m68k/av5282/make/custom/av5282.cfg
> index 0bbeaf1..a668d99 100644
> --- a/c/src/lib/libbsp/m68k/av5282/make/custom/av5282.cfg
> +++ b/c/src/lib/libbsp/m68k/av5282/make/custom/av5282.cfg
> @@ -22,5 +22,5 @@ endif
>  define bsp-post-link
>         $(default-bsp-post-link)
>         $(OBJCOPY) -O binary --strip-all \
> -           $(basename $@).exe $(basename $@)$(DOWNEXT)
> +           $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/m68k/genmcf548x/make/custom/genmcf548x.inc
> b/c/src/lib/libbsp/m68k/genmcf548x/make/custom/genmcf548x.inc
> index 843524c..a910bd3 100644
> --- a/c/src/lib/libbsp/m68k/genmcf548x/make/custom/genmcf548x.inc
> +++ b/c/src/lib/libbsp/m68k/genmcf548x/make/custom/genmcf548x.inc
> @@ -15,7 +15,7 @@ CPU_CFLAGS = -mcfv4e -Wa,-memac
>  CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>
>  define bsp-post-link
> -       $(OBJCOPY) -O binary --strip-all $(basename $@).exe \
> +       $(OBJCOPY) -O binary --strip-all $(basename $@)$(EXEEXT) \
>             $(basename $@)$(DOWNEXT)
>         $(default-bsp-post-link)
>  endef
> diff --git a/c/src/lib/libbsp/m68k/idp/make/custom/idp.cfg
> b/c/src/lib/libbsp/m68k/idp/make/custom/idp.cfg
> index 937ce30..d10029a 100644
> --- a/c/src/lib/libbsp/m68k/idp/make/custom/idp.cfg
> +++ b/c/src/lib/libbsp/m68k/idp/make/custom/idp.cfg
> @@ -16,7 +16,7 @@ CPU_CFLAGS = -msoft-float
>  CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>
>  define bsp-post-link
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec
>         sed -e 's/.$$//' -e '/^S0/d' $(basename $@).srec | \
>             $(PACKHEX) > $(basename $@)$(DOWNEXT)
>         rm -f  $(basename $@).srec
> diff --git a/c/src/lib/libbsp/m68k/mcf52235/make/custom/mcf52235.cfg
> b/c/src/lib/libbsp/m68k/mcf52235/make/custom/mcf52235.cfg
> index 4dcb890..9b22a21 100644
> --- a/c/src/lib/libbsp/m68k/mcf52235/make/custom/mcf52235.cfg
> +++ b/c/src/lib/libbsp/m68k/mcf52235/make/custom/mcf52235.cfg
> @@ -18,6 +18,6 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>  # is currently required.
>  define bsp-post-link
>         $(OBJCOPY) -O binary --strip-all \
> -           $(basename $@).exe $(basename $@)$(DOWNEXT)
> -       $(SIZE) $(basename $@).exe
> +           $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
> +       $(SIZE) $(basename $@)$(EXEEXT)
>  endef
> diff --git a/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x.cfg
> b/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x.cfg
> index 6a415a7..90e76e2 100644
> --- a/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x.cfg
> +++ b/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x.cfg
> @@ -22,6 +22,6 @@ CFLAGS_OPTIMIZE_V = -O2 -fomit-frame-pointer
>  # is currently required.
>  define bsp-post-link
>         $(OBJCOPY) -O binary --strip-all \
> -           $(basename $@).exe $(basename $@)$(DOWNEXT)
> -       $(SIZE) $(basename $@).exe
> +           $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
> +       $(SIZE) $(basename $@)$(EXEEXT)
>  endef
> diff --git a/c/src/lib/libbsp/m68k/mcf5235/make/custom/mcf5235.cfg
> b/c/src/lib/libbsp/m68k/mcf5235/make/custom/mcf5235.cfg
> index 8a543ac..b5c3c49 100644
> --- a/c/src/lib/libbsp/m68k/mcf5235/make/custom/mcf5235.cfg
> +++ b/c/src/lib/libbsp/m68k/mcf5235/make/custom/mcf5235.cfg
> @@ -22,6 +22,6 @@ endif
>  # is currently required.
>  define bsp-post-link
>         $(OBJCOPY) -O binary --strip-all \
> -           $(basename $@).exe $(basename $@)$(DOWNEXT)
> -       $(SIZE) $(basename $@).exe
> +           $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
> +       $(SIZE) $(basename $@)$(EXEEXT)
>  endef
> diff --git a/c/src/lib/libbsp/m68k/mcf5329/make/custom/mcf5329.cfg
> b/c/src/lib/libbsp/m68k/mcf5329/make/custom/mcf5329.cfg
> index e68fd28..e1f5734 100644
> --- a/c/src/lib/libbsp/m68k/mcf5329/make/custom/mcf5329.cfg
> +++ b/c/src/lib/libbsp/m68k/mcf5329/make/custom/mcf5329.cfg
> @@ -20,6 +20,6 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>  # is currently required.
>  define bsp-post-link
>         $(OBJCOPY) -O binary --strip-all \
> -           $(basename $@).exe $(basename $@)$(DOWNEXT)
> -       $(SIZE) $(basename $@).exe
> +           $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
> +       $(SIZE) $(basename $@)$(EXEEXT)
>  endef
> diff --git a/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg
> b/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg
> index a1be91b..bf55e4f 100644
> --- a/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg
> +++ b/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg
> @@ -31,8 +31,8 @@ define bsp-post-link
>                 return s } ;\
>                 /\.text/ { base = $$4 ; size = $$3 };\
>                 END { printf("0x%x", h2d(base) + h2d(size)) }'\
> -              ` $(basename $@).pxe $(basename $@).exe
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec
> +              ` $(basename $@).pxe $(basename $@)$(EXEEXT)
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec
>         sed -e 's/.$$//' -e '/^S0/d' $(basename $@).srec | \
>             $(PACKHEX) > $(basename $@)$(DOWNEXT)
>         $(NM) -g -n $(basename $@).pxe > $(basename $@).pnum
> @@ -41,7 +41,7 @@ define bsp-post-link
>  endef
>  else
>  define bsp-post-link
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec
>         sed -e 's/.$$//' -e '/^S0/d' $(basename $@).srec | \
>             $(PACKHEX) > $(basename $@)$(DOWNEXT)
>         rm -f $(basename $@).srec
> diff --git a/c/src/lib/libbsp/m68k/mvme136/make/custom/mvme136.cfg
> b/c/src/lib/libbsp/m68k/mvme136/make/custom/mvme136.cfg
> index 74cdd64..2f63f04 100644
> --- a/c/src/lib/libbsp/m68k/mvme136/make/custom/mvme136.cfg
> +++ b/c/src/lib/libbsp/m68k/mvme136/make/custom/mvme136.cfg
> @@ -17,7 +17,7 @@ CPU_CFLAGS = -mcpu=68020
>  CFLAGS_OPTIMIZE_V = -Os -g -fomit-frame-pointer -DNDEBUG
>
>  define bsp-post-link
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec
>         sed -e 's/.$$//' -e '/^S0/d' $(basename $@).srec | \
>             $(PACKHEX) > $(basename $@)$(DOWNEXT)
>         rm -f $(basename $@).srec
> diff --git a/c/src/lib/libbsp/m68k/mvme147/make/custom/mvme147.cfg
> b/c/src/lib/libbsp/m68k/mvme147/make/custom/mvme147.cfg
> index 0ba9719..9880587 100644
> --- a/c/src/lib/libbsp/m68k/mvme147/make/custom/mvme147.cfg
> +++ b/c/src/lib/libbsp/m68k/mvme147/make/custom/mvme147.cfg
> @@ -15,7 +15,7 @@ CPU_CFLAGS = -mcpu=68030
>  CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>
>  define bsp-post-link
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec
>         sed -e 's/.$$//' -e '/^S0/d' $(basename $@).srec | \
>             $(PACKHEX) > $(basename $@)$(DOWNEXT)
>         rm -f $(basename $@).srec
> diff --git a/c/src/lib/libbsp/m68k/mvme147s/make/custom/mvme147s.cfg
> b/c/src/lib/libbsp/m68k/mvme147s/make/custom/mvme147s.cfg
> index e14de8d..3eaade8 100644
> --- a/c/src/lib/libbsp/m68k/mvme147s/make/custom/mvme147s.cfg
> +++ b/c/src/lib/libbsp/m68k/mvme147s/make/custom/mvme147s.cfg
> @@ -15,7 +15,7 @@ CPU_CFLAGS = -mcpu=68030
>  CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>
>  define bsp-post-link
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec
>         sed -e 's/.$$//' -e '/^S0/d' $(basename $@).srec | \
>             $(PACKHEX) > $(basename $@)$(DOWNEXT)
>         rm -f $(basename $@).srec
> diff --git a/c/src/lib/libbsp/m68k/mvme162/make/custom/mvme162.cfg
> b/c/src/lib/libbsp/m68k/mvme162/make/custom/mvme162.cfg
> index d8a217f..4b343b2 100644
> --- a/c/src/lib/libbsp/m68k/mvme162/make/custom/mvme162.cfg
> +++ b/c/src/lib/libbsp/m68k/mvme162/make/custom/mvme162.cfg
> @@ -20,7 +20,7 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O binary $(basename $@)$(EXEEXT) $(basename
> $@)$(DOWNEXT)
>  endef
>
>  # BSP-specific tools
> diff --git a/c/src/lib/libbsp/m68k/mvme162/make/custom/mvme162lx.cfg
> b/c/src/lib/libbsp/m68k/mvme162/make/custom/mvme162lx.cfg
> index 81c398e..2a210a9 100644
> --- a/c/src/lib/libbsp/m68k/mvme162/make/custom/mvme162lx.cfg
> +++ b/c/src/lib/libbsp/m68k/mvme162/make/custom/mvme162lx.cfg
> @@ -25,7 +25,7 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O binary $(basename $@)$(EXEEXT) $(basename
> $@)$(DOWNEXT)
>  endef
>
>  # BSP-specific tools
> diff --git a/c/src/lib/libbsp/m68k/mvme167/make/custom/mvme167.cfg
> b/c/src/lib/libbsp/m68k/mvme167/make/custom/mvme167.cfg
> index a56de0f..21bd9af 100644
> --- a/c/src/lib/libbsp/m68k/mvme167/make/custom/mvme167.cfg
> +++ b/c/src/lib/libbsp/m68k/mvme167/make/custom/mvme167.cfg
> @@ -36,5 +36,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fno-omit-frame-pointer
>  # for more details.
>  define bsp-post-link
>         $(default-bsp-post-link)
> -    $(OBJCOPY) -O binary -R .comment -S $(basename $@).exe $(basename
> $@)$(DOWNEXT)
> +    $(OBJCOPY) -O binary -R .comment -S $(basename $@)$(EXEEXT)
> $(basename $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/m68k/sim68000/make/custom/sim68000.cfg
> b/c/src/lib/libbsp/m68k/sim68000/make/custom/sim68000.cfg
> index bb3354a..fb355cb 100644
> --- a/c/src/lib/libbsp/m68k/sim68000/make/custom/sim68000.cfg
> +++ b/c/src/lib/libbsp/m68k/sim68000/make/custom/sim68000.cfg
> @@ -16,5 +16,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/m68k/sim68000/make/custom/simcpu32.cfg
> b/c/src/lib/libbsp/m68k/sim68000/make/custom/simcpu32.cfg
> index 939a1e1..817e162 100644
> --- a/c/src/lib/libbsp/m68k/sim68000/make/custom/simcpu32.cfg
> +++ b/c/src/lib/libbsp/m68k/sim68000/make/custom/simcpu32.cfg
> @@ -16,5 +16,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/m68k/uC5282/make/custom/uC5282.cfg
> b/c/src/lib/libbsp/m68k/uC5282/make/custom/uC5282.cfg
> index caf93a8..3c62a17 100644
> --- a/c/src/lib/libbsp/m68k/uC5282/make/custom/uC5282.cfg
> +++ b/c/src/lib/libbsp/m68k/uC5282/make/custom/uC5282.cfg
> @@ -16,5 +16,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O binary $(basename $@)$(EXEEXT) $(basename
> $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/nios2/nios2_iss/make/custom/nios2_iss.cfg
> b/c/src/lib/libbsp/nios2/nios2_iss/make/custom/nios2_iss.cfg
> index e8fb39d..8254eec 100644
> --- a/c/src/lib/libbsp/nios2/nios2_iss/make/custom/nios2_iss.cfg
> +++ b/c/src/lib/libbsp/nios2/nios2_iss/make/custom/nios2_iss.cfg
> @@ -21,7 +21,7 @@ CPU_CFLAGS = -mno-hw-mul -mno-hw-div
>  CFLAGS_OPTIMIZE_V = -O0 -g
>
>  define bsp-post-link
> -       $(OBJCOPY) -O binary --strip-all $(basename $@).exe \
> +       $(OBJCOPY) -O binary --strip-all $(basename $@)$(EXEEXT) \
>             -R entry -R exceptions $(basename $@)$(DOWNEXT)
>         $(default-bsp-post-link)
>  endef
> diff --git a/c/src/lib/libbsp/powerpc/haleakala/make/custom/haleakala.cfg
> b/c/src/lib/libbsp/powerpc/haleakala/make/custom/haleakala.cfg
> index 41cd98e..67ffe58 100644
> --- a/c/src/lib/libbsp/powerpc/haleakala/make/custom/haleakala.cfg
> +++ b/c/src/lib/libbsp/powerpc/haleakala/make/custom/haleakala.cfg
> @@ -20,5 +20,5 @@ CFLAGS_OPTIMIZE_V = -O1 -g
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx8xx.inc
> b/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx8xx.inc
> index c1a2235..4795de7 100644
> --- a/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx8xx.inc
> +++ b/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx8xx.inc
> @@ -49,7 +49,7 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
>  LDFLAGS += $(MBX8xx_LDFLAGS)
>
>  define bsp-post-link
> -       cp $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       cp $(basename $@)$(EXEEXT)  $(basename $@)$(DOWNEXT)
>         $(STRIP) $(basename $@)$(DOWNEXT)
>         $(default-bsp-post-link)
>  endef
> diff --git
> a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mcp750.cfg
> b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mcp750.cfg
> index fc775d1..8ff97b3 100644
> --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mcp750.cfg
> +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mcp750.cfg
> @@ -17,11 +17,11 @@ CFLAGS_OPTIMIZE_V = -O2 -g -mmultiple -mstring
> -mstrict-align
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary -R .comment -S $(basename $@).exe rtems
> +       $(OBJCOPY) -O binary -R .comment -S $(basename $@)$(EXEEXT) rtems
>         gzip -vf9 rtems
>         $(LD) -o $(basename $@)$(DOWNEXT) \
>             $ $(PROJECT_RELEASE)/lib/bootloader.o \
> -           --just-symbols=$(basename $@).exe \
> +           --just-symbols=$(basename $@)$(EXEEXT) \
>             -b binary rtems.gz -T $(PROJECT_RELEASE)/lib/ppcboot.lds \
>             -Map $(basename $@).map && chmod 755 $@
>         rm -f rtems.gz
> diff --git
> a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mtx603e.cfg
> b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mtx603e.cfg
> index 2411501..6c7f597 100644
> --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mtx603e.cfg
> +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mtx603e.cfg
> @@ -16,11 +16,11 @@ CFLAGS_OPTIMIZE_V = -O2 -g -mmultiple -mstring
> -mstrict-align
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary -R .comment -S $(basename $@).exe rtems
> +       $(OBJCOPY) -O binary -R .comment -S $(basename $@)$(EXEEXT) rtems
>         gzip -vf9 rtems
>         $(LD) -o $(basename $@)$(DOWNEXT) \
>            $(PROJECT_RELEASE)/lib/bootloader.o \
> -           --just-symbols=$(basename $@).exe \
> +           --just-symbols=$(basename $@)$(EXEEXT) \
>             -b binary rtems.gz -T $(PROJECT_RELEASE)/lib/ppcboot.lds \
>             -Map $(basename $@).map && chmod 755 $@
>         rm -f rtems.gz
> diff --git
> a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2100.cfg
> b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2100.cfg
> index 93e14ab..d724b5d 100644
> --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2100.cfg
> +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2100.cfg
> @@ -16,11 +16,11 @@ CFLAGS_OPTIMIZE_V = -O2 -g -mmultiple -mstring
> -mstrict-align
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary -R .comment -S $(basename $@).exe rtems
> +       $(OBJCOPY) -O binary -R .comment -S $(basename $@)$(EXEEXT) rtems
>         gzip -vf9 rtems
>         $(LD) -o $(basename $@)$(DOWNEXT) \
>             $(PROJECT_RELEASE)/lib/bootloader.o \
> -           --just-symbols=$(basename $@).exe \
> +           --just-symbols=$(basename $@)$(EXEEXT) \
>             -b binary rtems.gz -T $(PROJECT_RELEASE)/lib/ppcboot.lds \
>             -Map $(basename $@).map && chmod 755 $@
>         rm -f rtems.gz
> diff --git
> a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2307.cfg
> b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2307.cfg
> index d7dac3a..ee00561 100644
> --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2307.cfg
> +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2307.cfg
> @@ -17,10 +17,10 @@ CFLAGS_OPTIMIZE_V = -O2 -g
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary -R .comment -S $(basename $@).exe rtems
> +       $(OBJCOPY) -O binary -R .comment -S $(basename $@)$(EXEEXT) rtems
>         gzip -vf9 rtems
>         $(LD) -o $(basename $@)$(DOWNEXT)
>  $(PROJECT_RELEASE)/lib/bootloader.o \
> -           --just-symbols=$(basename $@).exe \
> +           --just-symbols=$(basename $@)$(EXEEXT) \
>             -b binary rtems.gz -T $(PROJECT_RELEASE)/lib/ppcboot.lds \
>             -Map $(basename $@).map && chmod 755 $@
>         rm -f rtems.gz
> diff --git
> a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep-altivec.cfg
> b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep-altivec.cfg
> index cef17e5..1dd1744 100644
> ---
> a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep-altivec.cfg
> +++
> b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep-altivec.cfg
> @@ -18,15 +18,15 @@ CFLAGS_OPTIMIZE_V = -O2 -g
>  ifdef PURE_BINARY
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary -R .comment -S $(basename $@).exe $(basename
> $@)$(DOWNEXT)
> +       $(OBJCOPY) -O binary -R .comment -S $(basename $@)$(EXEEXT)
> $(basename $@)$(DOWNEXT)
>  endef
>  else
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary -R .comment -S $(basename $@).exe rtems
> +       $(OBJCOPY) -O binary -R .comment -S $(basename $@)$(EXEEXT) rtems
>         gzip -vf9 rtems
>         $(LD) -o $(basename $@)$(DOWNEXT)
>  $(PROJECT_RELEASE)/lib/bootloader.o \
> -           --just-symbols=$(basename $@).exe \
> +           --just-symbols=$(basename $@)$(EXEEXT) \
>             -b binary rtems.gz -T $(PROJECT_RELEASE)/lib/ppcboot.lds \
>             -Map $(basename $@).map && chmod 755 $@
>         rm -f rtems.gz
> diff --git
> a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep.cfg
> b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep.cfg
> index 3922767..e5f11fc 100644
> --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep.cfg
> +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep.cfg
> @@ -18,15 +18,15 @@ CFLAGS_OPTIMIZE_V = -O2 -g
>  ifdef PURE_BINARY
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary -R .comment -S $(basename $@).exe $(basename
> $@)$(DOWNEXT)
> +       $(OBJCOPY) -O binary -R .comment -S $(basename $@)$(EXEEXT)
> $(basename $@)$(DOWNEXT)
>  endef
>  else
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary -R .comment -S $(basename $@).exe rtems
> +       $(OBJCOPY) -O binary -R .comment -S $(basename $@)$(EXEEXT) rtems
>         gzip -vf9 rtems
>         $(LD) -o $(basename $@)$(DOWNEXT)
>  $(PROJECT_RELEASE)/lib/bootloader.o \
> -           --just-symbols=$(basename $@).exe \
> +           --just-symbols=$(basename $@)$(EXEEXT) \
>             -b binary rtems.gz -T $(PROJECT_RELEASE)/lib/ppcboot.lds \
>             -Map $(basename $@).map && chmod 755 $@
>         rm -f rtems.gz
> diff --git a/c/src/lib/libbsp/powerpc/mvme3100/make/custom/mvme3100.cfg
> b/c/src/lib/libbsp/powerpc/mvme3100/make/custom/mvme3100.cfg
> index 3ea5c2b..ddd6d23 100644
> --- a/c/src/lib/libbsp/powerpc/mvme3100/make/custom/mvme3100.cfg
> +++ b/c/src/lib/libbsp/powerpc/mvme3100/make/custom/mvme3100.cfg
> @@ -17,5 +17,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O binary $(basename $@)$(EXEEXT) $(basename
> $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/powerpc/mvme5500/make/custom/mvme5500.cfg
> b/c/src/lib/libbsp/powerpc/mvme5500/make/custom/mvme5500.cfg
> index b4727bc..4c59a07 100644
> --- a/c/src/lib/libbsp/powerpc/mvme5500/make/custom/mvme5500.cfg
> +++ b/c/src/lib/libbsp/powerpc/mvme5500/make/custom/mvme5500.cfg
> @@ -19,7 +19,7 @@ CFLAGS_OPTIMIZE_V = -O2 -g
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O binary $(basename $@)$(EXEEXT) $(basename
> $@)$(DOWNEXT)
>  endef
>
>  #
> diff --git a/c/src/lib/libbsp/powerpc/qemuppc/make/custom/qemuppc.cfg
> b/c/src/lib/libbsp/powerpc/qemuppc/make/custom/qemuppc.cfg
> index 177f88f..b768855 100644
> --- a/c/src/lib/libbsp/powerpc/qemuppc/make/custom/qemuppc.cfg
> +++ b/c/src/lib/libbsp/powerpc/qemuppc/make/custom/qemuppc.cfg
> @@ -16,5 +16,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O binary $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O binary $(basename $@)$(EXEEXT) $(basename
> $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/powerpc/score603e/make/custom/score603e.cfg
> b/c/src/lib/libbsp/powerpc/score603e/make/custom/score603e.cfg
> index 7b03438..a657bb3 100644
> --- a/c/src/lib/libbsp/powerpc/score603e/make/custom/score603e.cfg
> +++ b/c/src/lib/libbsp/powerpc/score603e/make/custom/score603e.cfg
> @@ -22,7 +22,7 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).s1
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).s1
>         sed -e 's/.$$//' $(basename $@).s1 | \
>           $(PACKHEX) >$(basename $@)$(DOWNEXT)
>         rm -f $(basename $@).s1
> diff --git a/c/src/lib/libbsp/powerpc/ss555/make/custom/ss555.cfg
> b/c/src/lib/libbsp/powerpc/ss555/make/custom/ss555.cfg
> index 22ae7fb..cde7f4a 100644
> --- a/c/src/lib/libbsp/powerpc/ss555/make/custom/ss555.cfg
> +++ b/c/src/lib/libbsp/powerpc/ss555/make/custom/ss555.cfg
> @@ -23,6 +23,6 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       cp $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       cp $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>         $(STRIP) $(basename $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/make/custom/tqm8xx.inc
> b/c/src/lib/libbsp/powerpc/tqm8xx/make/custom/tqm8xx.inc
> index 119bc28..da32441 100644
> --- a/c/src/lib/libbsp/powerpc/tqm8xx/make/custom/tqm8xx.inc
> +++ b/c/src/lib/libbsp/powerpc/tqm8xx/make/custom/tqm8xx.inc
> @@ -15,7 +15,7 @@ CPU_CFLAGS = -mcpu=860 -Dmpc860 \
>  CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
>
>  define bsp-post-link
> -       cp $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       cp $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>         $(STRIP) $(basename $@)$(DOWNEXT)
>         $(default-bsp-post-link)
>  endef
> diff --git a/c/src/lib/libbsp/powerpc/virtex/make/custom/virtex.cfg
> b/c/src/lib/libbsp/powerpc/virtex/make/custom/virtex.cfg
> index a91530c..96aa7cc 100644
> --- a/c/src/lib/libbsp/powerpc/virtex/make/custom/virtex.cfg
> +++ b/c/src/lib/libbsp/powerpc/virtex/make/custom/virtex.cfg
> @@ -19,5 +19,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
>
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>  endef
> diff --git a/c/src/lib/libbsp/powerpc/virtex4/make/custom/virtex4.cfg
> b/c/src/lib/libbsp/powerpc/virtex4/make/custom/virtex4.cfg
> index 333b144..713c297 100644
> --- a/c/src/lib/libbsp/powerpc/virtex4/make/custom/virtex4.cfg
> +++ b/c/src/lib/libbsp/powerpc/virtex4/make/custom/virtex4.cfg
> @@ -14,6 +14,6 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
>  # Miscellaneous additions go here
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>  endef
>
> diff --git a/c/src/lib/libbsp/powerpc/virtex5/make/custom/virtex5.cfg
> b/c/src/lib/libbsp/powerpc/virtex5/make/custom/virtex5.cfg
> index b4a7bd3..9601fbc 100644
> --- a/c/src/lib/libbsp/powerpc/virtex5/make/custom/virtex5.cfg
> +++ b/c/src/lib/libbsp/powerpc/virtex5/make/custom/virtex5.cfg
> @@ -14,6 +14,6 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
>  # Miscellaneous additions go here
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       $(OBJCOPY) -O srec $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>  endef
>
> diff --git a/c/src/make/leaf.cfg b/c/src/make/leaf.cfg
> index dd0defe..8d3f52e 100644
> --- a/c/src/make/leaf.cfg
> +++ b/c/src/make/leaf.cfg
> @@ -8,11 +8,8 @@ ifndef LINKCMDS
>  LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
>  endif
>
> -## what to do about $(EXEEXT) --> $(EXEEXT)
> -##    -o $(basename $@)$(EXEEXT)             OR
> -##    -o $(basename $@)$(EXEEXT)                  OR
> -
> -DOWNEXT=.ralf
> +EXEEXT?=.exe
> +DOWNEXT?=.ralf
>
>  define bsp-link-c
>         $(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
> diff --git a/make/leaf.cfg b/make/leaf.cfg
> index 90cda37..6ebf4bd 100644
> --- a/make/leaf.cfg
> +++ b/make/leaf.cfg
> @@ -78,20 +78,17 @@ clean: clean-am
>  .PHONY: clean clean-am
>  endif
>
> -## what to do about $(EXEEXT) --> $(EXEEXT)
> -##    -o $(basename $@)$(EXEEXT)             OR
> -##    -o $(basename $@)$(EXEEXT)                  OR
> -
> -DOWNEXT=.ralf
> +EXEEXT?=.exe
> +DOWNEXT?=.ralf
>
>  define bsp-link-c
>         $(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
> -           -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
> +           -o $(basename $@)$(EXEEXT) $(LINK_OBJS) $(LINK_LIBS)
>  endef
>
>  define bsp-link-cxx
>         $(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
> -           -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
> +           -o $(basename $@)$(EXEEXT) $(LINK_OBJS) $(LINK_LIBS)
>  endef
>
>  define default-bsp-post-link
> @@ -102,7 +99,7 @@ endef
>  ifndef bsp-post-link
>  define bsp-post-link
>         $(default-bsp-post-link)
> -       cp $(basename $@).exe $(basename $@)$(DOWNEXT)
> +       cp $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
>  endef
>  endif
>
> ____
> --
> Nick Withers
>
> Embedded Systems Programmer
> Room 2.26, Building 57
> Department of Nuclear Physics
> Research School of Physics and Engineering
> The Australian National University (CRICOS: 00120C)
>
> eMail: nick.withers at anu.edu.au
> Phone: +61 2 6125 2091
> Mobile: +61 414 397 446
>
>
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130704/2be8bda2/attachment-0001.html>


More information about the devel mailing list