From 2ebf6a5f0ebaaea368242adb71824428b2c24e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 17 Feb 2015 20:28:05 +0000 Subject: [PATCH] android's target --- misc/mkandroid | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/misc/mkandroid b/misc/mkandroid index edd643eb5..b49ad09d5 100755 --- a/misc/mkandroid +++ b/misc/mkandroid @@ -6,7 +6,7 @@ # # SDK_ROOT: where is the SDK # NDK_ROOT: and the NDK -# GMPDIR: get your copy of GMP from +# GMPDIR: get your copy of GMP from # BUILDDROID: where we want to compile yap @@ -24,7 +24,10 @@ else ANDROID_BUILD=linux fi -# what android to compile for +# use `android list target` to check for available targets +export ANDROID_TARGET=3 + +# what android to compile for, use ANDROID_IMAGE=first # YAP_SRC="$HOME/Yap/yap-6.3" @@ -63,6 +66,18 @@ else export GMPDIR="$HOME"/Yap/gmp-android fi +# fetch SQLITE3 from https://github.com/Rupan/gmp, +# and have two versions: one to build myddas, the +# other to build the app. +# +# This one is used to build myddas +if test -d /scratch +then + export SQLITE3DIR=/scratch/vitor/sqlite3-android +else + export SQLITE3DIR="$HOME"/Yap/sqlite3-android +fi + #where I want to compile #export BUILDTOOLCHAIN="$HOME/Yap/my-android-toolchain" if test -d /scratch @@ -106,10 +121,10 @@ fi mkdir -p $BUILDDROID -startemulator () { +startemulator () { EMS=`ps -ef | grep emulator64| grep -v grep` if test x"$EMS" = x - then + then nohup emulator -avd $IMAGE & fi } @@ -130,7 +145,7 @@ then make elif test x$1 = xgo then - echo "In make I believe" + echo "In make I believe" elif test x$1 = xeclipse then startemulator @@ -139,8 +154,17 @@ then else startemulator rm -rf "$BUILDDROID"/* - cd "$BUILDDROID" - "$YAP_SRC"/configure --host="$ANDROID_ARCH"-linux-androideabi --prefix=`pwd` --enable-low-level-tracer --enable-debug-yap --enable-dynamic-loading --with-swig --with-gmp=$GMPDIR --with-sqlite=no --disable-chr #--enable-threads + cd "$BUILDDROID" + "$YAP_SRC"/configure \ + --host="$ANDROID_ARCH"-linux-androideabi \ + --prefix=`pwd` \ + --enable-low-level-tracer \ + --enable-debug-yap \ + --enable-dynamic-loading \ + --with-swig \ + --with-gmp=$GMPDIR \ + --with-sqlite3=$SQLITE3DIR \ + --with-chr=no #--enable-threads make depend make -j install fi