13c16b81b7c17034ab263e9918d87a4a8f036bea
[libav.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 REFFILE=$(SRC_PATH)/tests/ffmpeg.regression.ref
11
12 SERVER_REFFILE=$(SRC_PATH)/tests/ffserver.regression.ref
13
14 LIBAV_REFFILE=$(SRC_PATH)/tests/libav.regression.ref
15
16 all: test test-server
17
18 test-server: vsynth1/0.pgm asynth1.sw
19 @$(SRC_PATH)/tests/server-regression.sh $(SERVER_REFFILE)
20
21 # fast regression tests for all codecs
22 test mpeg4 mpeg: vsynth1/0.pgm asynth1.sw tiny_psnr
23 @$(SRC_PATH)/tests/regression.sh $@ $(REFFILE) || true
24
25 # fast regression for libav formats
26 libavtest: vsynth1/0.pgm asynth1.sw
27 @$(SRC_PATH)/tests/regression.sh $@ $(LIBAV_REFFILE)
28
29 # video generation
30
31 vsynth1/0.pgm: videogen
32 @mkdir -p vsynth1
33 ./videogen 'vsynth1/'
34
35 videogen: videogen.c
36 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
37
38 # audio generation
39
40 asynth1.sw: audiogen
41 ./audiogen $@
42
43 audiogen: audiogen.c
44 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
45
46 tiny_psnr: tiny_psnr.c
47 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
48
49 DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
50 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
51 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
52 $(SRC_PATH)/libavcodec/i386/fdct_mmx.c \
53 $(SRC_PATH)/libavcodec/i386/idct_mmx.c \
54 $(SRC_PATH)/libavcodec/i386/motion_est_mmx.c \
55 $(SRC_PATH)/libavcodec/i386/simple_idct_mmx.c \
56 $(SRC_PATH)/libavcodec/dsputil.c \
57 $(SRC_PATH)/libavcodec/dsputil.h \
58 $(SRC_PATH)/libavcodec/simple_idct.c
59
60 dsptestpic: dsptest.c $(DSPDEPS)
61 $(CC) -fPIC -DPIC -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavcodec/i386 -I$(SRC_PATH)/libavcodec/ -o $@ $< -lm
62 dsptest: dsptest.c $(DSPDEPS)
63 $(CC) -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavcodec/i386 -I$(SRC_PATH)/libavcodec/ -o $@ $< -lm
64
65 clean:
66 rm -rf vsynth1 data
67 rm -f asynth1.sw *~ audiogen videogen