Android.mk如何使用通配符包含所有.cpp文件?

时间:2012-12-07 14:25:40

标签: android eclipse makefile cocos2d-x

这是我的目录结构...

> Classes [dir]
> ---subdir1
> ------ some .cpp and .h files
> ---subdir2
> ------ some .cpp and .h files
> ---more .cpp and .h files
> ---Android.mk

这是Android.mk的代码

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := game_logic_static

LOCAL_MODULE_FILENAME := libgame_logic

LOCAL_SRC_FILES := AppDelegate.cpp \
                   HelloWorldScene.cpp

LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)

LOCAL_STATIC_LIBRARIES := png_static_prebuilt
LOCAL_STATIC_LIBRARIES += xml2_static_prebuilt
LOCAL_STATIC_LIBRARIES += jpeg_static_prebuilt
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_static

LOCAL_SHARED_LIBRARIES := cocosdenshion_shared

include $(BUILD_STATIC_LIBRARY)

$(call import-module,cocos2dx/platform/third_party/android/modules/libpng)
$(call import-module,cocos2dx/platform/third_party/android/modules/libxml2)
$(call import-module,cocos2dx/platform/third_party/android/modules/libjpeg)

任何人都可以为Android.mk发布正确的代码(如果可能的话,完成),以便所有.cpp都将在Class目录中编译?谢谢!

注意:尝试使用Eclipse开发cocos2d-x Android 更多说明:我已经尝试过这些无济于事:

  

Android.mk file - including all source files in different folders and subfolders How to write android.mk file with source files in subdirectories? Android.mk, include all cpp files

0 个答案:

没有答案