1 EXAMPLES-$(CONFIG_AVIO_DIR_CMD_EXAMPLE) += avio_dir_cmd
2 EXAMPLES-$(CONFIG_AVIO_READING_EXAMPLE) += avio_reading
3 EXAMPLES-$(CONFIG_DECODE_AUDIO_EXAMPLE) += decode_audio
4 EXAMPLES-$(CONFIG_DECODE_VIDEO_EXAMPLE) += decode_video
5 EXAMPLES-$(CONFIG_DEMUXING_DECODING_EXAMPLE) += demuxing_decoding
6 EXAMPLES-$(CONFIG_ENCODE_AUDIO_EXAMPLE) += encode_audio
7 EXAMPLES-$(CONFIG_ENCODE_VIDEO_EXAMPLE) += encode_video
8 EXAMPLES-$(CONFIG_EXTRACT_MVS_EXAMPLE) += extract_mvs
9 EXAMPLES-$(CONFIG_FILTER_AUDIO_EXAMPLE) += filter_audio
10 EXAMPLES-$(CONFIG_FILTERING_AUDIO_EXAMPLE) += filtering_audio
11 EXAMPLES-$(CONFIG_FILTERING_VIDEO_EXAMPLE) += filtering_video
12 EXAMPLES-$(CONFIG_HTTP_MULTICLIENT_EXAMPLE) += http_multiclient
13 EXAMPLES-$(CONFIG_HW_DECODE_EXAMPLE) += hw_decode
14 EXAMPLES-$(CONFIG_METADATA_EXAMPLE) += metadata
15 EXAMPLES-$(CONFIG_MUXING_EXAMPLE) += muxing
16 EXAMPLES-$(CONFIG_QSVDEC_EXAMPLE) += qsvdec
17 EXAMPLES-$(CONFIG_REMUXING_EXAMPLE) += remuxing
18 EXAMPLES-$(CONFIG_RESAMPLING_AUDIO_EXAMPLE) += resampling_audio
19 EXAMPLES-$(CONFIG_SCALING_VIDEO_EXAMPLE) += scaling_video
20 EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE) += transcode_aac
21 EXAMPLES-$(CONFIG_TRANSCODING_EXAMPLE) += transcoding
23 EXAMPLES := $(EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)$(EXESUF))
24 EXAMPLES_G := $(EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
25 ALL_EXAMPLES := $(EXAMPLES) $(EXAMPLES-:%=doc/examples/%$(PROGSSUF)$(EXESUF))
26 ALL_EXAMPLES_G := $(EXAMPLES_G) $(EXAMPLES-:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
29 EXAMPLE_MAKEFILE := $(SRC_PATH)/doc/examples/Makefile
30 EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/README $(EXAMPLE_MAKEFILE)
32 $(foreach P,$(EXAMPLES),$(eval OBJS-$(P:%$(PROGSSUF)$(EXESUF)=%) = $(P:%$(PROGSSUF)$(EXESUF)=%).o))
33 $(EXAMPLES_G): %$(PROGSSUF)_g$(EXESUF): %.o
37 $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.o): | doc/examples
38 OBJDIRS += doc/examples
40 DOXY_INPUT += $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.c)
42 install: install-examples
44 install-examples: $(EXAMPLES_FILES)
45 $(Q)mkdir -p "$(DATADIR)/examples"
46 $(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
47 $(INSTALL) -m 644 $(EXAMPLE_MAKEFILE:%=%.example) "$(DATADIR)/examples/Makefile"
49 uninstall: uninstall-examples
52 $(RM) -r "$(DATADIR)/examples"
55 $(RM) $(ALL_EXAMPLES) $(ALL_EXAMPLES_G)
56 $(RM) $(CLEANSUFFIXES:%=doc/examples/%)
58 docclean:: examplesclean
60 -include $(wildcard $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.d))