Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 += \
  10. fftools/ffmpeg_filter.o \
  11. fftools/ffmpeg_hw.o \
  12. fftools/ffmpeg_mux.o \
  13. fftools/ffmpeg_opt.o \
  14. define DOFFTOOL
  15. OBJS-$(1) += fftools/cmdutils.o fftools/opt_common.o fftools/$(1).o $(OBJS-$(1)-yes)
  16. $(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
  17. $$(OBJS-$(1)): | fftools
  18. $$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
  19. $(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
  20. $(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
  21. -include $$(OBJS-$(1):.o=.d)
  22. endef
  23. $(foreach P,$(AVPROGS-yes),$(eval $(call DOFFTOOL,$(P))))
  24. all: $(AVPROGS)
  25. fftools/ffprobe.o fftools/cmdutils.o: libavutil/ffversion.h | fftools
  26. OUTDIRS += fftools
  27. ifdef AVPROGS
  28. install: install-progs install-data
  29. endif
  30. install-progs-yes:
  31. install-progs-$(CONFIG_SHARED): install-libs
  32. install-progs: install-progs-yes $(AVPROGS)
  33. $(Q)mkdir -p "$(BINDIR)"
  34. $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
  35. uninstall: uninstall-progs
  36. uninstall-progs:
  37. $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
  38. clean::
  39. $(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%)