Android.mk 代码注释

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android.mk 代码注释相关的知识,希望对你有一定的参考价值。

参考文章:http://www.cnblogs.com/wainiwann/p/3837936.html


LOCAL_PATH := $(call my-dir)  #返回android.mk的目录路径



include $(CLEAR_VARS)   #负责清理很多LOCAL_xxx. 例如:LOCAL_MODULE, LOCAL_SRC_FILES, LOCAL_STATIC_LIBRARIES等等。但不清理LOCAL_PATH.

LOCAL_MODULE := libjpush173   #模块的文件路径 ,Android.mk中的每一个模块

LOCAL_SRC_FILES := jpush/libjpush173.so   #模块的文件路径

include $(PREBUILT_SHARED_LIBRARY)  #把这个共享库声明为 “一个” 独立的模块,    预先编译好的动态库

LOCAL_SHARED_LIBRARIES := libjpush173  #要链接到本模块的动态库(更改或删掉无用)




include $(CLEAR_VARS)

LOCAL_MODULE := bugly

LOCAL_SRC_FILES := bugly/libBugly.so

include $(PREBUILT_SHARED_LIBRARY)

LOCAL_SHARED_LIBRARIES := bugly




include $(CLEAR_VARS)

LOCAL_MODULE := cocos2dlua_shared

LOCAL_MODULE_FILENAME := libcocos2dlua  #即允许用户重新定义最终生成的目标文件名


LOCAL_CFLAGS += -DUSING_LUA


LOCAL_SRC_FILES :=hellolua/main.cpp \

../../Classes/AppDelegate.cpp \

../../Classes/auto/lua_client_auto.cpp \

../../Classes/auto/lua_ui_extensions_auto.cpp \

../../Classes/manual/lua_client_manual.cpp \

../../Classes/Net/GameNetManager.cpp \

../../Classes/Net/MsgHandler.cpp \

../../lib/common/AdapterToLua.cpp \

../../lib/common/exceptdump.cpp \

../../lib/extensions/AnimateMgr.cpp \

../../lib/extensions/AnimateSprite.cpp \

../../lib/extensions/ParticleSystemCommon.cpp \

../../lib/extensions/ResourceMgr.cpp \

../../lib/extensions/SpriteAnimate.cpp \

../../lib/extensions/UtilEx.cpp \

../../lib/extensions/ZipFileEx.cpp \

../../lib/gamescene/AStarFindPath.cpp \

../../lib/gamescene/GameMap.cpp \

../../lib/gamescene/GameScene.cpp \

../../lib/gamescene/MapConfig.cpp \

../../lib/gamescene/RenderGroup.cpp \

../../lib/gamescene/Terrain.cpp \

../../lib/gamescene/TerrainNode.cpp \

../../lib/md5/md5.c \

../../lib/memory/clmempool.cpp \

../../lib/memory/memmonitor.cpp \

../../lib/memory/mempool.cpp \

../../lib/memory/mempoolex.cpp \

../../lib/memory/msgmem.cpp \

../../lib/network/HttpClient.cpp \

../../lib/network/NetworkManager.cpp \

../../lib/network/basicnetwork/basicnetwork.cpp \

../../lib/network/basicnetwork/jobaccept.cpp \

../../lib/network/basicnetwork/jobdisconnect.cpp \

../../lib/network/basicnetwork/jobrecv.cpp \

../../lib/network/basicnetwork/listenhandler.cpp \

../../lib/network/basicnetwork/network.cpp \

../../lib/network/basicnetwork/tcphandler.cpp \

../../lib/platform/system.cpp \

../../lib/platform/systemex.cpp \

../../lib/platform/platform_adapter.cpp \

../../lib/platform/socket/pisocket.cpp \

../../lib/platform/socket/pisocketex.cpp \

../../lib/platform/thread/event.cpp \

../../lib/platform/thread/mutex.cpp \

../../lib/platform/thread/semaphore.cpp \

../../lib/platform/thread/thread.cpp \

../../lib/ui_extensions/UIJoystick.cpp \

../../lib/ui_extensions/UILoadingBarEx.cpp \

../../lib/ui_extensions/UIRichTextEx.cpp \

../../lib/ui_extensions/UITextFieldEx.cpp \

../../lib/ui_extensions/UIToggleButton.cpp

   

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes \

$(LOCAL_PATH)/../../Classes/Net \

$(LOCAL_PATH)/../../Classes/lua_manual \

$(LOCAL_PATH)/../../Classes/auto \

$(LOCAL_PATH)/../../Classes/anysdk \

$(LOCAL_PATH)/../../lib \

$(LOCAL_PATH)/../../lib/auto \

$(LOCAL_PATH)/../../lib/common \

$(LOCAL_PATH)/../../lib/extensions \

$(LOCAL_PATH)/../../lib/gamescene \

$(LOCAL_PATH)/../../lib/md5 \

$(LOCAL_PATH)/../../lib/memory \

$(LOCAL_PATH)/../../lib/network \

$(LOCAL_PATH)/../../lib/platform \

$(LOCAL_PATH)/../../lib/ui_extensions \

$(LOCAL_PATH)/../../../cocos2d-x/cocos \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/2d \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/2d/platform \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/2d/platform\android \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/2d/platform\desktop \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/2d/renderer \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/base \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/math \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/math/kazmath \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/physics \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/platform \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/renderer\

$(LOCAL_PATH)/../../../cocos2d-x/cocos/ui \

$(LOCAL_PATH)/../../../cocos2d-x/extensions \

$(LOCAL_PATH)/../../../cocos2d-x/external \

$(LOCAL_PATH)/../../../cocos2d-x/external/lua/tolua \

$(LOCAL_PATH)/../../../cocos2d-x/external/lua/luajit/include \

$(LOCAL_PATH)/../../../cocos2d-x/external/lua \

$(LOCAL_PATH)/../../../cocos2d-x/external/tinyxml2 \

$(LOCAL_PATH)/../../../cocos2d-x/external/xxtea \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/scripting/lua-bindings/auto \

$(LOCAL_PATH)/../../../cocos2d-x/cocos/scripting/lua-bindings/manual


LOCAL_STATIC_LIBRARIES := cocos_curl_static

LOCAL_STATIC_LIBRARIES += cocos_mbedtls_static

LOCAL_STATIC_LIBRARIES += cocos_lua_static


include $(BUILD_SHARED_LIBRARY)

#BUILD_SHARED_LIBRARY  指向一个编译脚本,它收集自从上次调用 include $(CLEAR_VARS)  后的所有LOCAL_XXX信息。

并决定如何将你列出的Source编译成一个动态库。 注意,在包含此文件前,至少应该包含:LOCAL_MODULE and LOCAL_SRC_FILES 例如: include $(BUILD_SHARED_LIBRARY)


$(call import-module,scripting/lua-bindings)


本文出自 “陪你度过漫长岁月” 博客,请务必保留此出处http://4774721.blog.51cto.com/4764721/1792459

以上是关于Android.mk 代码注释的主要内容,如果未能解决你的问题,请参考以下文章

Android Studio 3.0.1在Android.mk中注释掉行

Android 逆向代码调试器开发 ( 使用 NDK 中的 ndk-build + Android.mk 编译 Android 平台的代码调试器可执行应用 )

Android 逆向代码调试器开发 ( 使用 NDK 中的 ndk-build + Android.mk 编译 Android 平台的代码调试器可执行应用 )

Android.mk解析

如何自动设好 Android.mk 的 LOCAL

android.mk是在啥情况下生成的