From f46cf669a37c088be969b4c1a38d7456026c20df Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Fri, 16 Oct 2015 17:07:35 +0300 Subject: [PATCH] Android: added make files --- .gitignore | 3 ++ ChangeLog | 1 + README.markdown | 5 +++ build-android.sh | 31 ++++++++++++++++++ jni/Android.mk | 78 ++++++++++++++++++++++++++++++++++++++++++++++ jni/Application.mk | 2 ++ 6 files changed, 120 insertions(+) create mode 100755 build-android.sh create mode 100644 jni/Android.mk create mode 100644 jni/Application.mk diff --git a/.gitignore b/.gitignore index 066a799..5ad3569 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,6 @@ tests/test_snprintf tests/test_sock m4/ libstrophe.project +libs/ +obj/ +expat/ diff --git a/ChangeLog b/ChangeLog index af890b3..099e516 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 0.9.0 - IPv6 support - Legacy SSL support + - Initial Android support - New API: - xmpp_uuid_gen() - xmpp_conn_get_flags() diff --git a/README.markdown b/README.markdown index 7dfeaa5..de8d816 100644 --- a/README.markdown +++ b/README.markdown @@ -41,6 +41,11 @@ another path use the `--prefix` option during configure, e.g.: ./configure --prefix=/usr +### Android + +Run script `build-android.sh` and follow the instructions. You will +need expat sources and android-ndk. + Requirements ------------ diff --git a/build-android.sh b/build-android.sh new file mode 100755 index 0000000..a6a389b --- /dev/null +++ b/build-android.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +DIR=`dirname $0` +EXPAT_PATH="$DIR/expat" +EXPAT_FILE='lib/expat.h' + +if [ ! -d $EXPAT_PATH ]; then + mkdir $EXPAT_PATH +fi + +# TODO Accept expat tarball as argument and extract it to the right place. + +if [ ! -d $EXPAT_PATH/lib -o ! -f "$EXPAT_PATH/$EXPAT_FILE" ]; then + cat <