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