This post is to make libs for armeabi
, armeabi-v7a
, x86
and mips
instruction sets.
But the official tutorial is not clear in Windows
platform, and the version is too old. So I just write them down.
To begin with, you should have already installed Cygwin32
, and change the path to your own path first!
And, a key point is too add TARGET_SYS=Linux
when in Windows platform.
** Notice: It's very hard to build the lib on Cygwin64! So, please remember to install Cygwin32! **
export NDK=D:/Android/android-ndk-r10e
export NDKABI=14
export NDKVER=$NDK/toolchains/arm-linux-androideabi-4.9
export NDKP=$NDKVER/prebuilt/windows-x86_64/bin/arm-linux-androideabi-
export NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF" TARGET_SYS=Linux clean default
export NDK=D:/Android/android-ndk-r10e
export NDKABI=14
export NDKVER=$NDK/toolchains/arm-linux-androideabi-4.9
export NDKP=$NDKVER/prebuilt/windows-x86_64/bin/arm-linux-androideabi-
export NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
export NDKARCH="-march=armv7-a -mfloat-abi=softfp -Wl,--fix-cortex-a8"
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF $NDKARCH" TARGET_SYS=Linux clean default
export NDK=D:/Android/android-ndk-r10e
export NDKABI=14
export NDKVER=$NDK/toolchains/x86-4.9
export NDKP=$NDKVER/prebuilt/windows-x86_64/bin/i686-linux-android-
export NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-x86"
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF" TARGET_SYS=Linux clean default
export NDK=D:/Android/android-ndk-r10e
export NDKABI=14
export NDKVER=$NDK/toolchains/mipsel-linux-android-4.9
export NDKP=$NDKVER/prebuilt/windows-x86_64/bin/mipsel-linux-android-
export NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-mips"
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF" TARGET_SYS=Linux clean default