1cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_AVIO_LIST_DIR_EXAMPLE)     += avio_list_dir
2cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_AVIO_READING_EXAMPLE)      += avio_reading
3cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_DECODE_AUDIO_EXAMPLE)      += decode_audio
4cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_DECODE_VIDEO_EXAMPLE)      += decode_video
5cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_DEMUXING_DECODING_EXAMPLE) += demuxing_decoding
6cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_ENCODE_AUDIO_EXAMPLE)      += encode_audio
7cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_ENCODE_VIDEO_EXAMPLE)      += encode_video
8cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_EXTRACT_MVS_EXAMPLE)       += extract_mvs
9cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_FILTER_AUDIO_EXAMPLE)      += filter_audio
10cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_FILTERING_AUDIO_EXAMPLE)   += filtering_audio
11cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_FILTERING_VIDEO_EXAMPLE)   += filtering_video
12cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_HTTP_MULTICLIENT_EXAMPLE)  += http_multiclient
13cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_HW_DECODE_EXAMPLE)         += hw_decode
14cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_METADATA_EXAMPLE)          += metadata
15cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_MUXING_EXAMPLE)            += muxing
16cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_QSVDEC_EXAMPLE)            += qsvdec
17cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_REMUXING_EXAMPLE)          += remuxing
18cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_RESAMPLING_AUDIO_EXAMPLE)  += resampling_audio
19cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_SCALING_VIDEO_EXAMPLE)     += scaling_video
20cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE)     += transcode_aac
21cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_TRANSCODING_EXAMPLE)       += transcoding
22cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_VAAPI_ENCODE_EXAMPLE)      += vaapi_encode
23cabdff1aSopenharmony_ciEXAMPLES-$(CONFIG_VAAPI_TRANSCODE_EXAMPLE)   += vaapi_transcode
24cabdff1aSopenharmony_ci
25cabdff1aSopenharmony_ciEXAMPLES       := $(EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)$(EXESUF))
26cabdff1aSopenharmony_ciEXAMPLES_G     := $(EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
27cabdff1aSopenharmony_ciALL_EXAMPLES   := $(EXAMPLES) $(EXAMPLES-:%=doc/examples/%$(PROGSSUF)$(EXESUF))
28cabdff1aSopenharmony_ciALL_EXAMPLES_G := $(EXAMPLES_G) $(EXAMPLES-:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
29cabdff1aSopenharmony_ciPROGS          += $(EXAMPLES)
30cabdff1aSopenharmony_ci
31cabdff1aSopenharmony_ciEXAMPLE_MAKEFILE := $(SRC_PATH)/doc/examples/Makefile
32cabdff1aSopenharmony_ciEXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/README $(EXAMPLE_MAKEFILE)
33cabdff1aSopenharmony_ci
34cabdff1aSopenharmony_ci$(foreach P,$(EXAMPLES),$(eval OBJS-$(P:%$(PROGSSUF)$(EXESUF)=%) = $(P:%$(PROGSSUF)$(EXESUF)=%).o))
35cabdff1aSopenharmony_ci$(EXAMPLES_G): %$(PROGSSUF)_g$(EXESUF): %.o
36cabdff1aSopenharmony_ci
37cabdff1aSopenharmony_ciexamples: $(EXAMPLES)
38cabdff1aSopenharmony_ci
39cabdff1aSopenharmony_ci$(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.o): | doc/examples
40cabdff1aSopenharmony_ciOUTDIRS += doc/examples
41cabdff1aSopenharmony_ci
42cabdff1aSopenharmony_ciDOXY_INPUT += $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.c)
43cabdff1aSopenharmony_ci
44cabdff1aSopenharmony_ciinstall: install-examples
45cabdff1aSopenharmony_ci
46cabdff1aSopenharmony_ciinstall-examples: $(EXAMPLES_FILES)
47cabdff1aSopenharmony_ci	$(Q)mkdir -p "$(DATADIR)/examples"
48cabdff1aSopenharmony_ci	$(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
49cabdff1aSopenharmony_ci	$(INSTALL) -m 644 $(EXAMPLE_MAKEFILE:%=%.example) "$(DATADIR)/examples/Makefile"
50cabdff1aSopenharmony_ci
51cabdff1aSopenharmony_ciuninstall: uninstall-examples
52cabdff1aSopenharmony_ci
53cabdff1aSopenharmony_ciuninstall-examples:
54cabdff1aSopenharmony_ci	$(RM) -r "$(DATADIR)/examples"
55cabdff1aSopenharmony_ci
56cabdff1aSopenharmony_ciexamplesclean:
57cabdff1aSopenharmony_ci	$(RM) $(ALL_EXAMPLES) $(ALL_EXAMPLES_G)
58cabdff1aSopenharmony_ci	$(RM) $(CLEANSUFFIXES:%=doc/examples/%)
59cabdff1aSopenharmony_ci
60cabdff1aSopenharmony_cidocclean:: examplesclean
61cabdff1aSopenharmony_ci
62cabdff1aSopenharmony_ci-include $(wildcard $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.d))
63cabdff1aSopenharmony_ci
64cabdff1aSopenharmony_ci.PHONY: examples
65