avconv: Enable generic hwaccel support for VAAPI
[ffmpeg.git] / avtools / Makefile
1 AVPROGS-$(CONFIG_AVCONV)   += avconv
2 AVPROGS-$(CONFIG_AVPLAY)   += avplay
3 AVPROGS-$(CONFIG_AVPROBE)  += avprobe
4
5 AVPROGS    := $(AVPROGS-yes:%=%$(EXESUF))
6 PROGS      += $(AVPROGS)
7
8 AVBASENAMES = avconv avplay avprobe
9 ALLAVPROGS  = $(AVBASENAMES:%=%$(EXESUF))
10
11 OBJS-avconv                   += avtools/avconv_opt.o avtools/avconv_filter.o \
12                                  avtools/avconv_hw.o
13 OBJS-avconv-$(CONFIG_LIBMFX)  += avtools/avconv_qsv.o
14 OBJS-avconv-$(CONFIG_VDA)     += avtools/avconv_vda.o
15 OBJS-avconv-$(HAVE_DXVA2_LIB) += avtools/avconv_dxva2.o
16 OBJS-avconv-$(HAVE_VDPAU_X11) += avtools/avconv_vdpau.o
17
18 define DOAVTOOL
19 OBJS-$(1) += avtools/cmdutils.o avtools/$(1).o $(OBJS-$(1)-yes)
20 $(1)$(EXESUF): $$(OBJS-$(1))
21 $$(OBJS-$(1)): | avtools
22 $$(OBJS-$(1)): CFLAGS  += $(CFLAGS-$(1))
23 $(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
24 $(1)$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
25 -include $$(OBJS-$(1):.o=.d)
26 endef
27
28 $(foreach P,$(AVPROGS-yes),$(eval $(call DOAVTOOL,$(P))))
29
30 all: $(AVPROGS)
31
32 avtools/cmdutils.o: avversion.h | avtools
33 OBJDIRS += avtools
34
35 ifdef AVPROGS
36 install: install-progs install-data
37 endif
38
39 install-progs-yes:
40 install-progs-$(CONFIG_SHARED): install-libs
41
42 install-progs: install-progs-yes $(AVPROGS)
43         $(Q)mkdir -p "$(BINDIR)"
44         $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
45
46 uninstall: uninstall-progs
47
48 uninstall-progs:
49         $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
50
51 clean::
52         $(RM) $(ALLAVPROGS) $(CLEANSUFFIXES:%=avtools/%)