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 reduced 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 adopted script by Arne Schwabe is completely 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 issue for maintenance. With my script it's possible to use shared libtype in CMakeLists.txt to reduce the APK-Size significantly, in tests up to 50% downsizing is possible (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)
- Expand *.in to .c/.h/.icx 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