This script is inspired from platform_external_openssl by Arne Schwabe for ics-openvpn and works with OpenSSL 3.0 and greater.
Supported Android-Targets: arm | arm64 | x86 | x86_64
Supported CMake Lib-Types: STATIC | SHARED
This script is refactored and pushed down to its minimum, using only some parts of its origin. The goal was to automate the necessary steps to create a prepared OpenSSL-Source which can be used in ics-openvpn CMake. The original script by Arne Schwabe is static and has to adapted with each Major OpenSSL-Update to keep working. Downgrade or Upgrade isn't possible without mandatory changes in the original files like import_openssl.sh or openssl.cmake, this is a big downside. Now it's possible to use shared libtype in CMakeLists.txt to reduce the APK-Size significantly, in tests up to 50% downsizing (Universal-APK).
- Use the official OpenSSL Git-Repo
- Alternative use of *.tar.gz Archives from Path or Web
- Search for necessary *.c files in Makefile
- Read CPP/C-Flags from Makefile
- Read ASM Compiler-Flags from configdata.pm
- Create Assembler-Code (Perl-ASM)
- Translate *.in files into *.c and *.h files
- Apply patches from Patch-Folder
- Create openssl.cmake for ics-openvpn (Automatic)
./generate.sh
./generate.sh </path/to/openssl-*.tar.gz>
./generate.sh <https://url/to/openssl-*.tar.gz>
./generate.sh 3.x.x
Valid Tags: https://github.com/openssl/openssl/tags
./generate.sh 3.x
Valid Branches: https://github.com/openssl/openssl/branches
./generate.sh master