Personal tools
The Open Lighting Project has moved!

We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.

Difference between revisions of "OLA on Android"

From wiki.openlighting.org

Jump to: navigation, search
Line 8: Line 8:
  
 
== Setup ==
 
== Setup ==
 +
 +
We'll do all the work in $HOME/android
  
 
<pre>
 
<pre>
 
mkdir $HOME/android
 
mkdir $HOME/android
# where we install deps to
+
# where we install libs to
 
mkdir $HOME/android/root
 
mkdir $HOME/android/root
 +
</pre>
 +
 +
Setup env variables
  
 +
<pre>
 +
export ANDROID_NDK_PATH=$HOME/android-ndk-r7c
 +
export ANDROID_PLATFORM=9
 +
export ANDROID_NDK_STANDALONE_TOOLCHAIN=$ANDROID_NDK_PATH/standalone-toolchain-api$ANDROID_PLATFORM
 +
export CPPFLAGS=""
 +
export LDFLAGS=""
 +
export PATH=$ANDROID_NDK_PATH/android-sdk-linux_x86/tools:$ANDROID_NDK_PATH/android-sdk-linux_x86/platform-tools:$ANDROID_NDK_STANDALONE_TOOLCHAIN/bin:$PATH
 +
</pre>
  
 
== Protobuf ==
 
== Protobuf ==
Line 27: Line 40:
 
</pre>
 
</pre>
  
TODO: install into sysroot. Figure out how to package (or should we statically link to ola?)
+
TODO: Figure out how to package (or should we statically link to ola?)
 +
 
 +
== UUID ==
 +
 
 +
 
  
 
== OLA ==
 
== OLA ==

Revision as of 10:35, 17 November 2012

These are my notes from trying to get OLA working on Android.

Toolchain

Download the ndk. Extract.

~/android-ndk-r8c/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=$HOME/android-ndk-r8c/standalone-toolchain-api9

Setup

We'll do all the work in $HOME/android

mkdir $HOME/android
# where we install libs to
mkdir $HOME/android/root

Setup env variables

export ANDROID_NDK_PATH=$HOME/android-ndk-r7c
export ANDROID_PLATFORM=9
export ANDROID_NDK_STANDALONE_TOOLCHAIN=$ANDROID_NDK_PATH/standalone-toolchain-api$ANDROID_PLATFORM
export CPPFLAGS=""
export LDFLAGS=""
export PATH=$ANDROID_NDK_PATH/android-sdk-linux_x86/tools:$ANDROID_NDK_PATH/android-sdk-linux_x86/platform-tools:$ANDROID_NDK_STANDALONE_TOOLCHAIN/bin:$PATH

Protobuf

cd $HOME/android
wget <protobuf>
tar -zxf <protobuf>
cd protobuf-X.Y.Z
./configure   --host=arm-linux-androideabi   CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-c++ --with-protoc=/opt/local/bin/protoc
make
DESTDIR="$HOME/android make install

TODO: Figure out how to package (or should we statically link to ola?)

UUID

OLA

export ac_cv_func_malloc_0_nonnull=yes
export PKG_CONFIG_PATH="$HOME/android/root/use/local/lib/pkgconfig"
./configure --host=arm-linux-androideabi --build=i686-pc-linux-gnu CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-c++ --disable-http
make