1 #!/bin/sh 2 3 # Copyright 2014 Google Inc. 4 # 5 # Use of this source code is governed by a BSD-style license that can be 6 # found in the LICENSE file. 7 8 set -e # When any command fails, the shell will immediately exit. 9 10 usage() { 11 cat >&2 <<EOF 12 arm64_make - this script builds a AArch64 version of skia that 13 does not depend on external libraries, perfect for putting in an 14 embedded system running Linux. 15 16 Assumes that you have already run the download_deps script. 17 18 Usage: 19 $0 \\ 20 [-o SKIA_OUT_DIR] [-c CC_EXE] [-x CXX_EXE] \\ 21 [-t Debug | Release | Coverage | Release_Developer] \\ 22 23 Example use: 24 $0 \\ 25 -o ~/build/skia/arg64gcc \\ 26 -c ~/local/arm64/bin/aarch64-linux-gnu-gcc \\ 27 -x ~/local/arm64/bin/aarch64-linux-gnu-g++ \\ 28 EOF 29 return 1 30 } 31 32 # BUILD_TYPE should be one of: 33 # Coverage, Debug, Release, or Release_Developer 34 BUILD_TYPE='Debug' 35 36 while getopts ":c:x:o:t:h" opt ; do 37 case $opt in 38 c) export CC="$OPTARG" ;; 39 x) export CXX="$OPTARG" ;; 40 o) export SKIA_OUT="$OPTARG";; 41 t) BUILD_TYPE="$OPTARG";; 42 h) usage || exit;; 43 ?) echo "unknown option '$OPTARG'" >&2; 44 usage || exit;; 45 esac 46 done 47 OPTIND=1 # Reset this variable for calling barelinux_make with -t command flag. 48 49 export GYP_DEFINES="${GYP_DEFINES} \ 50 skia_gpu=0 \ 51 skia_arch_type=arm64 \ 52 " 53 54 . "$(dirname "$0")/barelinux_make" -t "$BUILD_TYPE" 55 56