| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 ${ANDROID_SDK_VERSION} | 263 ${ANDROID_SDK_VERSION} |
| 264 | 264 |
| 265 common_vars_defines | 265 common_vars_defines |
| 266 | 266 |
| 267 # We need to supply SDK paths relative to the top of the Android tree to make | 267 # We need to supply SDK paths relative to the top of the Android tree to make |
| 268 # sure the generated Android makefiles are portable, as they will be checked | 268 # sure the generated Android makefiles are portable, as they will be checked |
| 269 # into the Android tree. | 269 # into the Android tree. |
| 270 ANDROID_SDK=$(python -c \ | 270 ANDROID_SDK=$(python -c \ |
| 271 "import os.path; print os.path.relpath('${ANDROID_SDK_ROOT}', \ | 271 "import os.path; print os.path.relpath('${ANDROID_SDK_ROOT}', \ |
| 272 '${ANDROID_BUILD_TOP}')") | 272 '${ANDROID_BUILD_TOP}')") |
| 273 ANDROID_SDK_TOOLS=$(python -c \ | 273 case "${host_os}" in |
| 274 "import os.path; \ | 274 "linux") |
| 275 print os.path.relpath('${ANDROID_SDK_ROOT}/../tools/linux', \ | 275 ANDROID_SDK_TOOLS=$(python -c \ |
| 276 '${ANDROID_BUILD_TOP}')") | 276 "import os.path; \ |
| 277 print os.path.relpath('${ANDROID_SDK_ROOT}/../tools/linux', \ |
| 278 '${ANDROID_BUILD_TOP}')") |
| 279 ;; |
| 280 "mac") |
| 281 ANDROID_SDK_TOOLS=$(python -c \ |
| 282 "import os.path; \ |
| 283 print os.path.relpath('${ANDROID_SDK_ROOT}/../tools/darwin', \ |
| 284 '${ANDROID_BUILD_TOP}')") |
| 285 ;; |
| 286 esac |
| 277 DEFINES+=" android_build_type=1" | 287 DEFINES+=" android_build_type=1" |
| 278 DEFINES+=" android_src=\$(GYP_ABS_ANDROID_TOP_DIR)" | 288 DEFINES+=" android_src=\$(GYP_ABS_ANDROID_TOP_DIR)" |
| 279 DEFINES+=" android_sdk=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}" | 289 DEFINES+=" android_sdk=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}" |
| 280 DEFINES+=" android_sdk_root=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}" | 290 DEFINES+=" android_sdk_root=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}" |
| 281 DEFINES+=" android_sdk_tools=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK_TOOLS}" | 291 DEFINES+=" android_sdk_tools=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK_TOOLS}" |
| 282 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" | 292 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" |
| 283 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" | 293 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" |
| 284 export GYP_DEFINES="${DEFINES}" | 294 export GYP_DEFINES="${DEFINES}" |
| 285 | 295 |
| 286 export GYP_GENERATORS="android" | 296 export GYP_GENERATORS="android" |
| 287 | 297 |
| 288 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 298 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 289 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 299 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
| 290 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 300 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
| 291 | 301 |
| 292 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 302 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
| 293 } | 303 } |
| OLD | NEW |