Makefile 5.5 KB

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