Makefile 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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 = $(PROGS-yes:%=doc/%.1) $(PROGS-yes:%=doc/%-all.1) $(COMPONENTS-yes:%=doc/%.1)
  16. MANPAGES3 = $(LIBRARIES-yes:%=doc/%.3)
  17. MANPAGES = $(MANPAGES1) $(MANPAGES3)
  18. PODPAGES = $(PROGS-yes:%=doc/%.pod) $(PROGS-yes:%=doc/%-all.pod) $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod)
  19. HTMLPAGES = $(PROGS-yes:%=doc/%.html) $(PROGS-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 = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.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/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
  49. $(Q)$(TEXIDEP)
  50. $(M)texi2html -I doc -monolithic --D=config-not-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
  51. doc/%-all.html: TAG = HTML
  52. doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
  53. $(Q)$(TEXIDEP)
  54. $(M)texi2html -I doc -monolithic --D=config-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
  55. doc/%.pod: TAG = POD
  56. doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
  57. $(Q)$(TEXIDEP)
  58. $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-not-all=yes -Idoc $< $@
  59. doc/%-all.pod: TAG = POD
  60. doc/%-all.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
  61. $(Q)$(TEXIDEP)
  62. $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-all=yes -Idoc $< $@
  63. doc/%.1 doc/%.3: TAG = MAN
  64. doc/%.1: doc/%.pod $(GENTEXI)
  65. $(M)pod2man --section=1 --center=" " --release=" " $< > $@
  66. doc/%.3: doc/%.pod $(GENTEXI)
  67. $(M)pod2man --section=3 --center=" " --release=" " $< > $@
  68. $(DOCS) doc/doxy/html: | doc/
  69. doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
  70. $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
  71. install-man:
  72. ifdef CONFIG_MANPAGES
  73. install-progs-$(CONFIG_DOC): install-man
  74. install-man: $(MANPAGES)
  75. $(Q)mkdir -p "$(MANDIR)/man1"
  76. $(INSTALL) -m 644 $(MANPAGES1) "$(MANDIR)/man1"
  77. $(Q)mkdir -p "$(MANDIR)/man3"
  78. $(INSTALL) -m 644 $(MANPAGES3) "$(MANDIR)/man3"
  79. endif
  80. uninstall: uninstall-man
  81. uninstall-man:
  82. $(RM) $(addprefix "$(MANDIR)/man1/",$(PROGS-yes:%=%.1) $(PROGS-yes:%=%-all.1) $(COMPONENTS-yes:%=%.1))
  83. $(RM) $(addprefix "$(MANDIR)/man3/",$(LIBRARIES-yes:%=%.3))
  84. clean:: docclean
  85. distclean:: docclean
  86. $(RM) doc/config.texi
  87. docclean:
  88. $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
  89. $(RM) -r doc/doxy/html
  90. -include $(wildcard $(DOCS:%=%.d))
  91. .PHONY: apidoc doc documentation