lavf: move internal functions from avformat.h to internal.h
[ffmpeg.git] / Makefile
index 9f1aa2f..356ba29 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,19 +9,20 @@ PROGS-$(CONFIG_FFPLAY)   += ffplay
 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)))
+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 pktdumper probetest qt-faststart trasher))
-HOSTPROGS   = $(addprefix tests/, audiogen videogen rotozoom tiny_psnr base64)
+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
@@ -90,9 +91,9 @@ tools/%$(EXESUF): tools/%.o
        $(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
@@ -110,21 +111,22 @@ version.h .version:
 
 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/protocols.texi
-doc/ffplay.pod doc/ffplay-doc.html: doc/indevs.texi doc/filters.texi doc/outdevs.texi doc/protocols.texi
-doc/ffprobe.pod doc/ffprobe-doc.html: doc/indevs.texi doc/protocols.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
@@ -160,7 +162,7 @@ testclean:
        $(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)
@@ -236,11 +238,10 @@ 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_TESTS += $(FATE2_TESTS)
-
 FATE_ACODEC  = $(ACODEC_TESTS:%=fate-acodec-%)
 FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
 FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
@@ -278,17 +279,19 @@ fate-seek:   $(FATE_SEEK)
 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