Porting a command-line executable to Android with an NDK standalone compiler
The previous recipe covered how to port a command-line executable to Android with an NDK build system. This recipe describes how to do it by using the Android NDK toolchain as a standalone compiler.
Getting ready
It is recommended that you read the Porting a library with its existing build system recipe in Chapter 8, Porting and Using Existing Libraries with Android NDK, before continuing.
How to do it...
The following steps describe how to port the fusch
program to Android by using the NDK toolchain directly:
Create an Android application named PortingExecutableBuildSystem with native support. Set the package name as
cookbook.chapter9.portingexecutablebuildsystem
. Refer to the Loading native libraries and registering native methods recipe of Chapter 2, Java Native Interface, if you want more detailed instructions.Remove the existing content under the
jni
folder of the project.Download the source code of the
fusch
...