Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: source/libvpx/build/make/Android.mk

Issue 290653003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 ## 1 ##
2 ## Copyright (c) 2012 The WebM project authors. All Rights Reserved. 2 ## Copyright (c) 2012 The WebM project authors. All Rights Reserved.
3 ## 3 ##
4 ## Use of this source code is governed by a BSD-style license 4 ## Use of this source code is governed by a BSD-style license
5 ## that can be found in the LICENSE file in the root of the source 5 ## that can be found in the LICENSE file in the root of the source
6 ## tree. An additional intellectual property rights grant can be found 6 ## tree. An additional intellectual property rights grant can be found
7 ## in the file PATENTS. All contributing project authors may 7 ## in the file PATENTS. All contributing project authors may
8 ## be found in the AUTHORS file in the root of the source tree. 8 ## be found in the AUTHORS file in the root of the source tree.
9 ## 9 ##
10 10
(...skipping 20 matching lines...) Expand all
31 # 31 #
32 # There are currently two TARGET_ARCH_ABI targets for ARM. 32 # There are currently two TARGET_ARCH_ABI targets for ARM.
33 # armeabi and armeabi-v7a. armeabi-v7a is selected by creating an 33 # armeabi and armeabi-v7a. armeabi-v7a is selected by creating an
34 # Application.mk in the jni directory that contains: 34 # Application.mk in the jni directory that contains:
35 # APP_ABI := armeabi-v7a 35 # APP_ABI := armeabi-v7a
36 # 36 #
37 # By default libvpx will detect at runtime the existance of NEON extension. 37 # By default libvpx will detect at runtime the existance of NEON extension.
38 # For this we import the 'cpufeatures' module from the NDK sources. 38 # For this we import the 'cpufeatures' module from the NDK sources.
39 # libvpx can also be configured without this runtime detection method. 39 # libvpx can also be configured without this runtime detection method.
40 # Configuring with --disable-runtime-cpu-detect will assume presence of NEON. 40 # Configuring with --disable-runtime-cpu-detect will assume presence of NEON.
41 # Configuring with --disable-runtime-cpu-detect --disable-neon will remove any 41 # Configuring with --disable-runtime-cpu-detect --disable-neon \
42 # NEON dependency. 42 # --disable-neon-asm
43 # will remove any NEON dependency.
43 44
44 # To change to building armeabi, run ./libvpx/configure again, but with 45 # To change to building armeabi, run ./libvpx/configure again, but with
45 # --target=arm5te-android-gcc and modify the Application.mk file to 46 # --target=arm5te-android-gcc and modify the Application.mk file to
46 # set APP_ABI := armeabi 47 # set APP_ABI := armeabi
47 # 48 #
48 # Running ndk-build will build libvpx and include it in your project. 49 # Running ndk-build will build libvpx and include it in your project.
49 # 50 #
50 51
51 CONFIG_DIR := $(LOCAL_PATH)/ 52 CONFIG_DIR := $(LOCAL_PATH)/
52 LIBVPX_PATH := $(LOCAL_PATH)/libvpx 53 LIBVPX_PATH := $(LOCAL_PATH)/libvpx
53 ASM_CNV_PATH_LOCAL := $(TARGET_ARCH_ABI)/ads2gas 54 ASM_CNV_PATH_LOCAL := $(TARGET_ARCH_ABI)/ads2gas
54 ASM_CNV_PATH := $(LOCAL_PATH)/$(ASM_CNV_PATH_LOCAL) 55 ASM_CNV_PATH := $(LOCAL_PATH)/$(ASM_CNV_PATH_LOCAL)
55 56
56 # Use the makefiles generated by upstream configure to determine which files to 57 # Use the makefiles generated by upstream configure to determine which files to
57 # build. Also set any architecture-specific flags. 58 # build. Also set any architecture-specific flags.
58 ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) 59 ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
59 include $(CONFIG_DIR)libs-armv7-android-gcc.mk 60 include $(CONFIG_DIR)libs-armv7-android-gcc.mk
60 LOCAL_ARM_MODE := arm 61 LOCAL_ARM_MODE := arm
61 else ifeq ($(TARGET_ARCH_ABI),armeabi) 62 else ifeq ($(TARGET_ARCH_ABI),armeabi)
62 include $(CONFIG_DIR)libs-armv5te-android-gcc.mk 63 include $(CONFIG_DIR)libs-armv5te-android-gcc.mk
63 LOCAL_ARM_MODE := arm 64 LOCAL_ARM_MODE := arm
65 else ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
66 include $(CONFIG_DIR)libs-armv8-android-gcc.mk
67 LOCAL_ARM_MODE := arm
64 else ifeq ($(TARGET_ARCH_ABI),x86) 68 else ifeq ($(TARGET_ARCH_ABI),x86)
65 include $(CONFIG_DIR)libs-x86-android-gcc.mk 69 include $(CONFIG_DIR)libs-x86-android-gcc.mk
66 else ifeq ($(TARGET_ARCH_ABI),mips) 70 else ifeq ($(TARGET_ARCH_ABI),mips)
67 include $(CONFIG_DIR)libs-mips-android-gcc.mk 71 include $(CONFIG_DIR)libs-mips-android-gcc.mk
68 else 72 else
69 $(error Not a supported TARGET_ARCH_ABI: $(TARGET_ARCH_ABI)) 73 $(error Not a supported TARGET_ARCH_ABI: $(TARGET_ARCH_ABI))
70 endif 74 endif
71 75
72 # Rule that is normally in Makefile created by libvpx 76 # Rule that is normally in Makefile created by libvpx
73 # configure. Used to filter out source files based on configuration. 77 # configure. Used to filter out source files based on configuration.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 @mkdir -p $$(dir $$@) 123 @mkdir -p $$(dir $$@)
120 @grep $(OFFSET_PATTERN) $$< | tr -d '\#' | $(CONFIG_DIR)$(ASM_CONVERSION ) > $$@ 124 @grep $(OFFSET_PATTERN) $$< | tr -d '\#' | $(CONFIG_DIR)$(ASM_CONVERSION ) > $$@
121 endef 125 endef
122 126
123 # Use ads2gas script to convert from RVCT format to GAS format. This 127 # Use ads2gas script to convert from RVCT format to GAS format. This
124 # puts the processed file under $(ASM_CNV_PATH). Local clean rule 128 # puts the processed file under $(ASM_CNV_PATH). Local clean rule
125 # to handle removing these 129 # to handle removing these
126 ifeq ($(CONFIG_VP8_ENCODER), yes) 130 ifeq ($(CONFIG_VP8_ENCODER), yes)
127 ASM_CNV_OFFSETS_DEPEND += $(ASM_CNV_PATH)/vp8_asm_enc_offsets.asm 131 ASM_CNV_OFFSETS_DEPEND += $(ASM_CNV_PATH)/vp8_asm_enc_offsets.asm
128 endif 132 endif
129 ifeq ($(HAVE_NEON), yes) 133 ifeq ($(HAVE_NEON_ASM), yes)
130 ASM_CNV_OFFSETS_DEPEND += $(ASM_CNV_PATH)/vpx_scale_asm_offsets.asm 134 ASM_CNV_OFFSETS_DEPEND += $(ASM_CNV_PATH)/vpx_scale_asm_offsets.asm
131 endif 135 endif
132 136
133 .PRECIOUS: %.asm.s 137 .PRECIOUS: %.asm.s
134 $(ASM_CNV_PATH)/libvpx/%.asm.s: $(LIBVPX_PATH)/%.asm $(ASM_CNV_OFFSETS_DEPEND) 138 $(ASM_CNV_PATH)/libvpx/%.asm.s: $(LIBVPX_PATH)/%.asm $(ASM_CNV_OFFSETS_DEPEND)
135 @mkdir -p $(dir $@) 139 @mkdir -p $(dir $@)
136 @$(CONFIG_DIR)$(ASM_CONVERSION) <$< > $@ 140 @$(CONFIG_DIR)$(ASM_CONVERSION) <$< > $@
137 141
138 # For building *_rtcd.h, which have rules in libs.mk 142 # For building *_rtcd.h, which have rules in libs.mk
139 TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN))) 143 TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN)))
140 target := libs 144 target := libs
141 145
142 LOCAL_SRC_FILES += vpx_config.c 146 LOCAL_SRC_FILES += vpx_config.c
143 147
144 # Remove duplicate entries 148 # Remove duplicate entries
145 CODEC_SRCS_UNIQUE = $(sort $(CODEC_SRCS)) 149 CODEC_SRCS_UNIQUE = $(sort $(CODEC_SRCS))
146 150
147 # Pull out C files. vpx_config.c is in the immediate directory and 151 # Pull out C files. vpx_config.c is in the immediate directory and
148 # so it does not need libvpx/ prefixed like the rest of the source files. 152 # so it does not need libvpx/ prefixed like the rest of the source files.
149 # The neon files with intrinsics need to have .neon appended so the proper 153 # The neon files with intrinsics need to have .neon appended so the proper
150 # flags are applied. 154 # flags are applied.
151 CODEC_SRCS_C = $(filter %.c, $(CODEC_SRCS_UNIQUE)) 155 CODEC_SRCS_C = $(filter %.c, $(CODEC_SRCS_UNIQUE))
152 LOCAL_NEON_SRCS_C = $(filter %_neon.c, $(CODEC_SRCS_C)) 156 LOCAL_NEON_SRCS_C = $(filter %_neon.c, $(CODEC_SRCS_C))
153 LOCAL_CODEC_SRCS_C = $(filter-out vpx_config.c %_neon.c, $(CODEC_SRCS_C)) 157 LOCAL_CODEC_SRCS_C = $(filter-out vpx_config.c %_neon.c, $(CODEC_SRCS_C))
154 158
155 LOCAL_SRC_FILES += $(foreach file, $(LOCAL_CODEC_SRCS_C), libvpx/$(file)) 159 LOCAL_SRC_FILES += $(foreach file, $(LOCAL_CODEC_SRCS_C), libvpx/$(file))
156 LOCAL_SRC_FILES += $(foreach file, $(LOCAL_NEON_SRCS_C), libvpx/$(file).neon) 160 ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
161 LOCAL_SRC_FILES += $(foreach file, $(LOCAL_NEON_SRCS_C), libvpx/$(file).neon)
162 else # If there are neon sources then we are building for arm64 and do not need to specify .neon
163 LOCAL_SRC_FILES += $(foreach file, $(LOCAL_NEON_SRCS_C), libvpx/$(file))
164 endif
157 165
158 # Pull out assembly files, splitting NEON from the rest. This is 166 # Pull out assembly files, splitting NEON from the rest. This is
159 # done to specify that the NEON assembly files use NEON assembler flags. 167 # done to specify that the NEON assembly files use NEON assembler flags.
160 # x86 assembly matches %.asm, arm matches %.asm.s 168 # x86 assembly matches %.asm, arm matches %.asm.s
161 169
162 # x86: 170 # x86:
163 171
164 CODEC_SRCS_ASM_X86 = $(filter %.asm, $(CODEC_SRCS_UNIQUE)) 172 CODEC_SRCS_ASM_X86 = $(filter %.asm, $(CODEC_SRCS_UNIQUE))
165 LOCAL_SRC_FILES += $(foreach file, $(CODEC_SRCS_ASM_X86), libvpx/$(file)) 173 LOCAL_SRC_FILES += $(foreach file, $(CODEC_SRCS_ASM_X86), libvpx/$(file))
166 174
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 238
231 ifeq ($(CONFIG_VP8_ENCODER), yes) 239 ifeq ($(CONFIG_VP8_ENCODER), yes)
232 $(eval $(call asm_offsets_template,\ 240 $(eval $(call asm_offsets_template,\
233 $(ASM_CNV_PATH)/vp8_asm_enc_offsets.asm, \ 241 $(ASM_CNV_PATH)/vp8_asm_enc_offsets.asm, \
234 $(LIBVPX_PATH)/vp8/encoder/vp8_asm_enc_offsets.c)) 242 $(LIBVPX_PATH)/vp8/encoder/vp8_asm_enc_offsets.c))
235 endif 243 endif
236 244
237 ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes) 245 ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
238 $(call import-module,cpufeatures) 246 $(call import-module,cpufeatures)
239 endif 247 endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698