Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> Android JNI之Android.mk、Application.mk

Android JNI之Android.mk、Application.mk

編輯:關於Android編程

Android.mk如下:


LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

#依賴的動態庫列表
XLOCAL_SHARED_LIBRARIES := \
liblog

#頭文件列表
XLOCAL_C_INCLUDES := \
/home/dell/yangping/json_linux/jsoncpp-src-0.5.0/include \
$(LOCAL_PATH)/Comm \
$(LOCAL_PATH)/XJniInterface

#源文件列表
XLOCAL_CPPS := \
$(wildcard $(LOCAL_PATH)/Comm/*.cpp) \
$(wildcard $(LOCAL_PATH)/XJniInterface/*.cpp)

XLOCAL_SRC_FILES := $(XLOCAL_CPPS:$(LOCAL_PATH)/%=%)

#LOCAL_CFLAGS := -Werror
XLOCAL_CFLAGS := -Wl,-Map=test.map \
-g(這兩個參數調試用,發布版本的話去掉比較好,其他參數可自己加)

LOCAL_SHARED_LIBRARIES += $(XLOCAL_SHARED_LIBRARIES)
LOCAL_C_INCLUDES += $(XLOCAL_C_INCLUDES)
LOCAL_SRC_FILES := $(XLOCAL_SRC_FILES)
LOCAL_CFLAGS := $(XLOCAL_CFLAGS)
LOCAL_MODULE := libsigParse
LOCAL_LDLIBS := -llog

include $(BUILD_SHARED_LIBRARY)



Application.mk如下:

APP_ABI := armeabi
APP_OPTIM := debug(調試用)
APP_STL := stlport_static




  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved