LOCAL_PATH := $(call my-dir)
TOP_LOCAL_PATH := $(call my-dir)/../
#Add target arm version
ifeq ($(TARGET_ARCH_ABI),armeabi)
MY_PJSIP_FLAGS := $(BASE_PJSIP_FLAGS) -DPJ_HAS_FLOATING_POINT=0
else
MY_PJSIP_FLAGS := $(BASE_PJSIP_FLAGS) -DPJ_HAS_FLOATING_POINT=1
endif
# Pjsip
include $(TOP_LOCAL_PATH)/pjlib/build/Android.mk
include $(TOP_LOCAL_PATH)/pjlib-util/build/Android.mk
include $(TOP_LOCAL_PATH)/pjnath/build/Android.mk
include $(TOP_LOCAL_PATH)/pjmedia/build/Android.mk
include $(TOP_LOCAL_PATH)/pjsip/build/Android.mk
#pjsip JNI
include $(TOP_LOCAL_PATH)/jni/build/Android.mk
#JSON
include $(TOP_LOCAL_PATH)/third_party/build/json/Android.mk
#GSLB
include $(TOP_LOCAL_PATH)/pgslb/build/Android.mk
There is an android Make file. Compile GSLB need this file. libpjnath.a, libpjnath.a is compiled by $(TOP_LOCAL_PATH)/pjnath/build/Android.mk. But the make file compile GSLB once execute. libpjnath.a can not be found.
How to designate the include execution sequence?
Actually, ndk-build runs make, and it’s not a good practice to rely on the order in which make decides to build its targets. For example, it may launch parallel builds to use your multi-core CPU. The correct way is to explain to make that one target depends on another.
LOCAL_STATIC_LIBRARIES and LOCAL_SHARED_LIBRARIES are designed exactly for this purpose. See NDK documentation for detailed explanation.