2013-01-18 17:28:32 +00:00
|
|
|
#/bin/sh
|
2013-01-18 19:41:48 +00:00
|
|
|
#script to compile Wrapper for Android
|
2013-01-18 17:28:32 +00:00
|
|
|
|
|
|
|
export ANDROIDTC="$HOME/android-tc"
|
|
|
|
export TCBINARIES="$ANDROIDTC/bin"
|
|
|
|
export TCINCLUDES="$ANDROIDTC/arm-linux-androideabi"
|
|
|
|
export TCSYSROOT="$ANDROIDTC/sysroot"
|
|
|
|
export STDCPPTC="$TCINCLUDES/lib/libstdc++.a"
|
2013-01-18 19:41:48 +00:00
|
|
|
export BOINC_DIR="../.."
|
|
|
|
export BOINC_API_DIR="$BOINC_DIR/api"
|
|
|
|
export BOINC_LIB_DIR="$BOINC_DIR/lib"
|
|
|
|
export BOINC_ZIP_DIR="$BOINC_DIR/zip"
|
2013-01-18 17:28:32 +00:00
|
|
|
|
|
|
|
export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
|
2013-01-28 05:15:03 +00:00
|
|
|
export CC=arm-linux-androideabi-gcc
|
2013-01-18 17:28:32 +00:00
|
|
|
export CXX=arm-linux-androideabi-g++
|
|
|
|
export LD=arm-linux-androideabi-ld
|
2013-01-28 05:15:03 +00:00
|
|
|
export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -I$TCINCLUDES/include -I$BOINC_DIR -I$BOINC_LIB_DIR -I$BOINC_API_DIR -I$BOINC_ZIP_DIR"
|
2013-01-18 19:41:48 +00:00
|
|
|
export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer -I$TCINCLUDES/include -I$BOINC_DIR -I$BOINC_LIB_DIR -I$BOINC_API_DIR -I$BOINC_ZIP_DIR"
|
|
|
|
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -L$BOINC_DIR -L$BOINC_LIB_DIR -L$BOINC_API_DIR -L$BOINC_ZIP_DIR -llog"
|
2013-01-18 17:28:32 +00:00
|
|
|
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
|
|
|
|
|
|
|
|
# Prepare android toolchain and environment
|
2013-01-18 17:30:08 +00:00
|
|
|
../../android/build_androidtc.sh
|
2013-01-18 17:28:32 +00:00
|
|
|
|
2013-01-18 19:41:48 +00:00
|
|
|
make -f Makefile_android
|