Makefile 1.8 KB

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