[FFmpeg-cvslog] Merge commit '3e105d08848162b90d886bde59c010d4b0362a4b'
James Almer
git at videolan.org
Thu Apr 13 23:18:56 EEST 2017
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Apr 13 17:09:52 2017 -0300| [5dba808064e7879c04d3e2fb4f10e709bedf51c2] | committer: James Almer
Merge commit '3e105d08848162b90d886bde59c010d4b0362a4b'
* commit '3e105d08848162b90d886bde59c010d4b0362a4b':
build: Move entries related to building TOOLS to a subdirectory Makefile
Merged-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5dba808064e7879c04d3e2fb4f10e709bedf51c2
---
Makefile | 12 +-----------
tools/Makefile | 13 +++++++++++++
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 99fc9207ec..3d930d450c 100644
--- a/Makefile
+++ b/Makefile
@@ -43,8 +43,6 @@ OBJS-ffserver += ffserver_config.o
TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 audiomatch
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
-TOOLS = qt-faststart trasher uncoded_frame
-TOOLS-$(CONFIG_ZLIB) += cws2fws
# $(FFLIBS-yes) needs to be in linking order
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
@@ -64,6 +62,7 @@ EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examp
SKIPHEADERS = cmdutils_common_opts.h \
compat/w32pthreads.h
+include $(SRC_PATH)/tools/Makefile
include $(SRC_PATH)/common.mak
FF_EXTRALIBS := $(FFEXTRALIBS)
@@ -75,10 +74,6 @@ all: $(AVPROGS)
$(TOOLS): %$(EXESUF): %.o
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS)
-tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
-tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
-tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)
-
CONFIGURABLE_COMPONENTS = \
$(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c)) \
$(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/version.h)) \
@@ -136,10 +131,6 @@ $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
%$(PROGSSUF)_g$(EXESUF): %.o $(FF_DEP_LIBS)
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
-OBJDIRS += tools
-
--include $(wildcard tools/*.d)
-
VERSION_SH = $(SRC_PATH)/version.sh
GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
@@ -184,7 +175,6 @@ uninstall-data:
clean::
$(RM) $(ALLAVPROGS) $(ALLAVPROGS_G)
$(RM) $(CLEANSUFFIXES)
- $(RM) $(CLEANSUFFIXES:%=tools/%)
$(RM) $(CLEANSUFFIXES:%=compat/msvcrt/%)
$(RM) $(CLEANSUFFIXES:%=compat/atomics/pthread/%)
$(RM) $(CLEANSUFFIXES:%=compat/%)
diff --git a/tools/Makefile b/tools/Makefile
new file mode 100644
index 0000000000..f8e1434f29
--- /dev/null
+++ b/tools/Makefile
@@ -0,0 +1,13 @@
+TOOLS = qt-faststart trasher uncoded_frame
+TOOLS-$(CONFIG_ZLIB) += cws2fws
+
+tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
+tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
+tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)
+
+OBJDIRS += tools
+
+clean::
+ $(RM) $(CLEANSUFFIXES:%=tools/%)
+
+-include $(wildcard tools/*.d)
======================================================================
diff --cc Makefile
index 99fc9207ec,b090007f1e..3d930d450c
--- a/Makefile
+++ b/Makefile
@@@ -2,49 -1,95 +2,47 @@@ MAIN_MAKEFILE=
include config.mak
vpath %.c $(SRC_PATH)
-vpath %.m $(SRC_PATH)
+vpath %.cpp $(SRC_PATH)
vpath %.h $(SRC_PATH)
+vpath %.inc $(SRC_PATH)
+vpath %.m $(SRC_PATH)
vpath %.S $(SRC_PATH)
vpath %.asm $(SRC_PATH)
+vpath %.rc $(SRC_PATH)
vpath %.v $(SRC_PATH)
vpath %.texi $(SRC_PATH)
+vpath %/fate_config.sh.template $(SRC_PATH)
-ifndef V
-Q = @
-ECHO = printf "$(1)\t%s\n" $(2)
-BRIEF = CC HOSTCC HOSTLD AS YASM AR LD
-SILENT = DEPCC DEPHOSTCC DEPAS DEPYASM RANLIB RM STRIP
-MSG = $@
-M = @$(call ECHO,$(TAG),$@);
-$(foreach VAR,$(BRIEF), \
- $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
-$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
-$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_PATH)/%=%)); $(INSTALL))
-endif
-
-ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil swscale
-
-IFLAGS := -I. -I$(SRC_PATH)
-CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
-CFLAGS += $(ECFLAGS)
-CCFLAGS = $(CPPFLAGS) $(CFLAGS)
-OBJCFLAGS += $(EOBJCFLAGS)
-OBJCCFLAGS = $(CPPFLAGS) $(CFLAGS) $(OBJCFLAGS)
-ASFLAGS := $(CPPFLAGS) $(ASFLAGS)
-YASMFLAGS += $(IFLAGS:%=%/) -Pconfig.asm
-HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS)
-LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS)
-
-define COMPILE
- $(call $(1)DEP,$(1))
- $($(1)) $($(1)FLAGS) $($(1)_DEPFLAGS) $($(1)_C) $($(1)_O) $<
-endef
-
-COMPILE_C = $(call COMPILE,CC)
-COMPILE_S = $(call COMPILE,AS)
-COMPILE_M = $(call COMPILE,OBJCC)
-COMPILE_HOSTC = $(call COMPILE,HOSTCC)
-
-%.o: %.c
- $(COMPILE_C)
-
-%.o: %.S
- $(COMPILE_S)
-
-%.o: %.m
- $(COMPILE_M)
-
-%_host.o: %.c
- $(COMPILE_HOSTC)
-
-%.o: %.asm
- $(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
- $(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $<
- -$(STRIP) $(STRIPFLAGS) $@
+AVPROGS-$(CONFIG_FFMPEG) += ffmpeg
+AVPROGS-$(CONFIG_FFPLAY) += ffplay
+AVPROGS-$(CONFIG_FFPROBE) += ffprobe
+AVPROGS-$(CONFIG_FFSERVER) += ffserver
-%.i: %.c
- $(CC) $(CCFLAGS) $(CC_E) $<
-
-%.h.c:
- $(Q)echo '#include "$*.h"' >$@
-
-%.c %.h %.ver: TAG = GEN
-
-AVPROGS-$(CONFIG_AVCONV) += avconv
-AVPROGS-$(CONFIG_AVPLAY) += avplay
-AVPROGS-$(CONFIG_AVPROBE) += avprobe
-
-AVPROGS := $(AVPROGS-yes:%=%$(EXESUF))
+AVPROGS := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF))
+INSTPROGS = $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF))
PROGS += $(AVPROGS)
-AVBASENAMES = avconv avplay avprobe
-ALLAVPROGS = $(AVBASENAMES:%=%$(EXESUF))
+AVBASENAMES = ffmpeg ffplay ffprobe ffserver
+ALLAVPROGS = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF))
+ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
$(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog) += cmdutils.o))
+$(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog)-$(CONFIG_OPENCL) += cmdutils_opencl.o))
+
+OBJS-ffmpeg += ffmpeg_opt.o ffmpeg_filter.o
+OBJS-ffmpeg-$(CONFIG_VIDEOTOOLBOX) += ffmpeg_videotoolbox.o
+OBJS-ffmpeg-$(CONFIG_LIBMFX) += ffmpeg_qsv.o
+OBJS-ffmpeg-$(CONFIG_VAAPI) += ffmpeg_vaapi.o
+ifndef CONFIG_VIDEOTOOLBOX
+OBJS-ffmpeg-$(CONFIG_VDA) += ffmpeg_videotoolbox.o
+endif
+OBJS-ffmpeg-$(CONFIG_CUVID) += ffmpeg_cuvid.o
+OBJS-ffmpeg-$(HAVE_DXVA2_LIB) += ffmpeg_dxva2.o
+OBJS-ffmpeg-$(HAVE_VDPAU_X11) += ffmpeg_vdpau.o
+OBJS-ffserver += ffserver_config.o
-OBJS-avconv += avconv_opt.o avconv_filter.o
-OBJS-avconv-$(CONFIG_LIBMFX) += avconv_qsv.o
-OBJS-avconv-$(CONFIG_VAAPI) += avconv_vaapi.o
-OBJS-avconv-$(CONFIG_VDA) += avconv_vda.o
-OBJS-avconv-$(HAVE_DXVA2_LIB) += avconv_dxva2.o
-OBJS-avconv-$(HAVE_VDPAU_X11) += avconv_vdpau.o
-
-TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
+TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 audiomatch
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
- TOOLS = qt-faststart trasher uncoded_frame
- TOOLS-$(CONFIG_ZLIB) += cws2fws
# $(FFLIBS-yes) needs to be in linking order
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
@@@ -73,12 -116,10 +72,8 @@@ FF_STATIC_DEP_LIBS := $(STATIC_DEP_LIBS
all: $(AVPROGS)
$(TOOLS): %$(EXESUF): %.o
- $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(EXTRALIBS) $(ELIBS)
-
-tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
+ $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS)
- tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
- tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
- tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)
-
CONFIGURABLE_COMPONENTS = \
$(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c)) \
$(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/version.h)) \
@@@ -125,21 -165,11 +120,17 @@@ $(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIB
-include $$(OBJS-$(1):.o=.d)
endef
-$(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(EXESUF)=))))
+$(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(PROGSSUF)$(EXESUF)=))))
+
+ffprobe.o cmdutils.o libavcodec/utils.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h
-$(PROGS): %$(EXESUF): %.o $(FF_DEP_LIBS)
+$(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
+ $(CP) $< $@
+ $(STRIP) $@
+
+%$(PROGSSUF)_g$(EXESUF): %.o $(FF_DEP_LIBS)
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
- OBJDIRS += tools
-
- -include $(wildcard tools/*.d)
-
VERSION_SH = $(SRC_PATH)/version.sh
GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
@@@ -182,14 -212,9 +173,13 @@@ uninstall-data
$(RM) -r "$(DATADIR)"
clean::
- $(RM) $(ALLAVPROGS)
+ $(RM) $(ALLAVPROGS) $(ALLAVPROGS_G)
$(RM) $(CLEANSUFFIXES)
- $(RM) $(CLEANSUFFIXES:%=tools/%)
- $(RM) -rf coverage.info lcov
+ $(RM) $(CLEANSUFFIXES:%=compat/msvcrt/%)
+ $(RM) $(CLEANSUFFIXES:%=compat/atomics/pthread/%)
+ $(RM) $(CLEANSUFFIXES:%=compat/%)
+ $(RM) -r coverage-html
+ $(RM) -rf coverage.info coverage.info.in lcov
distclean::
$(RM) $(DISTCLEANSUFFIXES)
diff --cc tools/Makefile
index 0000000000,372287b452..f8e1434f29
mode 000000,100644..100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@@ -1,0 -1,11 +1,13 @@@
-TOOLS = qt-faststart trasher
++TOOLS = qt-faststart trasher uncoded_frame
+ TOOLS-$(CONFIG_ZLIB) += cws2fws
+
+ tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
++tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
++tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)
+
+ OBJDIRS += tools
+
+ clean::
+ $(RM) $(CLEANSUFFIXES:%=tools/%)
+
+ -include $(wildcard tools/*.d)
More information about the ffmpeg-cvslog
mailing list