My objective is to build libspatialite-4.4 for Android from source.The source is avaulable at
https://www.gaia-gis.it/fossil/libspatialite/index. All the dependencies are built from the source on linux with below commands.
Code:
PROJ4
./configure --prefix=/c/MinGW --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
GEOS
./configure --prefix=/c/MinGW --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
with below in all Makefiles
CXXFLAGS = -g -O2 -std=gnu++11 -c -Wall
SQLITE3
./configure --prefix=/c/MinGW --build=x86_64-pc-linux-gnu --host=arm-linux-eabi --disable-static --enable-shared CFLAGS="-g -O2 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1"
FREEXL
./configure --prefix=/c/MinGW --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
LIBSPATIALITE
CPPFLAGS="-I/c/MingW/include" LDFLAGS="-L/c/MingW//lib" ./configure --prefix=/c/MinGW --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
My objective is to build libspatialite-4.4 for Android from source.The source is avaulable at
https://www.gaia-gis.it/fossil/libspatialite/index. All the dependencies are built from the source on linux with below commands.
PROJ4
./configure --prefix=/c/MinGW --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
GEOS
./configure --prefix=/c/MinGW --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
with below in all Makefiles
CXXFLAGS = -g -O2 -std=gnu++11 -c -Wall
SQLITE3
./configure --prefix=/c/MinGW --build=x86_64-pc-linux-gnu --host=arm-linux-eabi --disable-static --enable-shared CFLAGS="-g -O2 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1"
FREEXL
./configure --prefix=/c/MinGW --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
LIBSPATIALITE
CPPFLAGS="-I/c/MingW/include" LDFLAGS="-L/c/MingW//lib" ./configure --prefix=/c/MinGW --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
which means I have libproj.so,libgeos.so,libsqlite3.so and libspatialite.so
I have some exposure to Android Studio with basic android applications but completely new to NDK.At this point of time, my little reading says that I need to make use of all these .so files ,create jni folder add some code in java glue to make calls to libjsqlite.so.
In a prebuild version,there are three folders armeabi,armeabi-v7a,x86 all of which have libjsqlite.so.How does this libjsqlite.so gets generated ?
What is the role of ndk-build ?
Is Android.mk file specific for ndk and may be similar to Makefile for a gcc?
Note:-I have seen the explanation on hello-jni sample in Android site.But I would like to know how to accomplish this for a group of libraries.
Am I in the right path so far or the entire process can be bypassed?I mean would it be possible to add all the source code of these c/C++ libraries into a single AndroidStudio worksapce and it generates libjsqlite.so -(Assuming Java API to .so is added)