build: Integrate multilibrary examples into the build system
This includes moving libavformat/output-example to doc/examples/output.
This commit is contained in:
parent
14abeaa43d
commit
ab81f24ad4
3
Makefile
3
Makefile
@ -130,6 +130,8 @@ endef
|
|||||||
|
|
||||||
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
||||||
|
|
||||||
|
include $(SRC_PATH)/doc/Makefile
|
||||||
|
|
||||||
define DOPROG
|
define DOPROG
|
||||||
OBJS-$(1) += $(1).o $(EXEOBJS) $(OBJS-$(1)-yes)
|
OBJS-$(1) += $(1).o $(EXEOBJS) $(OBJS-$(1)-yes)
|
||||||
$(1)$(EXESUF): $$(OBJS-$(1))
|
$(1)$(EXESUF): $$(OBJS-$(1))
|
||||||
@ -203,7 +205,6 @@ config:
|
|||||||
|
|
||||||
check: all alltools checkheaders examples testprogs fate
|
check: all alltools checkheaders examples testprogs fate
|
||||||
|
|
||||||
include $(SRC_PATH)/doc/Makefile
|
|
||||||
include $(SRC_PATH)/tests/Makefile
|
include $(SRC_PATH)/tests/Makefile
|
||||||
|
|
||||||
$(sort $(OBJDIRS)):
|
$(sort $(OBJDIRS)):
|
||||||
|
10
configure
vendored
10
configure
vendored
@ -1041,6 +1041,10 @@ COMPONENT_LIST="
|
|||||||
protocols
|
protocols
|
||||||
"
|
"
|
||||||
|
|
||||||
|
EXAMPLE_LIST="
|
||||||
|
output_example
|
||||||
|
"
|
||||||
|
|
||||||
EXTERNAL_LIBRARY_LIST="
|
EXTERNAL_LIBRARY_LIST="
|
||||||
avisynth
|
avisynth
|
||||||
bzlib
|
bzlib
|
||||||
@ -1102,6 +1106,7 @@ PROGRAM_LIST="
|
|||||||
|
|
||||||
CONFIG_LIST="
|
CONFIG_LIST="
|
||||||
$COMPONENT_LIST
|
$COMPONENT_LIST
|
||||||
|
$EXAMPLE_LIST
|
||||||
$EXTERNAL_LIBRARY_LIST
|
$EXTERNAL_LIBRARY_LIST
|
||||||
$HWACCEL_LIST
|
$HWACCEL_LIST
|
||||||
$LIBRARY_LIST
|
$LIBRARY_LIST
|
||||||
@ -1944,6 +1949,9 @@ ocv_filter_deps="libopencv"
|
|||||||
scale_filter_deps="swscale"
|
scale_filter_deps="swscale"
|
||||||
yadif_filter_deps="gpl"
|
yadif_filter_deps="gpl"
|
||||||
|
|
||||||
|
# examples
|
||||||
|
output_example_deps="avcodec avformat avutil swscale"
|
||||||
|
|
||||||
# libraries
|
# libraries
|
||||||
avcodec_deps="avutil"
|
avcodec_deps="avutil"
|
||||||
avdevice_deps="avutil avcodec avformat"
|
avdevice_deps="avutil avcodec avformat"
|
||||||
@ -2002,7 +2010,7 @@ target_os_default=$(tolower $(uname -s))
|
|||||||
host_os=$target_os_default
|
host_os=$target_os_default
|
||||||
|
|
||||||
# configurable options
|
# configurable options
|
||||||
enable $LIBRARY_LIST $PROGRAM_LIST
|
enable $EXAMPLE_LIST $LIBRARY_LIST $PROGRAM_LIST
|
||||||
|
|
||||||
enable asm
|
enable asm
|
||||||
enable debug
|
enable debug
|
||||||
|
15
doc/Makefile
15
doc/Makefile
@ -15,11 +15,20 @@ DOCS-$(CONFIG_PERL) += $(MANPAGES) $(PODPAGES)
|
|||||||
DOCS-$(CONFIG_TEXI2HTML) += $(HTMLPAGES)
|
DOCS-$(CONFIG_TEXI2HTML) += $(HTMLPAGES)
|
||||||
DOCS = $(DOCS-yes)
|
DOCS = $(DOCS-yes)
|
||||||
|
|
||||||
|
DOC_EXAMPLES-$(CONFIG_OUTPUT_EXAMPLE) += output
|
||||||
|
ALL_DOC_EXAMPLES = output
|
||||||
|
|
||||||
|
DOC_EXAMPLES := $(DOC_EXAMPLES-yes:%=doc/examples/%$(EXESUF))
|
||||||
|
ALL_DOC_EXAMPLES := $(ALL_DOC_EXAMPLES:%=doc/examples/%$(EXESUF))
|
||||||
|
PROGS += $(DOC_EXAMPLES)
|
||||||
|
|
||||||
all: $(DOCS)
|
all: $(DOCS)
|
||||||
|
|
||||||
apidoc: doc/doxy/html
|
apidoc: doc/doxy/html
|
||||||
documentation: $(DOCS)
|
documentation: $(DOCS)
|
||||||
|
|
||||||
|
examples: $(DOC_EXAMPLES)
|
||||||
|
|
||||||
TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
|
TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
|
||||||
|
|
||||||
GENTEXI = format codec
|
GENTEXI = format codec
|
||||||
@ -44,6 +53,8 @@ doc/%.1: doc/%.pod $(GENTEXI)
|
|||||||
$(M)pod2man --section=1 --center=" " --release=" " $< > $@
|
$(M)pod2man --section=1 --center=" " --release=" " $< > $@
|
||||||
|
|
||||||
$(DOCS) doc/doxy/html: | doc/
|
$(DOCS) doc/doxy/html: | doc/
|
||||||
|
$(DOC_EXAMPLES:%=%.o): | doc/examples
|
||||||
|
OBJDIRS += doc/examples
|
||||||
|
|
||||||
doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
|
doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
|
||||||
$(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
|
$(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
|
||||||
@ -68,7 +79,9 @@ uninstall-man:
|
|||||||
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
$(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
|
$(RM) $(ALL_DOC_EXAMPLES)
|
||||||
|
$(RM) $(CLEANSUFFIXES:%=doc/%) $(CLEANSUFFIXES:%=doc/examples/%)
|
||||||
|
$(RM) doc/*.html doc/*.pod doc/*.1 doc/avoptions_*.texi
|
||||||
$(RM) -r doc/doxy/html
|
$(RM) -r doc/doxy/html
|
||||||
|
|
||||||
-include $(wildcard $(DOCS:%=%.d))
|
-include $(wildcard $(DOCS:%=%.d))
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* @file
|
* @file
|
||||||
* libavformat API example.
|
* libavformat API example.
|
||||||
*
|
*
|
||||||
* @example libavformat/output-example.c
|
* @example doc/examples/output.c
|
||||||
* Output a media file in any supported libavformat format.
|
* Output a media file in any supported libavformat format.
|
||||||
* The default codecs are used.
|
* The default codecs are used.
|
||||||
*/
|
*/
|
@ -392,7 +392,6 @@ SKIPHEADERS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpdh.h
|
|||||||
SKIPHEADERS-$(CONFIG_NETWORK) += network.h rtsp.h
|
SKIPHEADERS-$(CONFIG_NETWORK) += network.h rtsp.h
|
||||||
|
|
||||||
EXAMPLES = metadata \
|
EXAMPLES = metadata \
|
||||||
output \
|
|
||||||
|
|
||||||
TESTPROGS = seek \
|
TESTPROGS = seek \
|
||||||
srtp \
|
srtp \
|
||||||
@ -404,6 +403,3 @@ TOOLS = aviocat \
|
|||||||
ismindex \
|
ismindex \
|
||||||
pktdumper \
|
pktdumper \
|
||||||
probetest \
|
probetest \
|
||||||
|
|
||||||
$(SUBDIR)output-example$(EXESUF): ELIBS = $(patsubst %,$(LD_LIB),swscale avutil)
|
|
||||||
$(SUBDIR)output-example$(EXESUF): $(call PATH_LIBNAME,swscale)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user