Android ndk build - atmel-maxtouch/mxt-app GitHub Wiki
Using Android ndk-build to compile mxt-app
The second build harness uses the Android OS, ndk-build scripts. For this user guide, Android NDK revision 10e is used. The Android NDK is available from https://developer.android.com/ndk/downloads
By default, the code will compile with USB driver support. A submodule containing an Android USB library called libusbdroid is required.
The libusbdroid source will download to the /lib subdirectory. To download the submodule issue the commands:
git submodule init
git submodule update
To compile using the Android NDK, type the command: (Ensure ndk-build is added to the PATH)
ndk-build
An option is available to compile without USB support if desired:
ndk-build MXTAPP_NO_USB_SUPPORT=true
To enable debug use the following:
ndk-build NDK-DEBUG=1
To enable PIE support (for Android L or below versions)
ndk-build APP_PLATFORM=arndroid-16
The Android NDK will by default build the code for all non-deprecated ABIs. In this specific case, the build for Android (arm4-v8a, x86_64, mips64, armeabi-v7a, armeabi, x86, mips) and Linux (32bit, aarch64, arm, armhf, x86) can be found in the /libs subdirectory.
A shell script is also available named_build-mxt-app.sh_ which combines the process of creating mxt-app using both Autotools and Android NDK components. The build script generates the binary outputs to the /mxt-app-version folder.
Example:
/mxt-app-1.40
This script can be modified to create a custom build script for a specific release package.