Use $(EXEEXT) [defaults to "exe"] to generate binaries

This commit is contained in:
Nick Withers
2013-08-09 14:18:17 +10:00
committed by Sebastian Huber
parent 98bcf4ff6e
commit efdda56546
45 changed files with 65 additions and 71 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
#

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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) \

View File

@@ -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