| 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 # Defines functions for envsetup.sh which sets up environment for building | 7 # Defines functions for envsetup.sh which sets up environment for building |
| 8 # Chromium on Android. The build can be either use the Android NDK/SDK or | 8 # Chromium on Android. The build can be either use the Android NDK/SDK or |
| 9 # android source tree. Each has a unique init function which calls functions | 9 # android source tree. Each has a unique init function which calls functions |
| 10 # prefixed with "common_" that is common for both environment setups. | 10 # prefixed with "common_" that is common for both environment setups. |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 if [[ -z "${ANDROID_SDK_ROOT}" || \ | 228 if [[ -z "${ANDROID_SDK_ROOT}" || \ |
| 229 ! -d "${ANDROID_SDK_ROOT}/${sdk_suffix}" ]]; then | 229 ! -d "${ANDROID_SDK_ROOT}/${sdk_suffix}" ]]; then |
| 230 export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/" | 230 export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/" |
| 231 else | 231 else |
| 232 sdk_defines+=" android_sdk_root=${ANDROID_SDK_ROOT}" | 232 sdk_defines+=" android_sdk_root=${ANDROID_SDK_ROOT}" |
| 233 fi | 233 fi |
| 234 if [[ -z "${ANDROID_SDK_BUILD_TOOLS_VERSION}" ]]; then | 234 if [[ -z "${ANDROID_SDK_BUILD_TOOLS_VERSION}" ]]; then |
| 235 export ANDROID_SDK_BUILD_TOOLS_VERSION=19.0.0 | 235 export ANDROID_SDK_BUILD_TOOLS_VERSION=19.0.0 |
| 236 fi | 236 fi |
| 237 | 237 |
| 238 unset ANDROID_BUILD_TOP | 238 # Unset toolchain. This makes it easy to switch between architectures. |
| 239 | |
| 240 # Set default target. | |
| 241 export TARGET_PRODUCT="${TARGET_PRODUCT:-trygon}" | |
| 242 | |
| 243 # Unset toolchain so that it can be set based on TARGET_PRODUCT. | |
| 244 # This makes it easy to switch between architectures. | |
| 245 unset ANDROID_TOOLCHAIN | 239 unset ANDROID_TOOLCHAIN |
| 246 | 240 |
| 247 common_vars_defines | 241 common_vars_defines |
| 248 | 242 |
| 249 DEFINES+="${sdk_defines}" | 243 DEFINES+="${sdk_defines}" |
| 250 | 244 |
| 251 common_gyp_vars | 245 common_gyp_vars |
| 252 | 246 |
| 253 if [[ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]]; then | 247 if [[ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]]; then |
| 254 # Can not build WebView with NDK/SDK because it needs the Android build | 248 # Can not build WebView with NDK/SDK because it needs the Android build |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 fi | 313 fi |
| 320 export GYP_DEFINES="${DEFINES}" | 314 export GYP_DEFINES="${DEFINES}" |
| 321 | 315 |
| 322 export GYP_GENERATORS="android" | 316 export GYP_GENERATORS="android" |
| 323 | 317 |
| 324 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 318 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 325 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 319 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
| 326 | 320 |
| 327 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 321 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
| 328 } | 322 } |
| OLD | NEW |