Cocos2dx android build shell file

./jni/Android.mk

LOCAL_PATH := $(call my-dir)include $(CLEAR_VARS)LOCAL_MODULE := game_sharedLOCAL_MODULE_FILENAME := libgameLOCAL_SRC_FILES := hellocpp/main.cppdefine all-cpp-files-under$(patsubst ./%,%, \  $(shell cd $(LOCAL_PATH) ; \          find ../../Classes -name "*.cpp" -and -not -name ".*") \ )endefdefine all-subdir-cpp-files$(call all-cpp-files-under,.)endefLOCAL_SRC_FILES += $(call all-subdir-cpp-files)                   LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes                   LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static            include $(BUILD_SHARED_LIBRARY)$(call import-module,CocosDenshion/android) \$(call import-module,cocos2dx) \$(call import-module,extensions)

主要是修改 LOCAL_SRC_FILES 部分

原内容为

LOCAL_SRC_FILES := hellocpp/main.cpp \                   ../../Classes/AppDelegate.cpp \                   ../../Classes/HelloWorldScene.cpp

修改后

LOCAL_SRC_FILES := hellocpp/main.cppdefine all-cpp-files-under$(patsubst ./%,%, \  $(shell cd $(LOCAL_PATH) ; \          find ../../Classes -name "*.cpp" -and -not -name ".*") \ )endefdefine all-subdir-cpp-files$(call all-cpp-files-under,.)endefLOCAL_SRC_FILES += $(call all-subdir-cpp-files)