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

Side by Side Diff: Makefile.android

Issue 12248014: MIPS: Add android build support for mips in gyp. (Closed) Base URL: git://github.com/v8/v8.git@gbleed
Patch Set: Remove duplication with common.gypi, per code review. Created 7 years, 10 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
« no previous file with comments | « Makefile ('k') | build/android.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
11 # with the distribution. 11 # with the distribution.
12 # * Neither the name of Google Inc. nor the names of its 12 # * Neither the name of Google Inc. nor the names of its
13 # contributors may be used to endorse or promote products derived 13 # contributors may be used to endorse or promote products derived
14 # from this software without specific prior written permission. 14 # from this software without specific prior written permission.
15 # 15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 # Those definitions should be consistent with the main Makefile 28 # Those definitions should be consistent with the main Makefile
29 ANDROID_ARCHES = android_ia32 android_arm 29 ANDROID_ARCHES = android_ia32 android_arm android_mipsel
30 MODES = release debug 30 MODES = release debug
31 31
32 # Generates all combinations of ANDROID ARCHES and MODES, 32 # Generates all combinations of ANDROID ARCHES and MODES,
33 # e.g. "android_ia32.release" or "android_arm.release" 33 # e.g. "android_ia32.release" or "android_arm.release"
34 ANDROID_BUILDS = $(foreach mode,$(MODES), \ 34 ANDROID_BUILDS = $(foreach mode,$(MODES), \
35 $(addsuffix .$(mode),$(ANDROID_ARCHES))) 35 $(addsuffix .$(mode),$(ANDROID_ARCHES)))
36 36
37 HOST_OS = $(shell uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/') 37 HOST_OS = $(shell uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')
38 ifeq ($(HOST_OS), linux) 38 ifeq ($(HOST_OS), linux)
39 TOOLCHAIN_DIR = linux-x86 39 TOOLCHAIN_DIR = linux-x86
40 else 40 else
41 ifeq ($(HOST_OS), mac) 41 ifeq ($(HOST_OS), mac)
42 TOOLCHAIN_DIR = darwin-x86 42 TOOLCHAIN_DIR = darwin-x86
43 else 43 else
44 $(error Host platform "${HOST_OS}" is not supported) 44 $(error Host platform "${HOST_OS}" is not supported)
45 endif 45 endif
46 endif 46 endif
47 47
48 ifeq ($(ARCH), android_arm) 48 ifeq ($(ARCH), android_arm)
49 DEFINES = target_arch=arm v8_target_arch=arm android_target_arch=arm 49 DEFINES = target_arch=arm v8_target_arch=arm android_target_arch=arm
50 DEFINES += arm_neon=0 armv7=1 50 DEFINES += arm_neon=0 armv7=1
51 TOOLCHAIN_ARCH = arm-linux-androideabi-4.6 51 TOOLCHAIN_ARCH = arm-linux-androideabi-4.6
52 else 52 else
53 ifeq ($(ARCH), android_ia32) 53 ifeq ($(ARCH), android_mipsel)
54 DEFINES = target_arch=ia32 v8_target_arch=ia32 android_target_arch=x86 54 DEFINES = target_arch=mipsel v8_target_arch=mipsel android_target_arch=mips
55 TOOLCHAIN_ARCH = x86-4.6 55 DEFINES += mips_arch_variant=mips32r2
56 TOOLCHAIN_ARCH = mipsel-linux-android-4.6
56 else 57 else
57 $(error Target architecture "${ARCH}" is not supported) 58 ifeq ($(ARCH), android_ia32)
59 DEFINES = target_arch=ia32 v8_target_arch=ia32 android_target_arch=x86
60 TOOLCHAIN_ARCH = x86-4.6
61 else
62 $(error Target architecture "${ARCH}" is not supported)
63 endif
58 endif 64 endif
59 endif 65 endif
60 66
61 TOOLCHAIN_PATH = ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}/prebuilt 67 TOOLCHAIN_PATH = ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}/prebuilt
62 ANDROID_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR} 68 ANDROID_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR}
63 ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),) 69 ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),)
64 $(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}") 70 $(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}")
65 endif 71 endif
66 72
67 # For mksnapshot host generation. 73 # For mksnapshot host generation.
(...skipping 15 matching lines...) Expand all
83 # Android GYP file generation targets. 89 # Android GYP file generation targets.
84 ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_ARCHES)) 90 ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_ARCHES))
85 $(ANDROID_MAKEFILES): 91 $(ANDROID_MAKEFILES):
86 @GYP_GENERATORS=make-android \ 92 @GYP_GENERATORS=make-android \
87 GYP_DEFINES="${DEFINES}" \ 93 GYP_DEFINES="${DEFINES}" \
88 CC="${ANDROID_TOOLCHAIN}/bin/*-gcc" \ 94 CC="${ANDROID_TOOLCHAIN}/bin/*-gcc" \
89 CXX="${ANDROID_TOOLCHAIN}/bin/*-g++" \ 95 CXX="${ANDROID_TOOLCHAIN}/bin/*-g++" \
90 build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \ 96 build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \
91 -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \ 97 -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \
92 -S.${ARCH} ${GYPFLAGS} 98 -S.${ARCH} ${GYPFLAGS}
OLDNEW
« no previous file with comments | « Makefile ('k') | build/android.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698