OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script runs gyp with the configuration required to build WebView in the | 7 # This script runs gyp with the configuration required to build WebView in the |
8 # Android build system. It is not necessary to source build/android/envsetup.sh | 8 # Android build system. It is not necessary to source build/android/envsetup.sh |
9 # before running this script. | 9 # before running this script. |
10 | 10 |
11 set -e | 11 set -e |
12 | 12 |
13 PLATFORM=${1:-linux-arm} | 13 PLATFORM=${1:-linux-arm} |
14 echo "Generating makefiles for $PLATFORM" | 14 echo "Generating makefiles for $PLATFORM" |
15 | 15 |
16 export CHROME_ANDROID_BUILD_WEBVIEW=1 | 16 export CHROME_ANDROID_BUILD_WEBVIEW=1 |
17 export CHROME_SRC="$(readlink -f "$(dirname "$0")/../..")" | 17 export CHROME_SRC="$(readlink -f "$(dirname "$0")/../..")" |
18 export PYTHONDONTWRITEBYTECODE=1 | 18 export PYTHONDONTWRITEBYTECODE=1 |
19 | 19 |
20 FLAGS="-f android -Gdefault_target=All -Glimit_to_target_all=1 "\ | 20 FLAGS="-f android -Gdefault_target=All -Glimit_to_target_all=1 "\ |
21 "${CHROME_SRC}/android_webview/all_webview.gyp" | 21 "${CHROME_SRC}/android_webview/all_webview.gyp" |
22 | 22 |
23 if [ "$PLATFORM" == "linux-arm" -o "$PLATFORM" == "all" ]; then | 23 if [ "$PLATFORM" == "linux-arm" -o "$PLATFORM" == "all" ]; then |
24 ( . $CHROME_SRC/build/android/envsetup.sh --target-arch=arm \ | 24 ( . $CHROME_SRC/build/android/envsetup.sh \ |
25 && android_gyp --suffix .linux-arm ${FLAGS} -Dhost_os=linux ) | 25 && android_gyp --suffix .linux-arm ${FLAGS} -Dtarget_arch=arm -Dhost_os=linu
x ) |
26 fi | 26 fi |
27 if [ "$PLATFORM" == "linux-x86" -o "$PLATFORM" == "all" ]; then | 27 if [ "$PLATFORM" == "linux-x86" -o "$PLATFORM" == "all" ]; then |
28 ( . $CHROME_SRC/build/android/envsetup.sh --target-arch=x86 \ | 28 ( . $CHROME_SRC/build/android/envsetup.sh \ |
29 && android_gyp --suffix .linux-x86 ${FLAGS} -Dhost_os=linux ) | 29 && android_gyp --suffix .linux-x86 ${FLAGS} -Dtarget_arch=ia32 -Dhost_os=lin
ux ) |
30 fi | 30 fi |
31 if [ "$PLATFORM" == "linux-mips" -o "$PLATFORM" == "all" ]; then | 31 if [ "$PLATFORM" == "linux-mips" -o "$PLATFORM" == "all" ]; then |
32 ( . $CHROME_SRC/build/android/envsetup.sh --target-arch=mips \ | 32 ( . $CHROME_SRC/build/android/envsetup.sh \ |
33 && android_gyp --suffix .linux-mips ${FLAGS} -Dhost_os=linux ) | 33 && android_gyp --suffix .linux-mips ${FLAGS} -Dtarget_arch=mipsel -Dhost_os=
linux ) |
34 fi | 34 fi |
35 if [ "$PLATFORM" == "darwin-arm" -o "$PLATFORM" == "all" ]; then | 35 if [ "$PLATFORM" == "darwin-arm" -o "$PLATFORM" == "all" ]; then |
36 ( . $CHROME_SRC/build/android/envsetup.sh --target-arch=arm \ | 36 ( . $CHROME_SRC/build/android/envsetup.sh --target-arch=arm \ |
37 && android_gyp --suffix .darwin-arm ${FLAGS} -Dhost_os=mac ) | 37 && android_gyp --suffix .darwin-arm ${FLAGS} -Dtarget_arch=arm -Dhost_os=mac
) |
38 fi | 38 fi |
39 if [ "$PLATFORM" == "darwin-x86" -o "$PLATFORM" == "all" ]; then | 39 if [ "$PLATFORM" == "darwin-x86" -o "$PLATFORM" == "all" ]; then |
40 ( . $CHROME_SRC/build/android/envsetup.sh --target-arch=x86 \ | 40 ( . $CHROME_SRC/build/android/envsetup.sh \ |
41 && android_gyp --suffix .darwin-x86 ${FLAGS} -Dhost_os=mac ) | 41 && android_gyp --suffix .darwin-x86 ${FLAGS} -Dtarget_arch=ia32 -Dhost_os=ma
c ) |
42 fi | 42 fi |
43 if [ "$PLATFORM" == "darwin-mips" -o "$PLATFORM" == "all" ]; then | 43 if [ "$PLATFORM" == "darwin-mips" -o "$PLATFORM" == "all" ]; then |
44 ( . $CHROME_SRC/build/android/envsetup.sh --target-arch=mips \ | 44 ( . $CHROME_SRC/build/android/envsetup.sh \ |
45 && android_gyp --suffix .darwin-mips ${FLAGS} -Dhost_os=mac ) | 45 && android_gyp --suffix .darwin-mips ${FLAGS} -Dtarget_arch=mipsel -Dhost_os
=mac ) |
46 fi | 46 fi |
OLD | NEW |