Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a217cba
commit 37a3353
Showing
2 changed files
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
#!/bin/sh | ||
|
||
echo "building openssl..." | ||
echo "see logs in make_openssl.log" | ||
|
||
exec > make_openssl.log | ||
exec 2>&1 | ||
. ./portable_cmds.sh | ||
|
||
# 执行环境脚本,第一个句点不能省略 | ||
. ./portable_cmds.sh | ||
. ./Setenv-android.sh | ||
export OPENSSL_DIR=/usr/local/ssl/$ANDROID_API | ||
# 进入openssl源码目录 | ||
export OPENSSL_DIR=$PWD/ssl/$ANDROID_API | ||
|
||
# enter openssl source code directory | ||
OPENSSL_SRC_DIR=$(p_find ".*openssl-[0-9]+\.[0-9]+\.[0-9]+[a-z]") | ||
if [[ -z $OPENSSL_SRC_DIR ]]; then | ||
echo "Can't find openssl source directory!" | ||
exit 1 | ||
fi | ||
cd $OPENSSL_SRC_DIR | ||
# 生成Makefile | ||
|
||
# generate Makefile | ||
KERNEL_BITS=32 ./config shared no-ssl2 no-ssl3 no-comp no-hw no-engine \ | ||
--openssldir=$OPENSSL_DIR --prefix=$OPENSSL_DIR | ||
make depend | ||
make all | ||
# -E 保留当前的环境变量给root用户 | ||
sudo -E make install CC=$ANDROID_TOOLCHAIN/arm-linux-androideabi-gcc RANLIB=$ANDROID_TOOLCHAIN/arm-linux-androideabi-ranlib | ||
make install CC=$ANDROID_TOOLCHAIN/arm-linux-androideabi-gcc RANLIB=$ANDROID_TOOLCHAIN/arm-linux-androideabi-ranlib | ||
|
||
cd .. | ||
exec >/dev/tty | ||
echo "see logs in make_openssl.log" | ||
exec 2>&1 |