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