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