Merge pull request #579 from minggo/iss838_support_x86

android template supports x86
This commit is contained in:
minggo 2011-11-23 00:46:42 -08:00
commit c7aac6b526
5 changed files with 10 additions and 18 deletions

View File

@ -11,15 +11,15 @@ if not exist "%cd%\create-android-project.bat" echo Error!!! You should run it u
if not exist "%~dpn0.sh" echo Script "%~dpn0.sh" not found & pause & exit 3
:: modify it to work under your environment
set _CYGBIN=f:\cygwin\bin
set _CYGBIN=d:\programe\cygwin\bin
if not exist "%_CYGBIN%" echo Couldn't find Cygwin at "%_CYGBIN%" & pause & exit 4
:: modify it to work under your environment
set _ANDROIDTOOLS=d:\android-sdk\tools
set _ANDROIDTOOLS=d:\programe\android\android-sdk\tools
if not exist "%_ANDROIDTOOLS%" echo Couldn't find android sdk tools at "%_ANDROIDTOOLS%" & pause & exit 5
:: modify it to work under your environment
set _NDKROOT=e:\android-ndk-r5
set _NDKROOT=d:\programe\android\ndk\android-ndk-r6b
if not exist "%_NDKROOT%" echo Couldn't find ndk at "%_NDKROOT%" & pause & exit 6
:: create android project

View File

@ -2,22 +2,14 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := game
LOCAL_SRC_FILES := main.cpp \
../../../Classes/AppDelegate.cpp \
../../../Classes/HelloWorldScene.cpp
LOCAL_SRC_FILES := main.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \
$(LOCAL_PATH)/../../../../cocos2dx/platform \
$(LOCAL_PATH)/../../../../cocos2dx/include \
$(LOCAL_PATH)/../../../../CocosDenshion/include \
$(LOCAL_PATH)/../../../Classes
# 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/$(TARGET_ARCH_ABI)) \
-lcocos2d -llog -lgame_logic
include $(BUILD_SHARED_LIBRARY)

View File

@ -5,6 +5,6 @@ subdirs := $(addprefix $(LOCAL_PATH)/../../../,$(addsuffix /Android.mk, \
cocos2dx \
CocosDenshion/android \
))
subdirs += $(LOCAL_PATH)/helloworld/Android.mk
subdirs += $(LOCAL_PATH)/../../Classes/Android.mk $(LOCAL_PATH)/helloworld/Android.mk
include $(subdirs)

View File

@ -1,3 +1,3 @@
# it is needed for ndk-r5
APP_STL := stlport_static
APP_MODULES := cocos2d cocosdenshion game
APP_MODULES := cocos2d cocosdenshion game_logic game

View File

@ -33,7 +33,7 @@ move_files_into_android(){
copy_cpp_h_from_helloworld(){
mkdir $APP_DIR/Classes
for file in `ls $HELLOWORLD_ROOT/Classes/* | grep -E '.*\.[cpp|h]' `
for file in `ls $HELLOWORLD_ROOT/Classes/* | grep -E '.*\.[cpp|h|mk]' `
do
if [ -f $file ];then
cp $file $APP_DIR/Classes