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. 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" | 132 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |
133 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" "$@" | 133 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" "$@" |
134 } | 134 } |
135 | 135 |
136 export OBJCOPY=$(echo ${ANDROID_TOOLCHAIN}/*-objcopy) | 136 export OBJCOPY=$(echo ${ANDROID_TOOLCHAIN}/*-objcopy) |
137 export STRIP=$(echo ${ANDROID_TOOLCHAIN}/*-strip) | 137 export STRIP=$(echo ${ANDROID_TOOLCHAIN}/*-strip) |
138 | 138 |
139 # The set of GYP_DEFINES to pass to gyp. Use 'readlink -e' on directories | 139 # The set of GYP_DEFINES to pass to gyp. Use 'readlink -e' on directories |
140 # to canonicalize them (remove double '/', remove trailing '/', etc). | 140 # to canonicalize them (remove double '/', remove trailing '/', etc). |
141 DEFINES+=" OS=android" | 141 DEFINES+=" OS=android" |
142 DEFINES+=" android_build_type=0" # Currently, Only '0' is supportted. | 142 DEFINES+=" android_build_type=0" |
143 DEFINES+=" host_os=${host_os}" | 143 DEFINES+=" host_os=${host_os}" |
144 DEFINES+=" linux_fpic=1" | 144 DEFINES+=" linux_fpic=1" |
145 DEFINES+=" release_optimize=s" | 145 DEFINES+=" release_optimize=s" |
146 DEFINES+=" linux_use_tcmalloc=0" | 146 DEFINES+=" linux_use_tcmalloc=0" |
147 DEFINES+=" disable_nacl=1" | 147 DEFINES+=" disable_nacl=1" |
148 DEFINES+=" remoting=0" | 148 DEFINES+=" remoting=0" |
149 DEFINES+=" p2p_apis=0" | 149 DEFINES+=" p2p_apis=0" |
150 DEFINES+=" enable_touch_events=1" | 150 DEFINES+=" enable_touch_events=1" |
151 DEFINES+=" build_ffmpegsumo=0" | 151 DEFINES+=" build_ffmpegsumo=0" |
152 DEFINES+=" gtest_target_type=shared_library" | 152 DEFINES+=" gtest_target_type=shared_library" |
153 DEFINES+=" branding=Chromium" | 153 DEFINES+=" branding=Chromium" |
154 DEFINES+=\ | 154 DEFINES+=\ |
155 " android_sdk=${ANDROID_SDK_ROOT}/platforms/android-${ANDROID_SDK_VERSION}" | 155 " android_sdk=${ANDROID_SDK_ROOT}/platforms/android-${ANDROID_SDK_VERSION}" |
156 DEFINES+=" android_sdk_tools=${ANDROID_SDK_ROOT}/platform-tools" | 156 DEFINES+=" android_sdk_tools=${ANDROID_SDK_ROOT}/platform-tools" |
157 | 157 |
158 export GYP_DEFINES="${DEFINES}" | 158 export GYP_DEFINES="${DEFINES}" |
159 | 159 |
160 # Use the "android" flavor of the Makefile generator for both Linux and OS X. | 160 # Use the "android" flavor of the Makefile generator for both Linux and OS X. |
161 export GYP_GENERATORS="make-android" | 161 export GYP_GENERATORS="make-android" |
162 | 162 |
163 # Use our All target as the default | 163 # Use our All target as the default |
164 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 164 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
165 | 165 |
166 # We want to use our version of "all" targets. | 166 # We want to use our version of "all" targets. |
167 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" | 167 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" |
OLD | NEW |