diff --git a/android/BOINC/libs/armeabi-v7a/libdummyjni.so b/android/BOINC/libs/armeabi-v7a/libdummyjni.so old mode 100644 new mode 100755 diff --git a/android/BOINC/libs/mips/libdummyjni.so b/android/BOINC/libs/mips/libdummyjni.so old mode 100644 new mode 100755 diff --git a/android/BOINC/libs/x86/libdummyjni.so b/android/BOINC/libs/x86/libdummyjni.so old mode 100644 new mode 100755 diff --git a/android/build_all.sh b/android/build_all.sh index 6fc7bc96ad..c24cd30376 100755 --- a/android/build_all.sh +++ b/android/build_all.sh @@ -6,7 +6,15 @@ # Script to compile everything BOINC needs for Android -./build_androidtc.sh -./build_openssl.sh -./build_curl.sh -./build_boinc.sh +./build_androidtc_arm.sh +./build_androidtc_x86.sh +./build_androidtc_mips.sh +./build_openssl_arm.sh +./build_openssl_x86.sh +./build_openssl_mips.sh +./build_curl_arm.sh +./build_curl_x86.sh +./build_curl_mips.sh +./build_boinc_arm.sh +./build_boinc_x86.sh +./build_boinc_mips.sh diff --git a/android/build_androidtc.sh b/android/build_androidtc_arm.sh similarity index 100% rename from android/build_androidtc.sh rename to android/build_androidtc_arm.sh diff --git a/android/build_androidtc_mips.sh b/android/build_androidtc_mips.sh new file mode 100755 index 0000000000..320d5ddb7b --- /dev/null +++ b/android/build_androidtc_mips.sh @@ -0,0 +1,13 @@ +#/bin/sh + +# +# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildClient# +# + +# Script to setup Android toolchain + +export ANDROIDTC="$HOME/android-tc" + +if [ ! -d $ANDROIDTC ]; then + $NDKROOT/build/tools/make-standalone-toolchain.sh --platform=android-9 --arch=mips --install-dir=$ANDROIDTC +fi diff --git a/android/build_androidtc_x86.sh b/android/build_androidtc_x86.sh new file mode 100755 index 0000000000..7a6b7c0479 --- /dev/null +++ b/android/build_androidtc_x86.sh @@ -0,0 +1,13 @@ +#/bin/sh + +# +# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildClient# +# + +# Script to setup Android toolchain + +export ANDROIDTC="$HOME/android-tc" + +if [ ! -d $ANDROIDTC ]; then + $NDKROOT/build/tools/make-standalone-toolchain.sh --platform=android-9 --arch=x86 --install-dir=$ANDROIDTC +fi diff --git a/android/build_boinc.sh b/android/build_boinc_arm.sh similarity index 83% rename from android/build_boinc.sh rename to android/build_boinc_arm.sh index b442007fd5..85d1897bb8 100755 --- a/android/build_boinc.sh +++ b/android/build_boinc_arm.sh @@ -11,9 +11,6 @@ CONFIGURE="yes" MAKECLEAN="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 ANDROIDTC="$HOME/android-tc" export TCBINARIES="$ANDROIDTC/bin" @@ -30,10 +27,9 @@ export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -fun 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 +./build_androidtc_arm.sh if [ -n "$COMPILEBOINC" ]; then echo "==================building BOINC from $BOINC==========================" @@ -58,8 +54,8 @@ cd ../../../../ echo "Copy Assets" cd android mkdir "BOINC/assets" -cp "$BOINC/stage/usr/local/bin/boinc" "BOINC/assets/boinc" -cp "$BOINC/stage/usr/local/bin/boinccmd" "BOINC/assets/boinccmd" +cp "$BOINC/stage/usr/local/bin/boinc" "BOINC/assets/armeabi-v7a/boinc" +cp "$BOINC/stage/usr/local/bin/boinccmd" "BOINC/assets/armeabi-v7a/boinccmd" cp "$BOINC/win_build/installerv2/redist/all_projects_list.xml" "BOINC/assets/all_projects_list.xml" cp "$CURL_DIR/ca-bundle.crt" "BOINC/assets/ca-bundle.crt" diff --git a/android/build_boinc_mips.sh b/android/build_boinc_mips.sh new file mode 100755 index 0000000000..5e904ed039 --- /dev/null +++ b/android/build_boinc_mips.sh @@ -0,0 +1,64 @@ +#/bin/sh + +# +# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildClient# +# + +# Script to compile BOINC for Android + +COMPILEBOINC="yes" +CONFIGURE="yes" +MAKECLEAN="yes" + +export BOINC=".." #BOINC source code + +export ANDROIDTC="$HOME/android-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 -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" +export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" +export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT + +# Prepare android toolchain and environment +./build_androidtc_mips.sh + +if [ -n "$COMPILEBOINC" ]; then +echo "==================building BOINC from $BOINC==========================" +cd $BOINC +if [ -n "$MAKECLEAN" ]; then +make clean +fi +if [ -n "$CONFIGURE" ]; then +./_autosetup +./configure --host=arm-linux --with-boinc-platform="mips-android-linux-gnu" --with-ssl=$TCINCLUDES --disable-server --disable-manager --disable-shared --enable-static +sed -e "s%^CLIENTLIBS *= *.*$%CLIENTLIBS = -lm $STDCPPTC%g" client/Makefile > client/Makefile.out +mv client/Makefile.out client/Makefile +fi +make +make stage + +echo "Stripping Binaries" +cd stage/usr/local/bin +mipsel-linux-android-strip * +cd ../../../../ + +echo "Copy Assets" +cd android +mkdir "BOINC/assets" +cp "$BOINC/stage/usr/local/bin/boinc" "BOINC/assets/mips/boinc" +cp "$BOINC/stage/usr/local/bin/boinccmd" "BOINC/assets/mips/boinccmd" +cp "$BOINC/win_build/installerv2/redist/all_projects_list.xml" "BOINC/assets/all_projects_list.xml" +cp "$CURL_DIR/ca-bundle.crt" "BOINC/assets/ca-bundle.crt" + +echo "=============================BOINC done=============================" + +fi diff --git a/android/build_boinc_x86.sh b/android/build_boinc_x86.sh new file mode 100755 index 0000000000..809e9d178c --- /dev/null +++ b/android/build_boinc_x86.sh @@ -0,0 +1,64 @@ +#/bin/sh + +# +# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildClient# +# + +# Script to compile BOINC for Android + +COMPILEBOINC="yes" +CONFIGURE="yes" +MAKECLEAN="yes" + +export BOINC=".." #BOINC source code + +export ANDROIDTC="$HOME/android-tc" +export TCBINARIES="$ANDROIDTC/bin" +export TCINCLUDES="$ANDROIDTC/i686-android-linux" +export TCSYSROOT="$ANDROIDTC/sysroot" +export STDCPPTC="$TCINCLUDES/lib/libstdc++.a" + +export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin" +export CC=i686-android-linux-gcc +export CXX=i686-android-linux-g++ +export LD=i686-android-linux-ld +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" +export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" +export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT + +# Prepare android toolchain and environment +./build_androidtc_x86.sh + +if [ -n "$COMPILEBOINC" ]; then +echo "==================building BOINC from $BOINC==========================" +cd $BOINC +if [ -n "$MAKECLEAN" ]; then +make clean +fi +if [ -n "$CONFIGURE" ]; then +./_autosetup +./configure --host=arm-linux --with-boinc-platform="x86-android-linux-gnu" --with-ssl=$TCINCLUDES --disable-server --disable-manager --disable-shared --enable-static +sed -e "s%^CLIENTLIBS *= *.*$%CLIENTLIBS = -lm $STDCPPTC%g" client/Makefile > client/Makefile.out +mv client/Makefile.out client/Makefile +fi +make +make stage + +echo "Stripping Binaries" +cd stage/usr/local/bin +i686-android-linux-strip * +cd ../../../../ + +echo "Copy Assets" +cd android +mkdir "BOINC/assets" +cp "$BOINC/stage/usr/local/bin/boinc" "BOINC/assets/x86/boinc" +cp "$BOINC/stage/usr/local/bin/boinccmd" "BOINC/assets/x86/boinccmd" +cp "$BOINC/win_build/installerv2/redist/all_projects_list.xml" "BOINC/assets/all_projects_list.xml" +cp "$CURL_DIR/ca-bundle.crt" "BOINC/assets/ca-bundle.crt" + +echo "=============================BOINC done=============================" + +fi diff --git a/android/build_curl.sh b/android/build_curl_arm.sh similarity index 98% rename from android/build_curl.sh rename to android/build_curl_arm.sh index 726ae289e1..7b95145f4e 100755 --- a/android/build_curl.sh +++ b/android/build_curl_arm.sh @@ -28,7 +28,7 @@ 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 +./build_androidtc_arm.sh if [ -n "$COMPILECURL" ]; then echo "==================building curl from $CURL=================================" diff --git a/android/build_curl_mips.sh b/android/build_curl_mips.sh new file mode 100755 index 0000000000..eca9c3dd8b --- /dev/null +++ b/android/build_curl_mips.sh @@ -0,0 +1,45 @@ +#/bin/sh + +# +# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildClient# +# + +# 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 ANDROIDTC="$HOME/android-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" +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_mips.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 diff --git a/android/build_curl_x86.sh b/android/build_curl_x86.sh new file mode 100755 index 0000000000..e8e2866230 --- /dev/null +++ b/android/build_curl_x86.sh @@ -0,0 +1,45 @@ +#/bin/sh + +# +# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildClient# +# + +# 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 ANDROIDTC="$HOME/android-tc" +export TCBINARIES="$ANDROIDTC/bin" +export TCINCLUDES="$ANDROIDTC/i686-android-linux" +export TCSYSROOT="$ANDROIDTC/sysroot" +export STDCPPTC="$TCINCLUDES/lib/libstdc++.a" + +export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin" +export CC=i686-android-linux-gcc +export CXX=i686-android-linux-g++ +export LD=i686-android-linux-ld +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_x86.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 diff --git a/android/build_libraries.sh b/android/build_libraries_arm.sh similarity index 86% rename from android/build_libraries.sh rename to android/build_libraries_arm.sh index 992ef7c4d6..3980accf8a 100755 --- a/android/build_libraries.sh +++ b/android/build_libraries_arm.sh @@ -12,9 +12,6 @@ CONFIGURE="yes" MAKECLEAN="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 ANDROIDTC="$HOME/android-tc" export TCBINARIES="$ANDROIDTC/bin" @@ -31,10 +28,9 @@ export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -fun 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 +./build_androidtc_arm.sh if [ -n "$COMPILEBOINC" ]; then echo "==================building Libraries from $BOINC==========================" diff --git a/android/build_libraries_mips.sh b/android/build_libraries_mips.sh new file mode 100755 index 0000000000..d9bf2ff2bd --- /dev/null +++ b/android/build_libraries_mips.sh @@ -0,0 +1,50 @@ +#/bin/sh + +# +# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildApp# +# + +# Script to compile various BOINC libraries for Android to be used +# by science applications + +COMPILEBOINC="yes" +CONFIGURE="yes" +MAKECLEAN="yes" + +export BOINC=".." #BOINC source code + +export ANDROIDTC="$HOME/android-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 -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" +export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" +export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT + +# Prepare android toolchain and environment +./build_androidtc_mips.sh + +if [ -n "$COMPILEBOINC" ]; then +echo "==================building Libraries from $BOINC==========================" +cd $BOINC +if [ -n "$MAKECLEAN" ]; then +make clean +fi +if [ -n "$CONFIGURE" ]; then +./_autosetup +./configure --host=arm-linux --with-boinc-platform="mips-android-linux-gnu" --with-ssl=$TCINCLUDES --disable-server --disable-manager --disable-client --disable-shared --enable-static +fi +make +make stage + +echo "=============================BOINC done=============================" + +fi diff --git a/android/build_libraries_x86.sh b/android/build_libraries_x86.sh new file mode 100755 index 0000000000..8da5464b08 --- /dev/null +++ b/android/build_libraries_x86.sh @@ -0,0 +1,50 @@ +#/bin/sh + +# +# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildApp# +# + +# Script to compile various BOINC libraries for Android to be used +# by science applications + +COMPILEBOINC="yes" +CONFIGURE="yes" +MAKECLEAN="yes" + +export BOINC=".." #BOINC source code + +export ANDROIDTC="$HOME/android-tc" +export TCBINARIES="$ANDROIDTC/bin" +export TCINCLUDES="$ANDROIDTC/i686-android-linux" +export TCSYSROOT="$ANDROIDTC/sysroot" +export STDCPPTC="$TCINCLUDES/lib/libstdc++.a" + +export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin" +export CC=i686-android-linux-gcc +export CXX=i686-android-linux-g++ +export LD=i686-android-linux-ld +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" +export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" +export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT + +# Prepare android toolchain and environment +./build_androidtc_x86.sh + +if [ -n "$COMPILEBOINC" ]; then +echo "==================building Libraries from $BOINC==========================" +cd $BOINC +if [ -n "$MAKECLEAN" ]; then +make clean +fi +if [ -n "$CONFIGURE" ]; then +./_autosetup +./configure --host=arm-linux --with-boinc-platform="x86-android-linux-gnu" --with-ssl=$TCINCLUDES --disable-server --disable-manager --disable-client --disable-shared --enable-static +fi +make +make stage + +echo "=============================BOINC done=============================" + +fi diff --git a/android/build_openssl.sh b/android/build_openssl_arm.sh similarity index 98% rename from android/build_openssl.sh rename to android/build_openssl_arm.sh index d493e3e881..3e82fc327f 100755 --- a/android/build_openssl.sh +++ b/android/build_openssl_arm.sh @@ -28,7 +28,7 @@ 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 +./build_androidtc_arm.sh if [ -n "$COMPILEOPENSSL" ]; then echo "================building openssl from $OPENSSL=============================" diff --git a/android/build_openssl_mips.sh b/android/build_openssl_mips.sh new file mode 100755 index 0000000000..48658cbc0c --- /dev/null +++ b/android/build_openssl_mips.sh @@ -0,0 +1,49 @@ +#/bin/sh + +# +# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildClient# +# + +# 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 ANDROIDTC="$HOME/android-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" +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_mips.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 diff --git a/android/build_openssl_x86.sh b/android/build_openssl_x86.sh new file mode 100755 index 0000000000..1377dae04d --- /dev/null +++ b/android/build_openssl_x86.sh @@ -0,0 +1,49 @@ +#/bin/sh + +# +# See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildClient# +# + +# 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 ANDROIDTC="$HOME/android-tc" +export TCBINARIES="$ANDROIDTC/bin" +export TCINCLUDES="$ANDROIDTC/i686-android-linux" +export TCSYSROOT="$ANDROIDTC/sysroot" +export STDCPPTC="$TCINCLUDES/lib/libstdc++.a" + +export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin" +export CC=i686-android-linux-gcc +export CXX=i686-android-linux-g++ +export LD=i686-android-linux-ld +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_x86.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