OLD | NEW |
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 android_arm64 android_mipsel | 29 ANDROID_ARCHES = android_ia32 android_arm android_arm64 android_mipsel android_x
87 |
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 ANDROID_NDK_HOST_ARCH ?= $(shell uname -m | sed -e 's/i[3456]86/x86/') | 38 ANDROID_NDK_HOST_ARCH ?= $(shell uname -m | sed -e 's/i[3456]86/x86/') |
39 ifeq ($(HOST_OS), linux) | 39 ifeq ($(HOST_OS), linux) |
(...skipping 26 matching lines...) Expand all Loading... |
66 TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH) | 66 TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH) |
67 TOOLCHAIN_VER = 4.6 | 67 TOOLCHAIN_VER = 4.6 |
68 | 68 |
69 else | 69 else |
70 ifeq ($(ARCH), android_ia32) | 70 ifeq ($(ARCH), android_ia32) |
71 DEFINES = target_arch=ia32 v8_target_arch=ia32 android_target_arch=x86 a
ndroid_target_platform=14 | 71 DEFINES = target_arch=ia32 v8_target_arch=ia32 android_target_arch=x86 a
ndroid_target_platform=14 |
72 TOOLCHAIN_ARCH = x86 | 72 TOOLCHAIN_ARCH = x86 |
73 TOOLCHAIN_PREFIX = i686-linux-android | 73 TOOLCHAIN_PREFIX = i686-linux-android |
74 TOOLCHAIN_VER = 4.6 | 74 TOOLCHAIN_VER = 4.6 |
75 else | 75 else |
76 $(error Target architecture "${ARCH}" is not supported) | 76 ifeq ($(ARCH), android_x87) |
| 77 DEFINES = target_arch=x87 v8_target_arch=x87 android_target_arch=x86 a
ndroid_target_platform=14 |
| 78 TOOLCHAIN_ARCH = x86 |
| 79 TOOLCHAIN_PREFIX = i686-linux-android |
| 80 TOOLCHAIN_VER = 4.6 |
| 81 » else |
| 82 $(error Target architecture "${ARCH}" is not supported) |
| 83 endif |
77 endif | 84 endif |
78 endif | 85 endif |
79 endif | 86 endif |
80 endif | 87 endif |
81 | 88 |
82 TOOLCHAIN_PATH = \ | 89 TOOLCHAIN_PATH = \ |
83 ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}-${TOOLCHAIN_VER}/prebuilt | 90 ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}-${TOOLCHAIN_VER}/prebuilt |
84 ANDROID_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR} | 91 ANDROID_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR} |
85 | 92 |
86 ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),) | 93 ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),) |
(...skipping 22 matching lines...) Expand all Loading... |
109 ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_BUILDS)) | 116 ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_BUILDS)) |
110 $(ANDROID_MAKEFILES): | 117 $(ANDROID_MAKEFILES): |
111 GYP_GENERATORS=make-android \ | 118 GYP_GENERATORS=make-android \ |
112 GYP_DEFINES="${DEFINES}" \ | 119 GYP_DEFINES="${DEFINES}" \ |
113 CC="${ANDROID_TOOLCHAIN}/bin/${TOOLCHAIN_PREFIX}-gcc" \ | 120 CC="${ANDROID_TOOLCHAIN}/bin/${TOOLCHAIN_PREFIX}-gcc" \ |
114 CXX="${ANDROID_TOOLCHAIN}/bin/${TOOLCHAIN_PREFIX}-g++" \ | 121 CXX="${ANDROID_TOOLCHAIN}/bin/${TOOLCHAIN_PREFIX}-g++" \ |
115 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \ | 122 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \ |
116 build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \ | 123 build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \ |
117 -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \ | 124 -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \ |
118 -S$(suffix $(basename $@))$(suffix $@) ${GYPFLAGS} | 125 -S$(suffix $(basename $@))$(suffix $@) ${GYPFLAGS} |
OLD | NEW |