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