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.

104 lines
3.3KB

  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-yes = $(PROGS-yes)
  9. COMPONENTS-$(CONFIG_AVUTIL) += ffmpeg-utils
  10. COMPONENTS-$(CONFIG_SWSCALE) += ffmpeg-scaler
  11. COMPONENTS-$(CONFIG_SWRESAMPLE) += ffmpeg-resampler
  12. COMPONENTS-$(CONFIG_AVCODEC) += ffmpeg-codecs ffmpeg-bitstream-filters
  13. COMPONENTS-$(CONFIG_AVFORMAT) += ffmpeg-formats ffmpeg-protocols
  14. COMPONENTS-$(CONFIG_AVDEVICE) += ffmpeg-devices
  15. COMPONENTS-$(CONFIG_AVFILTER) += ffmpeg-filters
  16. MANPAGES = $(COMPONENTS-yes:%=doc/%.1) $(LIBRARIES-yes:%=doc/%.3)
  17. PODPAGES = $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod)
  18. HTMLPAGES = $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \
  19. doc/developer.html \
  20. doc/faq.html \
  21. doc/fate.html \
  22. doc/general.html \
  23. doc/git-howto.html \
  24. doc/nut.html \
  25. doc/platform.html \
  26. TXTPAGES = doc/fate.txt \
  27. DOCS-$(CONFIG_HTMLPAGES) += $(HTMLPAGES)
  28. DOCS-$(CONFIG_PODPAGES) += $(PODPAGES)
  29. DOCS-$(CONFIG_MANPAGES) += $(MANPAGES)
  30. DOCS-$(CONFIG_TXTPAGES) += $(TXTPAGES)
  31. DOCS = $(DOCS-yes)
  32. all-$(CONFIG_DOC): doc
  33. doc: documentation
  34. apidoc: doc/doxy/html
  35. documentation: $(DOCS)
  36. TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
  37. doc/%.txt: TAG = TXT
  38. doc/%.txt: doc/%.texi
  39. $(Q)$(TEXIDEP)
  40. $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
  41. GENTEXI = format codec
  42. GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
  43. $(GENTEXI): TAG = GENTEXI
  44. $(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
  45. $(M)doc/print_options $* > $@
  46. doc/%.html: TAG = HTML
  47. doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
  48. $(Q)$(TEXIDEP)
  49. $(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
  50. doc/%.pod: TAG = POD
  51. doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
  52. $(Q)$(TEXIDEP)
  53. $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
  54. doc/%.1 doc/%.3: TAG = MAN
  55. doc/%.1: doc/%.pod $(GENTEXI)
  56. $(M)pod2man --section=1 --center=" " --release=" " $< > $@
  57. doc/%.3: doc/%.pod $(GENTEXI)
  58. $(M)pod2man --section=3 --center=" " --release=" " $< > $@
  59. $(DOCS) doc/doxy/html: | doc/
  60. doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
  61. $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
  62. install-man:
  63. ifdef CONFIG_MANPAGES
  64. install-progs-$(CONFIG_DOC): install-man
  65. install-man: $(MANPAGES)
  66. $(Q)mkdir -p "$(MANDIR)/man1"
  67. $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
  68. endif
  69. uninstall: uninstall-man
  70. uninstall-man:
  71. $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
  72. clean:: docclean
  73. docclean:
  74. $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
  75. $(RM) -r doc/doxy/html
  76. -include $(wildcard $(DOCS:%=%.d))
  77. .PHONY: apidoc doc documentation