-
LOCAL_PATH := $(call my-dir)#这里反回的是Android.mk文件所在的路径。
-
include $(CLEAR_VARS)
-
-
LOCAL_MODULE := cocosdenshion_static #模块之间调用时使用
-
-
LOCAL_MODULE_FILENAME := libcocosdenshion #如果是BUILD_STATIC_LIBRARY则是生成libcocosdenshion.a,如果是BUILD_SHARED_LIBRARY则是生成libcocosdenshion.so
-
.a文件在obj文件夹内,.so文件在libs文件夹。
-
LOCAL_SRC_FILES := SimpleAudioEngine.cpp \ #加载.cpp或者.c文件
-
jni/SimpleAudioEngineJni.cpp \
-
opensl/OpenSLEngine.cpp \
-
opensl/SimpleAudioEngineOpenSL.cpp
-
-
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include #在其他模块中也可以使用。
-
-
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \ <span style="font-family: Arial, Helvetica, sans-serif;"> #加载.h文件,../意思是路径向上返回一级</span>
-
$(LOCAL_PATH)/../../cocos2dx \
-
$(LOCAL_PATH)/../../cocos2dx/include \
-
$(LOCAL_PATH)/../../cocos2dx/kazmath/include \
-
$(LOCAL_PATH)/../../cocos2dx/platform/android
-
-
LOCAL_CFLAGS += -Wno-psabi
-
LOCAL_EXPORT_CFLAGS += -Wno-psabi
-
-
include $(BUILD_STATIC_LIBRARY)
这是我把cocos2d-x-2.2.1安装成功后才对android.mk文件有了更深一层的理解。革命尚未成功,同志仍需努力!!!!!