From 76ab86674e8ded7def33f95941c7999eb338d261 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Thu, 6 Nov 2014 14:32:03 +0800 Subject: [PATCH] =?UTF-8?q?Fix=E2=80=99=20the=20error=20that=20Cocos2dxLua?= =?UTF-8?q?JavaBridge'=20was=20optimized=20because=20of=20usage=20of=20LOC?= =?UTF-8?q?AL=5FSTATIC=5FLIBRARIES=20on=20the=20android?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lua-bindings/proj.android/Android.mk | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/cocos/scripting/lua-bindings/proj.android/Android.mk b/cocos/scripting/lua-bindings/proj.android/Android.mk index a07e28abac..0c6f4bfb58 100644 --- a/cocos/scripting/lua-bindings/proj.android/Android.mk +++ b/cocos/scripting/lua-bindings/proj.android/Android.mk @@ -1,4 +1,31 @@ LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := cocos2d_lua_android_static + +LOCAL_MODULE_FILENAME := libluacocos2dandroid + +LOCAL_SRC_FILES := ../manual/platform/android/CCLuaJavaBridge.cpp \ + ../manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../.. \ + $(LOCAL_PATH)/../manual \ + $(LOCAL_PATH)/../../../../external/lua/tolua \ + $(LOCAL_PATH)/../manual/platform/android \ + $(LOCAL_PATH)/../manual/platform/android/jni + +LOCAL_EXPORT_LDLIBS := -lGLESv2 \ + -llog \ + -lz \ + -landroid + +LOCAL_STATIC_LIBRARIES := luajit_static + +include $(BUILD_STATIC_LIBRARY) + +#============================================================== + include $(CLEAR_VARS) LOCAL_MODULE := cocos2d_lua_static @@ -20,8 +47,6 @@ LOCAL_SRC_FILES := ../manual/CCLuaBridge.cpp \ ../manual/cocos2d/lua_cocos2dx_physics_manual.cpp \ ../manual/cocos2d/LuaOpengl.cpp \ ../manual/cocos2d/LuaScriptHandlerMgr.cpp \ - ../manual/platform/android/CCLuaJavaBridge.cpp \ - ../manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp \ ../manual/tolua_fix.cpp \ ../../../../external/lua/tolua/tolua_event.c \ ../../../../external/lua/tolua/tolua_is.c \ @@ -117,15 +142,11 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../external/lua/tolua \ $(LOCAL_PATH)/../manual/cocosbuilder \ $(LOCAL_PATH)/../manual/spine \ $(LOCAL_PATH)/../manual/ui \ - $(LOCAL_PATH)/../manual/platform/android \ - $(LOCAL_PATH)/../manual/platform/android/jni \ $(LOCAL_PATH)/../../../../external/xxtea \ $(LOCAL_PATH)/../../../.. \ $(LOCAL_PATH)/../../../../external/lua \ $(LOCAL_PATH)/../../../../external/lua/quick - - LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../external/lua/tolua \ $(LOCAL_PATH)/../../../../external/lua/luajit/include \ $(LOCAL_PATH)/../auto \ @@ -143,12 +164,11 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../external/lua/tolua \ $(LOCAL_PATH)/../../../../external/lua/quick \ $(LOCAL_PATH)/../../../.. +LOCAL_WHOLE_STATIC_LIBRARIES := cocos2d_lua_android_static -LOCAL_STATIC_LIBRARIES := luajit_static -LOCAL_STATIC_LIBRARIES += cocos2dx_static +LOCAL_STATIC_LIBRARIES := cocos2dx_static include $(BUILD_STATIC_LIBRARY) - $(call import-module,lua/luajit/prebuilt/android) $(call import-module,.)