Statistics
| Branch: | Revision:

ffmpeg / Makefile @ 27217159

History | View | Annotate | Download (14.8 KB)

1 a1b63811 Fabrice Bellard
#
2 85f07f22 Fabrice Bellard
# Main ffmpeg Makefile
3 38100e8c Mike Melanson
# (c) 2000-2004 Fabrice Bellard
4 85f07f22 Fabrice Bellard
#
5 980fc7b8 Fabrice Bellard
include config.mak
6 85f07f22 Fabrice Bellard
7 a426bbfc Måns Rullgård
SRC_DIR = $(SRC_PATH_BARE)
8
9 de2f77d8 Måns Rullgård
vpath %.c    $(SRC_PATH_BARE)
10
vpath %.h    $(SRC_PATH_BARE)
11
vpath %.texi $(SRC_PATH_BARE)
12 dd9ca370 Fabrice Bellard
13 cbeee4d8 Diego Biurrun
CFLAGS=$(OPTFLAGS) -I$(BUILD_ROOT) -I$(SRC_PATH) -I$(SRC_PATH)/libavutil \
14 a163ed1a Luca Abeni
       -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libswscale \
15 f7679c54 Vitor Sessak
       -I$(SRC_PATH)/libavdevice -I$(SRC_PATH)/libavfilter \
16 364a9607 Diego Biurrun
       -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -DHAVE_AV_CONFIG_H
17 115329f1 Diego Biurrun
LDFLAGS+= -g
18 37736979 Fabrice Bellard
19 0cb8579a Måns Rullgård
PROGS-$(CONFIG_FFMPEG)   += ffmpeg
20
PROGS-$(CONFIG_FFPLAY)   += ffplay
21
PROGS-$(CONFIG_FFSERVER) += ffserver
22 01310af2 Fabrice Bellard
23 bb8fe69a Diego Biurrun
PROGS       = $(addsuffix   $(EXESUF), $(PROGS-yes))
24
PROGS_G     = $(addsuffix _g$(EXESUF), $(PROGS-yes))
25 27217159 Diego Biurrun
SRCS        = $(addsuffix .c,          $(PROGS-yes)) cmdutils.c
26 bb8fe69a Diego Biurrun
MANPAGES    = $(addprefix doc/, $(addsuffix .1, $(PROGS-yes)))
27 85f07f22 Fabrice Bellard
28 bb8fe69a Diego Biurrun
BASENAMES   = ffmpeg ffplay ffserver
29
ALLPROGS    = $(addsuffix   $(EXESUF), $(BASENAMES))
30
ALLPROGS_G  = $(addsuffix _g$(EXESUF), $(BASENAMES))
31
ALLMANPAGES = $(addsuffix .1, $(BASENAMES))
32 6b991cb2 Diego Biurrun
33 0fd94442 Nick Kurshev
ifeq ($(BUILD_SHARED),yes)
34 c721d803 Luca Abeni
DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavdevice/$(SLIBPREF)avdevice$(SLIBSUF)
35 0fd94442 Nick Kurshev
else
36 c721d803 Luca Abeni
DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavdevice/$(LIBPREF)avdevice$(LIBSUF)
37 f02be79d Roman Shaposhnik
endif
38
39 7d6ac9a3 Måns Rullgård
ALL_TARGETS-$(CONFIG_VHOOK) += videohook
40
ALL_TARGETS-$(BUILD_DOC)    += documentation
41
42
INSTALL_TARGETS-$(CONFIG_VHOOK) += install-vhook
43 1217916b Diego Biurrun
ifneq ($(PROGS),)
44
INSTALL_TARGETS-yes             += install-progs
45 282db5fd Diego Biurrun
INSTALL_TARGETS-$(BUILD_DOC)    += install-man
46 1217916b Diego Biurrun
endif
47 dd9f3d97 Måns Rullgård
48 27217159 Diego Biurrun
main: lib $(PROGS_G) $(PROGS) $(ALL_TARGETS-yes)
49
50
%$(EXESUF): %_g$(EXESUF)
51
	cp -p $< $@
52
	$(STRIP) $@
53
54
vhook/%.o: vhook/%.c
55
	$(CC) $(VHOOKCFLAGS) -c -o $@ $<
56
57 3b26ee47 Måns Rullgård
VHOOKCFLAGS += $(filter-out -mdynamic-no-pic,$(CFLAGS))
58 dd9f3d97 Måns Rullgård
59
BASEHOOKS = fish null watermark
60
ALLHOOKS = $(BASEHOOKS) drawtext imlib2 ppm
61
ALLHOOKS_SRCS = $(addprefix vhook/, $(addsuffix .c, $(ALLHOOKS)))
62
63
HOOKS-$(HAVE_FORK)      += ppm
64
HOOKS-$(HAVE_IMLIB2)    += imlib2
65
HOOKS-$(HAVE_FREETYPE2) += drawtext
66
67
HOOKS = $(addprefix vhook/, $(addsuffix $(SLIBSUF), $(BASEHOOKS) $(HOOKS-yes)))
68
69
VHOOKCFLAGS-$(HAVE_IMLIB2) += `imlib2-config --cflags`
70 cbefadbd Måns Rullgård
LIBS_imlib2$(SLIBSUF)       = `imlib2-config --libs`
71 dd9f3d97 Måns Rullgård
72
VHOOKCFLAGS-$(HAVE_FREETYPE2) += `freetype-config --cflags`
73 cbefadbd Måns Rullgård
LIBS_drawtext$(SLIBSUF)        = `freetype-config --libs`
74 dd9f3d97 Måns Rullgård
75
VHOOKCFLAGS += $(VHOOKCFLAGS-yes)
76 142fc6b9 Philip Gladstone
77 c721d803 Luca Abeni
LDFLAGS := -L$(BUILD_ROOT)/libavdevice -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil $(LDFLAGS)
78
EXTRALIBS := -lavdevice$(BUILDSUF) -lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)
79 57514323 Zdenek Kabelac
80 13ca50f3 Diego Biurrun
ifeq ($(CONFIG_SWSCALE),yes)
81 06694949 Diego Biurrun
LDFLAGS+=-L$(BUILD_ROOT)/libswscale
82 6de9e506 Diego Biurrun
EXTRALIBS+=-lswscale$(BUILDSUF)
83 790c9ca7 Luca Abeni
endif
84
85 f7679c54 Vitor Sessak
ifeq ($(CONFIG_AVFILTER),yes)
86
LDFLAGS+=-L$(BUILD_ROOT)/libavfilter
87
EXTRALIBS := -lavfilter$(BUILDSUF) $(EXTRALIBS)
88
endif
89
90 a11f43a4 Måns Rullgård
MAKE-yes = $(MAKE)
91
MAKE-    = : $(MAKE)
92
93 951bf3e6 Fabrice Bellard
lib:
94 20963a71 Måns Rullgård
	$(MAKE)                    -C libavutil   all
95
	$(MAKE)                    -C libavcodec  all
96
	$(MAKE)                    -C libavformat all
97
	$(MAKE)                    -C libavdevice all
98 4a24ab64 Diego Biurrun
	$(MAKE-$(CONFIG_POSTPROC)) -C libpostproc all
99 13ca50f3 Diego Biurrun
	$(MAKE-$(CONFIG_SWSCALE))  -C libswscale  all
100 f7679c54 Vitor Sessak
	$(MAKE-$(CONFIG_AVFILTER)) -C libavfilter all
101 85f07f22 Fabrice Bellard
102 b1b18481 Diego Biurrun
ffplay_g$(EXESUF): EXTRALIBS += $(SDL_LIBS)
103
ffserver_g$(EXESUF): LDFLAGS += $(FFSERVERLDFLAGS)
104 85f07f22 Fabrice Bellard
105 b1b18481 Diego Biurrun
%_g$(EXESUF): %.o cmdutils.o .libs
106
	$(CC) $(LDFLAGS) -o $@ $< cmdutils.o $(EXTRALIBS)
107 01310af2 Fabrice Bellard
108 a4da50e1 Måns Rullgård
SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries
109
ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES))
110
version.h: $(SVN_ENTRIES)
111
endif
112
113 f1cc88a5 Diego Biurrun
version.h:
114 997baf01 Måns Rullgård
	$(SRC_PATH)/version.sh $(SRC_PATH)
115 f1cc88a5 Diego Biurrun
116 951bf3e6 Fabrice Bellard
output_example$(EXESUF): output_example.o .libs
117 18caf192 Diego Biurrun
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(EXTRALIBS)
118 8de65d4f Fabrice Bellard
119 1521c500 Diego Biurrun
tools/%$(EXESUF): tools/%.c
120
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(EXTRALIBS)
121 6da7cc81 Diego Biurrun
122 3c889b5c Diego Biurrun
ffplay.o .depend: CFLAGS += $(SDL_CFLAGS)
123 2744a37f Fabrice Bellard
124 496cfa3c Måns Rullgård
ffmpeg.o ffplay.o ffserver.o: version.h
125
126 bab785a5 Diego Biurrun
# vhooks compile fine without libav*, but need them nonetheless.
127
videohook: .libs $(HOOKS)
128 ed5614eb Diego Biurrun
129
vhook/%$(SLIBSUF): vhook/%.o
130 3b26ee47 Måns Rullgård
	$(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$(@F))
131 ed5614eb Diego Biurrun
132 3b26ee47 Måns Rullgård
%.o: %.c
133
	$(CC) $(CFLAGS) -c -o $@ $<
134 142fc6b9 Philip Gladstone
135 e9b19db8 Diego Biurrun
documentation: $(addprefix doc/, ffmpeg-doc.html faq.html ffserver-doc.html \
136 d0e1cd3d Diego Biurrun
                                 ffplay-doc.html general.html hooks.html \
137
                                 $(ALLMANPAGES))
138 e9b19db8 Diego Biurrun
139
doc/%.html: doc/%.texi
140
	texi2html -monolithic -number $<
141
	mv $(@F) $@
142
143
doc/%.pod: doc/%-doc.texi
144
	doc/texi2pod.pl $< $@
145
146
doc/%.1: doc/%.pod
147
	pod2man --section=1 --center=" " --release=" " $< > $@
148 146ea952 Nicolas Boos
149 1217916b Diego Biurrun
install: install-libs install-headers $(INSTALL_TARGETS-yes)
150 81dcdc53 Diego Biurrun
151 a4848db6 Diego Biurrun
ifeq ($(BUILD_SHARED),yes)
152 e1a3a63f Diego Biurrun
install-progs: install-libs
153 a4848db6 Diego Biurrun
endif
154 c4fa7ebc Diego Biurrun
install-progs: $(PROGS)
155 22a324da Diego Biurrun
	install -d "$(BINDIR)"
156
	install -c -m 755 $(PROGS) "$(BINDIR)"
157 85f07f22 Fabrice Bellard
158 23a65308 Fabrice Bellard
install-man:
159 22a324da Diego Biurrun
	install -d "$(MANDIR)/man1"
160
	install -m 644 $(MANPAGES) "$(MANDIR)/man1"
161 23a65308 Fabrice Bellard
162 ed5614eb Diego Biurrun
install-vhook: videohook
163 22a324da Diego Biurrun
	install -d "$(SHLIBDIR)/vhook"
164
	install -m 755 $(HOOKS) "$(SHLIBDIR)/vhook"
165 142fc6b9 Philip Gladstone
166 b12f8273 Diego Biurrun
install-libs:
167 20963a71 Måns Rullgård
	$(MAKE)                    -C libavutil   install-libs
168
	$(MAKE)                    -C libavcodec  install-libs
169
	$(MAKE)                    -C libavformat install-libs
170
	$(MAKE)                    -C libavdevice install-libs
171 4a24ab64 Diego Biurrun
	$(MAKE-$(CONFIG_POSTPROC)) -C libpostproc install-libs
172 13ca50f3 Diego Biurrun
	$(MAKE-$(CONFIG_SWSCALE))  -C libswscale  install-libs
173 3d323571 Diego Biurrun
	$(MAKE-$(CONFIG_AVFILTER)) -C libavfilter install-libs
174 37736979 Fabrice Bellard
175 f29f3b5d Diego Biurrun
install-headers:
176 61c51088 Diego Biurrun
	$(MAKE)                    -C libavutil   install-headers
177
	$(MAKE)                    -C libavcodec  install-headers
178
	$(MAKE)                    -C libavformat install-headers
179
	$(MAKE)                    -C libavdevice install-headers
180 4a24ab64 Diego Biurrun
	$(MAKE-$(CONFIG_POSTPROC)) -C libpostproc install-headers
181 61c51088 Diego Biurrun
	$(MAKE)                    -C libswscale  install-headers
182 f7679c54 Vitor Sessak
	$(MAKE-$(CONFIG_AVFILTER)) -C libavfilter install-headers
183 f29f3b5d Diego Biurrun
184 f9edb717 Diego Biurrun
uninstall: uninstall-progs uninstall-libs uninstall-headers uninstall-man uninstall-vhook
185
186
uninstall-progs:
187 1c2211bd Diego Biurrun
	rm -f $(addprefix "$(BINDIR)/", $(ALLPROGS))
188 f9edb717 Diego Biurrun
189
uninstall-man:
190 1c2211bd Diego Biurrun
	rm -f $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
191 f9edb717 Diego Biurrun
192
uninstall-vhook:
193 1c2211bd Diego Biurrun
	rm -f $(addprefix "$(SHLIBDIR)/",$(ALLHOOKS_SRCS:.c=$(SLIBSUF)))
194 22a324da Diego Biurrun
	-rmdir "$(SHLIBDIR)/vhook/"
195 f9edb717 Diego Biurrun
196
uninstall-libs:
197
	$(MAKE) -C libavutil   uninstall-libs
198
	$(MAKE) -C libavcodec  uninstall-libs
199
	$(MAKE) -C libavformat uninstall-libs
200 c721d803 Luca Abeni
	$(MAKE) -C libavdevice uninstall-libs
201 6d9a2421 Diego Biurrun
	$(MAKE) -C libpostproc uninstall-libs
202 65f37992 Dave Yeo
	$(MAKE) -C libswscale  uninstall-libs
203 f7679c54 Vitor Sessak
	$(MAKE) -C libavfilter uninstall-libs
204 f9edb717 Diego Biurrun
205
uninstall-headers:
206
	$(MAKE) -C libavutil   uninstall-headers
207
	$(MAKE) -C libavcodec  uninstall-headers
208
	$(MAKE) -C libavformat uninstall-headers
209 c721d803 Luca Abeni
	$(MAKE) -C libavdevice uninstall-headers
210 6d9a2421 Diego Biurrun
	$(MAKE) -C libpostproc uninstall-headers
211 65f37992 Dave Yeo
	$(MAKE) -C libswscale  uninstall-headers
212 f7679c54 Vitor Sessak
	$(MAKE) -C libavfilter uninstall-headers
213 22a324da Diego Biurrun
	-rmdir "$(INCDIR)"
214 f9edb717 Diego Biurrun
215 3b26ee47 Måns Rullgård
depend dep: .depend .vhookdep
216 20963a71 Måns Rullgård
	$(MAKE)                    -C libavutil   depend
217
	$(MAKE)                    -C libavcodec  depend
218
	$(MAKE)                    -C libavformat depend
219
	$(MAKE)                    -C libavdevice depend
220 4a24ab64 Diego Biurrun
	$(MAKE-$(CONFIG_POSTPROC)) -C libpostproc depend
221 13ca50f3 Diego Biurrun
	$(MAKE-$(CONFIG_SWSCALE))  -C libswscale  depend
222 f7679c54 Vitor Sessak
	$(MAKE-$(CONFIG_AVFILTER)) -C libavfilter depend
223 4b8b2edb Fabrice Bellard
224 fd071c26 Diego Biurrun
.depend: $(SRCS) version.h
225 315c741d Diego Biurrun
	$(DEPEND_CMD) > $@
226 3b26ee47 Måns Rullgård
227 fc900b7b Diego Pettenò
.vhookdep: $(ALLHOOKS_SRCS) version.h
228 315c741d Diego Biurrun
	$(VHOOK_DEPEND_CMD) > $@
229 57514323 Zdenek Kabelac
230 da34f7ac Måns Rullgård
$(DEP_LIBS): lib
231
232
.libs: $(DEP_LIBS)
233
	touch $@
234 cf2818b0 Zdenek Kabelac
235 98013cc1 Diego Biurrun
clean:
236 5d22ccf7 Diego Biurrun
	$(MAKE) -C libavutil   clean
237
	$(MAKE) -C libavcodec  clean
238 abac6175 Fabrice Bellard
	$(MAKE) -C libavformat clean
239 c721d803 Luca Abeni
	$(MAKE) -C libavdevice clean
240 6d9a2421 Diego Biurrun
	$(MAKE) -C libpostproc clean
241 790c9ca7 Luca Abeni
	$(MAKE) -C libswscale  clean
242 f7679c54 Vitor Sessak
	$(MAKE) -C libavfilter clean
243 b8d40825 Diego Biurrun
	rm -f *.o *~ .libs gmon.out TAGS $(ALLPROGS) $(ALLPROGS_G) \
244 2b258bba Diego Biurrun
	   output_example$(EXESUF)
245 e9b19db8 Diego Biurrun
	rm -f doc/*.html doc/*.pod doc/*.1
246 4fbd52f0 Diego Biurrun
	rm -rf tests/vsynth1 tests/vsynth2 tests/data tests/asynth1.sw tests/*~
247
	rm -f $(addprefix tests/,$(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr))
248 2b258bba Diego Biurrun
	rm -f $(addprefix tools/,$(addsuffix $(EXESUF),cws2fws pktdumper qt-faststart trasher))
249 ed5614eb Diego Biurrun
	rm -f vhook/*.o vhook/*~ vhook/*.so vhook/*.dylib vhook/*.dll
250 142fc6b9 Philip Gladstone
251 85f07f22 Fabrice Bellard
distclean: clean
252 98013cc1 Diego Biurrun
	$(MAKE) -C libavutil   distclean
253
	$(MAKE) -C libavcodec  distclean
254
	$(MAKE) -C libavformat distclean
255 c721d803 Luca Abeni
	$(MAKE) -C libavdevice distclean
256 6d9a2421 Diego Biurrun
	$(MAKE) -C libpostproc distclean
257 790c9ca7 Luca Abeni
	$(MAKE) -C libswscale  distclean
258 f7679c54 Vitor Sessak
	$(MAKE) -C libavfilter distclean
259 2c8c5021 Stefano Sabatini
	rm -f .depend .vhookdep version.h config.* *.pc
260 85f07f22 Fabrice Bellard
261
TAGS:
262 abac6175 Fabrice Bellard
	etags *.[ch] libavformat/*.[ch] libavcodec/*.[ch]
263 57514323 Zdenek Kabelac
264 dd9ca370 Fabrice Bellard
# regression tests
265
266 4fbd52f0 Diego Biurrun
fulltest test: codectest libavtest seektest
267
268
FFMPEG_REFFILE   = $(SRC_PATH)/tests/ffmpeg.regression.ref
269
FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
270
LIBAV_REFFILE    = $(SRC_PATH)/tests/libav.regression.ref
271
ROTOZOOM_REFFILE = $(SRC_PATH)/tests/rotozoom.regression.ref
272
SEEK_REFFILE     = $(SRC_PATH)/tests/seek.regression.ref
273
274 4383ed5c Måns Rullgård
CODEC_TESTS = $(addprefix regtest-,             \
275
        mpeg                                    \
276
        mpeg2                                   \
277
        mpeg2thread                             \
278
        msmpeg4v2                               \
279
        msmpeg4                                 \
280
        wmv1                                    \
281
        wmv2                                    \
282
        h261                                    \
283
        h263                                    \
284
        h263p                                   \
285
        mpeg4                                   \
286
        huffyuv                                 \
287
        rc                                      \
288
        mpeg4adv                                \
289
        mpeg4thread                             \
290
        error                                   \
291
        mpeg4nr                                 \
292
        mpeg1b                                  \
293
        mjpeg                                   \
294
        ljpeg                                   \
295
        jpegls                                  \
296
        rv10                                    \
297
        rv20                                    \
298
        asv1                                    \
299
        asv2                                    \
300
        flv                                     \
301
        ffv1                                    \
302
        snow                                    \
303
        snowll                                  \
304
        dv                                      \
305
        dv50                                    \
306
        svq1                                    \
307
        flashsv                                 \
308
        mp2                                     \
309
        ac3                                     \
310
        g726                                    \
311
        adpcm_ima_wav                           \
312 9dc92a38 Kostya Shishkov
        adpcm_ima_qt                            \
313 4383ed5c Måns Rullgård
        adpcm_ms                                \
314
        adpcm_yam                               \
315
        adpcm_swf                               \
316
        flac                                    \
317
        wma                                     \
318
    )
319
320 2009721d Måns Rullgård
LAVF_TESTS = $(addprefix regtest-,              \
321
        avi                                     \
322
        asf                                     \
323
        rm                                      \
324
        mpg                                     \
325
        ts                                      \
326
        swf                                     \
327
        ffm                                     \
328
        flv_fmt                                 \
329
        mov                                     \
330
        dv_fmt                                  \
331
        gxf                                     \
332
        nut                                     \
333
        mkv                                     \
334
        pbmpipe                                 \
335
        pgmpipe                                 \
336
        ppmpipe                                 \
337
        gif                                     \
338
        yuv4mpeg                                \
339
        pgm                                     \
340
        ppm                                     \
341
        bmp                                     \
342
        tga                                     \
343
        tiff                                    \
344
        sgi                                     \
345
        jpg                                     \
346
        wav                                     \
347
        alaw                                    \
348
        mulaw                                   \
349
        au                                      \
350
        mmf                                     \
351
        aiff                                    \
352
        voc                                     \
353
        ogg                                     \
354
        pixfmt                                  \
355
    )
356 4383ed5c Måns Rullgård
357
REGFILES = $(addprefix tests/data/,$(addsuffix .$(1),$(2:regtest-%=%)))
358
359
CODEC_ROTOZOOM = $(call REGFILES,rotozoom.regression,$(CODEC_TESTS))
360
CODEC_VSYNTH   = $(call REGFILES,vsynth.regression,$(CODEC_TESTS))
361
362
LAVF_REGFILES = $(call REGFILES,lavf.regression,$(LAVF_TESTS))
363
364
LAVF_REG     = tests/data/lavf.regression
365
ROTOZOOM_REG = tests/data/rotozoom.regression
366
VSYNTH_REG   = tests/data/vsynth.regression
367
368
codectest: $(VSYNTH_REG) $(ROTOZOOM_REG)
369 4411cb11 Måns Rullgård
	diff -u -w $(FFMPEG_REFFILE)   $(VSYNTH_REG)
370
	diff -u -w $(ROTOZOOM_REFFILE) $(ROTOZOOM_REG)
371 4383ed5c Måns Rullgård
372
libavtest: $(LAVF_REG)
373
	diff -u -w $(LIBAV_REFFILE) $(LAVF_REG)
374
375
$(VSYNTH_REG) $(ROTOZOOM_REG) $(LAVF_REG):
376
	cat $^ > $@
377
378
$(LAVF_REG):     $(LAVF_REGFILES)
379
$(ROTOZOOM_REG): $(CODEC_ROTOZOOM)
380
$(VSYNTH_REG):   $(CODEC_VSYNTH)
381
382
$(CODEC_VSYNTH) $(CODEC_ROTOZOOM): $(CODEC_TESTS)
383
384
$(LAVF_REGFILES): $(LAVF_TESTS)
385
386
$(CODEC_TESTS) $(LAVF_TESTS): regtest-ref
387
388
regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/asynth1.sw
389
390
$(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(EXESUF)
391 2009721d Måns Rullgård
	$(SRC_PATH)/tests/regression.sh $@ vsynth   tests/vsynth1 a
392
	$(SRC_PATH)/tests/regression.sh $@ rotozoom tests/vsynth2 a
393 4383ed5c Måns Rullgård
394
$(LAVF_TESTS):
395 2009721d Måns Rullgård
	$(SRC_PATH)/tests/regression.sh $@ lavf tests/vsynth1 b
396 4383ed5c Måns Rullgård
397
seektest: codectest libavtest tests/seek_test$(EXESUF)
398
	$(SRC_PATH)/tests/seek_test.sh $(SEEK_REFFILE)
399
400 b13cdd33 Diego Biurrun
test-server: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/asynth1.sw
401 4fbd52f0 Diego Biurrun
	@echo
402
	@echo "Unfortunately ffserver is broken and therefore its regression"
403
	@echo "test fails randomly. Treat the results accordingly."
404
	@echo
405
	$(SRC_PATH)/tests/server-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/test.conf
406
407 13ca50f3 Diego Biurrun
ifeq ($(CONFIG_SWSCALE),yes)
408 4383ed5c Måns Rullgård
test-server codectest $(CODEC_TESTS) libavtest: swscale_error
409 4fbd52f0 Diego Biurrun
swscale_error:
410
	@echo
411 13ca50f3 Diego Biurrun
	@echo "This regression test is incompatible with --enable-swscale."
412 4fbd52f0 Diego Biurrun
	@echo
413
	@exit 1
414
endif
415
416
tests/vsynth1/00.pgm: tests/videogen$(EXESUF)
417
	mkdir -p tests/vsynth1
418
	$(BUILD_ROOT)/$< 'tests/vsynth1/'
419
420
tests/vsynth2/00.pgm: tests/rotozoom$(EXESUF)
421
	mkdir -p tests/vsynth2
422
	$(BUILD_ROOT)/$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
423
424
tests/asynth1.sw: tests/audiogen$(EXESUF)
425
	$(BUILD_ROOT)/$< $@
426
427
%$(EXESUF): %.c
428
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
429
430 06396e11 Diego Biurrun
tests/seek_test$(EXESUF): tests/seek_test.c .libs
431 ff21c1b0 Diego Biurrun
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $< $(EXTRALIBS)
432 4fbd52f0 Diego Biurrun
433 dd9ca370 Fabrice Bellard
434 1b9cec96 Ramiro Polla
.PHONY: all lib videohook documentation install* uninstall*
435 bedb3550 Diego Biurrun
.PHONY: dep depend clean distclean TAGS
436 5e2dfd39 Diego Biurrun
.PHONY: codectest libavtest seektest test-server fulltest test
437 4383ed5c Måns Rullgård
.PHONY: $(CODEC_TESTS) $(LAVF_TESTS) regtest-ref swscale-error
438 cf2818b0 Zdenek Kabelac
439 6ca0c110 Diego Biurrun
-include .depend
440 3b26ee47 Måns Rullgård
-include .vhookdep