Revision 82bb3329

View differences:

Makefile
122 122
clean:: testclean
123 123
	rm -f $(ALLPROGS) $(ALLPROGS_G) output_example$(EXESUF)
124 124
	rm -f doc/*.html doc/*.pod doc/*.1
125
	rm -f $(addprefix tests/,$(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr))
125
	rm -f tests/seek_test$(EXESUF)
126
	rm -f $(addprefix tests/,$(addsuffix $(HOSTEXESUF),audiogen videogen rotozoom tiny_psnr))
126 127
	rm -f $(addprefix tools/,$(addsuffix $(EXESUF),cws2fws pktdumper qt-faststart trasher))
127 128

  
128 129
distclean::
......
266 267

  
267 268
regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/asynth1.sw
268 269

  
269
$(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(EXESUF)
270
$(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(HOSTEXESUF)
270 271
	$(SRC_PATH)/tests/regression.sh $@ vsynth   tests/vsynth1 a "$(TARGET_EXEC)" "$(TARGET_PATH)"
271 272
	$(SRC_PATH)/tests/regression.sh $@ rotozoom tests/vsynth2 a "$(TARGET_EXEC)" "$(TARGET_PATH)"
272 273

  
......
283 284
	@echo
284 285
	$(SRC_PATH)/tests/server-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/test.conf
285 286

  
286
tests/vsynth1/00.pgm: tests/videogen$(EXESUF)
287
tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF)
287 288
	mkdir -p tests/vsynth1
288 289
	$(BUILD_ROOT)/$< 'tests/vsynth1/'
289 290

  
290
tests/vsynth2/00.pgm: tests/rotozoom$(EXESUF)
291
tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF)
291 292
	mkdir -p tests/vsynth2
292 293
	$(BUILD_ROOT)/$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
293 294

  
294
tests/asynth1.sw: tests/audiogen$(EXESUF)
295
tests/asynth1.sw: tests/audiogen$(HOSTEXESUF)
295 296
	$(BUILD_ROOT)/$< $@
296 297

  
297
tests/%$(EXESUF): tests/%.c
298
tests/%$(HOSTEXESUF): tests/%.c
298 299
	$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
299 300

  
300 301
tests/seek_test$(EXESUF): tests/seek_test.c $(FF_DEP_LIBS)
configure
954 954
    host_cflags
955 955
    host_ldflags
956 956
    host_libs
957
    host_os
957 958
    logfile
958 959
    nm
959 960
    source_path
......
1162 1163

  
1163 1164
# OS
1164 1165
target_os=$(tolower $(uname -s))
1166
host_os=$target_os
1165 1167

  
1166 1168
# configurable options
1167 1169
enable debug
......
1325 1327
enabled cross_compile || host_cc_default=$cc
1326 1328
set_default host_cc
1327 1329

  
1328
case $target_os in
1329
    mingw32*|cygwin*|*-dos|freedos|opendos|os/2*) EXESUF=.exe ;;
1330
esac
1330
exesuf() {
1331
    case $1 in
1332
        mingw32*|cygwin*|*-dos|freedos|opendos|os/2*) echo .exe ;;
1333
    esac
1334
}
1335

  
1336
EXESUF=$(exesuf $target_os)
1337
HOSTEXESUF=$(exesuf $host_os)
1331 1338

  
1332 1339
# set temporary file name
1333 1340
: ${TMPDIR:=$TEMPDIR}
......
2376 2383
echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak
2377 2384
echo "HOSTCC=$host_cc" >> config.mak
2378 2385
echo "HOSTCFLAGS=$host_cflags" >> config.mak
2386
echo "HOSTEXESUF=$HOSTEXESUF" >> config.mak
2379 2387
echo "HOSTLDFLAGS=$host_ldflags" >> config.mak
2380 2388
echo "HOSTLIBS=$host_libs" >> config.mak
2381 2389
echo "TARGET_EXEC=$target_exec" >> config.mak

Also available in: Unified diff