CocosDeshion's android.mk 文件的理解

  1. LOCAL_PATH := $(call my-dir)#这里反回的是Android.mk文件所在的路径。  
  2. include $(CLEAR_VARS)  
  3.   
  4. LOCAL_MODULE := cocosdenshion_static  #模块之间调用时使用  
  5.   
  6. LOCAL_MODULE_FILENAME := libcocosdenshion  #如果是BUILD_STATIC_LIBRARY则是生成libcocosdenshion.a,如果是BUILD_SHARED_LIBRARY则是生成libcocosdenshion.so  
  1. .a文件在obj文件夹内,.so文件在libs文件夹。  
  1. LOCAL_SRC_FILES := SimpleAudioEngine.cpp \    #加载.cpp或者.c文件  
  2.                    jni/SimpleAudioEngineJni.cpp \  
  3.                    opensl/OpenSLEngine.cpp \  
  4.                    opensl/SimpleAudioEngineOpenSL.cpp  
  5.   
  6. LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include  #在其他模块中也可以使用。  
  7.   
  8. LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \   <span style="font-family: Arial, Helvetica, sans-serif;"> #加载.h文件,../意思是路径向上返回一级</span>  
  9.                     $(LOCAL_PATH)/../../cocos2dx \  
  10.                     $(LOCAL_PATH)/../../cocos2dx/include \  
  11.                     $(LOCAL_PATH)/../../cocos2dx/kazmath/include \  
  12.                     $(LOCAL_PATH)/../../cocos2dx/platform/android  
  13.   
  14. LOCAL_CFLAGS += -Wno-psabi  
  15. LOCAL_EXPORT_CFLAGS += -Wno-psabi  
  16.   
  17. include $(BUILD_STATIC_LIBRARY)  
这是我把cocos2d-x-2.2.1安装成功后才对android.mk文件有了更深一层的理解。革命尚未成功,同志仍需努力!!!!!
posted @ 2015-08-07 03:14  Anzhongliu  阅读(213)  评论(0编辑  收藏  举报