1#!/bin/bash 2 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 5# found in the LICENSE file. 6 7# This script runs gyp with the configuration required to build WebView in the 8# Android build system. It is not necessary to source build/android/envsetup.sh 9# before running this script. 10 11set -e 12 13PLATFORM=${1:-linux-arm} 14echo "Generating makefiles for $PLATFORM" 15 16export CHROME_ANDROID_BUILD_WEBVIEW=1 17export CHROME_SRC="$(readlink -f "$(dirname "$0")/../..")" 18export PYTHONDONTWRITEBYTECODE=1 19 20if [ "$PLATFORM" == "linux-arm" -o "$PLATFORM" == "all" ]; then 21 ( . build/android/envsetup.sh --target-arch=arm --host-os=linux && \ 22 android_gyp --suffix .linux-arm ) 23fi 24if [ "$PLATFORM" == "linux-x86" -o "$PLATFORM" == "all" ]; then 25 ( . build/android/envsetup.sh --target-arch=x86 --host-os=linux && \ 26 android_gyp --suffix .linux-x86 ) 27fi 28if [ "$PLATFORM" == "linux-mips" -o "$PLATFORM" == "all" ]; then 29 ( . build/android/envsetup.sh --target-arch=mips --host-os=linux && \ 30 android_gyp --suffix .linux-mips ) 31fi 32if [ "$PLATFORM" == "darwin-arm" -o "$PLATFORM" == "all" ]; then 33 ( . build/android/envsetup.sh --target-arch=arm --host-os=mac && \ 34 android_gyp --suffix .darwin-arm ) 35fi 36if [ "$PLATFORM" == "darwin-x86" -o "$PLATFORM" == "all" ]; then 37 ( . build/android/envsetup.sh --target-arch=x86 --host-os=mac && \ 38 android_gyp --suffix .darwin-x86 ) 39fi 40if [ "$PLATFORM" == "darwin-mips" -o "$PLATFORM" == "all" ]; then 41 ( . build/android/envsetup.sh --target-arch=mips --host-os=mac && \ 42 android_gyp --suffix .darwin-mips ) 43fi 44