summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2014-02-19 20:35:40 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-19 20:35:40 +0000
commitef10f06166df6c40c6c56233f2dddd1360ec6ea1 (patch)
tree2a98ee492a6d01b19caa84d976cc45e2b6f50b5d
parentdd9fa82d5073fb27c8b11518f775d632eab817c9 (diff)
parent827804f7548aff661411066982275862b56d6296 (diff)
downloadandroid_external_libvpx-ef10f06166df6c40c6c56233f2dddd1360ec6ea1.tar.gz
android_external_libvpx-ef10f06166df6c40c6c56233f2dddd1360ec6ea1.tar.bz2
android_external_libvpx-ef10f06166df6c40c6c56233f2dddd1360ec6ea1.zip
am 827804f7: Merge "libvpx: convert makefiles to support multilib build"
* commit '827804f7548aff661411066982275862b56d6296': libvpx: convert makefiles to support multilib build
-rw-r--r--libvpx-offsets.mk51
-rw-r--r--libvpx.mk59
2 files changed, 60 insertions, 50 deletions
diff --git a/libvpx-offsets.mk b/libvpx-offsets.mk
new file mode 100644
index 0000000..3336b1f
--- /dev/null
+++ b/libvpx-offsets.mk
@@ -0,0 +1,51 @@
+# ARM and x86 use an 'offsets' file in the assembly. It is generated by
+# tricking the compiler and generating non-functional output which is then
+# processed with grep. For ARM, this must be additionally converted from
+# RVCT (ARM's in-house compiler) format to GNU Assembler Format for gcc.
+
+# Offset files are currently used in vpx_scale for NEON and some encoder
+# functions used in both ARM and x86. These files can not be compiled and need
+# to be named accordingly to avoid auto-build rules. The encoder files are not
+# used yet but are included in the comments for future reference.
+
+libvpx_asm_offsets_intermediates := \
+ vp8/encoder/vp8_asm_enc_offsets.intermediate \
+ vpx_scale/vpx_scale_asm_offsets.intermediate \
+
+libvpx_asm_offsets_files := \
+ vp8/encoder/vp8_asm_enc_offsets.asm \
+ vpx_scale/vpx_scale_asm_offsets.asm \
+
+libvpx_intermediates := $(call local-intermediates-dir,,$(libvpx_2nd_arch))
+# Build the S files with inline assembly.
+COMPILE_TO_S := $(addprefix $(libvpx_intermediates)/, $(libvpx_asm_offsets_intermediates))
+$(COMPILE_TO_S) : PRIVATE_2ND_ARCH := $(libvpx_2nd_arch)
+$(COMPILE_TO_S) : PRIVATE_INTERMEDIATES := $(libvpx_intermediates)
+$(COMPILE_TO_S) : PRIVATE_SOURCE_DIR := $(libvpx_source_dir)
+$(COMPILE_TO_S) : PRIVATE_CONFIG_DIR := $(libvpx_config_dir)
+$(COMPILE_TO_S) : PRIVATE_CUSTOM_TOOL = $($(PRIVATE_2ND_ARCH)TARGET_CC) -S $(addprefix -I, $($(PRIVATE_2ND_ARCH)TARGET_C_INCLUDES)) -I $(PRIVATE_INTERMEDIATES) -I $(PRIVATE_SOURCE_DIR) -I $(PRIVATE_CONFIG_DIR) -DINLINE_ASM -o $@ $<
+$(COMPILE_TO_S) : $(libvpx_intermediates)/%.intermediate : $(libvpx_source_dir)/%.c
+ $(transform-generated-source)
+
+# Extract the offsets from the inline assembly.
+OFFSETS_GEN := $(addprefix $(libvpx_intermediates)/, $(libvpx_asm_offsets_files))
+$(OFFSETS_GEN) : PRIVATE_OFFSET_PATTERN := '^[a-zA-Z0-9_]* EQU'
+$(OFFSETS_GEN) : PRIVATE_SOURCE_DIR := $(libvpx_source_dir)
+$(OFFSETS_GEN) : PRIVATE_CUSTOM_TOOL = grep $(PRIVATE_OFFSET_PATTERN) $< | tr -d '$$\#' | perl $(PRIVATE_SOURCE_DIR)/build/make/ads2gas.pl > $@
+$(OFFSETS_GEN) : %.asm : %.intermediate
+ $(transform-generated-source)
+
+LOCAL_GENERATED_SOURCES_$(TARGET_$(libvpx_2nd_arch)ARCH) += $(OFFSETS_GEN)
+
+# This step is only required for ARM. MIPS uses intrinsics and x86 requires an
+# assembler to pre-process its assembly files.
+libvpx_asm_srcs := $(filter %.asm.s, $(libvpx_codec_srcs_unique))
+
+# The ARM assembly sources must be converted from ADS to GAS compatible format.
+VPX_GEN := $(addprefix $(libvpx_intermediates)/, $(libvpx_asm_srcs))
+$(VPX_GEN) : PRIVATE_SOURCE_DIR := $(libvpx_source_dir)
+$(VPX_GEN) : PRIVATE_CUSTOM_TOOL = cat $< | perl $(PRIVATE_SOURCE_DIR)/build/make/ads2gas.pl > $@
+$(VPX_GEN) : $(libvpx_intermediates)/%.s : $(libvpx_source_dir)/%
+ $(transform-generated-source)
+
+LOCAL_GENERATED_SOURCES_$(TARGET_$(libvpx_2nd_arch)ARCH) += $(VPX_GEN)
diff --git a/libvpx.mk b/libvpx.mk
index 0eee8c9..73429a9 100644
--- a/libvpx.mk
+++ b/libvpx.mk
@@ -37,7 +37,6 @@ LOCAL_CFLAGS += -O3
LOCAL_MODULE := libvpx
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-libvpx_intermediates := $(call local-intermediates-dir)
# Extract the C files from the list and add them to LOCAL_SRC_FILES.
libvpx_codec_srcs_unique := $(sort $(libvpx_codec_srcs))
@@ -47,55 +46,13 @@ libvpx_codec_srcs_c_static := $(filter-out vpx_config.c, $(libvpx_codec_srcs_c))
LOCAL_SRC_FILES += $(addprefix libvpx/, $(libvpx_codec_srcs_c_static))
LOCAL_SRC_FILES += $(libvpx_target)/vpx_config.c
-# ARM and x86 use an 'offsets' file in the assembly. It is generated by
-# tricking the compiler and generating non-functional output which is then
-# processed with grep. For ARM, this must be additionally converted from
-# RVCT (ARM's in-house compiler) format to GNU Assembler Format for gcc.
-
-# Offset files are currently used in vpx_scale for NEON and some encoder
-# functions used in both ARM and x86. These files can not be compiled and need
-# to be named accordingly to avoid auto-build rules. The encoder files are not
-# used yet but are included in the comments for future reference.
-
-libvpx_asm_offsets_intermediates := \
- vp8/encoder/vp8_asm_enc_offsets.intermediate \
- vpx_scale/vpx_scale_asm_offsets.intermediate \
-
-libvpx_asm_offsets_files := \
- vp8/encoder/vp8_asm_enc_offsets.asm \
- vpx_scale/vpx_scale_asm_offsets.asm \
-
-# Build the S files with inline assembly.
-COMPILE_TO_S := $(addprefix $(libvpx_intermediates)/, $(libvpx_asm_offsets_intermediates))
-$(COMPILE_TO_S) : PRIVATE_INTERMEDIATES := $(libvpx_intermediates)
-$(COMPILE_TO_S) : PRIVATE_SOURCE_DIR := $(libvpx_source_dir)
-$(COMPILE_TO_S) : PRIVATE_CONFIG_DIR := $(libvpx_config_dir)
-$(COMPILE_TO_S) : PRIVATE_CUSTOM_TOOL = $(TARGET_CC) -S $(addprefix -I, $(TARGET_C_INCLUDES)) -I $(PRIVATE_INTERMEDIATES) -I $(PRIVATE_SOURCE_DIR) -I $(PRIVATE_CONFIG_DIR) -DINLINE_ASM -o $@ $<
-$(COMPILE_TO_S) : $(libvpx_intermediates)/%.intermediate : $(libvpx_source_dir)/%.c
- $(transform-generated-source)
-
-# Extract the offsets from the inline assembly.
-OFFSETS_GEN := $(addprefix $(libvpx_intermediates)/, $(libvpx_asm_offsets_files))
-$(OFFSETS_GEN) : PRIVATE_OFFSET_PATTERN := '^[a-zA-Z0-9_]* EQU'
-$(OFFSETS_GEN) : PRIVATE_SOURCE_DIR := $(libvpx_source_dir)
-$(OFFSETS_GEN) : PRIVATE_CUSTOM_TOOL = grep $(PRIVATE_OFFSET_PATTERN) $< | tr -d '$$\#' | perl $(PRIVATE_SOURCE_DIR)/build/make/ads2gas.pl > $@
-$(OFFSETS_GEN) : %.asm : %.intermediate
- $(transform-generated-source)
-
-LOCAL_GENERATED_SOURCES += $(OFFSETS_GEN)
-
-# This step is only required for ARM. MIPS uses intrinsics and x86 requires an
-# assembler to pre-process its assembly files.
-libvpx_asm_srcs := $(filter %.asm.s, $(libvpx_codec_srcs_unique))
-
-# The ARM assembly sources must be converted from ADS to GAS compatible format.
-VPX_GEN := $(addprefix $(libvpx_intermediates)/, $(libvpx_asm_srcs))
-$(VPX_GEN) : PRIVATE_SOURCE_DIR := $(libvpx_source_dir)
-$(VPX_GEN) : PRIVATE_CUSTOM_TOOL = cat $< | perl $(PRIVATE_SOURCE_DIR)/build/make/ads2gas.pl > $@
-$(VPX_GEN) : $(libvpx_intermediates)/%.s : $(libvpx_source_dir)/%
- $(transform-generated-source)
-
-LOCAL_GENERATED_SOURCES += $(VPX_GEN)
+libvpx_2nd_arch :=
+include $(LOCAL_PATH)/libvpx-offsets.mk
+ifdef TARGET_2ND_ARCH
+libvpx_2nd_arch := $(TARGET_2ND_ARCH_VAR_PREFIX)
+include $(LOCAL_PATH)/libvpx-offsets.mk
+endif
+libvpx_2nd_arch :=
LOCAL_C_INCLUDES := \
$(libvpx_source_dir) \
@@ -118,4 +75,6 @@ libvpx_asm_offsets_intermediates :=
libvpx_asm_offsets_files :=
libvpx_asm_srcs :=
+LOCAL_32_BIT_ONLY := true
+
include $(BUILD_STATIC_LIBRARY)