Android.mk各種檔案編譯彙總

jia635發表於2014-07-22

一、原始碼編譯

1.1 so預編譯

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libAppArea
LOCAL_SRC_FILES :=libAppArea.so
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_SUFFIX:=$(HOST_JNILIB_SUFFIX)
LOCAL_CERTIFICATE:=platform
LOCAL_PRELINK_MODULE := false
include $(BUILD_PREBUILT)

1.2 share lib編譯

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
#LDFLAGS    +=  -ldl
LOCAL_LDLIBS    := -ldl -lm -llog -llibc
LOCAL_MODULE    := libnandFlashReadPage_jni
LOCAL_SRC_FILES := nandFlashReadPage_jni.cpp\
 
LOCAL_SHARED_LIBRARIES := libdl\
    liblog\
    libpre_NandRecognition\
    libpre_AppArea\
    libc\
    libstdc++
     
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)



相關文章