Using Vortex Library's Android install and development kit

Using Vortex Library's Android install and development kit

Inside http://www.aspl.es/vortex/downloads/android you'll find two types of downloads. One prefixed with -install.zip that provides just those binaries needed and -full.zip that provides a ready to use binaries with all the headers, etc needed to produce Android solutions using Vortex library.

General notes

The idea behind these installers is the following. Because there are several platforms (android APIs) that you might want to support and for each platform there could be several archs (up to 6), these installers include all files compiled for each possible combination.

That way, you only have to pick desired combinations to compile your project with ready to use binaries.

Platforms and archs

In particular the following platforms are supported by the NDK. Each of them represents an android particular version:

In the following link you have a declaration between each platform and each Android version: https://developer.android.com/ndk/guides/stable_apis.html

Now, for each platform you may have different archs supported (cpu style):

More information about this at: https://developer.android.com/ndk/guides/abis.html

Using the install bundle

Assuming previous information, please, uncompress vortex-VERSION-instal.zip bundle. Inside it, you'll find a "install" folder that inside includes the following structure:

install/<android-platform>/lib/<arch>/{libfiles}.so

That way, if you need ready to use compiled libraries for android-21, arch mips64, the look at:

install/android-21/<arch>/lib/mips64/{libfiles}.so files.

You might wonder why don't use a <android-platform>/<arch>/lib scheme? That's good question. This is because Android architectural design. See "Native code in app packages" in the following link https://developer.android.com/ndk/guides/abis.html to know more about this structure.

The idea is that you have to support all <archs> for a given <android-platform> (android-21 i.e.).

In that case, the install.zip is prepared to pick the entire directory content of a given android platform (for example install/android-21/) so the structure follows the guide lines of Android but also provides you full support for all archs, in that platform, to all components that Vortex Library is made of.

Using development kit bundle (full.zip)

Ok, now for compiling your project for android using this bundle, please grab a reference to the full installer and uncompress it.

Inside, you'll find the following structure (more handy for a developer using autoconf or cmake):

full/<arch>/<platform>/{ready to use devel files to compile using Vortex Library}

Now, assuming you are working with an ARM device, running android 4.0, then you can use files found at:

full/arm/android-14/bin/
include/
lib/
share/
ssl/

In your case, you only have to provide the following gcc flags to your cmake or autoconf environment as follows:

1) Compiler flags:

CFLAGS="-I/full/arm/android-14/include -I/full/arm/android-14/include/vortex -I/full/arm/android-14/include/axl -I/full/arm/android-14/include/nopoll"

2) Linker flags:

LDFLAGS=" -L/full/arm/android-14/lib -lvortex -lvortex-tls-1.1 -l axl -lssl -lcrypto -lpthread -pthread -lm -lnopoll"

3) And your compiler must match the target platform, for example, for ARM:

CC := $(ANDROID_NDK_BIN)/arm-linux-androideabi-gcc
CPP := $(ANDROID_NDK_BIN)/arm-linux-androideabi-g++
AR := $(ANDROID_NDK_BIN)/arm-linux-androideabi-ar
LD := $(ANDROID_NDK_BIN)/arm-linux-androideabi-ld

After that, according to your compiling tool, have it to use these indicatations to compile your source code using Vortex Library.