mirror of https://github.com/axmolengine/axmol.git
fixed #838: android template support x86
This commit is contained in:
parent
6aedc258b4
commit
c00d59a568
|
@ -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
|
if not exist "%~dpn0.sh" echo Script "%~dpn0.sh" not found & pause & exit 3
|
||||||
|
|
||||||
:: modify it to work under your environment
|
:: 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
|
if not exist "%_CYGBIN%" echo Couldn't find Cygwin at "%_CYGBIN%" & pause & exit 4
|
||||||
|
|
||||||
:: modify it to work under your environment
|
:: 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
|
if not exist "%_ANDROIDTOOLS%" echo Couldn't find android sdk tools at "%_ANDROIDTOOLS%" & pause & exit 5
|
||||||
|
|
||||||
:: modify it to work under your environment
|
:: 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
|
if not exist "%_NDKROOT%" echo Couldn't find ndk at "%_NDKROOT%" & pause & exit 6
|
||||||
|
|
||||||
:: create android project
|
:: create android project
|
||||||
|
|
|
@ -2,22 +2,14 @@ LOCAL_PATH := $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := game
|
LOCAL_MODULE := game
|
||||||
|
|
||||||
LOCAL_SRC_FILES := main.cpp \
|
LOCAL_SRC_FILES := main.cpp
|
||||||
../../../Classes/AppDelegate.cpp \
|
|
||||||
../../../Classes/HelloWorldScene.cpp
|
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \
|
||||||
$(LOCAL_PATH)/../../../../cocos2dx/platform \
|
$(LOCAL_PATH)/../../../../cocos2dx/platform \
|
||||||
$(LOCAL_PATH)/../../../../cocos2dx/include \
|
$(LOCAL_PATH)/../../../../cocos2dx/include \
|
||||||
$(LOCAL_PATH)/../../../../CocosDenshion/include \
|
|
||||||
$(LOCAL_PATH)/../../../Classes
|
$(LOCAL_PATH)/../../../Classes
|
||||||
|
|
||||||
# it is used for ndk-r5
|
LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/$(TARGET_ARCH_ABI)) \
|
||||||
# if you build with ndk-r4, comment it
|
-lcocos2d -llog -lgame_logic
|
||||||
# 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
|
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
|
@ -5,6 +5,6 @@ subdirs := $(addprefix $(LOCAL_PATH)/../../../,$(addsuffix /Android.mk, \
|
||||||
cocos2dx \
|
cocos2dx \
|
||||||
CocosDenshion/android \
|
CocosDenshion/android \
|
||||||
))
|
))
|
||||||
subdirs += $(LOCAL_PATH)/helloworld/Android.mk
|
subdirs += $(LOCAL_PATH)/../../Classes/Android.mk $(LOCAL_PATH)/helloworld/Android.mk
|
||||||
|
|
||||||
include $(subdirs)
|
include $(subdirs)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# it is needed for ndk-r5
|
# it is needed for ndk-r5
|
||||||
APP_STL := stlport_static
|
APP_STL := stlport_static
|
||||||
APP_MODULES := cocos2d cocosdenshion game
|
APP_MODULES := cocos2d cocosdenshion game_logic game
|
|
@ -33,7 +33,7 @@ move_files_into_android(){
|
||||||
|
|
||||||
copy_cpp_h_from_helloworld(){
|
copy_cpp_h_from_helloworld(){
|
||||||
mkdir $APP_DIR/Classes
|
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
|
do
|
||||||
if [ -f $file ];then
|
if [ -f $file ];then
|
||||||
cp $file $APP_DIR/Classes
|
cp $file $APP_DIR/Classes
|
||||||
|
|
Loading…
Reference in New Issue