You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.5KB

  1. AVPROGS-$(CONFIG_FFMPEG) += ffmpeg
  2. AVPROGS-$(CONFIG_FFPLAY) += ffplay
  3. AVPROGS-$(CONFIG_FFPROBE) += ffprobe
  4. AVPROGS := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF))
  5. PROGS += $(AVPROGS)
  6. AVBASENAMES = ffmpeg ffplay ffprobe
  7. ALLAVPROGS = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF))
  8. ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
  9. OBJS-ffmpeg += fftools/ffmpeg_opt.o fftools/ffmpeg_filter.o fftools/ffmpeg_hw.o
  10. OBJS-ffmpeg-$(CONFIG_LIBMFX) += fftools/ffmpeg_qsv.o
  11. ifndef CONFIG_VIDEOTOOLBOX
  12. OBJS-ffmpeg-$(CONFIG_VDA) += fftools/ffmpeg_videotoolbox.o
  13. endif
  14. OBJS-ffmpeg-$(CONFIG_VIDEOTOOLBOX) += fftools/ffmpeg_videotoolbox.o
  15. define DOFFTOOL
  16. OBJS-$(1) += fftools/cmdutils.o fftools/$(1).o $(OBJS-$(1)-yes)
  17. $(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
  18. $$(OBJS-$(1)): | fftools
  19. $$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
  20. $(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
  21. $(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
  22. -include $$(OBJS-$(1):.o=.d)
  23. endef
  24. $(foreach P,$(AVPROGS-yes),$(eval $(call DOFFTOOL,$(P))))
  25. all: $(AVPROGS)
  26. fftools/ffprobe.o fftools/cmdutils.o: libavutil/ffversion.h | fftools
  27. OUTDIRS += fftools
  28. ifdef AVPROGS
  29. install: install-progs install-data
  30. endif
  31. install-progs-yes:
  32. install-progs-$(CONFIG_SHARED): install-libs
  33. install-progs: install-progs-yes $(AVPROGS)
  34. $(Q)mkdir -p "$(BINDIR)"
  35. $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
  36. uninstall: uninstall-progs
  37. uninstall-progs:
  38. $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
  39. clean::
  40. $(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%)