48208e9cee6aadba18b52a5fd2d2254307b04376
[ffmpeg.git] / tests / Makefile
1 #
2 # Makefile for tests
3 # (c) 2002 Fabrice Bellard
4 #
5 include ../config.mak
6
7 VPATH=$(SRC_PATH)/tests
8 CFLAGS=-O2 -Wall -g
9
10 REFFILE1=$(VPATH)/ffmpeg.regression.ref
11 REFFILE2=$(VPATH)/rotozoom.regression.ref
12
13 SERVER_REFFILE=$(VPATH)/ffserver.regression.ref
14
15 LIBAV_REFFILE=$(VPATH)/libav.regression.ref
16
17 all fulltest test: codectest libavtest test-server
18
19 test-server: vsynth1/00.pgm asynth1.sw
20         @$(VPATH)/server-regression.sh $(SERVER_REFFILE) $(VPATH)/test.conf
21
22 # fast regression tests for all codecs
23 codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
24         @$(VPATH)/regression.sh $@ $(REFFILE1) vsynth1
25         @$(VPATH)/regression.sh $@ $(REFFILE2) vsynth2
26
27 # fast regression for libav formats
28 libavtest: vsynth1/00.pgm asynth1.sw
29         @echo
30         @echo "This test requires FFmpeg to be compiled with --enable-gpl."
31         @echo
32         @$(VPATH)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
33
34 # video generation
35
36 vsynth1/00.pgm: videogen$(EXESUF)
37         @mkdir -p vsynth1
38         ./videogen 'vsynth1/'
39
40 vsynth2/00.pgm: rotozoom$(EXESUF)
41         @mkdir -p vsynth2
42         ./rotozoom 'vsynth2/' $(VPATH)/lena.pnm
43
44 videogen$(EXESUF): videogen.c
45         $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
46
47 rotozoom$(EXESUF): rotozoom.c
48         $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
49
50 # audio generation
51
52 asynth1.sw: audiogen$(EXESUF)
53         ./audiogen $@
54
55 audiogen$(EXESUF): audiogen.c
56         $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
57
58 tiny_psnr$(EXESUF): tiny_psnr.c
59         $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
60
61 DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
62  $(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
63  $(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
64  $(SRC_PATH)/libavcodec/i386/fdct_mmx.c \
65  $(SRC_PATH)/libavcodec/i386/idct_mmx.c \
66  $(SRC_PATH)/libavcodec/i386/motion_est_mmx.c \
67  $(SRC_PATH)/libavcodec/i386/simple_idct_mmx.c \
68  $(SRC_PATH)/libavcodec/dsputil.c \
69  $(SRC_PATH)/libavcodec/dsputil.h \
70  $(SRC_PATH)/libavcodec/simple_idct.c
71
72 DSPCFLAGS = -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. \
73  -I$(SRC_PATH)/libavutil/ -I$(SRC_PATH)/libavcodec/i386 \
74  -I$(SRC_PATH)/libavcodec/ -lm
75
76 dsptestpic: dsptest.c $(DSPDEPS)
77         $(CC) -fPIC -DPIC $(DSPCFLAGS) -o $@ $<
78 dsptest: dsptest.c $(DSPDEPS)
79         $(CC) $(DSPCFLAGS) -o $@ $<
80
81 distclean clean:
82         rm -rf vsynth1 vsynth2 data
83         rm -f asynth1.sw *~ audiogen$(EXESUF) videogen$(EXESUF) rotozoom$(EXESUF) tiny_psnr$(EXESUF)
84
85 .PHONY: all fulltest test codectest libavtest test-server
86 .PHONY: mpeg4 mpeg ac3 snow snowll distclean clean