luajit 2.0.2 Android 编译和加载(Cocos2dx)

下面步骤是在MacOS下完成的,使用cygwin没成功,原因没细究。


1:编译脚本

LUAJIT=./LuaJIT-2.0.2
cd $LUAJIT
NDK=/alex_data/tools/android-ndk-r8e
NDKABI=14
NDKVER=$NDK/toolchains/arm-linux-androideabi-4.7
NDKP=$NDKVER/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-
NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF" TARGET_SYS=Other clean
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF" TARGET_SYS=Other

2:将src/libluajig.a拷贝到android工程下的jni目录

修改jni/Android.mk,添加

LOCAL_LDLIBS := $(LOCAL_PATH)/libluajit.a



你可能感兴趣的:(luajit 2.0.2 Android 编译和加载(Cocos2dx))