You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
5.1KB

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