Statistics
| Branch: | Revision:

ffmpeg / tests / Makefile @ 5d078bdb

History | View | Annotate | Download (2.43 KB)

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
CFLAGS=-O2 -Wall -g
10

    
11
REFFILE1=$(SRC_DIR)/ffmpeg.regression.ref
12
REFFILE2=$(SRC_DIR)/rotozoom.regression.ref
13

    
14
SERVER_REFFILE=$(SRC_DIR)/ffserver.regression.ref
15

    
16
LIBAV_REFFILE=$(SRC_DIR)/libav.regression.ref
17

    
18
all fulltest test: codectest libavtest test-server
19

    
20
test-server: vsynth1/00.pgm asynth1.sw
21
	@$(SRC_DIR)/server-regression.sh $(SERVER_REFFILE) $(SRC_DIR)/test.conf
22

    
23
# fast regression tests for all codecs
24
codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
25
	@$(SRC_DIR)/regression.sh $@ $(REFFILE1) vsynth1
26
	@$(SRC_DIR)/regression.sh $@ $(REFFILE2) vsynth2
27

    
28
# fast regression for libav formats
29
ifeq ($(CONFIG_GPL),yes)
30
libavtest: vsynth1/00.pgm asynth1.sw
31
	@$(SRC_DIR)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
32
else
33
libavtest:
34
	@echo
35
	@echo "This test requires FFmpeg to be compiled with --enable-gpl."
36
	@echo
37
endif
38

    
39
# video generation
40

    
41
vsynth1/00.pgm: videogen$(EXESUF)
42
	@mkdir -p vsynth1
43
	$< 'vsynth1/'
44

    
45
vsynth2/00.pgm: rotozoom$(EXESUF)
46
	@mkdir -p vsynth2
47
	$< 'vsynth2/' $(SRC_DIR)/lena.pnm
48

    
49
videogen$(EXESUF): videogen.c
50
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
51

    
52
rotozoom$(EXESUF): rotozoom.c
53
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
54

    
55
# audio generation
56

    
57
asynth1.sw: audiogen$(EXESUF)
58
	$< $@
59

    
60
audiogen$(EXESUF): audiogen.c
61
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
62

    
63
tiny_psnr$(EXESUF): tiny_psnr.c
64
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
65

    
66
DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
67
 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
68
 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
69
 $(SRC_PATH)/libavcodec/i386/fdct_mmx.c \
70
 $(SRC_PATH)/libavcodec/i386/idct_mmx.c \
71
 $(SRC_PATH)/libavcodec/i386/motion_est_mmx.c \
72
 $(SRC_PATH)/libavcodec/i386/simple_idct_mmx.c \
73
 $(SRC_PATH)/libavcodec/dsputil.c \
74
 $(SRC_PATH)/libavcodec/dsputil.h \
75
 $(SRC_PATH)/libavcodec/simple_idct.c
76

    
77
DSPCFLAGS = -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. \
78
 -I$(SRC_PATH)/libavutil/ -I$(SRC_PATH)/libavcodec/i386 \
79
 -I$(SRC_PATH)/libavcodec/ -lm
80

    
81
dsptestpic: dsptest.c $(DSPDEPS)
82
	$(CC) -fPIC -DPIC $(DSPCFLAGS) -o $@ $<
83
dsptest: dsptest.c $(DSPDEPS)
84
	$(CC) $(DSPCFLAGS) -o $@ $<
85

    
86
distclean clean:
87
	rm -rf vsynth1 vsynth2 data
88
	rm -f asynth1.sw *~ audiogen$(EXESUF) videogen$(EXESUF) rotozoom$(EXESUF) tiny_psnr$(EXESUF)
89

    
90
.PHONY: all fulltest test codectest libavtest test-server
91
.PHONY: mpeg4 mpeg ac3 snow snowll distclean clean