The documentation for Android NDK contains the following instructions:
The Android.mk file is located in a subdirectory of your jni / directory [...] http://developer.android.com/ndk/guides/android_mk.html
I can interpret from this that the Android.mk file should be placed in [project_path]/jni/[module_name]/Android.mk , and each module has its own specific Android.mk file, as this distinguishes it from the widely used application Application.mk , but when I execute ndk-build following error message appears:
Android NDK: Android.mk does not exist. / jni
Android NDK: If intentional, define APP_BUILD_SCRIPT to indicate
Android NDK: for a valid build of an NDK script.
From this, I have to create one Android.mk file next to my Application.mk file or define APP_BUILD_SCRIPT in Application.mk to point to a single Android.mk file. This contradicts the documentation and does not allow me to wonder why there is a need for several makefiles when Android.mk contains definitions for all modules in any case, which can also be placed in Application.mk .
Looking at a few examples of NDK projects, I found that the Android.mk file is in the same directory as Application.mk , and running ndk-build on them seems to work.
What is missing?
android android-ndk makefile
Max ocd
source share