ffmpeg: remove usage of deprecated getter functions
[ffmpeg.git] / fftools / Makefile
1 AVPROGS-$(CONFIG_FFMPEG)   += ffmpeg
2 AVPROGS-$(CONFIG_FFPLAY)   += ffplay
3 AVPROGS-$(CONFIG_FFPROBE)  += ffprobe
4 AVPROGS-$(CONFIG_FFSERVER) += ffserver
5
6 AVPROGS     := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF))
7 PROGS       += $(AVPROGS)
8
9 AVBASENAMES  = ffmpeg ffplay ffprobe ffserver
10 ALLAVPROGS   = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF))
11 ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
12
13 OBJS-ffmpeg                        += fftools/ffmpeg_opt.o fftools/ffmpeg_filter.o fftools/ffmpeg_hw.o
14 OBJS-ffmpeg-$(CONFIG_CUVID)        += fftools/ffmpeg_cuvid.o
15 OBJS-ffmpeg-$(CONFIG_LIBMFX)       += fftools/ffmpeg_qsv.o
16 ifndef CONFIG_VIDEOTOOLBOX
17 OBJS-ffmpeg-$(CONFIG_VDA)          += fftools/ffmpeg_videotoolbox.o
18 endif
19 OBJS-ffmpeg-$(CONFIG_VIDEOTOOLBOX) += fftools/ffmpeg_videotoolbox.o
20 OBJS-ffserver                      += fftools/ffserver_config.o
21
22 define DOFFTOOL
23 OBJS-$(1) += fftools/cmdutils.o fftools/$(1).o $(OBJS-$(1)-yes)
24 $(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
25 $$(OBJS-$(1)): | fftools
26 $$(OBJS-$(1)): CFLAGS  += $(CFLAGS-$(1))
27 $(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
28 $(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
29 -include $$(OBJS-$(1):.o=.d)
30 endef
31
32 $(foreach P,$(AVPROGS-yes),$(eval OBJS-$(P)-$(CONFIG_OPENCL) += fftools/cmdutils_opencl.o))
33 $(foreach P,$(AVPROGS-yes),$(eval $(call DOFFTOOL,$(P))))
34
35 all: $(AVPROGS)
36
37 fftools/ffprobe.o fftools/cmdutils.o: libavutil/ffversion.h | fftools
38 OBJDIRS += fftools
39
40 ifdef AVPROGS
41 install: install-progs install-data
42 endif
43
44 install-progs-yes:
45 install-progs-$(CONFIG_SHARED): install-libs
46
47 install-progs: install-progs-yes $(AVPROGS)
48         $(Q)mkdir -p "$(BINDIR)"
49         $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
50
51 uninstall: uninstall-progs
52
53 uninstall-progs:
54         $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
55
56 clean::
57         $(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%)