mirror of https://github.com/BOINC/boinc.git
31 lines
995 B
Bash
Executable File
31 lines
995 B
Bash
Executable File
#/bin/sh
|
|
|
|
#
|
|
# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildApp
|
|
#
|
|
|
|
# Script to compile a generic application on Android
|
|
|
|
export ANDROIDTC="$HOME/androidmips-tc"
|
|
export TCBINARIES="$ANDROIDTC/bin"
|
|
export TCINCLUDES="$ANDROIDTC/mipsel-linux-android"
|
|
export TCSYSROOT="$ANDROIDTC/sysroot"
|
|
export STDCPPTC="$TCINCLUDES/lib/libstdc++.a"
|
|
|
|
export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
|
|
export CC=mipsel-linux-android-gcc
|
|
export CXX=mipsel-linux-android-g++
|
|
export LD=mipsel-linux-android-ld
|
|
export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
|
|
export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -O3 -fomit-frame-pointer -fPIE"
|
|
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
|
|
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
|
|
|
|
make clean
|
|
|
|
if [ -e "./configure" ]; then
|
|
./configure --host=mipsel-linux --prefix=$TCINCLUDES --libdir="$TCINCLUDES/lib" --disable-shared --enable-static
|
|
fi
|
|
|
|
make
|