This blog post may answer your question:
http://clseto.mysinablog.com/index.php?op=ViewArticle&articleId=3480794
There is a recommended way to create your own C / C ++ program on Android: list the source files in the script (Android.mk) and run 'ndk-build'. It may not be a problem if you are writing new programs, but if you already have a working script build (for example, open source software) that can build your program on Linux well, it would be a headache to port your script to Android .mk. All you need in this situation is the C / C ++ cross-compiler, and then replace the variables in the script (e.g. CC, CXX, AR, AS, RANLIB, ...) with something like "arm-linux- androideabi- gcc ',' arm-linux-androideabi-g ++ ', ...
Fortunatley, inside the “Android NDK Dev Guide”, there is a section “Standalone Toolchain” that simply describes what we need ....
crusherjoe2000
source share