From bb4fc1c446c17d799f5043155655bfa393b3eba2 Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 29 Apr 2011 09:59:05 +0800 Subject: [PATCH] [android] fixed #477: set default ndk version to ndk-r5 --- HelloWorld/android/build_native.sh | 2 +- HelloWorld/android/jni/helloworld/Android.mk | 17 ++++++----- cocos2dx/Android.mk | 30 +++++++++++--------- tests/test.android/build_native.sh | 2 +- tests/test.android/jni/tests/Android.mk | 22 +++++++------- 5 files changed, 40 insertions(+), 33 deletions(-) diff --git a/HelloWorld/android/build_native.sh b/HelloWorld/android/build_native.sh index 6a59de19ab..5e1db3e435 100644 --- a/HelloWorld/android/build_native.sh +++ b/HelloWorld/android/build_native.sh @@ -1,5 +1,5 @@ # set params -ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r4-crystax +ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r5 COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x HELLOWORLD_ROOT=$COCOS2DX_ROOT/HelloWorld/android diff --git a/HelloWorld/android/jni/helloworld/Android.mk b/HelloWorld/android/jni/helloworld/Android.mk index d02abf55ab..0d370ea1eb 100644 --- a/HelloWorld/android/jni/helloworld/Android.mk +++ b/HelloWorld/android/jni/helloworld/Android.mk @@ -11,15 +11,18 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \ $(LOCAL_PATH)/../../../../cocos2dx/include \ $(LOCAL_PATH)/../../../../CocosDenshion/include \ $(LOCAL_PATH)/../../.. - -LOCAL_LDLIBS := -L$(LOCAL_PATH)/../../libs/armeabi -lcocos2d -llog -lcocosdenshion \ - -L$(LOCAL_PATH)/../../../../cocos2dx/platform/third_party/android/libraries -lcurl -# it is used for ndk-r5 +# it is used for ndk-r4 +# if you build with nkd-r4, uncomment it +# LOCAL_LDLIBS := -L$(LOCAL_PATH)/../../libs/armeabi -lcocos2d -llog -lcocosdenshion \ +# -L$(LOCAL_PATH)/../../../../cocos2dx/platform/third_party/android/libraries -lcurl + +# it is used for ndk-r5 +# if you build with ndk-r4, comment it # because the new Windows toolchain doesn't support Cygwin's drive # mapping (i.e /cygdrive/c/ instead of C:/) -# LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/armeabi) \ -# -lcocos2d -llog -lcocosdenshion \ -# -L$(call host-path, $(LOCAL_PATH)/../../../../cocos2dx/platform/third_party/android/libraries) -lcurl +LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/armeabi) \ + -lcocos2d -llog -lcocosdenshion \ + -L$(call host-path, $(LOCAL_PATH)/../../../../cocos2dx/platform/third_party/android/libraries) -lcurl include $(BUILD_SHARED_LIBRARY) \ No newline at end of file diff --git a/cocos2dx/Android.mk b/cocos2dx/Android.mk index 72753ae53e..38bd18e393 100644 --- a/cocos2dx/Android.mk +++ b/cocos2dx/Android.mk @@ -117,23 +117,25 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/ \ $(LOCAL_PATH)/platform/third_party/android/skia/views \ $(LOCAL_PATH)/platform/third_party/android/skia/xml -#it is used for ndk-r4 -LOCAL_LDLIBS := -L$(LOCAL_PATH)/platform/third_party/android/libraries \ - -lGLESv1_CM -llog -lz \ - -lpng \ - -lxml2 \ - -ljpeg \ - -lskia +# it is used for ndk-r4 +# if you build with nkd-r4, uncomment it +# LOCAL_LDLIBS := -L$(LOCAL_PATH)/platform/third_party/android/libraries \ +# -lGLESv1_CM -llog -lz \ +# -lpng \ +# -lxml2 \ +# -ljpeg \ +# -lskia -# it is used for ndk-r5 +# it is used for ndk-r5 +# if you build with ndk-r4, comment it # because the new Windows toolchain doesn't support Cygwin's drive # mapping (i.e /cygdrive/c/ instead of C:/) -# LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/platform/third_party/android/libraries) \ -# -lGLESv1_CM -llog -lz \ -# -lpng \ -# -lxml2 \ -# -ljpeg \ -# -lskia +LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/platform/third_party/android/libraries) \ + -lGLESv1_CM -llog -lz \ + -lpng \ + -lxml2 \ + -ljpeg \ + -lskia # define the macro to compile through support/zip_support/ioapi.c LOCAL_CFLAGS := -DUSE_FILE32API diff --git a/tests/test.android/build_native.sh b/tests/test.android/build_native.sh index 5c29a9bcbf..b802d5a54c 100644 --- a/tests/test.android/build_native.sh +++ b/tests/test.android/build_native.sh @@ -1,5 +1,5 @@ # set params -ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r4-crystax +ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r5 COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x TESTS_ROOT=$COCOS2DX_ROOT/tests/test.android diff --git a/tests/test.android/jni/tests/Android.mk b/tests/test.android/jni/tests/Android.mk index 07818cae51..3ef21aadc4 100644 --- a/tests/test.android/jni/tests/Android.mk +++ b/tests/test.android/jni/tests/Android.mk @@ -82,21 +82,23 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \ $(LOCAL_PATH)/../../../../CocosDenshion/include # it is used for ndk-r4 -LOCAL_LDLIBS := -L$(LOCAL_PATH)/../../libs/armeabi \ - -lGLESv1_CM \ - -lcocos2d -lcocosdenshion -llog \ - -lbox2d -lchipmunk \ - -L$(LOCAL_PATH)/../../../../cocos2dx/platform/third_party/android/libraries -lcurl +# if you build with nkd-r4, uncomment it +# LOCAL_LDLIBS := -L$(LOCAL_PATH)/../../libs/armeabi \ +# -lGLESv1_CM \ +# -lcocos2d -lcocosdenshion -llog \ +# -lbox2d -lchipmunk \ +# -L$(LOCAL_PATH)/../../../../cocos2dx/platform/third_party/android/libraries -lcurl # it is used for ndk-r5 +# if you build with ndk-r4, comment it # because the new Windows toolchain doesn't support Cygwin's drive # mapping (i.e /cygdrive/c/ instead of C:/) -#LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/armeabi) \ -# -lGLESv1_CM \ -# -lcocos2d -llog -lcocosdenshion \ -# -lbox2d -lchipmunk \ -# -L$(call host-path, $(LOCAL_PATH)/../../../../cocos2dx/platform/third_party/android/libraries) -lcurl +LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/armeabi) \ + -lGLESv1_CM \ + -lcocos2d -llog -lcocosdenshion \ + -lbox2d -lchipmunk \ + -L$(call host-path, $(LOCAL_PATH)/../../../../cocos2dx/platform/third_party/android/libraries) -lcurl include $(BUILD_SHARED_LIBRARY)