Makefile 1.7 KB

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