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)

 

posted on 2019-08-19 19:56  Maddock  阅读(753)  评论(0编辑  收藏  举报

导航