PROGS-$(CONFIG_FFPROBE) += ffprobe
PROGS-$(CONFIG_FFSERVER) += ffserver
-PROGS := $(addsuffix $(EXESUF), $(PROGS-yes))
-PROGS_G = $(addsuffix _g$(EXESUF), $(PROGS-yes))
-OBJS = $(addsuffix .o, $(PROGS-yes)) cmdutils.o
-MANPAGES = $(addprefix doc/, $(addsuffix .1, $(PROGS-yes)))
-HTMLPAGES = $(addprefix doc/, $(addsuffix -doc.html, $(PROGS-yes)))
-TOOLS = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws pktdumper probetest qt-faststart trasher))
-HOSTPROGS = $(addprefix tests/, audiogen videogen rotozoom tiny_psnr base64)
+PROGS := $(PROGS-yes:%=%$(EXESUF))
+PROGS_G = $(PROGS-yes:%=%_g$(EXESUF))
+OBJS = $(PROGS-yes:%=%.o) cmdutils.o
+MANPAGES = $(PROGS-yes:%=doc/%.1)
+PODPAGES = $(PROGS-yes:%=doc/%.pod)
+HTMLPAGES = $(PROGS-yes:%=doc/%.html)
+TOOLS = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws graph2dot lavfi-showfiltfmts pktdumper probetest qt-faststart trasher))
+TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
+HOSTPROGS := $(TESTTOOLS:%=tests/%)
BASENAMES = ffmpeg ffplay ffprobe ffserver
-ALLPROGS = $(addsuffix $(EXESUF), $(BASENAMES))
-ALLPROGS_G = $(addsuffix _g$(EXESUF), $(BASENAMES))
-ALLMANPAGES = $(addsuffix .1, $(BASENAMES))
-ALLHTMLPAGES= $(addsuffix -doc.html, $(BASENAMES))
+ALLPROGS = $(BASENAMES:%=%$(EXESUF))
+ALLPROGS_G = $(BASENAMES:%=%_g$(EXESUF))
+ALLMANPAGES = $(BASENAMES:%=%.1)
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
FFLIBS-$(CONFIG_AVFILTER) += avfilter
SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTPROGS EXAMPLES SKIPHEADERS \
ALTIVEC-OBJS MMX-OBJS NEON-OBJS X86-OBJS YASM-OBJS-FFT YASM-OBJS \
- HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS
+ HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS ARMV6-OBJS
define RESET
$(1) :=
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
tools/%.o: tools/%.c
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CC_O) $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $<
-ffplay.o ffplay.d: CFLAGS += $(SDL_CFLAGS)
+ffplay.o: CFLAGS += $(SDL_CFLAGS)
VERSION_SH = $(SRC_PATH_BARE)/version.sh
GIT_LOG = $(SRC_PATH_BARE)/.git/logs/HEAD
alltools: $(TOOLS)
-documentation: $(addprefix doc/, developer.html faq.html general.html libavfilter.html \
- $(ALLHTMLPAGES) $(ALLMANPAGES))
+DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
-$(HTMLPAGES) $(MANPAGES): doc/fftools-common-opts.texi
+documentation: $(DOCS)
-doc/ffmpeg.pod doc/ffmpeg-doc.html: doc/indevs.texi doc/filters.texi doc/outdevs.texi
-doc/ffplay.pod doc/ffplay-doc.html: doc/indevs.texi doc/filters.texi doc/outdevs.texi
-doc/ffprobe.pod doc/ffprobe-doc.html: doc/indevs.texi
+-include $(wildcard $(DOCS:%=%.d))
+
+TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
doc/%.html: TAG = HTML
-doc/%.html: doc/%.texi
- $(M)cd doc && texi2html -monolithic -number $(<:doc/%=%)
+doc/%.html: doc/%.texi $(SRC_PATH_BARE)/doc/t2h.init
+ $(Q)$(TEXIDEP)
+ $(M)cd doc && texi2html -monolithic --init-file $(SRC_PATH_BARE)/doc/t2h.init $(<:doc/%=%)
doc/%.pod: TAG = POD
-doc/%.pod: doc/%-doc.texi
+doc/%.pod: doc/%.texi
+ $(Q)$(TEXIDEP)
$(M)doc/texi2pod.pl $< $@
doc/%.1: TAG = MAN
$(RM) -r tests/vsynth1 tests/vsynth2 tests/data
$(RM) $(addprefix tests/,$(CLEANSUFFIXES))
$(RM) tests/seek_test$(EXESUF) tests/seek_test.o
- $(RM) $(addprefix tests/,$(addsuffix $(HOSTEXESUF),audiogen videogen rotozoom tiny_psnr base64))
+ $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
clean:: testclean
$(RM) $(ALLPROGS) $(ALLPROGS_G)
$(RM) $(CLEANSUFFIXES)
$(RM) doc/*.html doc/*.pod doc/*.1
$(RM) $(TOOLS)
+ $(RM) $(CLEANSUFFIXES:%=tools/%)
distclean::
$(RM) $(DISTCLEANSUFFIXES)
tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
+tools/lavfi-showfiltfmts$(EXESUF): tools/lavfi-showfiltfmts.o $(FF_DEP_LIBS)
+ $(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
+
include $(SRC_PATH_BARE)/tests/fate.mak
include $(SRC_PATH_BARE)/tests/fate2.mak
-FATE_TESTS += $(FATE2_TESTS)
+include $(SRC_PATH_BARE)/tests/fate/aac.mak
+include $(SRC_PATH_BARE)/tests/fate/als.mak
+include $(SRC_PATH_BARE)/tests/fate/fft.mak
+include $(SRC_PATH_BARE)/tests/fate/h264.mak
+include $(SRC_PATH_BARE)/tests/fate/mp3.mak
+include $(SRC_PATH_BARE)/tests/fate/vorbis.mak
+include $(SRC_PATH_BARE)/tests/fate/vp8.mak
FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
$(FATE_ACODEC): $(AREF)
$(FATE_VCODEC): $(VREF)
$(FATE_LAVF): $(REFS)
-$(FATE_LAVFI): $(REFS)
+$(FATE_LAVFI): $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
$(FATE_SEEK): fate-codec fate-lavf tests/seek_test$(EXESUF)
$(FATE_ACODEC): CMD = codectest acodec
ifdef SAMPLES
FATE += $(FATE_TESTS)
else
-fate2 $(FATE_TESTS):
+$(FATE_TESTS):
@echo "SAMPLES not specified, cannot run FATE"
endif
FATE_UTILS = base64 tiny_psnr
fate: $(FATE)
-fate2: $(FATE2_TESTS)
$(FATE): ffmpeg$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
@echo "TEST $(@:fate-%=%)"
$(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)'
+fate-list:
+ @printf '%s\n' $(sort $(FATE))
+
.PHONY: documentation *test regtest-* alltools check config