3 # (c) 2002 Fabrice Bellard
7 VPATH=$(SRC_PATH_BARE)/tests
8 SRC_DIR=$(SRC_PATH)/tests
9 BUILD_DIR=$(BUILD_ROOT)/tests
12 REFFILE1=$(SRC_DIR)/ffmpeg.regression.ref
13 REFFILE2=$(SRC_DIR)/rotozoom.regression.ref
15 SERVER_REFFILE=$(SRC_DIR)/ffserver.regression.ref
17 LIBAV_REFFILE=$(SRC_DIR)/libav.regression.ref
19 SEEK_REFFILE=$(SRC_DIR)/seek.regression.ref
21 all fulltest test: codectest libavtest seektest
23 test-server: vsynth1/00.pgm asynth1.sw
25 @echo "Unfortunately ffserver is broken and therefore its regression"
26 @echo "test fails randomly. Treat the results accordingly."
28 $(SRC_DIR)/server-regression.sh $(SERVER_REFFILE) $(SRC_DIR)/test.conf
30 codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
31 $(SRC_DIR)/regression.sh $@ $(REFFILE1) vsynth1
32 $(SRC_DIR)/regression.sh $@ $(REFFILE2) vsynth2
34 ifeq ($(CONFIG_GPL),yes)
35 libavtest: vsynth1/00.pgm asynth1.sw
36 $(SRC_DIR)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
40 @echo "This test requires FFmpeg to be compiled with --enable-gpl."
44 ifeq ($(CONFIG_SWSCALER),yes)
45 test-server codectest mpeg4 mpeg ac3 snow snowll libavtest: swscale_error
48 @echo "This regression test is incompatible with --enable-swscaler."
53 seektest: seek_test$(EXESUF)
54 $(SRC_DIR)/seek_test.sh $(SEEK_REFFILE)
56 vsynth1/00.pgm: videogen$(EXESUF)
58 $(BUILD_DIR)/$< 'vsynth1/'
60 vsynth2/00.pgm: rotozoom$(EXESUF)
62 $(BUILD_DIR)/$< 'vsynth2/' $(SRC_DIR)/lena.pnm
64 asynth1.sw: audiogen$(EXESUF)
68 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
70 seek_test$(EXESUF): seek_test.c
71 $(CC) $(LDFLAGS) $(CFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -o $@ $< $(BUILD_ROOT)/libavformat/libavformat.a $(BUILD_ROOT)/libavcodec/libavcodec.a $(BUILD_ROOT)/libavutil/libavutil.a $(EXTRALIBS)
74 rm -rf vsynth1 vsynth2 data asynth1.sw *~
75 rm -f $(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr)
77 .PHONY: all fulltest test codectest libavtest test-server seektest
78 .PHONY: mpeg4 mpeg ac3 snow snowll distclean clean