build: Split logic for building examples off into a separate Makefile
[libav.git] / doc / examples / Makefile
CommitLineData
acb0dea2
DB
1DOC_EXAMPLES-$(CONFIG_DECODE_AUDIO_EXAMPLE) += decode_audio
2DOC_EXAMPLES-$(CONFIG_DECODE_VIDEO_EXAMPLE) += decode_video
3DOC_EXAMPLES-$(CONFIG_ENCODE_AUDIO_EXAMPLE) += encode_audio
4DOC_EXAMPLES-$(CONFIG_ENCODE_VIDEO_EXAMPLE) += encode_video
5DOC_EXAMPLES-$(CONFIG_FILTER_AUDIO_EXAMPLE) += filter_audio
6DOC_EXAMPLES-$(CONFIG_METADATA_EXAMPLE) += metadata
7DOC_EXAMPLES-$(CONFIG_OUTPUT_EXAMPLE) += output
8DOC_EXAMPLES-$(CONFIG_QSVDEC_EXAMPLE) += qsvdec
9DOC_EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE) += transcode_aac
10
11DOC_EXAMPLES := $(DOC_EXAMPLES-yes:%=doc/examples/%$(EXESUF))
12ALL_DOC_EXAMPLES := $(DOC_EXAMPLES) $(DOC_EXAMPLES-:%=doc/examples/%$(EXESUF))
13PROGS += $(DOC_EXAMPLES)
14
15examples: $(DOC_EXAMPLES)
16
17$(DOC_EXAMPLES:%$(EXESUF)=%.o): | doc/examples
18OBJDIRS += doc/examples
19
20DOXY_INPUT += $(addprefix $(SRC_PATH)/, $(DOC_EXAMPLES:%$(EXESUF)=%.c))
21
22clean::
23 $(RM) $(ALL_DOC_EXAMPLES)
24 $(RM) $(CLEANSUFFIXES:%=doc/examples/%)
25
26.PHONY: examples