Commit 937dcc40 authored by mru's avatar mru

Allow different executable suffix for host and target

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17885 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2f2b2142
...@@ -122,7 +122,8 @@ testclean: ...@@ -122,7 +122,8 @@ testclean:
clean:: testclean clean:: testclean
rm -f $(ALLPROGS) $(ALLPROGS_G) output_example$(EXESUF) rm -f $(ALLPROGS) $(ALLPROGS_G) output_example$(EXESUF)
rm -f doc/*.html doc/*.pod doc/*.1 rm -f doc/*.html doc/*.pod doc/*.1
rm -f $(addprefix tests/,$(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr)) rm -f tests/seek_test$(EXESUF)
rm -f $(addprefix tests/,$(addsuffix $(HOSTEXESUF),audiogen videogen rotozoom tiny_psnr))
rm -f $(addprefix tools/,$(addsuffix $(EXESUF),cws2fws pktdumper qt-faststart trasher)) rm -f $(addprefix tools/,$(addsuffix $(EXESUF),cws2fws pktdumper qt-faststart trasher))
distclean:: distclean::
...@@ -266,7 +267,7 @@ $(CODEC_TESTS) $(LAVF_TESTS): regtest-ref ...@@ -266,7 +267,7 @@ $(CODEC_TESTS) $(LAVF_TESTS): regtest-ref
regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/asynth1.sw regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/asynth1.sw
$(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(EXESUF) $(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(HOSTEXESUF)
$(SRC_PATH)/tests/regression.sh $@ vsynth tests/vsynth1 a "$(TARGET_EXEC)" "$(TARGET_PATH)" $(SRC_PATH)/tests/regression.sh $@ vsynth tests/vsynth1 a "$(TARGET_EXEC)" "$(TARGET_PATH)"
$(SRC_PATH)/tests/regression.sh $@ rotozoom tests/vsynth2 a "$(TARGET_EXEC)" "$(TARGET_PATH)" $(SRC_PATH)/tests/regression.sh $@ rotozoom tests/vsynth2 a "$(TARGET_EXEC)" "$(TARGET_PATH)"
...@@ -283,18 +284,18 @@ servertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/asynth1.sw ...@@ -283,18 +284,18 @@ servertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/asynth1.sw
@echo @echo
$(SRC_PATH)/tests/server-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/test.conf $(SRC_PATH)/tests/server-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/test.conf
tests/vsynth1/00.pgm: tests/videogen$(EXESUF) tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF)
mkdir -p tests/vsynth1 mkdir -p tests/vsynth1
$(BUILD_ROOT)/$< 'tests/vsynth1/' $(BUILD_ROOT)/$< 'tests/vsynth1/'
tests/vsynth2/00.pgm: tests/rotozoom$(EXESUF) tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF)
mkdir -p tests/vsynth2 mkdir -p tests/vsynth2
$(BUILD_ROOT)/$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm $(BUILD_ROOT)/$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
tests/asynth1.sw: tests/audiogen$(EXESUF) tests/asynth1.sw: tests/audiogen$(HOSTEXESUF)
$(BUILD_ROOT)/$< $@ $(BUILD_ROOT)/$< $@
tests/%$(EXESUF): tests/%.c tests/%$(HOSTEXESUF): tests/%.c
$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS) $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
tests/seek_test$(EXESUF): tests/seek_test.c $(FF_DEP_LIBS) tests/seek_test$(EXESUF): tests/seek_test.c $(FF_DEP_LIBS)
......
...@@ -954,6 +954,7 @@ CMDLINE_SET=" ...@@ -954,6 +954,7 @@ CMDLINE_SET="
host_cflags host_cflags
host_ldflags host_ldflags
host_libs host_libs
host_os
logfile logfile
nm nm
source_path source_path
...@@ -1162,6 +1163,7 @@ cpu="generic" ...@@ -1162,6 +1163,7 @@ cpu="generic"
# OS # OS
target_os=$(tolower $(uname -s)) target_os=$(tolower $(uname -s))
host_os=$target_os
# configurable options # configurable options
enable debug enable debug
...@@ -1325,9 +1327,14 @@ set_default as cc nm sysinclude ...@@ -1325,9 +1327,14 @@ set_default as cc nm sysinclude
enabled cross_compile || host_cc_default=$cc enabled cross_compile || host_cc_default=$cc
set_default host_cc set_default host_cc
case $target_os in exesuf() {
mingw32*|cygwin*|*-dos|freedos|opendos|os/2*) EXESUF=.exe ;; case $1 in
esac mingw32*|cygwin*|*-dos|freedos|opendos|os/2*) echo .exe ;;
esac
}
EXESUF=$(exesuf $target_os)
HOSTEXESUF=$(exesuf $host_os)
# set temporary file name # set temporary file name
: ${TMPDIR:=$TEMPDIR} : ${TMPDIR:=$TEMPDIR}
...@@ -2376,6 +2383,7 @@ echo "EXTRA_VERSION=$extra_version" >> config.mak ...@@ -2376,6 +2383,7 @@ echo "EXTRA_VERSION=$extra_version" >> config.mak
echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak
echo "HOSTCC=$host_cc" >> config.mak echo "HOSTCC=$host_cc" >> config.mak
echo "HOSTCFLAGS=$host_cflags" >> config.mak echo "HOSTCFLAGS=$host_cflags" >> config.mak
echo "HOSTEXESUF=$HOSTEXESUF" >> config.mak
echo "HOSTLDFLAGS=$host_ldflags" >> config.mak echo "HOSTLDFLAGS=$host_ldflags" >> config.mak
echo "HOSTLIBS=$host_libs" >> config.mak echo "HOSTLIBS=$host_libs" >> config.mak
echo "TARGET_EXEC=$target_exec" >> config.mak echo "TARGET_EXEC=$target_exec" >> config.mak
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment