summaryrefslogtreecommitdiffstats
path: root/libvpx-offsets.mk
diff options
context:
space:
mode:
Diffstat (limited to 'libvpx-offsets.mk')
-rw-r--r--libvpx-offsets.mk26
1 files changed, 22 insertions, 4 deletions
diff --git a/libvpx-offsets.mk b/libvpx-offsets.mk
index 3336b1f..826520c 100644
--- a/libvpx-offsets.mk
+++ b/libvpx-offsets.mk
@@ -1,3 +1,15 @@
+# Rules to generate assembly.
+# Input variables:
+# libvpx_2nd_arch
+# libvpx_source_dir
+# libvpx_config_dir_<arch>
+# libvpx_codec_srcs_asm_<arch>
+#
+# Output variables:
+# LOCAL_GENERATED_SOURCES_<arch>
+# LOCAL_C_INCLUDES_<arch>
+#
+
# 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
@@ -22,7 +34,7 @@ COMPILE_TO_S := $(addprefix $(libvpx_intermediates)/, $(libvpx_asm_offsets_inter
$(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_CONFIG_DIR := $(libvpx_config_dir_$(TARGET_$(libvpx_2nd_arch)ARCH))
$(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)
@@ -37,15 +49,21 @@ $(OFFSETS_GEN) : %.asm : %.intermediate
LOCAL_GENERATED_SOURCES_$(TARGET_$(libvpx_2nd_arch)ARCH) += $(OFFSETS_GEN)
+ifneq ($(strip $(libvpx_codec_srcs_asm_$(TARGET_$(libvpx_2nd_arch)ARCH))),)
# 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 := $(addprefix $(libvpx_intermediates)/, $(libvpx_codec_srcs_asm_$(TARGET_$(libvpx_2nd_arch)ARCH)))
$(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)
+endif
+
+LOCAL_C_INCLUDES_$(TARGET_$(libvpx_2nd_arch)ARCH) += \
+ $(libvpx_intermediates)/vp8/common \
+ $(libvpx_intermediates)/vp8/decoder \
+ $(libvpx_intermediates)/vp8/encoder \
+ $(libvpx_intermediates)/vpx_scale