mirror of https://github.com/BOINC/boinc.git
android: adjust default android toolchain location so that it isn't deleted after a reboot
This commit is contained in:
parent
8feec9e6a0
commit
24921b204e
|
@ -22,3 +22,4 @@
|
|||
*.a
|
||||
*.la
|
||||
*.in
|
||||
/client/Makefile
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#/bin/sh
|
||||
#script to compile everything BOINC needs for Android
|
||||
|
||||
./build_androidtc.sh
|
||||
./build_openssl.sh
|
||||
./build_curl.sh
|
||||
./build_boinc.sh
|
|
@ -0,0 +1,21 @@
|
|||
#/bin/sh
|
||||
#script to setup Android toolchain
|
||||
|
||||
export ANDROIDTC="~/android-tc"
|
||||
export TCBINARIES="$ANDROIDTC/bin"
|
||||
export TCINCLUDES="$ANDROIDTC/arm-linux-androideabi"
|
||||
export TCSYSROOT="$ANDROIDTC/sysroot"
|
||||
export STDCPPTC="$TCINCLUDES/lib/libstdc++.a"
|
||||
|
||||
export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
|
||||
export CC=arm-linux-androideabi-gcc
|
||||
export CXX=arm-linux-androideabi-g++
|
||||
export LD=arm-linux-androideabi-ld
|
||||
|
||||
if [ ! -d "$ANDROIDTC" ]; then
|
||||
|
||||
cd ~/NVPACK/android-ndk-r8
|
||||
build/tools/make-standalone-toolchain.sh --platform=android-4 --install-dir=$ANDROIDTC
|
||||
cd ~
|
||||
|
||||
fi
|
|
@ -1,42 +1,24 @@
|
|||
#/bin/sh
|
||||
#script to compile BOINC for Android
|
||||
|
||||
#++++++++++++++++++++++++CONFIGURATION++++++++++++++++++++++++++++
|
||||
|
||||
#===locations
|
||||
#Android toolchain
|
||||
export ANDROIDTC="/tmp/tc"
|
||||
|
||||
#sources
|
||||
export BOINC=".." #BOINC source code
|
||||
export OPENSSL_DIR=$BOINC/../boinc_depends_android_eclipse/openssl
|
||||
export CURL_DIR=$BOINC/../boinc_depends_android_eclipse/curl
|
||||
|
||||
#===script behavior
|
||||
export PKG_CONFIG_DEBUG_SPEW=1
|
||||
|
||||
COMPILEBOINC="yes"
|
||||
CONFIGURE="yes"
|
||||
MAKECLEAN="yes"
|
||||
|
||||
COMPILEBOINC="yes"
|
||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
export BOINC=".." #BOINC source code
|
||||
export OPENSSL_DIR=$BOINC/../boinc_depends_android_eclipse/openssl
|
||||
export CURL_DIR=$BOINC/../boinc_depends_android_eclipse/curl
|
||||
export PKG_CONFIG_DEBUG_SPEW=1
|
||||
|
||||
export TCBINARIES="$ANDROIDTC/bin" #cross compiler location
|
||||
export TCINCLUDES="$ANDROIDTC/arm-linux-androideabi" #libraries to include in build
|
||||
export TCSYSROOT="$ANDROIDTC/sysroot" #SYSROOT of Android device
|
||||
export STDCPPTC="$TCINCLUDES/lib/libstdc++.a" #stdc++ library
|
||||
|
||||
export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin" #add location of compiler binaries to PATH
|
||||
export CC=arm-linux-androideabi-gcc #C compiler
|
||||
export CXX=arm-linux-androideabi-g++ #C++ compiler
|
||||
export LD=arm-linux-androideabi-ld #LD tool
|
||||
export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
|
||||
export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
|
||||
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog" #log is Logcat
|
||||
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
|
||||
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
|
||||
export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT
|
||||
export PKG_CONFIG_PATH=$CURL_DIR/lib/pkgconfig:$OPENSSL_DIR/lib/pkgconfig
|
||||
|
||||
# Prepare android toolchain and environment
|
||||
./build_androidtc.sh
|
||||
|
||||
if [ -n "$COMPILEBOINC" ]; then
|
||||
echo "==================building BOINC from $BOINC=========================="
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#/bin/sh
|
||||
#script to compile Libcurl for Android
|
||||
|
||||
COMPILECURL="yes"
|
||||
CONFIGURE="yes"
|
||||
MAKECLEAN="yes"
|
||||
|
||||
CURL="/home/boincadm/src/curl-7.28.1" #CURL sources, required by BOINC
|
||||
|
||||
export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
|
||||
export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
|
||||
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
|
||||
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
|
||||
|
||||
# Prepare android toolchain and environment
|
||||
./build_androidtc.sh
|
||||
|
||||
if [ -n "$COMPILECURL" ]; then
|
||||
echo "==================building curl from $CURL================================="
|
||||
cd $CURL
|
||||
if [ -n "$MAKECLEAN" ]; then
|
||||
make clean
|
||||
fi
|
||||
if [ -n "$CONFIGURE" ]; then
|
||||
./configure --host=arm-linux --prefix=$TCINCLUDES --libdir="$TCINCLUDES/lib" --disable-shared --enable-static --with-random=/dev/urandom
|
||||
fi
|
||||
make
|
||||
make install
|
||||
echo "========================curl done================================="
|
||||
fi
|
|
@ -0,0 +1,34 @@
|
|||
#/bin/sh
|
||||
#script to compile OpenSSL for Android
|
||||
|
||||
COMPILEOPENSSL="yes"
|
||||
CONFIGURE="yes"
|
||||
MAKECLEAN="yes"
|
||||
|
||||
OPENSSL="/home/boincadm/src/openssl-1.0.1c" #openSSL sources, requiered by BOINC
|
||||
|
||||
export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
|
||||
export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
|
||||
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
|
||||
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
|
||||
|
||||
# Prepare android toolchain and environment
|
||||
./build_androidtc.sh
|
||||
|
||||
if [ -n "$COMPILEOPENSSL" ]; then
|
||||
echo "================building openssl from $OPENSSL============================="
|
||||
cd $OPENSSL
|
||||
if [ -n "$MAKECLEAN" ]; then
|
||||
make clean
|
||||
fi
|
||||
if [ -n "$CONFIGURE" ]; then
|
||||
./Configure linux-generic32 no-shared no-dso -DL_ENDIAN --openssldir="$TCINCLUDES/ssl"
|
||||
#override flags in Makefile
|
||||
sed -e "s/^CFLAG=.*$/`grep -e \^CFLAG= Makefile` \$(CFLAGS)/g
|
||||
s%^INSTALLTOP=.*%INSTALLTOP=$TCINCLUDES%g" Makefile > Makefile.out
|
||||
mv Makefile.out Makefile
|
||||
fi
|
||||
make
|
||||
make install_sw
|
||||
echo "========================openssl DONE=================================="
|
||||
fi
|
Loading…
Reference in New Issue