Statistics
| Branch: | Revision:

ffmpeg / tests / Makefile @ 0b006599

History | View | Annotate | Download (3.28 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
BUILD_DIR=$(BUILD_ROOT)/tests
10
CFLAGS=-O2 -Wall -g
11

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

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

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

    
19
SEEK_REFFILE=$(SRC_DIR)/seek.regression.ref
20

    
21
all fulltest test: codectest libavtest
22

    
23
test-server: vsynth1/00.pgm asynth1.sw
24
	@echo
25
	@echo "Unfortunately ffserver is broken and therefore its regression"
26
	@echo "test fails randomly. Treat the results accordingly."
27
	@echo
28
	@$(SRC_DIR)/server-regression.sh $(SERVER_REFFILE) $(SRC_DIR)/test.conf
29

    
30
# fast regression tests for all codecs
31
codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
32
	@$(SRC_DIR)/regression.sh $@ $(REFFILE1) vsynth1
33
	@$(SRC_DIR)/regression.sh $@ $(REFFILE2) vsynth2
34

    
35
# fast regression for libav formats
36
ifeq ($(CONFIG_GPL),yes)
37
libavtest: vsynth1/00.pgm asynth1.sw
38
	@$(SRC_DIR)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
39
else
40
libavtest:
41
	@echo
42
	@echo "This test requires FFmpeg to be compiled with --enable-gpl."
43
	@echo
44
endif
45

    
46
ifeq ($(CONFIG_SWSCALER),yes)
47
test-server codectest mpeg4 mpeg ac3 snow snowll libavtest: swscale_error
48
swscale_error:
49
	@echo
50
	@echo "This regression test is incompatible with --enable-swscaler."
51
	@echo
52
	@exit 1
53
endif
54

    
55
seektest: seek_test$(EXESUF)
56
	@$(SRC_DIR)/seek_test.sh $(SEEK_REFFILE)
57

    
58
# video generation
59

    
60
vsynth1/00.pgm: videogen$(EXESUF)
61
	@mkdir -p vsynth1
62
	$(BUILD_DIR)/$< 'vsynth1/'
63

    
64
vsynth2/00.pgm: rotozoom$(EXESUF)
65
	@mkdir -p vsynth2
66
	$(BUILD_DIR)/$< 'vsynth2/' $(SRC_DIR)/lena.pnm
67

    
68
videogen$(EXESUF): videogen.c
69
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
70

    
71
rotozoom$(EXESUF): rotozoom.c
72
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
73

    
74
# audio generation
75

    
76
asynth1.sw: audiogen$(EXESUF)
77
	$(BUILD_DIR)/$< $@
78

    
79
audiogen$(EXESUF): audiogen.c
80
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
81

    
82
tiny_psnr$(EXESUF): tiny_psnr.c
83
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
84

    
85
#FIXME cleanup shit below
86
seek_test$(EXESUF): seek_test.c
87
	$(CC) $(LDFLAGS) $(CFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavformat/ -I$(SRC_PATH)/libavcodec/ -I$(SRC_PATH)/libavutil/ -o $@ $< $(SRC_PATH)/libavformat/libavformat.a $(SRC_PATH)/libavcodec/libavcodec.a $(SRC_PATH)/libavutil/libavutil.a $(EXTRALIBS)
88

    
89
DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
90
 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
91
 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
92
 $(SRC_PATH)/libavcodec/i386/fdct_mmx.c \
93
 $(SRC_PATH)/libavcodec/i386/idct_mmx.c \
94
 $(SRC_PATH)/libavcodec/i386/motion_est_mmx.c \
95
 $(SRC_PATH)/libavcodec/i386/simple_idct_mmx.c \
96
 $(SRC_PATH)/libavcodec/dsputil.c \
97
 $(SRC_PATH)/libavcodec/dsputil.h \
98
 $(SRC_PATH)/libavcodec/simple_idct.c
99

    
100
DSPCFLAGS = -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. \
101
 -I$(SRC_PATH)/libavutil/ -I$(SRC_PATH)/libavcodec/i386 \
102
 -I$(SRC_PATH)/libavcodec/ -lm
103

    
104
dsptestpic: dsptest.c $(DSPDEPS)
105
	$(CC) -fPIC -DPIC $(DSPCFLAGS) -o $@ $<
106
dsptest: dsptest.c $(DSPDEPS)
107
	$(CC) $(DSPCFLAGS) -o $@ $<
108

    
109
distclean clean:
110
	rm -rf vsynth1 vsynth2 data
111
	rm -f asynth1.sw *~ audiogen$(EXESUF) videogen$(EXESUF) rotozoom$(EXESUF) tiny_psnr$(EXESUF)
112

    
113
.PHONY: all fulltest test codectest libavtest test-server seektest
114
.PHONY: mpeg4 mpeg ac3 snow snowll distclean clean