examples/avcodec: split audio decoding into a separate example
[libav.git] / doc / Makefile
CommitLineData
14abeaa4
DB
1ALLMANPAGES = $(AVBASENAMES:%=%.1)
2MANPAGES = $(AVPROGS-yes:%=doc/%.1)
3PODPAGES = $(AVPROGS-yes:%=doc/%.pod)
8c201dde
DB
4PROGSHTML = $(AVPROGS-yes:%=doc/%.html)
5HTMLPAGES = $(PROGSHTML) \
47b20a1d
DB
6 doc/developer.html \
7 doc/faq.html \
1ebbdda1 8 doc/fate.html \
47b20a1d 9 doc/general.html \
2f017d97 10 doc/git-howto.html \
47b20a1d 11 doc/libavfilter.html \
175d0d94 12 doc/nut.html \
1de6e14e 13 doc/platform.html \
f87b03b5 14
92f0abb2 15DOCS-$(CONFIG_POD2MAN) += $(MANPAGES) $(PODPAGES)
f187557a
DB
16DOCS-$(CONFIG_TEXI2HTML) += $(HTMLPAGES)
17DOCS = $(DOCS-yes)
f87b03b5 18
b339182e 19DOC_EXAMPLES-$(CONFIG_AVCODEC_EXAMPLE) += avcodec
f5df897c 20DOC_EXAMPLES-$(CONFIG_DECODE_AUDIO_EXAMPLE) += decode_audio
40aaa8da 21DOC_EXAMPLES-$(CONFIG_ENCODE_AUDIO_EXAMPLE) += encode_audio
e7dfaf16 22DOC_EXAMPLES-$(CONFIG_FILTER_AUDIO_EXAMPLE) += filter_audio
b339182e 23DOC_EXAMPLES-$(CONFIG_METADATA_EXAMPLE) += metadata
ab81f24a 24DOC_EXAMPLES-$(CONFIG_OUTPUT_EXAMPLE) += output
990e4a66 25DOC_EXAMPLES-$(CONFIG_QSVDEC_EXAMPLE) += qsvdec
10421bcf 26DOC_EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE) += transcode_aac
f5df897c
AK
27ALL_DOC_EXAMPLES = avcodec decode_audio encode_audio filter_audio metadata \
28 output transcode_aac
ab81f24a
DB
29
30DOC_EXAMPLES := $(DOC_EXAMPLES-yes:%=doc/examples/%$(EXESUF))
31ALL_DOC_EXAMPLES := $(ALL_DOC_EXAMPLES:%=doc/examples/%$(EXESUF))
32PROGS += $(DOC_EXAMPLES)
33
f187557a 34all: $(DOCS)
f87b03b5 35
b3fab1f2 36apidoc: doc/doxy/html
f87b03b5
MR
37documentation: $(DOCS)
38
ab81f24a
DB
39examples: $(DOC_EXAMPLES)
40
f87b03b5
MR
41TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
42
0d0b81f9
AK
43GENTEXI = format codec
44GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
45
8c201dde
DB
46$(MANPAGES) $(PODPAGES) $(PROGSHTML): $(GENTEXI)
47
0d0b81f9 48$(GENTEXI): TAG = GENTEXI
09cd0a31 49$(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
0d0b81f9
AK
50 $(M)doc/print_options $* > $@
51
f87b03b5 52doc/%.html: TAG = HTML
8c201dde 53doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init
f87b03b5 54 $(Q)$(TEXIDEP)
2ac3df85 55 $(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
f87b03b5
MR
56
57doc/%.pod: TAG = POD
8c201dde 58doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl
f87b03b5 59 $(Q)$(TEXIDEP)
2ac3df85 60 $(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
f87b03b5
MR
61
62doc/%.1: TAG = MAN
8c201dde 63doc/%.1: doc/%.pod
f87b03b5
MR
64 $(M)pod2man --section=1 --center=" " --release=" " $< > $@
65
b3fab1f2 66$(DOCS) doc/doxy/html: | doc/
682b2a80 67$(DOC_EXAMPLES:%$(EXESUF)=%.o): | doc/examples
ab81f24a 68OBJDIRS += doc/examples
b3fab1f2 69
3a26ccbf 70DOXY_INPUT = $(addprefix $(SRC_PATH)/, $(INSTHEADERS) $(DOC_EXAMPLES:%$(EXESUF)=%.c) $(LIB_EXAMPLES:%$(EXESUF)=%.c))
58f0d164
AK
71DOXY_TEMPLATES = doxy_stylesheet.css footer.html header.html
72DOXY_TEMPLATES := $(addprefix $(SRC_PATH)/doc/doxy/, $(DOXY_TEMPLATES))
73
f1f42cfc
DB
74doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(DOXY_INPUT) $(DOXY_TEMPLATES)
75 $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $< $(DOXY_INPUT)
5e27ec28 76
92f0abb2 77install-progs-$(CONFIG_POD2MAN): install-man
f187557a 78install-progs-$(CONFIG_TEXI2HTML): install-doc
f4ca970d
VG
79
80install-doc: $(HTMLPAGES)
81 $(Q)mkdir -p "$(DOCDIR)"
82 $(INSTALL) -m 644 $(HTMLPAGES) "$(DOCDIR)"
f87b03b5
MR
83
84install-man: $(MANPAGES)
85 $(Q)mkdir -p "$(MANDIR)/man1"
86 $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
87
f4ca970d
VG
88uninstall: uninstall-doc uninstall-man
89
90uninstall-doc:
91 $(RM) -r "$(DOCDIR)"
f87b03b5
MR
92
93uninstall-man:
94 $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
95
96clean::
ab81f24a
DB
97 $(RM) $(ALL_DOC_EXAMPLES)
98 $(RM) $(CLEANSUFFIXES:%=doc/%) $(CLEANSUFFIXES:%=doc/examples/%)
99 $(RM) doc/*.html doc/*.pod doc/*.1 doc/avoptions_*.texi
b3fab1f2 100 $(RM) -r doc/doxy/html
f87b03b5
MR
101
102-include $(wildcard $(DOCS:%=%.d))
103
b3fab1f2 104.PHONY: apidoc documentation