qsv: align surface width/height to 16.
[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
16 define DOAVTOOL
17 OBJS-$(1) += avtools/cmdutils.o avtools/$(1).o $(OBJS-$(1)-yes)
18 $(1)$(EXESUF): $$(OBJS-$(1))
19 $$(OBJS-$(1)): | avtools
20 $$(OBJS-$(1)): CFLAGS  += $(CFLAGS-$(1))
21 $(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
22 $(1)$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
23 -include $$(OBJS-$(1):.o=.d)
24 endef
25
26 $(foreach P,$(AVPROGS-yes),$(eval $(call DOAVTOOL,$(P))))
27
28 all: $(AVPROGS)
29
30 avtools/cmdutils.o: avversion.h | avtools
31 OBJDIRS += avtools
32
33 ifdef AVPROGS
34 install: install-progs install-data
35 endif
36
37 install-progs-yes:
38 install-progs-$(CONFIG_SHARED): install-libs
39
40 install-progs: install-progs-yes $(AVPROGS)
41         $(Q)mkdir -p "$(BINDIR)"
42         $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
43
44 uninstall: uninstall-progs
45
46 uninstall-progs:
47         $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
48
49 clean::
50         $(RM) $(ALLAVPROGS) $(CLEANSUFFIXES:%=avtools/%)