android mk 预编译库

Posted adong7639

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android mk 预编译库相关的知识,希望对你有一定的参考价值。

 

 

LOCAL_PATH := $(call my-dir)

#include $(CLEAR_VARS)
# OpenCV
#OPENCV_CAMERA_MODULES:=on
#OPENCV_INSTALL_MODULES:=on
#OPENCV_LIB_TYPE:=STATIC
#include D:\project\android\OpenCV-2.4.10-android-sdk\sdk\native\jni\OpenCV.mk
#include $(LOCAL_PATH)/opencv_android/jni/OpenCV.mk


#第三方的编译模块
include $(CLEAR_VARS)
LOCAL_MODULE    := skface
LOCAL_SRC_FILES := arm64-v8a/libskface.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE    := sksegment
LOCAL_SRC_FILES := arm64-v8a/libsksegment.so
#LOCAL_EXPORT_C_INCLUDES := include
include $(PREBUILT_SHARED_LIBRARY)

#include $(CLEAR_VARS)
#LOCAL_MODULE    := gnustl_shared
#LOCAL_SRC_FILES := arm64-v8a/libgnustl_shared.so
#include $(PREBUILT_SHARED_LIBRARY)

LOCAL_MODULE    := test              
LOCAL_SRC_FILES += test.cpp 
    
LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog
LOCAL_CFLAGS += -ffast-math -lpthread -ldl -O3 -std=c++11
LOCAL_CFLAGS += -DBUILD_TBB=ON -DWITH_TBB=ON
LOCAL_LDFLAGS += -Wl,--gc-sections

LOCAL_CFLAGS += -fopenmp
LOCAL_CPPFLAGS += -fopenmp
LOCAL_LDFLAGS += -fopenmp

LOCAL_LDLIBS += -lz -llog -ljnigraphics
#这里引入第三方编译模块
LOCAL_SHARED_LIBRARIES += skface
LOCAL_SHARED_LIBRARIES += sksegment
#LOCAL_SHARED_LIBRARIES += gnustl_shared
include $(BUILD_SHARED_LIBRARY)

 

以上是关于android mk 预编译库的主要内容,如果未能解决你的问题,请参考以下文章

android.mk 怎么注释

使用预编译库PREBUILT LIBRARY

Android系统编译环境初始化时Product产品的import-nodes过程

android.mk makefile 有啥区别

Android 编译之Android.mk

Android.mk这个文件在哪里呢