1LIBRARIES-$(CONFIG_AVUTIL) += libavutil 2LIBRARIES-$(CONFIG_SWSCALE) += libswscale 3LIBRARIES-$(CONFIG_SWRESAMPLE) += libswresample 4LIBRARIES-$(CONFIG_AVCODEC) += libavcodec 5LIBRARIES-$(CONFIG_AVFORMAT) += libavformat 6LIBRARIES-$(CONFIG_AVDEVICE) += libavdevice 7LIBRARIES-$(CONFIG_AVFILTER) += libavfilter 8 9COMPONENTS-$(CONFIG_AVUTIL) += ffmpeg-utils 10COMPONENTS-$(CONFIG_SWSCALE) += ffmpeg-scaler 11COMPONENTS-$(CONFIG_SWRESAMPLE) += ffmpeg-resampler 12COMPONENTS-$(CONFIG_AVCODEC) += ffmpeg-codecs ffmpeg-bitstream-filters 13COMPONENTS-$(CONFIG_AVFORMAT) += ffmpeg-formats ffmpeg-protocols 14COMPONENTS-$(CONFIG_AVDEVICE) += ffmpeg-devices 15COMPONENTS-$(CONFIG_AVFILTER) += ffmpeg-filters 16 17MANPAGES1 = $(AVPROGS-yes:%=doc/%.1) $(AVPROGS-yes:%=doc/%-all.1) $(COMPONENTS-yes:%=doc/%.1) 18MANPAGES3 = $(LIBRARIES-yes:%=doc/%.3) 19MANPAGES = $(MANPAGES1) $(MANPAGES3) 20PODPAGES = $(AVPROGS-yes:%=doc/%.pod) $(AVPROGS-yes:%=doc/%-all.pod) $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod) 21HTMLPAGES = $(AVPROGS-yes:%=doc/%.html) $(AVPROGS-yes:%=doc/%-all.html) $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \ 22 doc/developer.html \ 23 doc/faq.html \ 24 doc/fate.html \ 25 doc/general.html \ 26 doc/git-howto.html \ 27 doc/mailing-list-faq.html \ 28 doc/nut.html \ 29 doc/platform.html \ 30 $(SRC_PATH)/doc/bootstrap.min.css \ 31 $(SRC_PATH)/doc/style.min.css \ 32 $(SRC_PATH)/doc/default.css \ 33 34TXTPAGES = doc/fate.txt \ 35 36 37DOCS-$(CONFIG_HTMLPAGES) += $(HTMLPAGES) 38DOCS-$(CONFIG_PODPAGES) += $(PODPAGES) 39DOCS-$(CONFIG_MANPAGES) += $(MANPAGES) 40DOCS-$(CONFIG_TXTPAGES) += $(TXTPAGES) 41DOCS = $(DOCS-yes) 42 43all-$(CONFIG_DOC): doc 44 45doc: documentation 46 47apidoc: doc/doxy/html 48documentation: $(DOCS) 49 50TEXIDEP = perl $(SRC_PATH)/doc/texidep.pl $(SRC_PATH) $< $@ >$(@:%=%.d) 51 52doc/%.txt: TAG = TXT 53doc/%.txt: doc/%.texi 54 $(Q)$(TEXIDEP) 55 $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null 56 57GENTEXI = format codec 58GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi) 59 60$(GENTEXI): TAG = GENTEXI 61$(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF) 62 $(M)doc/print_options $* > $@ 63 64doc/%.html: TAG = HTML 65doc/%-all.html: TAG = HTML 66 67ifdef HAVE_MAKEINFO_HTML 68doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.pm $(GENTEXI) 69 $(Q)$(TEXIDEP) 70 $(M)makeinfo --html -I doc --no-split -D config-not-all --init-file=$(SRC_PATH)/doc/t2h.pm --output $@ $< 71 72doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.pm $(GENTEXI) 73 $(Q)$(TEXIDEP) 74 $(M)makeinfo --html -I doc --no-split -D config-all --init-file=$(SRC_PATH)/doc/t2h.pm --output $@ $< 75else 76doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI) 77 $(Q)$(TEXIDEP) 78 $(M)texi2html -I doc -monolithic --D=config-not-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $< 79 80doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI) 81 $(Q)$(TEXIDEP) 82 $(M)texi2html -I doc -monolithic --D=config-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $< 83endif 84 85doc/%.pod: TAG = POD 86doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI) 87 $(Q)$(TEXIDEP) 88 $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-not-all=yes -Idoc $< $@ 89 90doc/%-all.pod: TAG = POD 91doc/%-all.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI) 92 $(Q)$(TEXIDEP) 93 $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-all=yes -Idoc $< $@ 94 95doc/%.1 doc/%.3: TAG = MAN 96doc/%.1: doc/%.pod $(GENTEXI) 97 $(M)pod2man --section=1 --center=" " --release=" " --date=" " $< > $@ 98doc/%.3: doc/%.pod $(GENTEXI) 99 $(M)pod2man --section=3 --center=" " --release=" " --date=" " $< > $@ 100 101$(DOCS) doc/doxy/html: | doc/ 102 103DOXY_INPUT = $(INSTHEADERS) 104DOXY_INPUT_DEPS = $(addprefix $(SRC_PATH)/, $(DOXY_INPUT)) ffbuild/config.mak 105 106doc/doxy/html: TAG = DOXY 107doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(SRC_PATH)/doc/doxy-wrapper.sh $(DOXY_INPUT_DEPS) 108 $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $$PWD/doc/doxy $(SRC_PATH) doc/Doxyfile $(DOXYGEN) $(DOXY_INPUT); 109 110install-doc: install-html install-man 111 112install-html: 113 114install-man: 115 116ifdef CONFIG_HTMLPAGES 117install-progs-$(CONFIG_DOC): install-html 118 119install-html: $(HTMLPAGES) 120 $(Q)mkdir -p "$(DOCDIR)" 121 $(INSTALL) -m 644 $(HTMLPAGES) "$(DOCDIR)" 122endif 123 124ifdef CONFIG_MANPAGES 125install-progs-$(CONFIG_DOC): install-man 126 127install-man: $(MANPAGES) 128 $(Q)mkdir -p "$(MANDIR)/man1" 129 $(INSTALL) -m 644 $(MANPAGES1) "$(MANDIR)/man1" 130 $(Q)mkdir -p "$(MANDIR)/man3" 131 $(INSTALL) -m 644 $(MANPAGES3) "$(MANDIR)/man3" 132endif 133 134uninstall: uninstall-doc 135 136uninstall-doc: uninstall-html uninstall-man 137 138uninstall-html: 139 $(RM) -r "$(DOCDIR)" 140 141uninstall-man: 142 $(RM) $(addprefix "$(MANDIR)/man1/",$(AVPROGS-yes:%=%.1) $(AVPROGS-yes:%=%-all.1) $(COMPONENTS-yes:%=%.1)) 143 $(RM) $(addprefix "$(MANDIR)/man3/",$(LIBRARIES-yes:%=%.3)) 144 145clean:: docclean 146 147distclean:: docclean 148 $(RM) doc/config.texi 149 150docclean:: 151 $(RM) $(CLEANSUFFIXES:%=doc/%) 152 $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 doc/avoptions_*.texi 153 $(RM) -r doc/doxy/html 154 155-include $(wildcard $(DOCS:%=%.d)) 156 157.PHONY: apidoc doc documentation 158