aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Makefile
blob: b4ab9a01982d4cce0a7931277d4a0893f2d880a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# Makefile for tests
# (c) 2002 Fabrice Bellard
#
include ../config.mak

VPATH=$(SRC_PATH)/tests
CFLAGS=-O2 -Wall -g

REFFILE1=$(SRC_PATH)/tests/ffmpeg.regression.ref
REFFILE2=$(SRC_PATH)/tests/rotozoom.regression.ref

SERVER_REFFILE=$(SRC_PATH)/tests/ffserver.regression.ref

LIBAV_REFFILE=$(SRC_PATH)/tests/libav.regression.ref

all: test test-server

test-server: vsynth1/0.pgm asynth1.sw
	@$(SRC_PATH)/tests/server-regression.sh $(SERVER_REFFILE)

# fast regression tests for all codecs
test mpeg4 mpeg: vsynth1/0.pgm vsynth2/0.pgm asynth1.sw tiny_psnr
	@$(SRC_PATH)/tests/regression.sh $@ $(REFFILE1) vsynth1 || true
	@$(SRC_PATH)/tests/regression.sh $@ $(REFFILE2) vsynth2 || true

# fast regression for libav formats
libavtest: vsynth1/0.pgm asynth1.sw
	@$(SRC_PATH)/tests/regression.sh $@ $(LIBAV_REFFILE) vsynth1

# video generation

vsynth1/0.pgm: videogen
	@mkdir -p vsynth1
	./videogen 'vsynth1/'

vsynth2/0.pgm: rotozoom
	@mkdir -p vsynth2
	./rotozoom 'vsynth2/'

videogen: videogen.c
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<

rotozoom: rotozoom.c
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<

# audio generation

asynth1.sw: audiogen
	./audiogen $@

audiogen: audiogen.c
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<

tiny_psnr: tiny_psnr.c
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
        
DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
 $(SRC_PATH)/libavcodec/i386/fdct_mmx.c \
 $(SRC_PATH)/libavcodec/i386/idct_mmx.c \
 $(SRC_PATH)/libavcodec/i386/motion_est_mmx.c \
 $(SRC_PATH)/libavcodec/i386/simple_idct_mmx.c \
 $(SRC_PATH)/libavcodec/dsputil.c \
 $(SRC_PATH)/libavcodec/dsputil.h \
 $(SRC_PATH)/libavcodec/simple_idct.c

dsptestpic: dsptest.c $(DSPDEPS)
	$(CC) -fPIC -DPIC -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavcodec/i386 -I$(SRC_PATH)/libavcodec/ -o $@ $< -lm
dsptest: dsptest.c $(DSPDEPS)
	$(CC) -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavcodec/i386 -I$(SRC_PATH)/libavcodec/ -o $@ $< -lm

clean:
	rm -rf vsynth1 vsynth2 data
	rm -f asynth1.sw *~ audiogen videogen