Android NDK Cross-Compile Setup

按照這個文章來做就行了

http://mortoray.com/2012/08/21/android-ndk-cross-compile-setup-libpng-and-freetype/

分享一個腳本

#!/bin/sh

set -e

PLATFORM_PREFIX=/home/hoping/Downloads/geos-3.4.2/android
PATH=$PLATFORM_PREFIX/bin:$PATH
NDK_PLATFORM=android-9

if [ ! -e $PLATFORM_PREFIX ]; then
	mkdir $PLATFORM_PREFIX
fi
$NDK_ROOT/build/tools/make-standalone-toolchain.sh  --platform=$NDK_PLATFORM --install-dir=$PLATFORM_PREFIX --system=linux-x86_64

cp /usr/share/misc/config.* .

./configure --host=arm-linux-androideabi --prefix=$PLATFORM_PREFIX

make

make install

注意其中,cp config.*這一句,這是爲了更新當前腳本所使用的config.xxx文件,否則可能會報host not found錯誤
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章