Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 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. Only Android NDK, | 7 # Sets up environment for building Chromium on Android. Only Android NDK, |
| 8 # Revision 6b on Linux or Mac is offically supported. | 8 # Revision 6b on Linux or Mac is offically supported. |
| 9 # | 9 # |
| 10 # To run this script, the system environment ANDROID_NDK_ROOT must be set | 10 # To run this script, the system environment ANDROID_NDK_ROOT must be set |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 | 68 |
| 69 make() { | 69 make() { |
| 70 # TODO(michaelbai): how to use ccache in NDK. | 70 # TODO(michaelbai): how to use ccache in NDK. |
| 71 if [ -n "${USE_CCACHE}" ]; then | 71 if [ -n "${USE_CCACHE}" ]; then |
| 72 if [ -e "${PREBUILT_CCACHE_PATH}" ]; then | 72 if [ -e "${PREBUILT_CCACHE_PATH}" ]; then |
| 73 use_ccache_var="$PREBUILT_CCACHE_PATH " | 73 use_ccache_var="$PREBUILT_CCACHE_PATH " |
| 74 else | 74 else |
| 75 use_ccache_var="" | 75 use_ccache_var="" |
| 76 fi | 76 fi |
| 77 fi | 77 fi |
| 78 if [ -f "$PWD/build/android/envsetup.sh" ]; then | 78 if [ -f "$PWD/build/android/envsetup.sh" ] || |
| 79 [ -n "${WEBKIT_ANDROID_BUILD}" ]; then | |
|
John Grabowski
2011/11/16 19:40:21
This needs doc or an explanation of some kind.
| |
| 79 CC="${use_ccache_var}${CROSS_CC}" CXX="${use_ccache_var}${CROSS_CXX}" \ | 80 CC="${use_ccache_var}${CROSS_CC}" CXX="${use_ccache_var}${CROSS_CXX}" \ |
| 80 LINK="${CROSS_LINK}" AR="${CROSS_AR}" RANLIB="${CROSS_RANLIB}" \ | 81 LINK="${CROSS_LINK}" AR="${CROSS_AR}" RANLIB="${CROSS_RANLIB}" \ |
| 81 command make $* | 82 command make $* |
| 82 else | 83 else |
| 83 command make $* | 84 command make $* |
| 84 fi | 85 fi |
| 85 } | 86 } |
| 86 | 87 |
| 87 # Performs a gyp_chromium run to convert gyp->Makefile for android code. | 88 # Performs a gyp_chromium run to convert gyp->Makefile for android code. |
| 88 android_gyp() { | 89 android_gyp() { |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 106 DEFINES="OS=android" | 107 DEFINES="OS=android" |
| 107 DEFINES+=" android_build_type=0" # Currently, Only '0' is supportted. | 108 DEFINES+=" android_build_type=0" # Currently, Only '0' is supportted. |
| 108 DEFINES+=" host_os=${host_os}" | 109 DEFINES+=" host_os=${host_os}" |
| 109 DEFINES+=" linux_fpic=1" | 110 DEFINES+=" linux_fpic=1" |
| 110 DEFINES+=" release_optimize=s" | 111 DEFINES+=" release_optimize=s" |
| 111 DEFINES+=" linux_use_tcmalloc=0" | 112 DEFINES+=" linux_use_tcmalloc=0" |
| 112 DEFINES+=" disable_nacl=1" | 113 DEFINES+=" disable_nacl=1" |
| 113 DEFINES+=" remoting=0" | 114 DEFINES+=" remoting=0" |
| 114 DEFINES+=" p2p_apis=0" | 115 DEFINES+=" p2p_apis=0" |
| 115 DEFINES+=" enable_touch_events=1" | 116 DEFINES+=" enable_touch_events=1" |
| 117 DEFINES+=" build_ffmpegsumo=0" | |
| 116 # TODO(bulach): use "shared_libraries" once the transition from executable | 118 # TODO(bulach): use "shared_libraries" once the transition from executable |
| 117 # is over. | 119 # is over. |
| 118 DEFINES+=" gtest_target_type=executable" | 120 DEFINES+=" gtest_target_type=executable" |
| 119 DEFINES+=" branding=Chromium" | 121 DEFINES+=" branding=Chromium" |
| 120 | 122 |
| 121 # If the TARGET_PRODUCT wasn't set, use 'full' by default. | 123 # If the TARGET_PRODUCT wasn't set, use 'full' by default. |
| 122 if [ -z "${TARGET_PRODUCT}" ]; then | 124 if [ -z "${TARGET_PRODUCT}" ]; then |
| 123 TARGET_PRODUCT="full" | 125 TARGET_PRODUCT="full" |
| 124 fi | 126 fi |
| 125 | 127 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 138 return 1 | 140 return 1 |
| 139 esac | 141 esac |
| 140 | 142 |
| 141 export GYP_DEFINES="${DEFINES}" | 143 export GYP_DEFINES="${DEFINES}" |
| 142 | 144 |
| 143 # Use the "android" flavor of the Makefile generator for both Linux and OS X. | 145 # Use the "android" flavor of the Makefile generator for both Linux and OS X. |
| 144 export GYP_GENERATORS="make-android" | 146 export GYP_GENERATORS="make-android" |
| 145 | 147 |
| 146 # We want to use our version of "all" targets. | 148 # We want to use our version of "all" targets. |
| 147 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" | 149 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" |
| OLD | NEW |