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 # Sets up environment for building Chromium on Android. It can either be | 7 # Sets up environment for building Chromium on Android. It can either be |
8 # compiled with the Android tree or using the Android SDK/NDK. To build with | 8 # compiled with the Android tree or using the Android SDK/NDK. To build with |
9 # NDK/SDK: ". build/android/envsetup.sh --sdk". Environment variable | 9 # NDK/SDK: ". build/android/envsetup.sh --sdk". Environment variable |
10 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to | 10 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 # Source a bunch of helper functions | 89 # Source a bunch of helper functions |
90 . ${CHROME_SRC}/build/android/adb_device_functions.sh | 90 . ${CHROME_SRC}/build/android/adb_device_functions.sh |
91 | 91 |
92 ANDROID_GOMA_WRAPPER="" | 92 ANDROID_GOMA_WRAPPER="" |
93 if [[ -d $GOMA_DIR ]]; then | 93 if [[ -d $GOMA_DIR ]]; then |
94 ANDROID_GOMA_WRAPPER="$GOMA_DIR/gomacc" | 94 ANDROID_GOMA_WRAPPER="$GOMA_DIR/gomacc" |
95 fi | 95 fi |
96 export ANDROID_GOMA_WRAPPER | 96 export ANDROID_GOMA_WRAPPER |
97 | 97 |
98 export CC_target=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) | 98 export CC=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) |
99 export CXX_target=$(basename ${ANDROID_TOOLCHAIN}/*-g++) | 99 export CXX=$(basename ${ANDROID_TOOLCHAIN}/*-g++) |
100 export LINK_target=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) | 100 export LINK=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) |
101 export AR_target=$(basename ${ANDROID_TOOLCHAIN}/*-ar) | 101 export AR=$(basename ${ANDROID_TOOLCHAIN}/*-ar) |
| 102 export CC_host=gcc |
| 103 export CXX_host=g++ |
| 104 export AR_host=ar |
102 | 105 |
103 # Performs a gyp_chromium run to convert gyp->Makefile for android code. | 106 # Performs a gyp_chromium run to convert gyp->Makefile for android code. |
104 android_gyp() { | 107 android_gyp() { |
105 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" | 108 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |
106 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 109 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
107 } | 110 } |
108 | 111 |
109 # FLOCK needs to be null on system that has no flock | 112 # FLOCK needs to be null on system that has no flock |
110 which flock > /dev/null || export FLOCK= | 113 which flock > /dev/null || export FLOCK= |
OLD | NEW |