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

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