android: Add cross-compile scripts for the x86 and MIPS CPU architectures

This commit is contained in:
Rom Walton 2013-10-22 11:19:42 -04:00
parent c8fbb7e799
commit efc25bbd78
19 changed files with 460 additions and 18 deletions

0
android/BOINC/libs/armeabi-v7a/libdummyjni.so Normal file → Executable file
View File

0
android/BOINC/libs/mips/libdummyjni.so Normal file → Executable file
View File

0
android/BOINC/libs/x86/libdummyjni.so Normal file → Executable file
View File

View File

@ -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

13
android/build_androidtc_mips.sh Executable file
View File

@ -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

13
android/build_androidtc_x86.sh Executable file
View File

@ -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

View File

@ -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"

64
android/build_boinc_mips.sh Executable file
View File

@ -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

64
android/build_boinc_x86.sh Executable file
View File

@ -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

View File

@ -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================================="

45
android/build_curl_mips.sh Executable file
View File

@ -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

45
android/build_curl_x86.sh Executable file
View File

@ -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

View File

@ -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=========================="

50
android/build_libraries_mips.sh Executable file
View File

@ -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

50
android/build_libraries_x86.sh Executable file
View File

@ -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

View File

@ -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============================="

49
android/build_openssl_mips.sh Executable file
View File

@ -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

49
android/build_openssl_x86.sh Executable file
View File

@ -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