media/libvpx/Makefile.in

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libvpx/Makefile.in	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,123 @@
     1.4 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.7 +
     1.8 +#Setup the libvpx assembler config.
     1.9 +AS=$(VPX_AS)
    1.10 +ASFLAGS=$(VPX_ASFLAGS) -I. -I$(topsrcdir)/media/libvpx/ -I$(topsrcdir)/media/libvpx/vpx_ports/
    1.11 +AS_DASH_C_FLAG=$(VPX_DASH_C_FLAG)
    1.12 +ASM_SUFFIX=$(VPX_ASM_SUFFIX)
    1.13 +
    1.14 +ifdef VPX_ARM_ASM
    1.15 +# Building on an ARM platform with a supported assembler, include
    1.16 +# the optimized assembly in the build.
    1.17 +
    1.18 +ifeq ($(OS_TARGET),Android)
    1.19 +# For cpu-features.h
    1.20 +LOCAL_INCLUDES += -I$(ANDROID_NDK)/sources/android/cpufeatures
    1.21 +endif
    1.22 +
    1.23 +ASM_OFFSETS = vpx_scale_asm_offsets.asm vp8_asm_enc_offsets.asm
    1.24 +
    1.25 +
    1.26 +ifdef VPX_AS_CONVERSION
    1.27 +# The ARM asm is written in ARM RVCT syntax, but we actually build it with
    1.28 +# gas using GNU syntax. Add some rules to perform the conversion.
    1.29 +
    1.30 +GENERATED_DIRS += $(dir $(ASFILES))
    1.31 +
    1.32 +%.asm.$(ASM_SUFFIX): %.asm $(ASM_OFFSETS)
    1.33 +	$(VPX_AS_CONVERSION) < $< > $@
    1.34 +
    1.35 +endif
    1.36 +endif
    1.37 +
    1.38 +ifdef VPX_NEED_OBJ_INT_EXTRACT
    1.39 +
    1.40 +# We don't have a compiler that supports a compatible inline asm syntax, so we
    1.41 +# have to resort to extracting asm offsets from a compiled object. This only
    1.42 +# works if we have the appropriate system headers obj_int_extract needs to
    1.43 +# parse that format, and so only has limited support for cross-compilation.
    1.44 +
    1.45 +ifdef VPX_ARM_ASM
    1.46 +VPX_OIE_FORMAT := rvds
    1.47 +else
    1.48 +VPX_OIE_FORMAT := gas
    1.49 +endif
    1.50 +
    1.51 +GARBAGE += vpx_scale_asm_offsets.$(OBJ_SUFFIX) vpx_scale_asm_offsets.asm
    1.52 +GARBAGE += vp8_asm_enc_offsets.$(OBJ_SUFFIX) vp8_asm_enc_offsets.asm
    1.53 +
    1.54 +else
    1.55 +
    1.56 +# We can extract the asm offsets directly from generated assembly using inline
    1.57 +# asm. This is the preferred method. However we need to strip out CFLAGS that
    1.58 +# cause LTO because then the resulting .S file is useless.
    1.59 +
    1.60 +vpx_scale_asm_offsets.s: CFLAGS := -DINLINE_ASM
    1.61 +
    1.62 +OFFSET_PATTERN := '^[a-zA-Z0-9_]* EQU'
    1.63 +
    1.64 +# This rule, as well as the rule for vp8_asm_enc_offsets.s further below are here
    1.65 +# because the generic rule in rules.mk was made to not be implicit, and we
    1.66 +# can't put the C files in CSRCS.
    1.67 +vpx_scale_asm_offsets.s: $(srcdir)/vpx_scale/vpx_scale_asm_offsets.c
    1.68 +	$(REPORT_BUILD)
    1.69 +	$(CC) -S $(COMPILE_CFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
    1.70 +
    1.71 +vpx_scale_asm_offsets.asm: vpx_scale_asm_offsets.s
    1.72 +	grep $(OFFSET_PATTERN) $< | sed -e 's/[$$\#]//g' \
    1.73 +	    $(if $(VPX_AS_CONVERSION),| $(VPX_AS_CONVERSION)) > $@
    1.74 +
    1.75 +GARBAGE += vpx_scale_asm_offsets.s vpx_scale_asm_offsets.asm
    1.76 +
    1.77 +vp8_asm_enc_offsets.s: CFLAGS := -DINLINE_ASM
    1.78 +
    1.79 +vp8_asm_enc_offsets.s: $(srcdir)/vp8/encoder/vp8_asm_enc_offsets.c
    1.80 +	$(REPORT_BUILD)
    1.81 +	$(CC) -S $(COMPILE_CFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
    1.82 +
    1.83 +vp8_asm_enc_offsets.asm: vp8_asm_enc_offsets.s
    1.84 +	grep $(OFFSET_PATTERN) $< | sed -e 's/[$$\#]//g' \
    1.85 +	    $(if $(VPX_AS_CONVERSION),| $(VPX_AS_CONVERSION)) > $@
    1.86 +
    1.87 +GARBAGE += vp8_asm_enc_offsets.s vp8_asm_enc_offsets.asm
    1.88 +
    1.89 +endif
    1.90 +
    1.91 +EXTRA_MDDEPEND_FILES = vp8_asm_enc_offsets.s.pp vp8_asm_enc_offsets.$(OBJ_SUFFIX).pp vpx_scale_asm_offsets.s.pp vpx_scale_asm_offsets.$(OBJ_SUFFIX).pp
    1.92 +
    1.93 +include $(topsrcdir)/config/rules.mk
    1.94 +
    1.95 +quantize_sse4.$(OBJ_SUFFIX): vp8_asm_enc_offsets.asm
    1.96 +quantize_ssse3.$(OBJ_SUFFIX): vp8_asm_enc_offsets.asm
    1.97 +
    1.98 +ifdef VPX_NEED_OBJ_INT_EXTRACT
    1.99 +
   1.100 +vpx_scale_asm_offsets.asm: vpx_scale_asm_offsets.$(OBJ_SUFFIX) $(HOST_PROGRAM)
   1.101 +	./$(HOST_PROGRAM) $(VPX_OIE_FORMAT) $< \
   1.102 +	    $(if $(VPX_AS_CONVERSION),| $(VPX_AS_CONVERSION)) > $@
   1.103 +
   1.104 +# Filter out this object, because we don't want to link against it.
   1.105 +# It was generated solely so it could be parsed by obj_int_extract.
   1.106 +OBJS := $(filter-out vpx_scale_asm_offsets.$(OBJ_SUFFIX),$(OBJS))
   1.107 +
   1.108 +vp8_asm_enc_offsets.asm: vp8_asm_enc_offsets.$(OBJ_SUFFIX) $(HOST_PROGRAM)
   1.109 +	./$(HOST_PROGRAM) $(VPX_OIE_FORMAT) $< \
   1.110 +	    $(if $(VPX_AS_CONVERSION),| $(VPX_AS_CONVERSION)) > $@
   1.111 +
   1.112 +# Filter out this object, because we don't want to link against it.
   1.113 +# It was generated solely so it could be parsed by obj_int_extract.
   1.114 +OBJS := $(filter-out vp8_asm_enc_offsets.$(OBJ_SUFFIX),$(OBJS))
   1.115 +
   1.116 +endif
   1.117 +
   1.118 +# Workaround a bug of Sun Studio (CR 6963410)
   1.119 +ifdef SOLARIS_SUNPRO_CC
   1.120 +ifeq (86,$(findstring 86,$(OS_TEST)))
   1.121 +filter.o: filter.c Makefile.in
   1.122 +	$(REPORT_BUILD)
   1.123 +	@$(MAKE_DEPS_AUTO_CC)
   1.124 +	$(CC) -o $@ -c $(patsubst -xO[45],-xO3,$(COMPILE_CFLAGS)) $<
   1.125 +endif
   1.126 +endif

mercurial