1 LIBRARIES-$(CONFIG_AVUTIL) += libavutil
2 LIBRARIES-$(CONFIG_SWSCALE) += libswscale
3 LIBRARIES-$(CONFIG_SWRESAMPLE) += libswresample
4 LIBRARIES-$(CONFIG_AVCODEC) += libavcodec
5 LIBRARIES-$(CONFIG_AVFORMAT) += libavformat
6 LIBRARIES-$(CONFIG_AVDEVICE) += libavdevice
7 LIBRARIES-$(CONFIG_AVFILTER) += libavfilter
9 COMPONENTS-$(CONFIG_AVUTIL) += ffmpeg-utils
10 COMPONENTS-$(CONFIG_SWSCALE) += ffmpeg-scaler
11 COMPONENTS-$(CONFIG_SWRESAMPLE) += ffmpeg-resampler
12 COMPONENTS-$(CONFIG_AVCODEC) += ffmpeg-codecs ffmpeg-bitstream-filters
13 COMPONENTS-$(CONFIG_AVFORMAT) += ffmpeg-formats ffmpeg-protocols
14 COMPONENTS-$(CONFIG_AVDEVICE) += ffmpeg-devices
15 COMPONENTS-$(CONFIG_AVFILTER) += ffmpeg-filters
17 MANPAGES1 = $(AVPROGS-yes:%=doc/%.1) $(AVPROGS-yes:%=doc/%-all.1) $(COMPONENTS-yes:%=doc/%.1)
18 MANPAGES3 = $(LIBRARIES-yes:%=doc/%.3)
19 MANPAGES = $(MANPAGES1) $(MANPAGES3)
20 PODPAGES = $(AVPROGS-yes:%=doc/%.pod) $(AVPROGS-yes:%=doc/%-all.pod) $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod)
21 HTMLPAGES = $(AVPROGS-yes:%=doc/%.html) $(AVPROGS-yes:%=doc/%-all.html) $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \
27 doc/mailing-list-faq.html \
31 TXTPAGES = doc/fate.txt \
34 DOCS-$(CONFIG_HTMLPAGES) += $(HTMLPAGES)
35 DOCS-$(CONFIG_PODPAGES) += $(PODPAGES)
36 DOCS-$(CONFIG_MANPAGES) += $(MANPAGES)
37 DOCS-$(CONFIG_TXTPAGES) += $(TXTPAGES)
40 all-$(CONFIG_DOC): doc
45 documentation: $(DOCS)
47 TEXIDEP = perl $(SRC_PATH)/doc/texidep.pl $(SRC_PATH) $< $@ >$(@:%=%.d)
52 $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
54 GENTEXI = format codec
55 GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
57 $(GENTEXI): TAG = GENTEXI
58 $(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
59 $(M)doc/print_options $* > $@
61 doc/%.html: TAG = HTML
62 doc/%-all.html: TAG = HTML
64 ifdef HAVE_MAKEINFO_HTML
65 doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.pm $(GENTEXI)
67 $(M)makeinfo --html -I doc --no-split -D config-not-all --init-file=$(SRC_PATH)/doc/t2h.pm --output $@ $<
69 doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.pm $(GENTEXI)
71 $(M)makeinfo --html -I doc --no-split -D config-all --init-file=$(SRC_PATH)/doc/t2h.pm --output $@ $<
73 doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
75 $(M)texi2html -I doc -monolithic --D=config-not-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
77 doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
79 $(M)texi2html -I doc -monolithic --D=config-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
83 doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
85 $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-not-all=yes -Idoc $< $@
87 doc/%-all.pod: TAG = POD
88 doc/%-all.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
90 $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-all=yes -Idoc $< $@
92 doc/%.1 doc/%.3: TAG = MAN
93 doc/%.1: doc/%.pod $(GENTEXI)
94 $(M)pod2man --section=1 --center=" " --release=" " --date=" " $< > $@
95 doc/%.3: doc/%.pod $(GENTEXI)
96 $(M)pod2man --section=3 --center=" " --release=" " --date=" " $< > $@
98 $(DOCS) doc/doxy/html: | doc/
100 DOXY_INPUT = $(INSTHEADERS)
101 DOXY_INPUT_DEPS = $(addprefix $(SRC_PATH)/, $(DOXY_INPUT)) ffbuild/config.mak
103 doc/doxy/html: TAG = DOXY
104 doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(SRC_PATH)/doc/doxy-wrapper.sh $(DOXY_INPUT_DEPS)
105 $(M)OUT_DIR=$$PWD/doc/doxy; cd $(SRC_PATH); ./doc/doxy-wrapper.sh $$OUT_DIR $< $(DOXYGEN) $(DOXY_INPUT);
107 install-doc: install-html install-man
113 ifdef CONFIG_HTMLPAGES
114 install-progs-$(CONFIG_DOC): install-html
116 install-html: $(HTMLPAGES)
117 $(Q)mkdir -p "$(DOCDIR)"
118 $(INSTALL) -m 644 $(HTMLPAGES) "$(DOCDIR)"
121 ifdef CONFIG_MANPAGES
122 install-progs-$(CONFIG_DOC): install-man
124 install-man: $(MANPAGES)
125 $(Q)mkdir -p "$(MANDIR)/man1"
126 $(INSTALL) -m 644 $(MANPAGES1) "$(MANDIR)/man1"
127 $(Q)mkdir -p "$(MANDIR)/man3"
128 $(INSTALL) -m 644 $(MANPAGES3) "$(MANDIR)/man3"
131 uninstall: uninstall-doc
133 uninstall-doc: uninstall-html uninstall-man
139 $(RM) $(addprefix "$(MANDIR)/man1/",$(AVPROGS-yes:%=%.1) $(AVPROGS-yes:%=%-all.1) $(COMPONENTS-yes:%=%.1))
140 $(RM) $(addprefix "$(MANDIR)/man3/",$(LIBRARIES-yes:%=%.3))
145 $(RM) doc/config.texi
148 $(RM) $(CLEANSUFFIXES:%=doc/%)
149 $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 doc/avoptions_*.texi
150 $(RM) -r doc/doxy/html
152 -include $(wildcard $(DOCS:%=%.d))
154 .PHONY: apidoc doc documentation