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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 DEFINES+=" android_src='NOT_SDK_COMPLIANT'" | 185 DEFINES+=" android_src='NOT_SDK_COMPLIANT'" |
186 DEFINES+=" android_product_out=${CHROME_SRC}/out/android" | 186 DEFINES+=" android_product_out=${CHROME_SRC}/out/android" |
187 DEFINES+=" android_lib='NOT_SDK_COMPLIANT'" | 187 DEFINES+=" android_lib='NOT_SDK_COMPLIANT'" |
188 DEFINES+=" android_static_lib='NOT_SDK_COMPLIANT'" | 188 DEFINES+=" android_static_lib='NOT_SDK_COMPLIANT'" |
189 DEFINES+=\ | 189 DEFINES+=\ |
190 " android_sdk=${ANDROID_SDK_ROOT}/platforms/android-${ANDROID_SDK_VERSION}" | 190 " android_sdk=${ANDROID_SDK_ROOT}/platforms/android-${ANDROID_SDK_VERSION}" |
191 DEFINES+=" android_sdk_root=${ANDROID_SDK_ROOT}" | 191 DEFINES+=" android_sdk_root=${ANDROID_SDK_ROOT}" |
192 DEFINES+=" android_sdk_tools=${ANDROID_SDK_ROOT}/platform-tools" | 192 DEFINES+=" android_sdk_tools=${ANDROID_SDK_ROOT}/platform-tools" |
193 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" | 193 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" |
194 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" | 194 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" |
195 DEFINES+=" android_strip=${STRIP}" | |
Torne
2012/08/14 16:09:33
Can't we derive this from android_toolchain inside
| |
195 | 196 |
196 common_gyp_vars | 197 common_gyp_vars |
197 | 198 |
198 if [ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]; then | 199 if [ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]; then |
199 # Can not build WebView with NDK/SDK because it needs the Android build | 200 # Can not build WebView with NDK/SDK because it needs the Android build |
200 # system and build inside an Android source tree. | 201 # system and build inside an Android source tree. |
201 echo "Can not build WebView with NDK/SDK. Requires android source tree." \ | 202 echo "Can not build WebView with NDK/SDK. Requires android source tree." \ |
202 >& 2 | 203 >& 2 |
203 echo "Try . build/android/envsetup.sh instead." >& 2 | 204 echo "Try . build/android/envsetup.sh instead." >& 2 |
204 return 1 | 205 return 1 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 return | 240 return |
240 fi | 241 fi |
241 | 242 |
242 # The non-SDK build currently requires the SDK path to build the framework | 243 # The non-SDK build currently requires the SDK path to build the framework |
243 # Java aidl files. TODO(steveblock): Investigate avoiding this requirement. | 244 # Java aidl files. TODO(steveblock): Investigate avoiding this requirement. |
244 DEFINES+=" android_sdk=${ANDROID_SDK_ROOT}" | 245 DEFINES+=" android_sdk=${ANDROID_SDK_ROOT}" |
245 DEFINES+=" android_sdk_root=${ANDROID_SDK_ROOT}" | 246 DEFINES+=" android_sdk_root=${ANDROID_SDK_ROOT}" |
246 DEFINES+=" android_sdk_tools=${ANDROID_SDK_ROOT}/../tools/linux" | 247 DEFINES+=" android_sdk_tools=${ANDROID_SDK_ROOT}/../tools/linux" |
247 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" | 248 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" |
248 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" | 249 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" |
250 DEFINES+=" android_strip=${STRIP}" | |
249 | 251 |
250 common_gyp_vars | 252 common_gyp_vars |
251 } | 253 } |
252 | 254 |
253 ################################################################################ | 255 ################################################################################ |
254 # To build WebView, we use the Android build system and build inside an Android | 256 # To build WebView, we use the Android build system and build inside an Android |
255 # source tree. This method is called from non_sdk_build_init() and adds to the | 257 # source tree. This method is called from non_sdk_build_init() and adds to the |
256 # settings specified there. | 258 # settings specified there. |
257 ############################################################################# | 259 ############################################################################# |
258 webview_build_init() { | 260 webview_build_init() { |
(...skipping 17 matching lines...) Expand all Loading... | |
276 | 278 |
277 export GYP_GENERATORS="android" | 279 export GYP_GENERATORS="android" |
278 | 280 |
279 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 281 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
280 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 282 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
281 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 283 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
282 | 284 |
283 # TODO(torne): This isn't upstream yet. Upstream it or remove this setting. | 285 # TODO(torne): This isn't upstream yet. Upstream it or remove this setting. |
284 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android_webview.gyp" | 286 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android_webview.gyp" |
285 } | 287 } |
OLD | NEW |