As long as the Ndk-bundle directory structure is understood, the basic principle of cross-compiling can be compiled by self-scripting.
After taking the code package from the warehouse, it is common to compile the library used by the current platform under the Linux platform, as long as the configuration of the platform-related configuration is made using its automatic configuration script configure, it can execute make to compile and install after the success.
Configure typically check the platform-supported interfaces under/usr/inclue and/usr/lib, and compile with a collection of two tools for binutils and GCC.
Therefore, to use the NDK for cross-compiling, the most basic is to configure the above 4 features, you can configure the most basic cross-platform environment, it is logical to do the subsequent configuration compilation work. Simply put, this is the case, in fact, the configuration and compilation after the beginning of the difficult.
Ndk-bundle in the cross-compilation of the main application of the two directories are platforms and Toolchains, see the following directory structure map can be clear of their respective role.
Https://github.com/bbqz007/xw/ndk-build-libevent.zip is an example of configuring a cross-compiling Libevent library under the Android platform.
Cross-compiling third-party libraries for Android platform versions using NDK