From 33d90770013dc8ba3fbb4ce9de05133b28fbd2c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Mon, 29 Aug 2011 17:52:03 +0200 Subject: [PATCH] build: introduce --progs-suffix option. --- Makefile | 12 ++++++------ configure | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 64506c7194..0a6d388e64 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,8 @@ TOOLS = qt-faststart trasher TOOLS-$(CONFIG_ZLIB) += cws2fws BASENAMES = ffmpeg avconv ffplay ffprobe ffserver -ALLPROGS = $(BASENAMES:%=%$(EXESUF)) -ALLPROGS_G = $(BASENAMES:%=%_g$(EXESUF)) +ALLPROGS = $(BASENAMES:%=%$(PROGSSUF)$(EXESUF)) +ALLPROGS_G = $(BASENAMES:%=%$(PROGSSUF)_g$(EXESUF)) ALLMANPAGES = $(BASENAMES:%=%.1) FFLIBS-$(CONFIG_AVDEVICE) += avdevice @@ -48,9 +48,9 @@ FF_DEP_LIBS := $(DEP_LIBS) all: $(PROGS) -$(PROGS): %$(EXESUF): %_g$(EXESUF) - $(CP) $< $@ - $(STRIP) $@ +$(PROGS): %$(EXESUF): %$(PROGSSUF)_g$(EXESUF) + $(CP) $< $@$(PROGSSUF) + $(STRIP) $@$(PROGSSUF) $(TOOLS): %$(EXESUF): %.o $(LD) $(LDFLAGS) -o $@ $< $(ELIBS) @@ -84,7 +84,7 @@ ffplay.o: CFLAGS += $(SDL_CFLAGS) ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS) ffserver_g$(EXESUF): LDFLAGS += $(FFSERVERLDFLAGS) -%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS) +%$(PROGSSUF)_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS) $(LD) $(LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS) OBJDIRS += tools diff --git a/configure b/configure index 0dc86cb1b3..6aa194c37f 100755 --- a/configure +++ b/configure @@ -215,6 +215,7 @@ Advanced options (experts only): --extra-libs=ELIBS add ELIBS [$ELIBS] --extra-version=STRING version string suffix [] --build-suffix=SUFFIX library name suffix [] + --progs-suffix=SUFFIX program name suffix [] --arch=ARCH select architecture [$arch] --cpu=CPU select the minimum required CPU (affects instruction selection, may crash on older CPUs) @@ -1177,6 +1178,7 @@ CMDLINE_SET=" arch as build_suffix + progs_suffix cc cpu cross_prefix @@ -3170,6 +3172,9 @@ echo "ARCH $arch ($cpu)" if test "$build_suffix" != ""; then echo "build suffix $build_suffix" fi +if test "$progs_suffix" != ""; then + echo "progs suffix $progs_suffix" +fi if test "$extra_version" != ""; then echo "version string suffix $extra_version" fi @@ -3319,6 +3324,7 @@ FFSERVERLDFLAGS=$FFSERVERLDFLAGS SHFLAGS=$SHFLAGS YASMFLAGS=$YASMFLAGS BUILDSUF=$build_suffix +PROGSSUF=$progs_suffix FULLNAME=$FULLNAME LIBPREF=$LIBPREF LIBSUF=$LIBSUF