2002-05-26 00:22:57 +02:00
|
|
|
#
|
2001-07-22 16:37:44 +02:00
|
|
|
# Main ffmpeg Makefile
|
2004-03-26 21:42:28 +01:00
|
|
|
# (c) 2000-2004 Fabrice Bellard
|
2001-07-22 16:37:44 +02:00
|
|
|
#
|
2001-07-23 22:06:54 +02:00
|
|
|
include config.mak
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2008-03-15 20:24:05 +01:00
|
|
|
SRC_DIR = $(SRC_PATH_BARE)
|
|
|
|
|
2008-03-05 22:27:58 +01:00
|
|
|
vpath %.c $(SRC_PATH_BARE)
|
|
|
|
vpath %.h $(SRC_PATH_BARE)
|
|
|
|
vpath %.texi $(SRC_PATH_BARE)
|
2002-05-19 01:11:25 +02:00
|
|
|
|
2007-02-27 20:00:26 +01:00
|
|
|
PROGS-$(CONFIG_FFMPEG) += ffmpeg
|
|
|
|
PROGS-$(CONFIG_FFPLAY) += ffplay
|
|
|
|
PROGS-$(CONFIG_FFSERVER) += ffserver
|
2003-06-07 20:34:02 +02:00
|
|
|
|
2007-06-10 16:28:42 +02:00
|
|
|
PROGS = $(addsuffix $(EXESUF), $(PROGS-yes))
|
|
|
|
PROGS_G = $(addsuffix _g$(EXESUF), $(PROGS-yes))
|
2008-03-26 10:30:09 +01:00
|
|
|
PROGS_SRCS = $(addsuffix .c, $(PROGS-yes)) cmdutils.c
|
2007-06-10 16:28:42 +02:00
|
|
|
MANPAGES = $(addprefix doc/, $(addsuffix .1, $(PROGS-yes)))
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2007-06-10 16:28:42 +02:00
|
|
|
BASENAMES = ffmpeg ffplay ffserver
|
|
|
|
ALLPROGS = $(addsuffix $(EXESUF), $(BASENAMES))
|
|
|
|
ALLPROGS_G = $(addsuffix _g$(EXESUF), $(BASENAMES))
|
|
|
|
ALLMANPAGES = $(addsuffix .1, $(BASENAMES))
|
2006-05-18 14:33:13 +02:00
|
|
|
|
2001-10-27 14:04:27 +02:00
|
|
|
ifeq ($(BUILD_SHARED),yes)
|
2007-11-22 17:10:02 +01:00
|
|
|
DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavdevice/$(SLIBPREF)avdevice$(SLIBSUF)
|
2001-10-27 14:04:27 +02:00
|
|
|
else
|
2007-11-22 17:10:02 +01:00
|
|
|
DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavdevice/$(LIBPREF)avdevice$(LIBSUF)
|
2004-10-22 04:04:30 +02:00
|
|
|
endif
|
|
|
|
|
2007-07-09 22:42:00 +02:00
|
|
|
ALL_TARGETS-$(CONFIG_VHOOK) += videohook
|
|
|
|
ALL_TARGETS-$(BUILD_DOC) += documentation
|
|
|
|
|
|
|
|
INSTALL_TARGETS-$(CONFIG_VHOOK) += install-vhook
|
2007-10-22 20:00:31 +02:00
|
|
|
ifneq ($(PROGS),)
|
|
|
|
INSTALL_TARGETS-yes += install-progs
|
2007-10-22 20:01:33 +02:00
|
|
|
INSTALL_TARGETS-$(BUILD_DOC) += install-man
|
2007-10-22 20:00:31 +02:00
|
|
|
endif
|
2007-07-09 22:22:16 +02:00
|
|
|
|
2008-03-26 10:22:43 +01:00
|
|
|
main: lib $(PROGS_G) $(PROGS) $(ALL_TARGETS-yes)
|
|
|
|
|
|
|
|
%$(EXESUF): %_g$(EXESUF)
|
|
|
|
cp -p $< $@
|
|
|
|
$(STRIP) $@
|
|
|
|
|
|
|
|
vhook/%.o: vhook/%.c
|
|
|
|
$(CC) $(VHOOKCFLAGS) -c -o $@ $<
|
|
|
|
|
2008-03-26 10:39:12 +01:00
|
|
|
.depend: version.h $(PROGS_SRCS)
|
|
|
|
|
|
|
|
include common.mak
|
|
|
|
|
2007-07-08 19:47:15 +02:00
|
|
|
VHOOKCFLAGS += $(filter-out -mdynamic-no-pic,$(CFLAGS))
|
2007-07-09 22:22:16 +02:00
|
|
|
|
|
|
|
BASEHOOKS = fish null watermark
|
|
|
|
ALLHOOKS = $(BASEHOOKS) drawtext imlib2 ppm
|
|
|
|
ALLHOOKS_SRCS = $(addprefix vhook/, $(addsuffix .c, $(ALLHOOKS)))
|
|
|
|
|
|
|
|
HOOKS-$(HAVE_FORK) += ppm
|
|
|
|
HOOKS-$(HAVE_IMLIB2) += imlib2
|
|
|
|
HOOKS-$(HAVE_FREETYPE2) += drawtext
|
|
|
|
|
|
|
|
HOOKS = $(addprefix vhook/, $(addsuffix $(SLIBSUF), $(BASEHOOKS) $(HOOKS-yes)))
|
|
|
|
|
|
|
|
VHOOKCFLAGS-$(HAVE_IMLIB2) += `imlib2-config --cflags`
|
2007-07-09 22:41:58 +02:00
|
|
|
LIBS_imlib2$(SLIBSUF) = `imlib2-config --libs`
|
2007-07-09 22:22:16 +02:00
|
|
|
|
|
|
|
VHOOKCFLAGS-$(HAVE_FREETYPE2) += `freetype-config --cflags`
|
2007-07-09 22:41:58 +02:00
|
|
|
LIBS_drawtext$(SLIBSUF) = `freetype-config --libs`
|
2007-07-09 22:22:16 +02:00
|
|
|
|
|
|
|
VHOOKCFLAGS += $(VHOOKCFLAGS-yes)
|
2002-11-20 04:02:23 +01:00
|
|
|
|
2008-03-26 10:27:58 +01:00
|
|
|
LDFLAGS := -L$(BUILD_ROOT)/libavdevice -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil -g $(LDFLAGS)
|
2007-11-22 17:10:02 +01:00
|
|
|
EXTRALIBS := -lavdevice$(BUILDSUF) -lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)
|
2002-04-22 21:57:45 +02:00
|
|
|
|
2008-03-10 18:54:24 +01:00
|
|
|
ifeq ($(CONFIG_SWSCALE),yes)
|
2007-06-10 23:19:15 +02:00
|
|
|
LDFLAGS+=-L$(BUILD_ROOT)/libswscale
|
2006-09-08 20:28:58 +02:00
|
|
|
EXTRALIBS+=-lswscale$(BUILDSUF)
|
2006-08-08 20:51:38 +02:00
|
|
|
endif
|
|
|
|
|
2008-02-26 22:32:56 +01:00
|
|
|
ifeq ($(CONFIG_AVFILTER),yes)
|
|
|
|
LDFLAGS+=-L$(BUILD_ROOT)/libavfilter
|
|
|
|
EXTRALIBS := -lavfilter$(BUILDSUF) $(EXTRALIBS)
|
|
|
|
endif
|
|
|
|
|
2008-01-27 15:55:13 +01:00
|
|
|
MAKE-yes = $(MAKE)
|
|
|
|
MAKE- = : $(MAKE)
|
|
|
|
|
2003-09-16 00:26:45 +02:00
|
|
|
lib:
|
2008-01-27 15:55:16 +01:00
|
|
|
$(MAKE) -C libavutil all
|
|
|
|
$(MAKE) -C libavcodec all
|
|
|
|
$(MAKE) -C libavformat all
|
|
|
|
$(MAKE) -C libavdevice all
|
2008-03-08 19:50:38 +01:00
|
|
|
$(MAKE-$(CONFIG_POSTPROC)) -C libpostproc all
|
2008-03-10 18:54:24 +01:00
|
|
|
$(MAKE-$(CONFIG_SWSCALE)) -C libswscale all
|
2008-02-26 22:32:56 +01:00
|
|
|
$(MAKE-$(CONFIG_AVFILTER)) -C libavfilter all
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2008-03-15 20:57:09 +01:00
|
|
|
ffplay_g$(EXESUF): EXTRALIBS += $(SDL_LIBS)
|
|
|
|
ffserver_g$(EXESUF): LDFLAGS += $(FFSERVERLDFLAGS)
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2008-03-15 20:57:09 +01:00
|
|
|
%_g$(EXESUF): %.o cmdutils.o .libs
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $< cmdutils.o $(EXTRALIBS)
|
2003-06-07 20:34:02 +02:00
|
|
|
|
2006-12-26 18:25:16 +01:00
|
|
|
SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries
|
|
|
|
ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES))
|
|
|
|
version.h: $(SVN_ENTRIES)
|
|
|
|
endif
|
|
|
|
|
2006-06-20 12:24:08 +02:00
|
|
|
version.h:
|
2006-11-08 01:02:15 +01:00
|
|
|
$(SRC_PATH)/version.sh $(SRC_PATH)
|
2006-06-20 12:24:08 +02:00
|
|
|
|
2003-09-16 00:26:45 +02:00
|
|
|
output_example$(EXESUF): output_example.o .libs
|
2007-06-10 16:21:07 +02:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(EXTRALIBS)
|
2003-07-22 14:46:15 +02:00
|
|
|
|
2008-01-26 19:41:20 +01:00
|
|
|
tools/%$(EXESUF): tools/%.c
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(EXTRALIBS)
|
2008-01-09 00:02:39 +01:00
|
|
|
|
2008-03-10 21:01:50 +01:00
|
|
|
ffplay.o .depend: CFLAGS += $(SDL_CFLAGS)
|
2001-09-25 01:21:02 +02:00
|
|
|
|
2006-09-13 01:13:22 +02:00
|
|
|
ffmpeg.o ffplay.o ffserver.o: version.h
|
|
|
|
|
2008-03-10 19:37:18 +01:00
|
|
|
# vhooks compile fine without libav*, but need them nonetheless.
|
|
|
|
videohook: .libs $(HOOKS)
|
2007-07-08 17:16:25 +02:00
|
|
|
|
|
|
|
vhook/%$(SLIBSUF): vhook/%.o
|
2007-07-08 19:47:15 +02:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$(@F))
|
2007-07-08 17:16:25 +02:00
|
|
|
|
2007-05-17 10:39:50 +02:00
|
|
|
documentation: $(addprefix doc/, ffmpeg-doc.html faq.html ffserver-doc.html \
|
2007-08-28 08:22:57 +02:00
|
|
|
ffplay-doc.html general.html hooks.html \
|
|
|
|
$(ALLMANPAGES))
|
2007-05-17 10:39:50 +02:00
|
|
|
|
|
|
|
doc/%.html: doc/%.texi
|
|
|
|
texi2html -monolithic -number $<
|
|
|
|
mv $(@F) $@
|
|
|
|
|
|
|
|
doc/%.pod: doc/%-doc.texi
|
|
|
|
doc/texi2pod.pl $< $@
|
|
|
|
|
|
|
|
doc/%.1: doc/%.pod
|
|
|
|
pod2man --section=1 --center=" " --release=" " $< > $@
|
2004-07-05 20:06:16 +02:00
|
|
|
|
2006-02-11 20:01:54 +01:00
|
|
|
ifeq ($(BUILD_SHARED),yes)
|
2007-10-22 19:21:38 +02:00
|
|
|
install-progs: install-libs
|
2006-02-11 20:01:54 +01:00
|
|
|
endif
|
2007-10-22 19:15:12 +02:00
|
|
|
install-progs: $(PROGS)
|
2007-07-21 20:53:06 +02:00
|
|
|
install -d "$(BINDIR)"
|
|
|
|
install -c -m 755 $(PROGS) "$(BINDIR)"
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2003-08-24 18:02:39 +02:00
|
|
|
install-man:
|
2007-07-21 20:53:06 +02:00
|
|
|
install -d "$(MANDIR)/man1"
|
|
|
|
install -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
2003-08-24 18:02:39 +02:00
|
|
|
|
2007-07-08 17:16:25 +02:00
|
|
|
install-vhook: videohook
|
2007-07-21 20:53:06 +02:00
|
|
|
install -d "$(SHLIBDIR)/vhook"
|
|
|
|
install -m 755 $(HOOKS) "$(SHLIBDIR)/vhook"
|
2002-11-20 04:02:23 +01:00
|
|
|
|
2006-02-11 19:50:45 +01:00
|
|
|
install-libs:
|
2008-01-27 15:55:16 +01:00
|
|
|
$(MAKE) -C libavutil install-libs
|
|
|
|
$(MAKE) -C libavcodec install-libs
|
|
|
|
$(MAKE) -C libavformat install-libs
|
|
|
|
$(MAKE) -C libavdevice install-libs
|
2008-03-08 19:50:38 +01:00
|
|
|
$(MAKE-$(CONFIG_POSTPROC)) -C libpostproc install-libs
|
2008-03-10 18:54:24 +01:00
|
|
|
$(MAKE-$(CONFIG_SWSCALE)) -C libswscale install-libs
|
2008-03-08 17:19:03 +01:00
|
|
|
$(MAKE-$(CONFIG_AVFILTER)) -C libavfilter install-libs
|
2002-07-25 18:40:10 +02:00
|
|
|
|
2008-03-26 10:39:12 +01:00
|
|
|
install-headers::
|
2008-03-08 17:19:46 +01:00
|
|
|
$(MAKE) -C libavutil install-headers
|
|
|
|
$(MAKE) -C libavcodec install-headers
|
|
|
|
$(MAKE) -C libavformat install-headers
|
|
|
|
$(MAKE) -C libavdevice install-headers
|
2008-03-08 19:50:38 +01:00
|
|
|
$(MAKE-$(CONFIG_POSTPROC)) -C libpostproc install-headers
|
2008-03-08 17:19:46 +01:00
|
|
|
$(MAKE) -C libswscale install-headers
|
2008-02-26 22:32:56 +01:00
|
|
|
$(MAKE-$(CONFIG_AVFILTER)) -C libavfilter install-headers
|
2006-02-11 18:44:06 +01:00
|
|
|
|
2008-03-26 10:39:12 +01:00
|
|
|
uninstall: uninstall-progs uninstall-man uninstall-vhook
|
2006-05-18 14:14:02 +02:00
|
|
|
|
|
|
|
uninstall-progs:
|
2007-11-05 00:00:22 +01:00
|
|
|
rm -f $(addprefix "$(BINDIR)/", $(ALLPROGS))
|
2006-05-18 14:14:02 +02:00
|
|
|
|
|
|
|
uninstall-man:
|
2007-11-05 00:00:22 +01:00
|
|
|
rm -f $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
2006-05-18 14:14:02 +02:00
|
|
|
|
|
|
|
uninstall-vhook:
|
2007-11-05 00:00:22 +01:00
|
|
|
rm -f $(addprefix "$(SHLIBDIR)/",$(ALLHOOKS_SRCS:.c=$(SLIBSUF)))
|
2007-07-21 20:53:06 +02:00
|
|
|
-rmdir "$(SHLIBDIR)/vhook/"
|
2006-05-18 14:14:02 +02:00
|
|
|
|
2008-03-26 10:39:12 +01:00
|
|
|
uninstall-libs::
|
2006-05-18 14:14:02 +02:00
|
|
|
$(MAKE) -C libavutil uninstall-libs
|
|
|
|
$(MAKE) -C libavcodec uninstall-libs
|
|
|
|
$(MAKE) -C libavformat uninstall-libs
|
2007-11-22 17:10:02 +01:00
|
|
|
$(MAKE) -C libavdevice uninstall-libs
|
2006-06-01 23:37:48 +02:00
|
|
|
$(MAKE) -C libpostproc uninstall-libs
|
2007-09-12 11:35:30 +02:00
|
|
|
$(MAKE) -C libswscale uninstall-libs
|
2008-02-26 22:32:56 +01:00
|
|
|
$(MAKE) -C libavfilter uninstall-libs
|
2006-05-18 14:14:02 +02:00
|
|
|
|
2008-03-26 10:39:12 +01:00
|
|
|
uninstall-headers::
|
2006-05-18 14:14:02 +02:00
|
|
|
$(MAKE) -C libavutil uninstall-headers
|
|
|
|
$(MAKE) -C libavcodec uninstall-headers
|
|
|
|
$(MAKE) -C libavformat uninstall-headers
|
2007-11-22 17:10:02 +01:00
|
|
|
$(MAKE) -C libavdevice uninstall-headers
|
2006-06-01 23:37:48 +02:00
|
|
|
$(MAKE) -C libpostproc uninstall-headers
|
2007-09-12 11:35:30 +02:00
|
|
|
$(MAKE) -C libswscale uninstall-headers
|
2008-02-26 22:32:56 +01:00
|
|
|
$(MAKE) -C libavfilter uninstall-headers
|
2007-07-21 20:53:06 +02:00
|
|
|
-rmdir "$(INCDIR)"
|
2006-05-18 14:14:02 +02:00
|
|
|
|
2008-03-26 10:39:12 +01:00
|
|
|
depend dep: .vhookdep
|
2008-01-27 15:55:16 +01:00
|
|
|
$(MAKE) -C libavutil depend
|
|
|
|
$(MAKE) -C libavcodec depend
|
|
|
|
$(MAKE) -C libavformat depend
|
|
|
|
$(MAKE) -C libavdevice depend
|
2008-03-08 19:50:38 +01:00
|
|
|
$(MAKE-$(CONFIG_POSTPROC)) -C libpostproc depend
|
2008-03-10 18:54:24 +01:00
|
|
|
$(MAKE-$(CONFIG_SWSCALE)) -C libswscale depend
|
2008-02-26 22:32:56 +01:00
|
|
|
$(MAKE-$(CONFIG_AVFILTER)) -C libavfilter depend
|
2003-01-22 10:55:08 +01:00
|
|
|
|
2008-01-16 23:43:04 +01:00
|
|
|
.vhookdep: $(ALLHOOKS_SRCS) version.h
|
2008-03-13 00:30:35 +01:00
|
|
|
$(VHOOK_DEPEND_CMD) > $@
|
2002-04-22 21:57:45 +02:00
|
|
|
|
2006-12-07 20:25:04 +01:00
|
|
|
$(DEP_LIBS): lib
|
|
|
|
|
|
|
|
.libs: $(DEP_LIBS)
|
|
|
|
touch $@
|
2003-03-12 19:38:18 +01:00
|
|
|
|
2008-03-26 10:39:12 +01:00
|
|
|
clean::
|
2006-05-18 10:40:15 +02:00
|
|
|
$(MAKE) -C libavutil clean
|
|
|
|
$(MAKE) -C libavcodec clean
|
2002-11-25 20:07:40 +01:00
|
|
|
$(MAKE) -C libavformat clean
|
2007-11-22 17:10:02 +01:00
|
|
|
$(MAKE) -C libavdevice clean
|
2006-06-01 23:37:48 +02:00
|
|
|
$(MAKE) -C libpostproc clean
|
2006-08-08 20:51:38 +02:00
|
|
|
$(MAKE) -C libswscale clean
|
2008-02-26 22:32:56 +01:00
|
|
|
$(MAKE) -C libavfilter clean
|
2008-03-26 10:39:12 +01:00
|
|
|
rm -f .libs gmon.out TAGS $(ALLPROGS) $(ALLPROGS_G) \
|
2008-01-26 14:43:40 +01:00
|
|
|
output_example$(EXESUF)
|
2007-05-17 10:39:50 +02:00
|
|
|
rm -f doc/*.html doc/*.pod doc/*.1
|
2007-06-08 00:36:39 +02:00
|
|
|
rm -rf tests/vsynth1 tests/vsynth2 tests/data tests/asynth1.sw tests/*~
|
|
|
|
rm -f $(addprefix tests/,$(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr))
|
2008-01-26 14:43:40 +01:00
|
|
|
rm -f $(addprefix tools/,$(addsuffix $(EXESUF),cws2fws pktdumper qt-faststart trasher))
|
2007-07-08 17:16:25 +02:00
|
|
|
rm -f vhook/*.o vhook/*~ vhook/*.so vhook/*.dylib vhook/*.dll
|
2002-11-20 04:02:23 +01:00
|
|
|
|
2008-03-26 10:39:12 +01:00
|
|
|
distclean::
|
2006-01-16 15:59:54 +01:00
|
|
|
$(MAKE) -C libavutil distclean
|
|
|
|
$(MAKE) -C libavcodec distclean
|
|
|
|
$(MAKE) -C libavformat distclean
|
2007-11-22 17:10:02 +01:00
|
|
|
$(MAKE) -C libavdevice distclean
|
2006-06-01 23:37:48 +02:00
|
|
|
$(MAKE) -C libpostproc distclean
|
2006-08-08 20:51:38 +02:00
|
|
|
$(MAKE) -C libswscale distclean
|
2008-02-26 22:32:56 +01:00
|
|
|
$(MAKE) -C libavfilter distclean
|
2008-03-26 10:39:12 +01:00
|
|
|
rm -f .vhookdep version.h config.* *.pc
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2002-05-19 01:11:25 +02:00
|
|
|
# regression tests
|
|
|
|
|
2007-06-08 00:36:39 +02:00
|
|
|
fulltest test: codectest libavtest seektest
|
|
|
|
|
|
|
|
FFMPEG_REFFILE = $(SRC_PATH)/tests/ffmpeg.regression.ref
|
|
|
|
FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
|
|
|
|
LIBAV_REFFILE = $(SRC_PATH)/tests/libav.regression.ref
|
|
|
|
ROTOZOOM_REFFILE = $(SRC_PATH)/tests/rotozoom.regression.ref
|
|
|
|
SEEK_REFFILE = $(SRC_PATH)/tests/seek.regression.ref
|
|
|
|
|
2008-02-03 20:26:26 +01:00
|
|
|
CODEC_TESTS = $(addprefix regtest-, \
|
|
|
|
mpeg \
|
|
|
|
mpeg2 \
|
|
|
|
mpeg2thread \
|
|
|
|
msmpeg4v2 \
|
|
|
|
msmpeg4 \
|
|
|
|
wmv1 \
|
|
|
|
wmv2 \
|
|
|
|
h261 \
|
|
|
|
h263 \
|
|
|
|
h263p \
|
|
|
|
mpeg4 \
|
|
|
|
huffyuv \
|
|
|
|
rc \
|
|
|
|
mpeg4adv \
|
|
|
|
mpeg4thread \
|
|
|
|
error \
|
|
|
|
mpeg4nr \
|
|
|
|
mpeg1b \
|
|
|
|
mjpeg \
|
|
|
|
ljpeg \
|
|
|
|
jpegls \
|
|
|
|
rv10 \
|
|
|
|
rv20 \
|
|
|
|
asv1 \
|
|
|
|
asv2 \
|
|
|
|
flv \
|
|
|
|
ffv1 \
|
|
|
|
snow \
|
|
|
|
snowll \
|
|
|
|
dv \
|
|
|
|
dv50 \
|
|
|
|
svq1 \
|
|
|
|
flashsv \
|
|
|
|
mp2 \
|
|
|
|
ac3 \
|
|
|
|
g726 \
|
|
|
|
adpcm_ima_wav \
|
2008-03-06 08:30:41 +01:00
|
|
|
adpcm_ima_qt \
|
2008-02-03 20:26:26 +01:00
|
|
|
adpcm_ms \
|
|
|
|
adpcm_yam \
|
|
|
|
adpcm_swf \
|
|
|
|
flac \
|
|
|
|
wma \
|
|
|
|
)
|
|
|
|
|
2008-02-03 20:26:29 +01:00
|
|
|
LAVF_TESTS = $(addprefix regtest-, \
|
|
|
|
avi \
|
|
|
|
asf \
|
|
|
|
rm \
|
|
|
|
mpg \
|
|
|
|
ts \
|
|
|
|
swf \
|
|
|
|
ffm \
|
|
|
|
flv_fmt \
|
|
|
|
mov \
|
|
|
|
dv_fmt \
|
|
|
|
gxf \
|
|
|
|
nut \
|
|
|
|
mkv \
|
|
|
|
pbmpipe \
|
|
|
|
pgmpipe \
|
|
|
|
ppmpipe \
|
|
|
|
gif \
|
|
|
|
yuv4mpeg \
|
|
|
|
pgm \
|
|
|
|
ppm \
|
|
|
|
bmp \
|
|
|
|
tga \
|
|
|
|
tiff \
|
|
|
|
sgi \
|
|
|
|
jpg \
|
|
|
|
wav \
|
|
|
|
alaw \
|
|
|
|
mulaw \
|
|
|
|
au \
|
|
|
|
mmf \
|
|
|
|
aiff \
|
|
|
|
voc \
|
|
|
|
ogg \
|
|
|
|
pixfmt \
|
|
|
|
)
|
2008-02-03 20:26:26 +01:00
|
|
|
|
|
|
|
REGFILES = $(addprefix tests/data/,$(addsuffix .$(1),$(2:regtest-%=%)))
|
|
|
|
|
|
|
|
CODEC_ROTOZOOM = $(call REGFILES,rotozoom.regression,$(CODEC_TESTS))
|
|
|
|
CODEC_VSYNTH = $(call REGFILES,vsynth.regression,$(CODEC_TESTS))
|
|
|
|
|
|
|
|
LAVF_REGFILES = $(call REGFILES,lavf.regression,$(LAVF_TESTS))
|
|
|
|
|
|
|
|
LAVF_REG = tests/data/lavf.regression
|
|
|
|
ROTOZOOM_REG = tests/data/rotozoom.regression
|
|
|
|
VSYNTH_REG = tests/data/vsynth.regression
|
|
|
|
|
|
|
|
codectest: $(VSYNTH_REG) $(ROTOZOOM_REG)
|
2008-02-23 14:15:24 +01:00
|
|
|
diff -u -w $(FFMPEG_REFFILE) $(VSYNTH_REG)
|
|
|
|
diff -u -w $(ROTOZOOM_REFFILE) $(ROTOZOOM_REG)
|
2008-02-03 20:26:26 +01:00
|
|
|
|
|
|
|
libavtest: $(LAVF_REG)
|
|
|
|
diff -u -w $(LIBAV_REFFILE) $(LAVF_REG)
|
|
|
|
|
|
|
|
$(VSYNTH_REG) $(ROTOZOOM_REG) $(LAVF_REG):
|
|
|
|
cat $^ > $@
|
|
|
|
|
|
|
|
$(LAVF_REG): $(LAVF_REGFILES)
|
|
|
|
$(ROTOZOOM_REG): $(CODEC_ROTOZOOM)
|
|
|
|
$(VSYNTH_REG): $(CODEC_VSYNTH)
|
|
|
|
|
|
|
|
$(CODEC_VSYNTH) $(CODEC_ROTOZOOM): $(CODEC_TESTS)
|
|
|
|
|
|
|
|
$(LAVF_REGFILES): $(LAVF_TESTS)
|
|
|
|
|
|
|
|
$(CODEC_TESTS) $(LAVF_TESTS): regtest-ref
|
|
|
|
|
|
|
|
regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/asynth1.sw
|
|
|
|
|
|
|
|
$(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(EXESUF)
|
2008-02-03 20:26:29 +01:00
|
|
|
$(SRC_PATH)/tests/regression.sh $@ vsynth tests/vsynth1 a
|
|
|
|
$(SRC_PATH)/tests/regression.sh $@ rotozoom tests/vsynth2 a
|
2008-02-03 20:26:26 +01:00
|
|
|
|
|
|
|
$(LAVF_TESTS):
|
2008-02-03 20:26:29 +01:00
|
|
|
$(SRC_PATH)/tests/regression.sh $@ lavf tests/vsynth1 b
|
2008-02-03 20:26:26 +01:00
|
|
|
|
|
|
|
seektest: codectest libavtest tests/seek_test$(EXESUF)
|
|
|
|
$(SRC_PATH)/tests/seek_test.sh $(SEEK_REFFILE)
|
|
|
|
|
2007-06-08 21:05:48 +02:00
|
|
|
test-server: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/asynth1.sw
|
2007-06-08 00:36:39 +02:00
|
|
|
@echo
|
|
|
|
@echo "Unfortunately ffserver is broken and therefore its regression"
|
|
|
|
@echo "test fails randomly. Treat the results accordingly."
|
|
|
|
@echo
|
|
|
|
$(SRC_PATH)/tests/server-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/test.conf
|
|
|
|
|
2008-03-10 18:54:24 +01:00
|
|
|
ifeq ($(CONFIG_SWSCALE),yes)
|
2008-02-03 20:26:26 +01:00
|
|
|
test-server codectest $(CODEC_TESTS) libavtest: swscale_error
|
2007-06-08 00:36:39 +02:00
|
|
|
swscale_error:
|
|
|
|
@echo
|
2008-03-10 18:54:24 +01:00
|
|
|
@echo "This regression test is incompatible with --enable-swscale."
|
2007-06-08 00:36:39 +02:00
|
|
|
@echo
|
|
|
|
@exit 1
|
|
|
|
endif
|
|
|
|
|
|
|
|
tests/vsynth1/00.pgm: tests/videogen$(EXESUF)
|
|
|
|
mkdir -p tests/vsynth1
|
|
|
|
$(BUILD_ROOT)/$< 'tests/vsynth1/'
|
|
|
|
|
|
|
|
tests/vsynth2/00.pgm: tests/rotozoom$(EXESUF)
|
|
|
|
mkdir -p tests/vsynth2
|
|
|
|
$(BUILD_ROOT)/$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
|
|
|
|
|
|
|
|
tests/asynth1.sw: tests/audiogen$(EXESUF)
|
|
|
|
$(BUILD_ROOT)/$< $@
|
|
|
|
|
|
|
|
%$(EXESUF): %.c
|
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
|
|
|
|
|
2007-08-29 01:29:07 +02:00
|
|
|
tests/seek_test$(EXESUF): tests/seek_test.c .libs
|
2007-10-31 12:38:08 +01:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $< $(EXTRALIBS)
|
2007-06-08 00:36:39 +02:00
|
|
|
|
2002-05-19 01:11:25 +02:00
|
|
|
|
2008-03-26 10:39:12 +01:00
|
|
|
.PHONY: lib videohook documentation TAGS
|
2007-05-25 15:12:17 +02:00
|
|
|
.PHONY: codectest libavtest seektest test-server fulltest test
|
2008-02-03 20:26:26 +01:00
|
|
|
.PHONY: $(CODEC_TESTS) $(LAVF_TESTS) regtest-ref swscale-error
|
2003-03-12 19:38:18 +01:00
|
|
|
|
2007-07-08 19:47:15 +02:00
|
|
|
-include .vhookdep
|