1 #!/bin/bash 2 # 3 # this script is used to build a static version of the Android emulator 4 # from our distribution package. 5 # 6 cd $(dirname $0) 7 CURDIR=$(pwd) 8 9 show_help= 10 TARGET=emulator 11 for opt; do 12 optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'` 13 case "$opt" in 14 --help|-h|-\?) show_help=yes 15 ;; 16 --target=*) TARGET=$optarg 17 ;; 18 esac 19 done 20 21 if [ -n "$show_help" ] ; then 22 echo "usage: build-emulator [--target=FILEPATH]" 23 exit 1 24 fi 25 26 # directory where we'll place the temporary SDL binaries 27 LOCAL=$CURDIR/local 28 29 cd $CURDIR/qemu 30 if ! (./android-rebuild.sh); then 31 echo "ERROR: could not build the emulator, please check the sources" 32 fi 33 34 cp objs/emulator $CURDIR/emulator 35