Makefile 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. EXAMPLES-$(CONFIG_VAAPI_ENCODE_EXAMPLE) += vaapi_encode
  23. EXAMPLES-$(CONFIG_VAAPI_TRANSCODE_EXAMPLE) += vaapi_transcode
  24. EXAMPLES := $(EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)$(EXESUF))
  25. EXAMPLES_G := $(EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
  26. ALL_EXAMPLES := $(EXAMPLES) $(EXAMPLES-:%=doc/examples/%$(PROGSSUF)$(EXESUF))
  27. ALL_EXAMPLES_G := $(EXAMPLES_G) $(EXAMPLES-:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
  28. PROGS += $(EXAMPLES)
  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. $(foreach P,$(EXAMPLES),$(eval OBJS-$(P:%$(PROGSSUF)$(EXESUF)=%) = $(P:%$(PROGSSUF)$(EXESUF)=%).o))
  32. $(EXAMPLES_G): %$(PROGSSUF)_g$(EXESUF): %.o
  33. examples: $(EXAMPLES)
  34. $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.o): | doc/examples
  35. OBJDIRS += doc/examples
  36. DOXY_INPUT += $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.c)
  37. install: install-examples
  38. install-examples: $(EXAMPLES_FILES)
  39. $(Q)mkdir -p "$(DATADIR)/examples"
  40. $(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
  41. $(INSTALL) -m 644 $(EXAMPLE_MAKEFILE:%=%.example) "$(DATADIR)/examples/Makefile"
  42. uninstall: uninstall-examples
  43. uninstall-examples:
  44. $(RM) -r "$(DATADIR)/examples"
  45. examplesclean:
  46. $(RM) $(ALL_EXAMPLES) $(ALL_EXAMPLES_G)
  47. $(RM) $(CLEANSUFFIXES:%=doc/examples/%)
  48. docclean:: examplesclean
  49. -include $(wildcard $(EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.d))
  50. .PHONY: examples