[FFmpeg-cvslog] Merge commit '93d5b022a9fd3a1a1f9c521a1eac7f0410e05b81'
James Almer
git at videolan.org
Thu Mar 23 23:00:04 EET 2017
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Mar 23 17:48:28 2017 -0300| [3ddae9eee9a8bc4c667a66a9b1db36b84edca436] | committer: James Almer
Merge commit '93d5b022a9fd3a1a1f9c521a1eac7f0410e05b81'
* commit '93d5b022a9fd3a1a1f9c521a1eac7f0410e05b81':
build: Drop duplicate asm recipe
Merged-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ddae9eee9a8bc4c667a66a9b1db36b84edca436
---
common.mak | 9 +++++++++
library.mak | 9 ---------
tests/checkasm/x86/Makefile | 5 -----
3 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/common.mak b/common.mak
index 7815c3f..3c645ad 100644
--- a/common.mak
+++ b/common.mak
@@ -74,6 +74,15 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC)
%_host.o: %.c
$(COMPILE_HOSTC)
+%$(DEFAULT_YASMD).asm: %.asm
+ $(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.asm=.d)
+ $(YASM) $(YASMFLAGS) -I $(<D)/ -e $< | sed '/^%/d;/^$$/d;' > $@
+
+%.o: %.asm
+ $(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
+ $(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<)
+ -$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)
+
%.o: %.rc
$(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)" -o $@ $<
diff --git a/library.mak b/library.mak
index d8c2b63..837b360 100644
--- a/library.mak
+++ b/library.mak
@@ -10,15 +10,6 @@ INSTHEADERS := $(INSTHEADERS) $(HEADERS:%=$(SUBDIR)%)
all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME)
-$(SUBDIR)x86/%$(DEFAULT_YASMD).asm: $(SUBDIR)x86/%.asm
- $(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.asm=.d)
- $(YASM) $(YASMFLAGS) -I $(<D)/ -e $< | sed '/^%/d;/^$$/d;' > $@
-
-$(SUBDIR)x86/%.o: $(SUBDIR)x86/%$(YASMD).asm
- $(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
- $(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<)
- -$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)
-
LIBOBJS := $(OBJS) $(SUBDIR)%.h.o $(TESTOBJS)
$(LIBOBJS) $(LIBOBJS:.o=.s) $(LIBOBJS:.o=.i): CPPFLAGS += -DHAVE_AV_CONFIG_H
$(TESTOBJS) $(TESTOBJS:.o=.i): CFLAGS += -Umain
diff --git a/tests/checkasm/x86/Makefile b/tests/checkasm/x86/Makefile
index befe088..e1bef76 100644
--- a/tests/checkasm/x86/Makefile
+++ b/tests/checkasm/x86/Makefile
@@ -1,6 +1 @@
CHECKASMOBJS-$(HAVE_YASM) += x86/checkasm.o
-
-tests/checkasm/x86/%.o: tests/checkasm/x86/%.asm
- $(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
- $(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $<
- -$(STRIP) $(ASMSTRIPFLAGS) $@
======================================================================
diff --cc common.mak
index 7815c3f,8f6a61f..3c645ad
--- a/common.mak
+++ b/common.mak
@@@ -5,98 -5,6 +5,107 @@@
# first so "all" becomes default target
all: all-yes
+DEFAULT_YASMD=.dbg
+
+ifeq ($(DBG),1)
+YASMD=$(DEFAULT_YASMD)
+else
+YASMD=
+endif
+
+ifndef SUBDIR
+
+ifndef V
+Q = @
+ECHO = printf "$(1)\t%s\n" $(2)
+BRIEF = CC CXX OBJCC HOSTCC HOSTLD AS YASM AR LD STRIP CP WINDRES
+SILENT = DEPCC DEPHOSTCC DEPAS DEPYASM RANLIB RM
+
+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_DIR)/%=%)); $(INSTALL))
+endif
+
+ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil postproc swscale swresample
+
+# NASM requires -I path terminated with /
+IFLAGS := -I. -I$(SRC_LINK)/
+CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
+CFLAGS += $(ECFLAGS)
+CCFLAGS = $(CPPFLAGS) $(CFLAGS)
+OBJCFLAGS += $(EOBJCFLAGS)
+OBJCCFLAGS = $(CPPFLAGS) $(CFLAGS) $(OBJCFLAGS)
+ASFLAGS := $(CPPFLAGS) $(ASFLAGS)
+CXXFLAGS := $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS)
+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) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<)
+endef
+
+COMPILE_C = $(call COMPILE,CC)
+COMPILE_CXX = $(call COMPILE,CXX)
+COMPILE_S = $(call COMPILE,AS)
+COMPILE_M = $(call COMPILE,OBJCC)
+COMPILE_HOSTC = $(call COMPILE,HOSTCC)
+
+%.o: %.c
+ $(COMPILE_C)
+
+%.o: %.cpp
+ $(COMPILE_CXX)
+
+%.o: %.m
+ $(COMPILE_M)
+
+%.s: %.c
+ $(CC) $(CCFLAGS) -S -o $@ $<
+
+%.o: %.S
+ $(COMPILE_S)
+
+%_host.o: %.c
+ $(COMPILE_HOSTC)
+
++%$(DEFAULT_YASMD).asm: %.asm
++ $(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.asm=.d)
++ $(YASM) $(YASMFLAGS) -I $(<D)/ -e $< | sed '/^%/d;/^$$/d;' > $@
++
++%.o: %.asm
++ $(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
++ $(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<)
++ -$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)
++
+%.o: %.rc
+ $(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)" -o $@ $<
+
+%.i: %.c
+ $(CC) $(CCFLAGS) $(CC_E) $<
+
+%.h.c:
+ $(Q)echo '#include "$*.h"' >$@
+
+%.c %.h %.ver: TAG = GEN
+
+# Dummy rule to stop make trying to rebuild removed or renamed headers
+%.h:
+ @:
+
+# Disable suffix rules. Most of the builtin rules are suffix rules,
+# so this saves some time on slow systems.
+.SUFFIXES:
+
+# Do not delete intermediate files from chains of implicit rules
+$(OBJS):
+endif
+
include $(SRC_PATH)/arch.mak
OBJS += $(OBJS-yes)
diff --cc library.mak
index d8c2b63,b456d80..837b360
--- a/library.mak
+++ b/library.mak
@@@ -10,18 -10,8 +10,9 @@@ INSTHEADERS := $(INSTHEADERS) $(HEADERS
all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME)
- $(SUBDIR)x86/%$(DEFAULT_YASMD).asm: $(SUBDIR)x86/%.asm
- $(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.asm=.d)
- $(YASM) $(YASMFLAGS) -I $(<D)/ -e $< | sed '/^%/d;/^$$/d;' > $@
-
- $(SUBDIR)x86/%.o: $(SUBDIR)x86/%$(YASMD).asm
- $(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
- $(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<)
- -$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)
-
LIBOBJS := $(OBJS) $(SUBDIR)%.h.o $(TESTOBJS)
-$(LIBOBJS) $(LIBOBJS:.o=.i): CPPFLAGS += -DHAVE_AV_CONFIG_H
+$(LIBOBJS) $(LIBOBJS:.o=.s) $(LIBOBJS:.o=.i): CPPFLAGS += -DHAVE_AV_CONFIG_H
+$(TESTOBJS) $(TESTOBJS:.o=.i): CFLAGS += -Umain
$(SUBDIR)$(LIBNAME): $(OBJS)
$(RM) $@
More information about the ffmpeg-cvslog
mailing list