cocos2d-x通过build_natice.sh编译成android时不用每次更改Andro
来源:未知 责任编辑:责任编辑 发表时间:2013-11-15 19:49 点击:次
这是我的Android.mk的全文
p>重点是红色部分,替换掉原来的那部分手工添加的部分。
p>
p>注:这是cocos2d-x 2.1.5版本的
p>
p>LOCAL_PATH := $(call my-dir)
p>
p>
p>include $(CLEAR_VARS)
p>
p>
p>LOCAL_MODULE := cocos2dcpp_shared
p>
p>
p>LOCAL_MODULE_FILENAME := libcocos2dcpp
p>
p>
p>
p>
p>
p>
p>
p>
p># 遍历目录及子目录的函数
p>define walk
p>$(wildcard $(1)) $(foreach e, $(wildcard $(1)/*), $(call walk, $(e)))
p>endef
p># 遍历Classes目录
p>ALLFILES = $(call walk, $(LOCAL_PATH)/../../Classes)
p>FILE_LIST := hellocpp/main.cpp
p># 从所有文件中提取出所有.cpp文件
p>FILE_LIST += $(filter %.cpp, $(ALLFILES))
p>LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
p>FILE_INCLUDES := $(shell find $(LOCAL_PATH)/../../Classes -type d)
p>LOCAL_C_INCLUDES := $(FILE_INCLUDES)
p>
p>
p>
p>
p>
p>
p>
p>
p>LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_static
p>LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
p>LOCAL_WHOLE_STATIC_LIBRARIES += box2d_static
p>LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static
p>LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static
p>
p>
p>include $(BUILD_SHARED_LIBRARY)
p>
p>
p>$(call import-module,cocos2dx)
p>$(call import-module,cocos2dx/platform/third_party/android/prebuilt/libcurl)
p>$(call import-module,CocosDenshion/android)
p>$(call import-module,extensions)
p>$(call import-module,external/Box2D)
p>$(call import-module,external/chipmunk)
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>