LOCAL_SRC_FILES := hellocpp/main.cpp \
../../Classes/AppDelegate.cpp \
../../Classes/HelloWorldScene.cpp
只要把上面这些替换成下面的:
SRC_FILES := hellocpp/main.cpp
SRC_FILES += $(wildcard $(LOCAL_PATH)/../../Classes/*.cpp)
SRC_FILES += $(wildcard $(LOCAL_PATH)/../../Classes/*/*.cpp)
SRC_FILES += $(wildcard $(LOCAL_PATH)/../../Classes/*/*/*.cpp)
SRC_FILES += $(wildcard $(LOCAL_PATH)/../../Classes/*/*/*/*.cpp)
LOCAL_SRC_FILES := $(SRC_FILES:$(LOCAL_PATH)/%=%)
转载自 http://www.cnblogs.com/Colored-Mr/p/4721073.html