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

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

Issue 756673003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years 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
« no previous file with comments | « source/libvpx/build/arm-msvs/obj_int_extract.bat ('k') | source/libvpx/build/make/Makefile » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
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 \ 41 # Configuring with --disable-runtime-cpu-detect --disable-neon \
42 # --disable-neon-asm 42 # --disable-neon-asm
43 # will remove any NEON dependency. 43 # will remove any NEON dependency.
44 44
45 # To change to building armeabi, run ./libvpx/configure again, but with 45 # To change to building armeabi, run ./libvpx/configure again, but with
46 # --target=arm5te-android-gcc and modify the Application.mk file to 46 # --target=armv6-android-gcc and modify the Application.mk file to
47 # set APP_ABI := armeabi 47 # set APP_ABI := armeabi
48 # 48 #
49 # 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.
50 # 50 #
51 51
52 CONFIG_DIR := $(LOCAL_PATH)/ 52 CONFIG_DIR := $(LOCAL_PATH)/
53 LIBVPX_PATH := $(LOCAL_PATH)/libvpx 53 LIBVPX_PATH := $(LOCAL_PATH)/libvpx
54 ASM_CNV_PATH_LOCAL := $(TARGET_ARCH_ABI)/ads2gas 54 ASM_CNV_PATH_LOCAL := $(TARGET_ARCH_ABI)/ads2gas
55 ASM_CNV_PATH := $(LOCAL_PATH)/$(ASM_CNV_PATH_LOCAL) 55 ASM_CNV_PATH := $(LOCAL_PATH)/$(ASM_CNV_PATH_LOCAL)
56 56
57 # 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
58 # build. Also set any architecture-specific flags. 58 # build. Also set any architecture-specific flags.
59 ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) 59 ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
60 include $(CONFIG_DIR)libs-armv7-android-gcc.mk 60 include $(CONFIG_DIR)libs-armv7-android-gcc.mk
61 LOCAL_ARM_MODE := arm 61 LOCAL_ARM_MODE := arm
62 else ifeq ($(TARGET_ARCH_ABI),armeabi) 62 else ifeq ($(TARGET_ARCH_ABI),armeabi)
63 include $(CONFIG_DIR)libs-armv5te-android-gcc.mk 63 include $(CONFIG_DIR)libs-armv6-android-gcc.mk
64 LOCAL_ARM_MODE := arm 64 LOCAL_ARM_MODE := arm
65 else ifeq ($(TARGET_ARCH_ABI),arm64-v8a) 65 else ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
66 include $(CONFIG_DIR)libs-armv8-android-gcc.mk 66 include $(CONFIG_DIR)libs-armv8-android-gcc.mk
67 LOCAL_ARM_MODE := arm 67 LOCAL_ARM_MODE := arm
68 else ifeq ($(TARGET_ARCH_ABI),x86) 68 else ifeq ($(TARGET_ARCH_ABI),x86)
69 include $(CONFIG_DIR)libs-x86-android-gcc.mk 69 include $(CONFIG_DIR)libs-x86-android-gcc.mk
70 else ifeq ($(TARGET_ARCH_ABI),mips) 70 else ifeq ($(TARGET_ARCH_ABI),mips)
71 include $(CONFIG_DIR)libs-mips-android-gcc.mk 71 include $(CONFIG_DIR)libs-mips-android-gcc.mk
72 else 72 else
73 $(error Not a supported TARGET_ARCH_ABI: $(TARGET_ARCH_ABI)) 73 $(error Not a supported TARGET_ARCH_ABI: $(TARGET_ARCH_ABI))
(...skipping 10 matching lines...) Expand all
84 # Include the list of files to be built 84 # Include the list of files to be built
85 include $(LIBVPX_PATH)/libs.mk 85 include $(LIBVPX_PATH)/libs.mk
86 86
87 # Optimise the code. May want to revisit this setting in the future. 87 # Optimise the code. May want to revisit this setting in the future.
88 LOCAL_CFLAGS := -O3 88 LOCAL_CFLAGS := -O3
89 89
90 # For x86, include the source code in the search path so it will find files 90 # For x86, include the source code in the search path so it will find files
91 # like x86inc.asm and x86_abi_support.asm 91 # like x86inc.asm and x86_abi_support.asm
92 LOCAL_ASMFLAGS := -I$(LIBVPX_PATH) 92 LOCAL_ASMFLAGS := -I$(LIBVPX_PATH)
93 93
94 # -----------------------------------------------------------------------------
95 # Template : asm_offsets_template
96 # Arguments : 1: assembly offsets file to be created
97 # 2: c file to base assembly offsets on
98 # Returns : None
99 # Usage : $(eval $(call asm_offsets_template,<asmfile>, <srcfile>
100 # Rationale : Create offsets at compile time using for structures that are
101 # defined in c, but used in assembly functions.
102 # -----------------------------------------------------------------------------
103 define asm_offsets_template
104
105 _SRC:=$(2)
106 _OBJ:=$(ASM_CNV_PATH)/$$(notdir $(2)).S
107
108 _FLAGS = $$($$(my)CFLAGS) \
109 $$(call get-src-file-target-cflags,$(2)) \
110 $$(call host-c-includes,$$(LOCAL_C_INCLUDES) $$(CONFIG_DIR)) \
111 $$(LOCAL_CFLAGS) \
112 $$(NDK_APP_CFLAGS) \
113 $$(call host-c-includes,$$($(my)C_INCLUDES)) \
114 -DINLINE_ASM \
115 -S \
116
117 _TEXT = "Compile $$(call get-src-file-text,$(2))"
118 _CC = $$(TARGET_CC)
119
120 $$(eval $$(call ev-build-file))
121
122 $(1) : $$(_OBJ) $(2)
123 @mkdir -p $$(dir $$@)
124 @grep $(OFFSET_PATTERN) $$< | tr -d '\#' | $(CONFIG_DIR)$(ASM_CONVERSION ) > $$@
125 endef
126
127 # Use ads2gas script to convert from RVCT format to GAS format. This
128 # puts the processed file under $(ASM_CNV_PATH). Local clean rule
129 # to handle removing these
130 ifeq ($(CONFIG_VP8_ENCODER), yes)
131 ASM_CNV_OFFSETS_DEPEND += $(ASM_CNV_PATH)/vp8_asm_enc_offsets.asm
132 endif
133 ifeq ($(HAVE_NEON_ASM), yes)
134 ASM_CNV_OFFSETS_DEPEND += $(ASM_CNV_PATH)/vpx_scale_asm_offsets.asm
135 endif
136
137 .PRECIOUS: %.asm.s 94 .PRECIOUS: %.asm.s
138 $(ASM_CNV_PATH)/libvpx/%.asm.s: $(LIBVPX_PATH)/%.asm $(ASM_CNV_OFFSETS_DEPEND) 95 $(ASM_CNV_PATH)/libvpx/%.asm.s: $(LIBVPX_PATH)/%.asm
139 @mkdir -p $(dir $@) 96 @mkdir -p $(dir $@)
140 @$(CONFIG_DIR)$(ASM_CONVERSION) <$< > $@ 97 @$(CONFIG_DIR)$(ASM_CONVERSION) <$< > $@
141 98
142 # For building *_rtcd.h, which have rules in libs.mk 99 # For building *_rtcd.h, which have rules in libs.mk
143 TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN))) 100 TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN)))
144 target := libs 101 target := libs
145 102
146 LOCAL_SRC_FILES += vpx_config.c 103 LOCAL_SRC_FILES += vpx_config.c
147 104
148 # Remove duplicate entries 105 # Remove duplicate entries
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 $(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_scale_rtcd.h 174 $(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_scale_rtcd.h
218 175
219 ifeq ($(TARGET_ARCH_ABI),x86) 176 ifeq ($(TARGET_ARCH_ABI),x86)
220 $(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_config.asm 177 $(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_config.asm
221 endif 178 endif
222 179
223 .PHONY: clean 180 .PHONY: clean
224 clean: 181 clean:
225 @echo "Clean: ads2gas files [$(TARGET_ARCH_ABI)]" 182 @echo "Clean: ads2gas files [$(TARGET_ARCH_ABI)]"
226 @$(RM) $(CODEC_SRCS_ASM_ADS2GAS) $(CODEC_SRCS_ASM_NEON_ADS2GAS) 183 @$(RM) $(CODEC_SRCS_ASM_ADS2GAS) $(CODEC_SRCS_ASM_NEON_ADS2GAS)
227 @$(RM) $(patsubst %.asm, %.*, $(ASM_CNV_OFFSETS_DEPEND))
228 @$(RM) -r $(ASM_CNV_PATH) 184 @$(RM) -r $(ASM_CNV_PATH)
229 @$(RM) $(CLEAN-OBJS) 185 @$(RM) $(CLEAN-OBJS)
230 186
231 include $(BUILD_SHARED_LIBRARY) 187 include $(BUILD_SHARED_LIBRARY)
232 188
233 ifeq ($(HAVE_NEON), yes)
234 $(eval $(call asm_offsets_template,\
235 $(ASM_CNV_PATH)/vpx_scale_asm_offsets.asm, \
236 $(LIBVPX_PATH)/vpx_scale/vpx_scale_asm_offsets.c))
237 endif
238
239 ifeq ($(CONFIG_VP8_ENCODER), yes)
240 $(eval $(call asm_offsets_template,\
241 $(ASM_CNV_PATH)/vp8_asm_enc_offsets.asm, \
242 $(LIBVPX_PATH)/vp8/encoder/vp8_asm_enc_offsets.c))
243 endif
244
245 ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes) 189 ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
246 $(call import-module,cpufeatures) 190 $(call import-module,cpufeatures)
247 endif 191 endif
OLDNEW
« no previous file with comments | « source/libvpx/build/arm-msvs/obj_int_extract.bat ('k') | source/libvpx/build/make/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698