As I understand it, the correct method is to use ndk-build and not call the compiler directly.
In Android.mk, you need to specify a module for each static library that you want to compile, and then indicate that your library should use it.
An example of a modified Android.mk file in the hello-jni project example:
LOCAL_PATH := $(call my-dir)
If you want to control which modules to compile when you run ndk-build, you can create the Application.mk file (in the same directory as Android.mk) and list all the modules, as in the following example:
APP_MODULES := <module_name_1> <module_name_2> ... <module_name_n>
I think it helps you
user647826
source share