seek tests only available with GPL enabled
[libav.git] / tests / Makefile
1 #
2 # Makefile for tests
3 # (c) 2002 Fabrice Bellard
4 #
5 include ../config.mak
6
7 VPATH = $(SRC_PATH_BARE)/tests
8 SRC_DIR = $(SRC_PATH)/tests
9 BUILD_DIR = $(BUILD_ROOT)/tests
10 CFLAGS = -O2 -Wall -g
11
12 FFMPEG_REFFILE = $(SRC_DIR)/ffmpeg.regression.ref
13 FFSERVER_REFFILE = $(SRC_DIR)/ffserver.regression.ref
14 LIBAV_REFFILE = $(SRC_DIR)/libav.regression.ref
15 ROTOZOOM_REFFILE = $(SRC_DIR)/rotozoom.regression.ref
16 SEEK_REFFILE = $(SRC_DIR)/seek.regression.ref
17
18 all fulltest test: codectest libavtest seektest
19
20 test-server: vsynth1/00.pgm asynth1.sw
21 @echo
22 @echo "Unfortunately ffserver is broken and therefore its regression"
23 @echo "test fails randomly. Treat the results accordingly."
24 @echo
25 $(SRC_DIR)/server-regression.sh $(FFSERVER_REFFILE) $(SRC_DIR)/test.conf
26
27 codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
28 $(SRC_DIR)/regression.sh $@ $(FFMPEG_REFFILE) vsynth1
29 $(SRC_DIR)/regression.sh $@ $(ROTOZOOM_REFFILE) vsynth2
30
31 ifeq ($(CONFIG_GPL),yes)
32 libavtest: vsynth1/00.pgm asynth1.sw
33 $(SRC_DIR)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
34 seektest: seek_test$(EXESUF)
35 $(SRC_DIR)/seek_test.sh $(SEEK_REFFILE)
36 else
37 libavtest seektest:
38 @echo
39 @echo "This test requires FFmpeg to be compiled with --enable-gpl."
40 @echo
41 @exit 1
42 endif
43
44 ifeq ($(CONFIG_SWSCALER),yes)
45 test-server codectest mpeg4 mpeg ac3 snow snowll libavtest: swscale_error
46 swscale_error:
47 @echo
48 @echo "This regression test is incompatible with --enable-swscaler."
49 @echo
50 @exit 1
51 endif
52
53 vsynth1/00.pgm: videogen$(EXESUF)
54 mkdir -p vsynth1
55 $(BUILD_DIR)/$< 'vsynth1/'
56
57 vsynth2/00.pgm: rotozoom$(EXESUF)
58 mkdir -p vsynth2
59 $(BUILD_DIR)/$< 'vsynth2/' $(SRC_DIR)/lena.pnm
60
61 asynth1.sw: audiogen$(EXESUF)
62 $(BUILD_DIR)/$< $@
63
64 %$(EXESUF): %.c
65 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
66
67 seek_test$(EXESUF): seek_test.c
68 $(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)
69
70 distclean clean:
71 rm -rf vsynth1 vsynth2 data asynth1.sw *~
72 rm -f $(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr)
73
74 .PHONY: all fulltest test codectest libavtest test-server seektest
75 .PHONY: mpeg4 mpeg ac3 snow snowll swscale_error distclean clean