6 votes

Android NDK build of spatialite ?

J'essaie de construire une copie de sqlite avec les extensions de spatialite. J'ai vu le fichier un o deux Il existe de nombreux messages en ligne relatifs à cette question, mais personne ne semble être allé jusqu'au bout.

J'ai téléchargé le spatialite fusion , GEOS et PROJ. J'ai créé des projets Android vides et déplacé les fichiers non compressés dans le répertoire jni/. Le mur que je rencontre maintenant est la création du fichier jni/Android.mk. Quelqu'un a-t-il un exemple pour les dépendances GEOS ou PROJ ? Est-ce que quelqu'un a pu travailler sur ce processus depuis la dernière question de stackexchange dont le lien figure ci-dessus ?

6voto

Mark Renouf Points 13128

J'ai configuré les choses pour compiler spatialite comme une bibliothèque partagée, et geos et proj comme des librairies statiques (liées statiquement avec spatialite). Celles-ci ont également besoin de libiconv (AFAIK) puisque la libc du NDK ne fournit pas iconv.h.

Heureusement, tous ces éléments sont sous LGPL ou compatibles, et vous pouvez donc les inclure dans votre application sans craindre de problèmes de licence.

NOTE : Vous devez d'abord lancer un './configure' dans libiconv et libspatialite afin de générer des en-têtes. Cela nécessite l'installation de 'autoconf'.

Notez également que ceci est réalisé sous Linux (Ubuntu 10.10).

GEOS ne peut pas être construit et lié pour le moment parce que le support C++ pour STL est complètement absent du NDK. Si quelqu'un trouve une solution pour construire GEOS, qu'il nous le fasse savoir ! Je ne suis pas sûr qu'il soit très important d'avoir les fonctions avancées dans GEOS, mais selon le README, cela économise plus d'1MB de taille de bibliothèque en les laissant de côté.

Voici mon fichier principal 'jni/Android.mk'. Il pourrait être divisé en plusieurs fichiers mais je n'ai pas pris la peine de le faire car je suis paresseux :-)

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE    := iconv
LOCAL_CFLAGS    := \
    -Wno-multichar \
    -D_ANDROID \
    -DLIBDIR="\"c\"" \
    -DBUILDING_LIBICONV \
    -DIN_LIBRARY
LOCAL_C_INCLUDES := \
    libiconv-1.13.1 \
    libiconv-1.13.1/include \
    libiconv-1.13.1/lib \
    libiconv-1.13.1/libcharset/include
LOCAL_SRC_FILES := \
    libiconv-1.13.1/lib/iconv.c \
    libiconv-1.13.1/lib/relocatable.c \
    libiconv-1.13.1/libcharset/lib/localcharset.c
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE    := proj
LOCAL_C_INCLUDES := proj-4.7.0/src
LOCAL_LDLIBS := -lm
# this list was generated with:
#   find proj-4.7.0/ -name "*.c" | grep -Ev "tests|doc" | sort | awk '{ print "\t"$1" \\" }'
LOCAL_SRC_FILES := \
    proj-4.7.0/src/aasincos.c \
    proj-4.7.0/src/adjlon.c \
    proj-4.7.0/src/bch2bps.c \
    proj-4.7.0/src/bchgen.c \
    proj-4.7.0/src/biveval.c \
    proj-4.7.0/src/cs2cs.c \
    proj-4.7.0/src/dmstor.c \
    proj-4.7.0/src/emess.c \
    proj-4.7.0/src/gen_cheb.c \
    proj-4.7.0/src/geocent.c \
    proj-4.7.0/src/geod.c \
    proj-4.7.0/src/geod_for.c \
    proj-4.7.0/src/geod_inv.c \
    proj-4.7.0/src/geod_set.c \
    proj-4.7.0/src/jniproj.c \
    proj-4.7.0/src/mk_cheby.c \
    proj-4.7.0/src/nad2bin.c \
    proj-4.7.0/src/nad2nad.c \
    proj-4.7.0/src/nad_cvt.c \
    proj-4.7.0/src/nad_init.c \
    proj-4.7.0/src/nad_intr.c \
    proj-4.7.0/src/PJ_aea.c \
    proj-4.7.0/src/PJ_aeqd.c \
    proj-4.7.0/src/PJ_airy.c \
    proj-4.7.0/src/PJ_aitoff.c \
    proj-4.7.0/src/pj_apply_gridshift.c \
    proj-4.7.0/src/PJ_august.c \
    proj-4.7.0/src/pj_auth.c \
    proj-4.7.0/src/PJ_bacon.c \
    proj-4.7.0/src/PJ_bipc.c \
    proj-4.7.0/src/PJ_boggs.c \
    proj-4.7.0/src/PJ_bonne.c \
    proj-4.7.0/src/PJ_cass.c \
    proj-4.7.0/src/PJ_cc.c \
    proj-4.7.0/src/PJ_cea.c \
    proj-4.7.0/src/PJ_chamb.c \
    proj-4.7.0/src/PJ_collg.c \
    proj-4.7.0/src/PJ_crast.c \
    proj-4.7.0/src/pj_datums.c \
    proj-4.7.0/src/pj_datum_set.c \
    proj-4.7.0/src/PJ_denoy.c \
    proj-4.7.0/src/pj_deriv.c \
    proj-4.7.0/src/PJ_eck1.c \
    proj-4.7.0/src/PJ_eck2.c \
    proj-4.7.0/src/PJ_eck3.c \
    proj-4.7.0/src/PJ_eck4.c \
    proj-4.7.0/src/PJ_eck5.c \
    proj-4.7.0/src/pj_ellps.c \
    proj-4.7.0/src/pj_ell_set.c \
    proj-4.7.0/src/PJ_eqc.c \
    proj-4.7.0/src/PJ_eqdc.c \
    proj-4.7.0/src/pj_errno.c \
    proj-4.7.0/src/pj_factors.c \
    proj-4.7.0/src/PJ_fahey.c \
    proj-4.7.0/src/PJ_fouc_s.c \
    proj-4.7.0/src/pj_fwd.c \
    proj-4.7.0/src/PJ_gall.c \
    proj-4.7.0/src/pj_gauss.c \
    proj-4.7.0/src/pj_geocent.c \
    proj-4.7.0/src/PJ_geos.c \
    proj-4.7.0/src/PJ_gins8.c \
    proj-4.7.0/src/PJ_gnom.c \
    proj-4.7.0/src/PJ_gn_sinu.c \
    proj-4.7.0/src/PJ_goode.c \
    proj-4.7.0/src/pj_gridinfo.c \
    proj-4.7.0/src/pj_gridlist.c \
    proj-4.7.0/src/PJ_gstmerc.c \
    proj-4.7.0/src/PJ_hammer.c \
    proj-4.7.0/src/PJ_hatano.c \
    proj-4.7.0/src/PJ_imw_p.c \
    proj-4.7.0/src/pj_init.c \
    proj-4.7.0/src/pj_initcache.c \
    proj-4.7.0/src/pj_inv.c \
    proj-4.7.0/src/PJ_krovak.c \
    proj-4.7.0/src/PJ_labrd.c \
    proj-4.7.0/src/PJ_laea.c \
    proj-4.7.0/src/PJ_lagrng.c \
    proj-4.7.0/src/PJ_larr.c \
    proj-4.7.0/src/PJ_lask.c \
    proj-4.7.0/src/pj_latlong.c \
    proj-4.7.0/src/PJ_lcca.c \
    proj-4.7.0/src/PJ_lcc.c \
    proj-4.7.0/src/pj_list.c \
    proj-4.7.0/src/PJ_loxim.c \
    proj-4.7.0/src/PJ_lsat.c \
    proj-4.7.0/src/pj_malloc.c \
    proj-4.7.0/src/PJ_mbtfpp.c \
    proj-4.7.0/src/PJ_mbtfpq.c \
    proj-4.7.0/src/PJ_mbt_fps.c \
    proj-4.7.0/src/PJ_merc.c \
    proj-4.7.0/src/PJ_mill.c \
    proj-4.7.0/src/pj_mlfn.c \
    proj-4.7.0/src/PJ_mod_ster.c \
    proj-4.7.0/src/PJ_moll.c \
    proj-4.7.0/src/pj_msfn.c \
    proj-4.7.0/src/pj_mutex.c \
    proj-4.7.0/src/PJ_nell.c \
    proj-4.7.0/src/PJ_nell_h.c \
    proj-4.7.0/src/PJ_nocol.c \
    proj-4.7.0/src/PJ_nsper.c \
    proj-4.7.0/src/PJ_nzmg.c \
    proj-4.7.0/src/PJ_ob_tran.c \
    proj-4.7.0/src/PJ_ocea.c \
    proj-4.7.0/src/PJ_oea.c \
    proj-4.7.0/src/PJ_omerc.c \
    proj-4.7.0/src/pj_open_lib.c \
    proj-4.7.0/src/PJ_ortho.c \
    proj-4.7.0/src/pj_param.c \
    proj-4.7.0/src/pj_phi2.c \
    proj-4.7.0/src/PJ_poly.c \
    proj-4.7.0/src/pj_pr_list.c \
    proj-4.7.0/src/PJ_putp2.c \
    proj-4.7.0/src/PJ_putp3.c \
    proj-4.7.0/src/PJ_putp4p.c \
    proj-4.7.0/src/PJ_putp5.c \
    proj-4.7.0/src/PJ_putp6.c \
    proj-4.7.0/src/pj_qsfn.c \
    proj-4.7.0/src/pj_release.c \
    proj-4.7.0/src/PJ_robin.c \
    proj-4.7.0/src/PJ_rpoly.c \
    proj-4.7.0/src/PJ_sconics.c \
    proj-4.7.0/src/PJ_somerc.c \
    proj-4.7.0/src/PJ_sterea.c \
    proj-4.7.0/src/PJ_stere.c \
    proj-4.7.0/src/pj_strerrno.c \
    proj-4.7.0/src/PJ_sts.c \
    proj-4.7.0/src/PJ_tcc.c \
    proj-4.7.0/src/PJ_tcea.c \
    proj-4.7.0/src/PJ_tmerc.c \
    proj-4.7.0/src/PJ_tpeqd.c \
    proj-4.7.0/src/pj_transform.c \
    proj-4.7.0/src/pj_tsfn.c \
    proj-4.7.0/src/pj_units.c \
    proj-4.7.0/src/PJ_urm5.c \
    proj-4.7.0/src/PJ_urmfps.c \
    proj-4.7.0/src/pj_utils.c \
    proj-4.7.0/src/PJ_vandg2.c \
    proj-4.7.0/src/PJ_vandg4.c \
    proj-4.7.0/src/PJ_vandg.c \
    proj-4.7.0/src/PJ_wag2.c \
    proj-4.7.0/src/PJ_wag3.c \
    proj-4.7.0/src/PJ_wag7.c \
    proj-4.7.0/src/PJ_wink1.c \
    proj-4.7.0/src/PJ_wink2.c \
    proj-4.7.0/src/pj_zpoly1.c \
    proj-4.7.0/src/proj.c \
    proj-4.7.0/src/proj_mdist.c \
    proj-4.7.0/src/proj_rouss.c \
    proj-4.7.0/src/p_series.c \
    proj-4.7.0/src/rtodms.c \
    proj-4.7.0/src/vector1.c
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE    := spatialite
LOCAL_CFLAGS    := -D__ANDROID__ -DOMIT_GEOS=1 -Dfdatasync=fsync
LOCAL_C_INCLUDES := \
    libiconv-1.13.1/include \
    libiconv-1.13.1/libcharset/include \
    geos-3.2.2/source/headers \
    geos-3.2.2/capi \
    proj-4.7.0/src
LOCAL_SRC_FILES := \
    ./libspatialite-amalgamation-2.3.1/spatialite.c \
    ./libspatialite-amalgamation-2.3.1/sqlite3.c
LOCAL_STATIC_LIBRARIES := iconv proj
include $(BUILD_SHARED_LIBRARY)

Dans ce cas, vous devrez appliquer quelques petits correctifs aux sources pour que les choses aillent dans le bon sens. La version Mac était proche mais en utilisant -D_ APPLE a provoqué d'autres bizarreries. J'ai fini par me contenter de Parcheando les parties de libiconv et spatialite dont j'avais besoin :

diff --git a/android/jni/libiconv-1.13.1/libcharset/lib/localcharset.c b/android/jni/libiconv-1.13.1/libcharset/lib/localcharset.c
index 434fc7c..44b087d 100644
--- a/android/jni/libiconv-1.13.1/libcharset/lib/localcharset.c
+++ b/android/jni/libiconv-1.13.1/libcharset/lib/localcharset.c
@@ -44,7 +44,7 @@
 # endif
 #endif

-#if !defined WIN32_NATIVE
+#if !defined(WIN32_NATIVE) && !defined(__ANDROID__)
 # if HAVE_LANGINFO_CODESET
 #  include <langinfo.h>
 # else
@@ -328,7 +328,7 @@ locale_charset (void)
   const char *codeset;
   const char *aliases;

-#if !(defined WIN32_NATIVE || defined OS2)
+#if !(defined WIN32_NATIVE || defined OS2 || defined __ANDROID__)

 # if HAVE_LANGINFO_CODESET

diff --git a/android/jni/libspatialite-amalgamation-2.3.1/spatialite.c b/android/jni/libspatialite-amalgamation-2.3.1/spatialite.c
index 5fed6f0..d482ecc 100644
--- a/android/jni/libspatialite-amalgamation-2.3.1/spatialite.c
+++ b/android/jni/libspatialite-amalgamation-2.3.1/spatialite.c
@@ -72,7 +72,7 @@ extern const char * locale_charset (void);
 #include <localcharset.h>
 #endif /* end localcharset */
 #else /* not WINDOWS */
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__ANDROID__)
 #include <iconv.h>
 #include <localcharset.h>
 #else /* not Mac OsX */
@@ -7508,7 +7508,7 @@ gaiaCleanSqlString (char *value)
 #define LIBCHARSET_STATIC
 /* #include <localcharset.h> */
 #else /* not MINGW32 - WIN32 */
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__ANDROID__)
 /* #include <iconv.h> */
 /* #include <localcharset.h> */
 #else /* not Mac OsX */
@@ -7526,7 +7526,7 @@ gaiaGetLocaleCharset ()
 #if defined(__MINGW32__) || defined(_WIN32)
     return locale_charset ();
 #else /* not MINGW32 - WIN32 */
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__ANDROID__)
     return locale_charset ();
 #else /* not Mac OsX */
     return nl_langinfo (CODESET);
@@ -13896,7 +13896,7 @@ gaiaPolygonize (gaiaGeomCollPtr geom_org, int force_multipolygon)
 #define LIBCHARSET_STATIC
 /* #include <localcharset.h> */
 #else /* not MINGW32 */
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__ANDROID__)
 /* #include <iconv.h> */
 /* #include <localcharset.h> */
 #else /* not Mac OsX */

Et voici le résultat :

mark@beast:~/Code/android-spatialite/jni$ ndk-build 
Compile thumb  : spatialite <= spatialite.c
Compile thumb  : spatialite <= sqlite3.c
/home/mark/Code/android-spatialite/jni/./libspatialite-amalgamation-2.3.1/sqlite3.c: In function 'unixDlError':
/home/mark/Code/android-spatialite/jni/./libspatialite-amalgamation-2.3.1/sqlite3.c:24986: warning: assignment discards qualifiers from pointer target type
Compile thumb  : iconv <= iconv.c
Compile thumb  : iconv <= relocatable.c
Compile thumb  : iconv <= localcharset.c
StaticLibrary  : libiconv.a
Compile thumb  : proj <= aasincos.c
Compile thumb  : proj <= adjlon.c
Compile thumb  : proj <= bch2bps.c
Compile thumb  : proj <= bchgen.c
Compile thumb  : proj <= biveval.c
Compile thumb  : proj <= cs2cs.c
Compile thumb  : proj <= dmstor.c
Compile thumb  : proj <= emess.c
Compile thumb  : proj <= gen_cheb.c
Compile thumb  : proj <= geocent.c
Compile thumb  : proj <= geod.c
Compile thumb  : proj <= geod_for.c
Compile thumb  : proj <= geod_inv.c
Compile thumb  : proj <= geod_set.c
Compile thumb  : proj <= jniproj.c
Compile thumb  : proj <= mk_cheby.c
Compile thumb  : proj <= nad2bin.c
Compile thumb  : proj <= nad2nad.c
Compile thumb  : proj <= nad_cvt.c
Compile thumb  : proj <= nad_init.c
Compile thumb  : proj <= nad_intr.c
Compile thumb  : proj <= PJ_aea.c
Compile thumb  : proj <= PJ_aeqd.c
Compile thumb  : proj <= PJ_airy.c
Compile thumb  : proj <= PJ_aitoff.c
Compile thumb  : proj <= pj_apply_gridshift.c
Compile thumb  : proj <= PJ_august.c
Compile thumb  : proj <= pj_auth.c
Compile thumb  : proj <= PJ_bacon.c
Compile thumb  : proj <= PJ_bipc.c
Compile thumb  : proj <= PJ_boggs.c
Compile thumb  : proj <= PJ_bonne.c
Compile thumb  : proj <= PJ_cass.c
Compile thumb  : proj <= PJ_cc.c
Compile thumb  : proj <= PJ_cea.c
Compile thumb  : proj <= PJ_chamb.c
Compile thumb  : proj <= PJ_collg.c
Compile thumb  : proj <= PJ_crast.c
Compile thumb  : proj <= pj_datums.c
Compile thumb  : proj <= pj_datum_set.c
Compile thumb  : proj <= PJ_denoy.c
Compile thumb  : proj <= pj_deriv.c
Compile thumb  : proj <= PJ_eck1.c
Compile thumb  : proj <= PJ_eck2.c
Compile thumb  : proj <= PJ_eck3.c
Compile thumb  : proj <= PJ_eck4.c
Compile thumb  : proj <= PJ_eck5.c
Compile thumb  : proj <= pj_ellps.c
Compile thumb  : proj <= pj_ell_set.c
Compile thumb  : proj <= PJ_eqc.c
Compile thumb  : proj <= PJ_eqdc.c
Compile thumb  : proj <= pj_errno.c
Compile thumb  : proj <= pj_factors.c
Compile thumb  : proj <= PJ_fahey.c
Compile thumb  : proj <= PJ_fouc_s.c
Compile thumb  : proj <= pj_fwd.c
Compile thumb  : proj <= PJ_gall.c
Compile thumb  : proj <= pj_gauss.c
Compile thumb  : proj <= pj_geocent.c
Compile thumb  : proj <= PJ_geos.c
Compile thumb  : proj <= PJ_gins8.c
Compile thumb  : proj <= PJ_gnom.c
Compile thumb  : proj <= PJ_gn_sinu.c
Compile thumb  : proj <= PJ_goode.c
Compile thumb  : proj <= pj_gridinfo.c
Compile thumb  : proj <= pj_gridlist.c
Compile thumb  : proj <= PJ_gstmerc.c
Compile thumb  : proj <= PJ_hammer.c
Compile thumb  : proj <= PJ_hatano.c
Compile thumb  : proj <= PJ_imw_p.c
Compile thumb  : proj <= pj_init.c
Compile thumb  : proj <= pj_initcache.c
Compile thumb  : proj <= pj_inv.c
Compile thumb  : proj <= PJ_krovak.c
Compile thumb  : proj <= PJ_labrd.c
Compile thumb  : proj <= PJ_laea.c
Compile thumb  : proj <= PJ_lagrng.c
Compile thumb  : proj <= PJ_larr.c
Compile thumb  : proj <= PJ_lask.c
Compile thumb  : proj <= pj_latlong.c
Compile thumb  : proj <= PJ_lcca.c
Compile thumb  : proj <= PJ_lcc.c
Compile thumb  : proj <= pj_list.c
Compile thumb  : proj <= PJ_loxim.c
Compile thumb  : proj <= PJ_lsat.c
Compile thumb  : proj <= pj_malloc.c
Compile thumb  : proj <= PJ_mbtfpp.c
Compile thumb  : proj <= PJ_mbtfpq.c
Compile thumb  : proj <= PJ_mbt_fps.c
Compile thumb  : proj <= PJ_merc.c
Compile thumb  : proj <= PJ_mill.c
Compile thumb  : proj <= pj_mlfn.c
Compile thumb  : proj <= PJ_mod_ster.c
Compile thumb  : proj <= PJ_moll.c
Compile thumb  : proj <= pj_msfn.c
Compile thumb  : proj <= pj_mutex.c
Compile thumb  : proj <= PJ_nell.c
Compile thumb  : proj <= PJ_nell_h.c
Compile thumb  : proj <= PJ_nocol.c
Compile thumb  : proj <= PJ_nsper.c
Compile thumb  : proj <= PJ_nzmg.c
Compile thumb  : proj <= PJ_ob_tran.c
Compile thumb  : proj <= PJ_ocea.c
Compile thumb  : proj <= PJ_oea.c
Compile thumb  : proj <= PJ_omerc.c
Compile thumb  : proj <= pj_open_lib.c
Compile thumb  : proj <= PJ_ortho.c
Compile thumb  : proj <= pj_param.c
Compile thumb  : proj <= pj_phi2.c
Compile thumb  : proj <= PJ_poly.c
Compile thumb  : proj <= pj_pr_list.c
Compile thumb  : proj <= PJ_putp2.c
Compile thumb  : proj <= PJ_putp3.c
Compile thumb  : proj <= PJ_putp4p.c
Compile thumb  : proj <= PJ_putp5.c
Compile thumb  : proj <= PJ_putp6.c
Compile thumb  : proj <= pj_qsfn.c
Compile thumb  : proj <= pj_release.c
Compile thumb  : proj <= PJ_robin.c
Compile thumb  : proj <= PJ_rpoly.c
Compile thumb  : proj <= PJ_sconics.c
Compile thumb  : proj <= PJ_somerc.c
Compile thumb  : proj <= PJ_sterea.c
Compile thumb  : proj <= PJ_stere.c
Compile thumb  : proj <= pj_strerrno.c
Compile thumb  : proj <= PJ_sts.c
Compile thumb  : proj <= PJ_tcc.c
Compile thumb  : proj <= PJ_tcea.c
Compile thumb  : proj <= PJ_tmerc.c
Compile thumb  : proj <= PJ_tpeqd.c
Compile thumb  : proj <= pj_transform.c
Compile thumb  : proj <= pj_tsfn.c
Compile thumb  : proj <= pj_units.c
Compile thumb  : proj <= PJ_urm5.c
Compile thumb  : proj <= PJ_urmfps.c
Compile thumb  : proj <= pj_utils.c
Compile thumb  : proj <= PJ_vandg2.c
Compile thumb  : proj <= PJ_vandg4.c
Compile thumb  : proj <= PJ_vandg.c
Compile thumb  : proj <= PJ_wag2.c
Compile thumb  : proj <= PJ_wag3.c
Compile thumb  : proj <= PJ_wag7.c
Compile thumb  : proj <= PJ_wink1.c
Compile thumb  : proj <= PJ_wink2.c
Compile thumb  : proj <= pj_zpoly1.c
Compile thumb  : proj <= proj.c
Compile thumb  : proj <= proj_mdist.c
Compile thumb  : proj <= proj_rouss.c
Compile thumb  : proj <= p_series.c
Compile thumb  : proj <= rtodms.c
Compile thumb  : proj <= vector1.c
StaticLibrary  : libproj.a
SharedLibrary  : libspatialite.so
Install        : libspatialite.so => libs/armeabi/libspatialite.so

La bibliothèque qui en résulte :

$ ls -l ../libs/armeabi/libspatialite.so 
-rwxr-xr-x 1 mark mark 1560744 2011-03-13 22:23 ../libs/armeabi/libspatialite.so

1voto

Frohnzie Points 2487

J'ai remarqué qu'il y avait des problèmes avec Spatialite 2.3.1 et GEOS 3.1.1. La requête suivante retournait toujours 0.0 pour une raison quelconque.

select Distance(geomfromtext('point(60 60)', 4326), geomfromtext('point(59 60)', 4326));

Quoi qu'il en soit, j'ai récupéré Spatialite 2.4.0 RC4, GEOS 3.2.2, iconv 1.13.1, proj 4.6.1 et j'ai appliqué les changements de code à iconv et Spatialite. J'ai pu compiler et exécuter le code avec succès sur Android 2.2 avec le fichier Android.mk :

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

# ./configure --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
LOCAL_MODULE := iconv
LOCAL_CFLAGS := \
    -Wno-multichar \
    -D_ANDROID \
    -DBUILDING_LIBICONV \
    -DIN_LIBRARY \
    -DLIBDIR="\"/usr/local/android-libs/usr/local/lib\"" 
LOCAL_C_INCLUDES := \
    $(LOCAL_PATH)/libiconv-1.13.1 \
    $(LOCAL_PATH)/libiconv-1.13.1/include \
    $(LOCAL_PATH)/libiconv-1.13.1/lib \
    $(LOCAL_PATH)/libiconv-1.13.1/libcharset/include
LOCAL_SRC_FILES := \
    libiconv-1.13.1/lib/iconv.c \
    libiconv-1.13.1/lib/relocatable.c \
    libiconv-1.13.1/lib/empty.cpp \
    libiconv-1.13.1/libcharset/lib/localcharset.c
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
# ./configure --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
# find proj-4.6.1/ -name "*.c" | grep -Ev "tests|doc" | sort | awk '{ print "\t"$1" \\" }'
LOCAL_MODULE    := proj
LOCAL_C_INCLUDES := $(LOCAL_PATH)/proj-4.6.1/src
LOCAL_LDLIBS := -lm
LOCAL_SRC_FILES := \
    proj-4.6.1/src/empty.cpp \
    proj-4.6.1/src/aasincos.c \
    proj-4.6.1/src/adjlon.c \
    proj-4.6.1/src/bch2bps.c \
    proj-4.6.1/src/bchgen.c \
    proj-4.6.1/src/biveval.c \
    proj-4.6.1/src/dmstor.c \
    proj-4.6.1/src/emess.c \
    proj-4.6.1/src/gen_cheb.c \
    proj-4.6.1/src/geocent.c \
    proj-4.6.1/src/geod_for.c \
    proj-4.6.1/src/geod_inv.c \
    proj-4.6.1/src/geod_set.c \
    proj-4.6.1/src/jniproj.c \
    proj-4.6.1/src/mk_cheby.c \
    proj-4.6.1/src/nad_cvt.c \
    proj-4.6.1/src/nad_init.c \
    proj-4.6.1/src/nad_intr.c \
    proj-4.6.1/src/PJ_aea.c \
    proj-4.6.1/src/PJ_aeqd.c \
    proj-4.6.1/src/PJ_airy.c \
    proj-4.6.1/src/PJ_aitoff.c \
    proj-4.6.1/src/pj_apply_gridshift.c \
    proj-4.6.1/src/PJ_august.c \
    proj-4.6.1/src/pj_auth.c \
    proj-4.6.1/src/PJ_bacon.c \
    proj-4.6.1/src/PJ_bipc.c \
    proj-4.6.1/src/PJ_boggs.c \
    proj-4.6.1/src/PJ_bonne.c \
    proj-4.6.1/src/PJ_cass.c \
    proj-4.6.1/src/PJ_cc.c \
    proj-4.6.1/src/PJ_cea.c \
    proj-4.6.1/src/PJ_chamb.c \
    proj-4.6.1/src/PJ_collg.c \
    proj-4.6.1/src/PJ_crast.c \
    proj-4.6.1/src/pj_datums.c \
    proj-4.6.1/src/pj_datum_set.c \
    proj-4.6.1/src/PJ_denoy.c \
    proj-4.6.1/src/pj_deriv.c \
    proj-4.6.1/src/PJ_eck1.c \
    proj-4.6.1/src/PJ_eck2.c \
    proj-4.6.1/src/PJ_eck3.c \
    proj-4.6.1/src/PJ_eck4.c \
    proj-4.6.1/src/PJ_eck5.c \
    proj-4.6.1/src/pj_ellps.c \
    proj-4.6.1/src/pj_ell_set.c \
    proj-4.6.1/src/PJ_eqc.c \
    proj-4.6.1/src/PJ_eqdc.c \
    proj-4.6.1/src/pj_errno.c \
    proj-4.6.1/src/pj_factors.c \
    proj-4.6.1/src/PJ_fahey.c \
    proj-4.6.1/src/PJ_fouc_s.c \
    proj-4.6.1/src/pj_fwd.c \
    proj-4.6.1/src/PJ_gall.c \
    proj-4.6.1/src/pj_gauss.c \
    proj-4.6.1/src/pj_geocent.c \
    proj-4.6.1/src/PJ_geos.c \
    proj-4.6.1/src/PJ_gins8.c \
    proj-4.6.1/src/PJ_gnom.c \
    proj-4.6.1/src/PJ_gn_sinu.c \
    proj-4.6.1/src/PJ_goode.c \
    proj-4.6.1/src/pj_gridinfo.c \
    proj-4.6.1/src/pj_gridlist.c \
    proj-4.6.1/src/PJ_gstmerc.c \
    proj-4.6.1/src/PJ_hammer.c \
    proj-4.6.1/src/PJ_hatano.c \
    proj-4.6.1/src/PJ_imw_p.c \
    proj-4.6.1/src/pj_init.c \
    proj-4.6.1/src/pj_inv.c \
    proj-4.6.1/src/PJ_krovak.c \
    proj-4.6.1/src/PJ_labrd.c \
    proj-4.6.1/src/PJ_laea.c \
    proj-4.6.1/src/PJ_lagrng.c \
    proj-4.6.1/src/PJ_larr.c \
    proj-4.6.1/src/PJ_lask.c \
    proj-4.6.1/src/pj_latlong.c \
    proj-4.6.1/src/PJ_lcca.c \
    proj-4.6.1/src/PJ_lcc.c \
    proj-4.6.1/src/pj_list.c \
    proj-4.6.1/src/PJ_loxim.c \
    proj-4.6.1/src/PJ_lsat.c \
    proj-4.6.1/src/pj_malloc.c \
    proj-4.6.1/src/PJ_mbtfpp.c \
    proj-4.6.1/src/PJ_mbtfpq.c \
    proj-4.6.1/src/PJ_mbt_fps.c \
    proj-4.6.1/src/PJ_merc.c \
    proj-4.6.1/src/PJ_mill.c \
    proj-4.6.1/src/pj_mlfn.c \
    proj-4.6.1/src/PJ_mod_ster.c \
    proj-4.6.1/src/PJ_moll.c \
    proj-4.6.1/src/pj_msfn.c \
    proj-4.6.1/src/PJ_nell.c \
    proj-4.6.1/src/PJ_nell_h.c \
    proj-4.6.1/src/PJ_nocol.c \
    proj-4.6.1/src/PJ_nsper.c \
    proj-4.6.1/src/PJ_nzmg.c \
    proj-4.6.1/src/PJ_ob_tran.c \
    proj-4.6.1/src/PJ_ocea.c \
    proj-4.6.1/src/PJ_oea.c \
    proj-4.6.1/src/PJ_omerc.c \
    proj-4.6.1/src/pj_open_lib.c \
    proj-4.6.1/src/PJ_ortho.c \
    proj-4.6.1/src/pj_param.c \
    proj-4.6.1/src/pj_phi2.c \
    proj-4.6.1/src/PJ_poly.c \
    proj-4.6.1/src/pj_pr_list.c \
    proj-4.6.1/src/PJ_putp2.c \
    proj-4.6.1/src/PJ_putp3.c \
    proj-4.6.1/src/PJ_putp4p.c \
    proj-4.6.1/src/PJ_putp5.c \
    proj-4.6.1/src/PJ_putp6.c \
    proj-4.6.1/src/pj_qsfn.c \
    proj-4.6.1/src/pj_release.c \
    proj-4.6.1/src/PJ_robin.c \
    proj-4.6.1/src/PJ_rpoly.c \
    proj-4.6.1/src/PJ_sconics.c \
    proj-4.6.1/src/PJ_somerc.c \
    proj-4.6.1/src/PJ_sterea.c \
    proj-4.6.1/src/PJ_stere.c \
    proj-4.6.1/src/pj_strerrno.c \
    proj-4.6.1/src/PJ_sts.c \
    proj-4.6.1/src/PJ_tcc.c \
    proj-4.6.1/src/PJ_tcea.c \
    proj-4.6.1/src/PJ_tmerc.c \
    proj-4.6.1/src/PJ_tpeqd.c \
    proj-4.6.1/src/pj_transform.c \
    proj-4.6.1/src/pj_tsfn.c \
    proj-4.6.1/src/pj_units.c \
    proj-4.6.1/src/PJ_urm5.c \
    proj-4.6.1/src/PJ_urmfps.c \
    proj-4.6.1/src/pj_utils.c \
    proj-4.6.1/src/PJ_vandg2.c \
    proj-4.6.1/src/PJ_vandg4.c \
    proj-4.6.1/src/PJ_vandg.c \
    proj-4.6.1/src/PJ_wag2.c \
    proj-4.6.1/src/PJ_wag3.c \
    proj-4.6.1/src/PJ_wag7.c \
    proj-4.6.1/src/PJ_wink1.c \
    proj-4.6.1/src/PJ_wink2.c \
    proj-4.6.1/src/pj_zpoly1.c \
    proj-4.6.1/src/proj.c \
    proj-4.6.1/src/proj_mdist.c \
    proj-4.6.1/src/proj_rouss.c \
    proj-4.6.1/src/p_series.c \
    proj-4.6.1/src/rtodms.c \
    proj-4.6.1/src/vector1.c
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
# ./configure --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
# find geos-3.2.2/ -name "*.cpp" | grep -Ev "tests|doc" | sort | awk '{ print "\t"$1" \\" }'
LOCAL_MODULE := geos
LOCAL_C_INCLUDES := $(LOCAL_PATH)/geos-3.2.2/source/headers
LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%)
LOCAL_SRC_FILES := \
    geos-3.2.2/capi/geos_c.cpp \
    geos-3.2.2/capi/geos_ts_c.cpp \
    geos-3.2.2/source/algorithm/Angle.cpp \
    geos-3.2.2/source/algorithm/BoundaryNodeRule.cpp \
    geos-3.2.2/source/algorithm/CentroidArea.cpp \
    geos-3.2.2/source/algorithm/CentroidLine.cpp \
    geos-3.2.2/source/algorithm/CentroidPoint.cpp \
    geos-3.2.2/source/algorithm/CGAlgorithms.cpp \
    geos-3.2.2/source/algorithm/ConvexHull.cpp \
    geos-3.2.2/source/algorithm/distance/DiscreteHausdorffDistance.cpp \
    geos-3.2.2/source/algorithm/distance/DistanceToPoint.cpp \
    geos-3.2.2/source/algorithm/HCoordinate.cpp \
    geos-3.2.2/source/algorithm/InteriorPointArea.cpp \
    geos-3.2.2/source/algorithm/InteriorPointLine.cpp \
    geos-3.2.2/source/algorithm/InteriorPointPoint.cpp \
    geos-3.2.2/source/algorithm/LineIntersector.cpp \
    geos-3.2.2/source/algorithm/locate/IndexedPointInAreaLocator.cpp \
    geos-3.2.2/source/algorithm/locate/PointOnGeometryLocator.cpp \
    geos-3.2.2/source/algorithm/locate/SimplePointInAreaLocator.cpp \
    geos-3.2.2/source/algorithm/MCPointInRing.cpp \
    geos-3.2.2/source/algorithm/MinimumDiameter.cpp \
    geos-3.2.2/source/algorithm/NotRepresentableException.cpp \
    geos-3.2.2/source/algorithm/PointLocator.cpp \
    geos-3.2.2/source/algorithm/RayCrossingCounter.cpp \
    geos-3.2.2/source/algorithm/RobustDeterminant.cpp \
    geos-3.2.2/source/algorithm/SimplePointInRing.cpp \
    geos-3.2.2/source/algorithm/SIRtreePointInRing.cpp \
    geos-3.2.2/source/geom/CoordinateArraySequence.cpp \
    geos-3.2.2/source/geom/CoordinateArraySequenceFactory.cpp \
    geos-3.2.2/source/geom/Coordinate.cpp \
    geos-3.2.2/source/geom/CoordinateSequence.cpp \
    geos-3.2.2/source/geom/CoordinateSequenceFactory.cpp \
    geos-3.2.2/source/geom/Dimension.cpp \
    geos-3.2.2/source/geom/Envelope.cpp \
    geos-3.2.2/source/geom/GeometryCollection.cpp \
    geos-3.2.2/source/geom/GeometryComponentFilter.cpp \
    geos-3.2.2/source/geom/Geometry.cpp \
    geos-3.2.2/source/geom/GeometryFactory.cpp \
    geos-3.2.2/source/geom/GeometryList.cpp \
    geos-3.2.2/source/geomgraph/Depth.cpp \
    geos-3.2.2/source/geomgraph/DirectedEdge.cpp \
    geos-3.2.2/source/geomgraph/DirectedEdgeStar.cpp \
    geos-3.2.2/source/geomgraph/Edge.cpp \
    geos-3.2.2/source/geomgraph/EdgeEnd.cpp \
    geos-3.2.2/source/geomgraph/EdgeEndStar.cpp \
    geos-3.2.2/source/geomgraph/EdgeIntersection.cpp \
    geos-3.2.2/source/geomgraph/EdgeIntersectionList.cpp \
    geos-3.2.2/source/geomgraph/EdgeList.cpp \
    geos-3.2.2/source/geomgraph/EdgeNodingValidator.cpp \
    geos-3.2.2/source/geomgraph/EdgeRing.cpp \
    geos-3.2.2/source/geomgraph/GeometryGraph.cpp \
    geos-3.2.2/source/geomgraph/GraphComponent.cpp \
    geos-3.2.2/source/geomgraph/index/MonotoneChainEdge.cpp \
    geos-3.2.2/source/geomgraph/index/MonotoneChainIndexer.cpp \
    geos-3.2.2/source/geomgraph/index/SegmentIntersector.cpp \
    geos-3.2.2/source/geomgraph/index/SimpleEdgeSetIntersector.cpp \
    geos-3.2.2/source/geomgraph/index/SimpleMCSweepLineIntersector.cpp \
    geos-3.2.2/source/geomgraph/index/SimpleSweepLineIntersector.cpp \
    geos-3.2.2/source/geomgraph/index/SweepLineEvent.cpp \
    geos-3.2.2/source/geomgraph/index/SweepLineSegment.cpp \
    geos-3.2.2/source/geomgraph/Label.cpp \
    geos-3.2.2/source/geomgraph/Node.cpp \
    geos-3.2.2/source/geomgraph/NodeFactory.cpp \
    geos-3.2.2/source/geomgraph/NodeMap.cpp \
    geos-3.2.2/source/geomgraph/PlanarGraph.cpp \
    geos-3.2.2/source/geomgraph/Position.cpp \
    geos-3.2.2/source/geomgraph/Quadrant.cpp \
    geos-3.2.2/source/geomgraph/TopologyLocation.cpp \
    geos-3.2.2/source/geom/IntersectionMatrix.cpp \
    geos-3.2.2/source/geom/LinearRing.cpp \
    geos-3.2.2/source/geom/LineSegment.cpp \
    geos-3.2.2/source/geom/LineString.cpp \
    geos-3.2.2/source/geom/Location.cpp \
    geos-3.2.2/source/geom/MultiLineString.cpp \
    geos-3.2.2/source/geom/MultiPoint.cpp \
    geos-3.2.2/source/geom/MultiPolygon.cpp \
    geos-3.2.2/source/geom/Point.cpp \
    geos-3.2.2/source/geom/Polygon.cpp \
    geos-3.2.2/source/geom/PrecisionModel.cpp \
    geos-3.2.2/source/geom/prep/AbstractPreparedPolygonContains.cpp \
    geos-3.2.2/source/geom/prep/BasicPreparedGeometry.cpp \
    geos-3.2.2/source/geom/prep/PreparedGeometry.cpp \
    geos-3.2.2/source/geom/prep/PreparedGeometryFactory.cpp \
    geos-3.2.2/source/geom/prep/PreparedLineString.cpp \
    geos-3.2.2/source/geom/prep/PreparedLineStringIntersects.cpp \
    geos-3.2.2/source/geom/prep/PreparedPoint.cpp \
    geos-3.2.2/source/geom/prep/PreparedPolygonContains.cpp \
    geos-3.2.2/source/geom/prep/PreparedPolygonContainsProperly.cpp \
    geos-3.2.2/source/geom/prep/PreparedPolygonCovers.cpp \
    geos-3.2.2/source/geom/prep/PreparedPolygon.cpp \
    geos-3.2.2/source/geom/prep/PreparedPolygonIntersects.cpp \
    geos-3.2.2/source/geom/prep/PreparedPolygonPredicate.cpp \
    geos-3.2.2/source/geom/Triangle.cpp \
    geos-3.2.2/source/geom/util/ComponentCoordinateExtracter.cpp \
    geos-3.2.2/source/geom/util/CoordinateOperation.cpp \
    geos-3.2.2/source/geom/util/GeometryCombiner.cpp \
    geos-3.2.2/source/geom/util/GeometryEditor.cpp \
    geos-3.2.2/source/geom/util/GeometryTransformer.cpp \
    geos-3.2.2/source/geom/util/ShortCircuitedGeometryVisitor.cpp \
    geos-3.2.2/source/index/bintree/Bintree.cpp \
    geos-3.2.2/source/index/bintree/Interval.cpp \
    geos-3.2.2/source/index/bintree/Key.cpp \
    geos-3.2.2/source/index/bintree/NodeBase.cpp \
    geos-3.2.2/source/index/bintree/Node.cpp \
    geos-3.2.2/source/index/bintree/Root.cpp \
    geos-3.2.2/source/index/chain/MonotoneChainBuilder.cpp \
    geos-3.2.2/source/index/chain/MonotoneChain.cpp \
    geos-3.2.2/source/index/chain/MonotoneChainOverlapAction.cpp \
    geos-3.2.2/source/index/chain/MonotoneChainSelectAction.cpp \
    geos-3.2.2/source/index/intervalrtree/IntervalRTreeBranchNode.cpp \
    geos-3.2.2/source/index/intervalrtree/IntervalRTreeLeafNode.cpp \
    geos-3.2.2/source/index/intervalrtree/IntervalRTreeNode.cpp \
    geos-3.2.2/source/index/intervalrtree/SortedPackedIntervalRTree.cpp \
    geos-3.2.2/source/index/quadtree/DoubleBits.cpp \
    geos-3.2.2/source/index/quadtree/IntervalSize.cpp \
    geos-3.2.2/source/index/quadtree/Key.cpp \
    geos-3.2.2/source/index/quadtree/NodeBase.cpp \
    geos-3.2.2/source/index/quadtree/Node.cpp \
    geos-3.2.2/source/index/quadtree/Quadtree.cpp \
    geos-3.2.2/source/index/quadtree/Root.cpp \
    geos-3.2.2/source/index/strtree/AbstractNode.cpp \
    geos-3.2.2/source/index/strtree/AbstractSTRtree.cpp \
    geos-3.2.2/source/index/strtree/Interval.cpp \
    geos-3.2.2/source/index/strtree/ItemBoundable.cpp \
    geos-3.2.2/source/index/strtree/SIRtree.cpp \
    geos-3.2.2/source/index/strtree/STRtree.cpp \
    geos-3.2.2/source/index/sweepline/SweepLineEvent.cpp \
    geos-3.2.2/source/index/sweepline/SweepLineIndex.cpp \
    geos-3.2.2/source/index/sweepline/SweepLineInterval.cpp \
    geos-3.2.2/source/inlines.cpp \
    geos-3.2.2/source/io/ByteOrderDataInStream.cpp \
    geos-3.2.2/source/io/ByteOrderValues.cpp \
    geos-3.2.2/source/io/CLocalizer.cpp \
    geos-3.2.2/source/io/ParseException.cpp \
    geos-3.2.2/source/io/StringTokenizer.cpp \
    geos-3.2.2/source/io/Unload.cpp \
    geos-3.2.2/source/io/WKBReader.cpp \
    geos-3.2.2/source/io/WKBWriter.cpp \
    geos-3.2.2/source/io/WKTReader.cpp \
    geos-3.2.2/source/io/WKTWriter.cpp \
    geos-3.2.2/source/io/Writer.cpp \
    geos-3.2.2/source/linearref/ExtractLineByLocation.cpp \
    geos-3.2.2/source/linearref/LengthIndexedLine.cpp \
    geos-3.2.2/source/linearref/LengthIndexOfPoint.cpp \
    geos-3.2.2/source/linearref/LengthLocationMap.cpp \
    geos-3.2.2/source/linearref/LinearGeometryBuilder.cpp \
    geos-3.2.2/source/linearref/LinearIterator.cpp \
    geos-3.2.2/source/linearref/LinearLocation.cpp \
    geos-3.2.2/source/linearref/LocationIndexOfLine.cpp \
    geos-3.2.2/source/linearref/LocationIndexOfPoint.cpp \
    geos-3.2.2/source/noding/BasicSegmentString.cpp \
    geos-3.2.2/source/noding/FastNodingValidator.cpp \
    geos-3.2.2/source/noding/FastSegmentSetIntersectionFinder.cpp \
    geos-3.2.2/source/noding/IntersectionAdder.cpp \
    geos-3.2.2/source/noding/IntersectionFinderAdder.cpp \
    geos-3.2.2/source/noding/IteratedNoder.cpp \
    geos-3.2.2/source/noding/MCIndexNoder.cpp \
    geos-3.2.2/source/noding/MCIndexSegmentSetMutualIntersector.cpp \
    geos-3.2.2/source/noding/NodedSegmentString.cpp \
    geos-3.2.2/source/noding/NodingValidator.cpp \
    geos-3.2.2/source/noding/Octant.cpp \
    geos-3.2.2/source/noding/OrientedCoordinateArray.cpp \
    geos-3.2.2/source/noding/ScaledNoder.cpp \
    geos-3.2.2/source/noding/SegmentIntersectionDetector.cpp \
    geos-3.2.2/source/noding/SegmentNode.cpp \
    geos-3.2.2/source/noding/SegmentNodeList.cpp \
    geos-3.2.2/source/noding/SegmentString.cpp \
    geos-3.2.2/source/noding/SegmentStringUtil.cpp \
    geos-3.2.2/source/noding/SimpleNoder.cpp \
    geos-3.2.2/source/noding/SingleInteriorIntersectionFinder.cpp \
    geos-3.2.2/source/noding/snapround/HotPixel.cpp \
    geos-3.2.2/source/noding/snapround/MCIndexPointSnapper.cpp \
    geos-3.2.2/source/noding/snapround/MCIndexSnapRounder.cpp \
    geos-3.2.2/source/noding/snapround/SimpleSnapRounder.cpp \
    geos-3.2.2/source/operation/buffer/BufferBuilder.cpp \
    geos-3.2.2/source/operation/buffer/BufferInputLineSimplifier.cpp \
    geos-3.2.2/source/operation/buffer/BufferOp.cpp \
    geos-3.2.2/source/operation/buffer/BufferParameters.cpp \
    geos-3.2.2/source/operation/buffer/BufferSubgraph.cpp \
    geos-3.2.2/source/operation/buffer/OffsetCurveBuilder.cpp \
    geos-3.2.2/source/operation/buffer/OffsetCurveSetBuilder.cpp \
    geos-3.2.2/source/operation/buffer/RightmostEdgeFinder.cpp \
    geos-3.2.2/source/operation/buffer/SubgraphDepthLocater.cpp \
    geos-3.2.2/source/operation/distance/ConnectedElementLocationFilter.cpp \
    geos-3.2.2/source/operation/distance/ConnectedElementPointFilter.cpp \
    geos-3.2.2/source/operation/distance/DistanceOp.cpp \
    geos-3.2.2/source/operation/distance/GeometryLocation.cpp \
    geos-3.2.2/source/operation/GeometryGraphOperation.cpp \
    geos-3.2.2/source/operation/IsSimpleOp.cpp \
    geos-3.2.2/source/operation/linemerge/EdgeString.cpp \
    geos-3.2.2/source/operation/linemerge/LineMergeDirectedEdge.cpp \
    geos-3.2.2/source/operation/linemerge/LineMergeEdge.cpp \
    geos-3.2.2/source/operation/linemerge/LineMergeGraph.cpp \
    geos-3.2.2/source/operation/linemerge/LineMerger.cpp \
    geos-3.2.2/source/operation/linemerge/LineSequencer.cpp \
    geos-3.2.2/source/operation/overlay/EdgeSetNoder.cpp \
    geos-3.2.2/source/operation/overlay/ElevationMatrixCell.cpp \
    geos-3.2.2/source/operation/overlay/ElevationMatrix.cpp \
    geos-3.2.2/source/operation/overlay/LineBuilder.cpp \
    geos-3.2.2/source/operation/overlay/MaximalEdgeRing.cpp \
    geos-3.2.2/source/operation/overlay/MinimalEdgeRing.cpp \
    geos-3.2.2/source/operation/overlay/OverlayNodeFactory.cpp \
    geos-3.2.2/source/operation/overlay/OverlayOp.cpp \
    geos-3.2.2/source/operation/overlay/PointBuilder.cpp \
    geos-3.2.2/source/operation/overlay/PolygonBuilder.cpp \
    geos-3.2.2/source/operation/overlay/snap/GeometrySnapper.cpp \
    geos-3.2.2/source/operation/overlay/snap/LineStringSnapper.cpp \
    geos-3.2.2/source/operation/overlay/snap/SnapIfNeededOverlayOp.cpp \
    geos-3.2.2/source/operation/overlay/snap/SnapOverlayOp.cpp \
    geos-3.2.2/source/operation/overlay/validate/FuzzyPointLocator.cpp \
    geos-3.2.2/source/operation/overlay/validate/OffsetPointGenerator.cpp \
    geos-3.2.2/source/operation/overlay/validate/OverlayResultValidator.cpp \
    geos-3.2.2/source/operation/polygonize/EdgeRing.cpp \
    geos-3.2.2/source/operation/polygonize/PolygonizeDirectedEdge.cpp \
    geos-3.2.2/source/operation/polygonize/PolygonizeEdge.cpp \
    geos-3.2.2/source/operation/polygonize/PolygonizeGraph.cpp \
    geos-3.2.2/source/operation/polygonize/Polygonizer.cpp \
    geos-3.2.2/source/operation/predicate/RectangleContains.cpp \
    geos-3.2.2/source/operation/predicate/RectangleIntersects.cpp \
    geos-3.2.2/source/operation/predicate/SegmentIntersectionTester.cpp \
    geos-3.2.2/source/operation/relate/EdgeEndBuilder.cpp \
    geos-3.2.2/source/operation/relate/EdgeEndBundle.cpp \
    geos-3.2.2/source/operation/relate/EdgeEndBundleStar.cpp \
    geos-3.2.2/source/operation/relate/RelateComputer.cpp \
    geos-3.2.2/source/operation/relate/RelateNode.cpp \
    geos-3.2.2/source/operation/relate/RelateNodeFactory.cpp \
    geos-3.2.2/source/operation/relate/RelateNodeGraph.cpp \
    geos-3.2.2/source/operation/relate/RelateOp.cpp \
    geos-3.2.2/source/operation/union/CascadedPolygonUnion.cpp \
    geos-3.2.2/source/operation/valid/ConnectedInteriorTester.cpp \
    geos-3.2.2/source/operation/valid/ConsistentAreaTester.cpp \
    geos-3.2.2/source/operation/valid/IndexedNestedRingTester.cpp \
    geos-3.2.2/source/operation/valid/IsValidOp.cpp \
    geos-3.2.2/source/operation/valid/QuadtreeNestedRingTester.cpp \
    geos-3.2.2/source/operation/valid/RepeatedPointTester.cpp \
    geos-3.2.2/source/operation/valid/SimpleNestedRingTester.cpp \
    geos-3.2.2/source/operation/valid/SweeplineNestedRingTester.cpp \
    geos-3.2.2/source/operation/valid/TopologyValidationError.cpp \
    geos-3.2.2/source/planargraph/algorithm/ConnectedSubgraphFinder.cpp \
    geos-3.2.2/source/planargraph/DirectedEdge.cpp \
    geos-3.2.2/source/planargraph/DirectedEdgeStar.cpp \
    geos-3.2.2/source/planargraph/Edge.cpp \
    geos-3.2.2/source/planargraph/Node.cpp \
    geos-3.2.2/source/planargraph/NodeMap.cpp \
    geos-3.2.2/source/planargraph/PlanarGraph.cpp \
    geos-3.2.2/source/planargraph/Subgraph.cpp \
    geos-3.2.2/source/precision/CommonBits.cpp \
    geos-3.2.2/source/precision/CommonBitsOp.cpp \
    geos-3.2.2/source/precision/CommonBitsRemover.cpp \
    geos-3.2.2/source/precision/EnhancedPrecisionOp.cpp \
    geos-3.2.2/source/precision/SimpleGeometryPrecisionReducer.cpp \
    geos-3.2.2/source/simplify/DouglasPeuckerLineSimplifier.cpp \
    geos-3.2.2/source/simplify/DouglasPeuckerSimplifier.cpp \
    geos-3.2.2/source/simplify/LineSegmentIndex.cpp \
    geos-3.2.2/source/simplify/TaggedLineSegment.cpp \
    geos-3.2.2/source/simplify/TaggedLinesSimplifier.cpp \
    geos-3.2.2/source/simplify/TaggedLineString.cpp \
    geos-3.2.2/source/simplify/TaggedLineStringSimplifier.cpp \
    geos-3.2.2/source/simplify/TopologyPreservingSimplifier.cpp \
    geos-3.2.2/source/util/Assert.cpp \
    geos-3.2.2/source/util/GeometricShapeFactory.cpp \
    geos-3.2.2/source/util/math.cpp \
    geos-3.2.2/source/util/Profiler.cpp
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
# -DOMIT_GEOS=0
# ./configure --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
#LOCAL_MODULE    := spatialite
#LOCAL_CFLAGS    := -D__ANDROID__ -Dfdatasync=fsync
#LOCAL_LDLIBS   := -llog 
#LOCAL_C_INCLUDES := \
    libiconv-1.13.1/include \
    libiconv-1.13.1/libcharset/include \
    geos-3.1.1/source/headers \
    geos-3.1.1/capi \
    proj-4.6.1/src
#LOCAL_SRC_FILES := \
    ./libspatialite-amalgamation-2.3.1/spatialite.c \
    ./libspatialite-amalgamation-2.3.1/empty.cpp \
    ./libspatialite-amalgamation-2.3.1/sqlite3.c
#LOCAL_STATIC_LIBRARIES := iconv proj geos
#include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
# -DOMIT_GEOS=0
# ./configure --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
LOCAL_MODULE    := spatialite
LOCAL_CFLAGS    := -D__ANDROID__ -Dfdatasync=fsync -DOMIT_GEOCALLBACKS
LOCAL_LDLIBS    := -llog 
LOCAL_C_INCLUDES := \
    libiconv-1.13.1/include \
    libiconv-1.13.1/libcharset/include \
    geos-3.2.2/source/headers \
    geos-3.2.2/capi \
    proj-4.6.1/src
LOCAL_SRC_FILES := \
    ./libspatialite-amalgamation-2.4.0/spatialite.c \
    ./libspatialite-amalgamation-2.4.0/empty.cpp \
    ./libspatialite-amalgamation-2.4.0/sqlite3.c
LOCAL_STATIC_LIBRARIES := iconv proj geos
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE    := jsqlite
LOCAL_CFLAGS    := -D__ANDROID__ \
    -DHAVE_SQLITE3=1 \
    -DHAVE_SQLITE3_LOAD_EXTENSION=1 \
    -DCANT_PASS_VALIST_AS_CHARPTR=1 \
    -Dfdatasync=fsync
LOCAL_LDLIBS    := -llog
LOCAL_C_INCLUDES := \
    $(LOCAL_PATH)/libspatialite-amalgamation-2.4.0/headers/spatialite \
    $(LOCAL_PATH)/javasqlite-20110106/native/
LOCAL_SRC_FILES := \
    javasqlite-20110106/native/sqlite_jni.c \
    javasqlite-20110106/native/empty.cpp \
    libspatialite-amalgamation-2.4.0/sqlite3.c
LOCAL_STATIC_LIBRARIES := spatialite iconv proj geos
include $(BUILD_SHARED_LIBRARY)

Application.mk :

APP_STL := gnustl_static
APP_CPPFLAGS += -frtti
APP_CPPFLAGS += -fexceptions

0voto

JaakL Points 1715

J'ai également un projet qui fonctionne avec Spatialite (3.0 beta) sur Android : https://bitbucket.org/nutiteq/Android-map-samples . Vous pouvez également obtenir des binaires préconstruits à partir des téléchargements sur ce site.

0voto

diligentpig Points 11

Pour un post chinois sur la compilation réussie sous Windows et cygwin, référez-vous à ce post : http://blog.newnaw.com/?p=1012

Prograide.com

Prograide est une communauté de développeurs qui cherche à élargir la connaissance de la programmation au-delà de l'anglais.
Pour cela nous avons les plus grands doutes résolus en français et vous pouvez aussi poser vos propres questions ou résoudre celles des autres.

Powered by:

X