ifneq ($(TARGET_SIMULATOR),true)
LOCAL_PATH:= $(call my-dir) //定义当前目录
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= .cpp \ //所需要的源文件
LOCAL_C_INCLUDES += $(KERNEL_HEADERS) \
$(LOCAL_PATH)/boost/include/boost-1_48 //添加源文件所需要的头文件
LOCAL_CFLAGS += -I bionic/libstdc++/include -I external/astl/include
LOCAL_CFLAGS += -I$(LOCAL_PATH)/boost/include/boost-1_48/boost
LOCAL_CFLAGS += -Wno-deprecated
LOCAL_LDLIBS += -L$(LOCAL_PATH)/boost/lib/ -lsupc++ -lboost_system -lboost_iostreams \
-lboost_program_options -lboost_regex -lboost_signals -lboost_thread \
-lboost_filesystem -lboost_date_time
#LOCAL_LDLIBS += -L$(LOCAL_PATH)/libs/armeabi-v7a/4.6.3/ -lsupc++ -lgnust1_static \
LOCAL_CPPFLAGS += -fexceptions
LOCAL_CPPFLAGS += -frtti
LOCAL_SYSTEM_SHARED_LIBRARIES := libc libstdc++ libutils //所需要的共享库
LOCAL_MODULE = LogMgr //编译成的模块名
include $(BUILD_EXECUTABLE)
endif # TARGET_SIMULATOR != true
Android.mk编写有些类似于makefile的编写方式,对于Andoid下面的底层编译有很重要的意义。