| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 GOMA_WRAPPER="" | 100 GOMA_WRAPPER="" |
| 101 if [[ -d $GOMA_DIR ]]; then | 101 if [[ -d $GOMA_DIR ]]; then |
| 102 GOMA_WRAPPER="$GOMA_DIR/gomacc" | 102 GOMA_WRAPPER="$GOMA_DIR/gomacc" |
| 103 fi | 103 fi |
| 104 # Ninja requires "*_target" for target builds. | 104 # Ninja requires "*_target" for target builds. |
| 105 GOMA_WRAPPER=${GOMA_WRAPPER} \ | 105 GOMA_WRAPPER=${GOMA_WRAPPER} \ |
| 106 CC_target=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) \ | 106 CC_target=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) \ |
| 107 CXX_target=$(basename ${ANDROID_TOOLCHAIN}/*-g++) \ | 107 CXX_target=$(basename ${ANDROID_TOOLCHAIN}/*-g++) \ |
| 108 LINK_target=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) \ | 108 LINK_target=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) \ |
| 109 AR_target=$(basename ${ANDROID_TOOLCHAIN}/*-ar) \ | 109 AR_target=$(basename ${ANDROID_TOOLCHAIN}/*-ar) \ |
| 110 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" | 110 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" "$@" |
| 111 } | 111 } |
| 112 | 112 |
| 113 export OBJCOPY=$(echo ${ANDROID_TOOLCHAIN}/*-objcopy) | 113 export OBJCOPY=$(echo ${ANDROID_TOOLCHAIN}/*-objcopy) |
| 114 export STRIP=$(echo ${ANDROID_TOOLCHAIN}/*-strip) | 114 export STRIP=$(echo ${ANDROID_TOOLCHAIN}/*-strip) |
| 115 | 115 |
| 116 # The set of GYP_DEFINES to pass to gyp. Use 'readlink -e' on directories | 116 # The set of GYP_DEFINES to pass to gyp. Use 'readlink -e' on directories |
| 117 # to canonicalize them (remove double '/', remove trailing '/', etc). | 117 # to canonicalize them (remove double '/', remove trailing '/', etc). |
| 118 DEFINES+=" OS=android" | 118 DEFINES+=" OS=android" |
| 119 DEFINES+=" android_build_type=0" # Currently, Only '0' is supportted. | 119 DEFINES+=" android_build_type=0" # Currently, Only '0' is supportted. |
| 120 DEFINES+=" host_os=${host_os}" | 120 DEFINES+=" host_os=${host_os}" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 134 export GYP_DEFINES="${DEFINES}" | 134 export GYP_DEFINES="${DEFINES}" |
| 135 | 135 |
| 136 # Use the "android" flavor of the Makefile generator for both Linux and OS X. | 136 # Use the "android" flavor of the Makefile generator for both Linux and OS X. |
| 137 export GYP_GENERATORS="make-android" | 137 export GYP_GENERATORS="make-android" |
| 138 | 138 |
| 139 # Use our All target as the default | 139 # Use our All target as the default |
| 140 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 140 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 141 | 141 |
| 142 # We want to use our version of "all" targets. | 142 # We want to use our version of "all" targets. |
| 143 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" | 143 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" |
| OLD | NEW |