Use $< instead of explicit names.
[libav.git] / tests / Makefile
CommitLineData
51133a7d
FB
1#
2# Makefile for tests
d0c30ca5 3# (c) 2002 Fabrice Bellard
51133a7d
FB
4#
5include ../config.mak
6
997baf01
MR
7VPATH=$(SRC_PATH_BARE)/tests
8SRC_DIR=$(SRC_PATH)/tests
51133a7d 9CFLAGS=-O2 -Wall -g
1b78558a 10
997baf01
MR
11REFFILE1=$(SRC_DIR)/ffmpeg.regression.ref
12REFFILE2=$(SRC_DIR)/rotozoom.regression.ref
1b78558a 13
997baf01 14SERVER_REFFILE=$(SRC_DIR)/ffserver.regression.ref
e2b2851e 15
997baf01 16LIBAV_REFFILE=$(SRC_DIR)/libav.regression.ref
51133a7d 17
d568d0fe 18all fulltest test: codectest libavtest test-server
e2b2851e 19
9fd353e9 20test-server: vsynth1/00.pgm asynth1.sw
997baf01 21 @$(SRC_DIR)/server-regression.sh $(SERVER_REFFILE) $(SRC_DIR)/test.conf
51133a7d
FB
22
23# fast regression tests for all codecs
9fd353e9 24codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
997baf01
MR
25 @$(SRC_DIR)/regression.sh $@ $(REFFILE1) vsynth1
26 @$(SRC_DIR)/regression.sh $@ $(REFFILE2) vsynth2
51133a7d 27
89d5dfd5 28# fast regression for libav formats
ca612735 29ifeq ($(CONFIG_GPL),yes)
9fd353e9 30libavtest: vsynth1/00.pgm asynth1.sw
997baf01 31 @$(SRC_DIR)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
ca612735
DB
32else
33libavtest:
41ada6e5
DB
34 @echo
35 @echo "This test requires FFmpeg to be compiled with --enable-gpl."
36 @echo
ca612735 37endif
51133a7d 38
6fea8454 39# video generation
51133a7d 40
9fd353e9 41vsynth1/00.pgm: videogen$(EXESUF)
51133a7d 42 @mkdir -p vsynth1
5d078bdb 43 $< 'vsynth1/'
51133a7d 44
9fd353e9 45vsynth2/00.pgm: rotozoom$(EXESUF)
6afd3b92 46 @mkdir -p vsynth2
5d078bdb 47 $< 'vsynth2/' $(SRC_DIR)/lena.pnm
6afd3b92 48
462f3c37 49videogen$(EXESUF): videogen.c
51133a7d
FB
50 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
51
462f3c37 52rotozoom$(EXESUF): rotozoom.c
6afd3b92
MN
53 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
54
51133a7d
FB
55# audio generation
56
f5c85943 57asynth1.sw: audiogen$(EXESUF)
5d078bdb 58 $< $@
51133a7d 59
462f3c37 60audiogen$(EXESUF): audiogen.c
51133a7d
FB
61 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
62
462f3c37 63tiny_psnr$(EXESUF): tiny_psnr.c
67cbe681 64 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
115329f1 65
ec9a41f5 66DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
6fea8454 67 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
5845431a 68 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
6fea8454
ZK
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
ec9a41f5 76
0e16a1fc
DB
77DSPCFLAGS = -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
9e8098e7 81dsptestpic: dsptest.c $(DSPDEPS)
0e16a1fc 82 $(CC) -fPIC -DPIC $(DSPCFLAGS) -o $@ $<
ec9a41f5 83dsptest: dsptest.c $(DSPDEPS)
0e16a1fc 84 $(CC) $(DSPCFLAGS) -o $@ $<
ec9a41f5 85
98013cc1 86distclean clean:
6afd3b92 87 rm -rf vsynth1 vsynth2 data
462f3c37 88 rm -f asynth1.sw *~ audiogen$(EXESUF) videogen$(EXESUF) rotozoom$(EXESUF) tiny_psnr$(EXESUF)
3263626f
DB
89
90.PHONY: all fulltest test codectest libavtest test-server
91.PHONY: mpeg4 mpeg ac3 snow snowll distclean clean