From ccbc6684273d0dcca21daad74dbcdd7a948f500a Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Fri, 17 Oct 2014 10:13:33 +0800 Subject: [PATCH] Improve Android.mk --- cocos/3d/Android.mk | 4 +--- cocos/Android.mk | 12 +++++------- cocos/editor-support/cocosbuilder/Android.mk | 13 ++++--------- cocos/editor-support/cocostudio/Android.mk | 17 +++-------------- cocos/editor-support/spine/Android.mk | 4 +--- cocos/network/Android.mk | 10 +++------- cocos/platform/android/Android.mk | 2 ++ cocos/ui/Android.mk | 14 +++----------- extensions/Android.mk | 15 +++------------ 9 files changed, 25 insertions(+), 66 deletions(-) diff --git a/cocos/3d/Android.mk b/cocos/3d/Android.mk index c0ce7c55f3..9710c56be0 100644 --- a/cocos/3d/Android.mk +++ b/cocos/3d/Android.mk @@ -25,9 +25,7 @@ CCSprite3D.cpp LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. -LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ - $(LOCAL_PATH)/../../external \ - $(LOCAL_PATH)/../platform/android +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static diff --git a/cocos/Android.mk b/cocos/Android.mk index d492889320..79950b1e77 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -190,14 +190,15 @@ physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/. \ + $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/platform \ $(LOCAL_PATH)/base \ + $(LOCAL_PATH)/../external \ $(LOCAL_PATH)/../external/tinyxml2 \ $(LOCAL_PATH)/../external/unzip \ $(LOCAL_PATH)/../external/chipmunk/include/chipmunk \ $(LOCAL_PATH)/../external/xxhash \ - $(LOCAL_PATH)/../external/nslog \ - $(LOCAL_PATH)/base + $(LOCAL_PATH)/../external/nslog LOCAL_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/. \ @@ -245,12 +246,11 @@ LOCAL_MODULE := cocos2dx_static LOCAL_MODULE_FILENAME := libcocos2d LOCAL_STATIC_LIBRARIES := cocostudio_static -LOCAL_STATIC_LIBRARIES += audioengine_static -LOCAL_STATIC_LIBRARIES += cocos3d_static LOCAL_STATIC_LIBRARIES += cocosbuilder_static +LOCAL_STATIC_LIBRARIES += cocos3d_static LOCAL_STATIC_LIBRARIES += spine_static LOCAL_STATIC_LIBRARIES += cocos_network_static -LOCAL_STATIC_LIBRARIES += box2d_static +LOCAL_STATIC_LIBRARIES += audioengine_static include $(BUILD_STATIC_LIBRARY) #============================================================== @@ -273,5 +273,3 @@ $(call import-module,Box2D) $(call import-module,curl/prebuilt/android) $(call import-module,websockets/prebuilt/android) $(call import-module,protobuf-lite) - - diff --git a/cocos/editor-support/cocosbuilder/Android.mk b/cocos/editor-support/cocosbuilder/Android.mk index eaafab037f..a93f8cf5aa 100644 --- a/cocos/editor-support/cocosbuilder/Android.mk +++ b/cocos/editor-support/cocosbuilder/Android.mk @@ -28,17 +28,12 @@ CCScale9SpriteLoader.cpp \ CCScrollViewLoader.cpp \ CCSpriteLoader.cpp -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../../.. +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../2d \ -$(LOCAL_PATH) \ -$(LOCAL_PATH)/../../.. \ -$(LOCAL_PATH)/../../ \ -$(LOCAL_PATH)/../../platform/android \ -$(LOCAL_PATH)/../../editor-support +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/../../2d \ + LOCAL_STATIC_LIBRARIES := cocos_extension_static include $(BUILD_STATIC_LIBRARY) - diff --git a/cocos/editor-support/cocostudio/Android.mk b/cocos/editor-support/cocostudio/Android.mk index aa13963325..d31578183a 100644 --- a/cocos/editor-support/cocostudio/Android.mk +++ b/cocos/editor-support/cocostudio/Android.mk @@ -63,26 +63,15 @@ ActionTimeline/CSLoader.cpp \ CSParseBinary.pb.cc -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../../../external +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \ -$(LOCAL_PATH)/../../../external \ -$(LOCAL_PATH)/../../../external/protobuf-lite/src/google/protobuf \ -$(LOCAL_PATH)/../../../external/protobuf-lite/src \ -$(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../.. \ -$(LOCAL_PATH)/WidgetReader \ -$(LOCAL_PATH)/../../platform/android \ -$(LOCAL_PATH)/../../../external/tinyxml2 \ +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/WidgetReader LOCAL_CFLAGS += -fexceptions LOCAL_STATIC_LIBRARIES := cocos_ui_static LOCAL_STATIC_LIBRARIES += cocosdenshion_static -LOCAL_STATIC_LIBRARIES += cocos_extension_static -LOCAL_STATIC_LIBRARIES += cocos2dx_internal_static LOCAL_STATIC_LIBRARIES += cocos_protobuf-lite_static include $(BUILD_STATIC_LIBRARY) - diff --git a/cocos/editor-support/spine/Android.mk b/cocos/editor-support/spine/Android.mk index 118f45c52e..cd44de01ce 100644 --- a/cocos/editor-support/spine/Android.mk +++ b/cocos/editor-support/spine/Android.mk @@ -33,9 +33,7 @@ spine-cocos2dx.cpp LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \ -$(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../../platform/android +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static diff --git a/cocos/network/Android.mk b/cocos/network/Android.mk index e056ad41c5..0e5fa5254f 100644 --- a/cocos/network/Android.mk +++ b/cocos/network/Android.mk @@ -9,14 +9,10 @@ LOCAL_SRC_FILES := HttpClient.cpp \ SocketIO.cpp \ WebSocket.cpp +LOCAL_EXPORT_C_INCLUDES := -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \ -$(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../platform/android \ -$(LOCAL_PATH)/../../external/curl/include/android \ -$(LOCAL_PATH)/../../external/websockets/include/android +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../external/curl/include/android \ + $(LOCAL_PATH)/../../external/websockets/include/android LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static LOCAL_STATIC_LIBRARIES += cocos_curl_static diff --git a/cocos/platform/android/Android.mk b/cocos/platform/android/Android.mk index 6073ebd55f..123e4fb7e8 100644 --- a/cocos/platform/android/Android.mk +++ b/cocos/platform/android/Android.mk @@ -37,4 +37,6 @@ LOCAL_EXPORT_LDLIBS := -lGLESv1_CM \ LOCAL_CPPFLAGS := -Wno-extern-c-compat +LOCAL_EXPORT_CPPFLAGS := -Wno-extern-c-compat + include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index f71f89ea5c..316d8a51d1 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -37,18 +37,10 @@ UIEditBox/UIEditBox.cpp \ UIEditBox/UIEditBoxImpl-android.cpp \ UILayoutComponent.cpp \ -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../editor-support +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../editor-support -LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../../external \ -$(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../.. \ -$(LOCAL_PATH)/../editor-support \ -$(LOCAL_PATH)/../platform/android +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../editor-support -LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static -LOCAL_STATIC_LIBRARIES += cocos_extension_static +LOCAL_STATIC_LIBRARIES := cocos_extension_static include $(BUILD_STATIC_LIBRARY) - diff --git a/extensions/Android.mk b/extensions/Android.mk index d7d4f2777e..116dfc8cda 100644 --- a/extensions/Android.mk +++ b/extensions/Android.mk @@ -33,21 +33,12 @@ LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static LOCAL_STATIC_LIBRARIES += cocos_curl_static LOCAL_STATIC_LIBRARIES += box2d_static -GU/CCEditBox/CCEditBox.cpp \ -GUI/CCEditBox/CCEditBoxImplAndroid.cpp \ -GUI/CCEditBox/CCEditBoxImplNone.cpp \ -GUI/CCEditBox/CCEditBoxImplWin.cpp \ LOCAL_CXXFLAGS += -fexceptions -LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ - $(LOCAL_PATH)/../cocos \ - $(LOCAL_PATH)/../cocos/platform/android \ - $(LOCAL_PATH)/../external/chipmunk/include/chipmunk \ - $(LOCAL_PATH)/../external/curl/include/android \ - $(LOCAL_PATH)/../external/unzip +LOCAL_C_INCLUDES := $(LOCAL_PATH) - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/. \ + $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/GUI/CCControlExtension \ $(LOCAL_PATH)/GUI/CCScrollView