]> git.sesse.net Git - ffmpeg/blob - doc/examples/Makefile
Merge commit '1146bb3babca3973e88005d267cd06210d6ac075'
[ffmpeg] / doc / examples / Makefile
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
22
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))
27 PROGS          += $(EXAMPLES)
28
29 EXAMPLE_MAKEFILE := $(SRC_PATH)/doc/examples/Makefile
30 EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/README $(EXAMPLE_MAKEFILE)
31
32 $(foreach P,$(EXAMPLES),$(eval OBJS-$(P:%$(PROGSSUF)$(EXESUF)=%) = $(P:%$(PROGSSUF)$(EXESUF)=%).o))
33 $(EXAMPLES_G): %$(PROGSSUF)_g$(EXESUF): %.o
34
35 examples: $(EXAMPLES)
36
37 $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.o): | doc/examples
38 OBJDIRS += doc/examples
39
40 DOXY_INPUT += $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.c)
41
42 install: install-examples
43
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"
48
49 uninstall: uninstall-examples
50
51 uninstall-examples:
52         $(RM) -r "$(DATADIR)/examples"
53
54 examplesclean:
55         $(RM) $(ALL_EXAMPLES) $(ALL_EXAMPLES_G)
56         $(RM) $(CLEANSUFFIXES:%=doc/examples/%)
57
58 docclean:: examplesclean
59
60 -include $(wildcard $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.d))
61
62 .PHONY: examples