android 源码下建立自有工程下编译通用模版

android 源码下建立自有工程下编译

1、source build/envsetup.sh\r\n\r\n 
下面列出一个通用makefile模板 
# This makefile supplies the rules for building a library of JNI code for\r\n\r\n 
# use by our example of how to bundle a shared library with an APK. 

LOCAL_PATH:= $(call my-dir) 
tw_module_tags := eng debug 
include $(CLEAR_VARS) 
LOCAL_MODULE_TAGS := $(tw_module_tags) 
# This is the target being built.\r\n 
LOCAL_MODULE:= libmyhello 
#the target platform\r\n 
#TARGET_PLATFORM := android-4

# All of the source files that we will compile.\r\n 
LOCAL_SRC_FILES:= com_wonder_MyJniAppActivity.h calllocal.c 

#system lib to use log 
#LOCAL_LDLIBS+= -L$(SYSROOT)/system/lib -llog 

#All of the shared libraries we link against.\r\n 
LOCAL_SHARED_LIBRARIES := liblog 

# No static libraries. 
LOCAL_STATIC_LIBRARIES := 
# Also need the JNI headers.\r\n 

LOCAL_C_INCLUDES += $(JNI_H_INCLUDE) 
LOCAL_ARM_MODE := arm 
# No special compiler flags. 
LOCAL_CFLAGS += 

# Don''t prelink this library. For more efficient code, you may want\r\n# to add this library to the prelink map and set this to true. However,\r\n 
# it''s difficult to do this for applications that are not supplied as\r\n# part of a system image. 

LOCAL_PRELINK_MODULE := false 
include $(BUILD_SHARED_LIBRARY)
posted @ 2012-05-24 23:01  xianyuan  阅读(169)  评论(0编辑  收藏  举报