1、创建开源模块根目录
mkdir AndroidWorkSpace/OpenSourceModule
2、openssl源码
获取openssl:https://www.openssl.org/source/
我做这个的时候最新的是1.1.1e
openssl-1.1.1e.tar.gz
进入开源模块目录:
cd OpenSourceModule
解压到当前目录:
tar vzxf openssl-1.1.1e.tar.gz
3、编译
进入openssl根目录:cd openssl-1.1.1e
-D__ANDROID_API__目前理解是使用哪个版本api编译,也就是支持的最低api版本,因为android向下兼容。
执行脚本build-android.sh
#!/bin/bash
set -e
set -x
#
# Copyright 2016 leenjewel
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language gov

本文详述了在Android环境下编译OpenSSL的过程,包括创建模块目录、获取源码、配置编译环境及使用特定脚本进行多架构编译的方法。通过遵循这些步骤,开发者可以为不同Android架构生成所需的OpenSSL库。

3173

被折叠的 条评论
为什么被折叠?



