Build OpenSSL for Windows, from Linux.
Go to file
Fierelier fe9447d0c9 Initial commit 2023-10-04 19:31:56 +02:00
.gitignore Initial commit 2023-10-04 19:31:56 +02:00
LICENSE Initial commit 2023-10-04 19:31:56 +02:00
README.txt Initial commit 2023-10-04 19:31:56 +02:00
compile Initial commit 2023-10-04 19:31:56 +02:00

README.txt

Build OpenSSL for Windows, from Linux.

--- CONFIG ---
You can change the build configuration by setting environment variables:
* ofw_mirror="https://github.com/openssl/openssl" - Which mirror to pull from. Defaults to "https://github.com/openssl/openssl".
* ofw_target="x86/x86-64" - Build for 32-bit/64-bit. Defaults to "x86".
* ofw_version="*/3.1/1/..." - Which version to pull. * pulls the newest version, 3.1 would download the newest 3.1.* release, 1 the newest 1.* release, 3 the newest 3.*, etc. The script will only download stable releases. Defaults to "*".
* ofw_config="" - Which options to pass to ./config. Read: https://wiki.openssl.org/index.php/Compilation_and_Installation#Configuration

--- BUILDING ---
You can find the compiled binaries in openssl_source/usr/bin.

* Compile for 32-bit (defaults):
ofw_target="x86" ./compile

* Compile for 64-bit (defaults):
ofw_target="x86-64" ./compile

* Compile for 32-bit with legacy compatibility (Pentium II (somehow), Windows 2000 (?)):
ofw_target="x86" ofw_config="386" CFLAGS="-D_WIN32_WINNT=0x0500 -march=i586" CXXFLAGS="$CFLAGS" CPPFLAGS="$CFLAGS" ./compile

* Compile for 64-bit with legacy compatibility (All x86-64 chips, Windows XP):
ofw_target="x86-64" CFLAGS="-march=x86-64 -mtune=generic -D_WIN32_WINNT=0x0501" CXXFLAGS="$CFLAGS" CPPFLAGS="$CFLAGS" ./compile

* For a list of Windows versions, see: https://web.archive.org/web/20111001070837if_/https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx#macros_for_conditional_declarations

* This version of the document also lists newer windows revisions:
https://web.archive.org/web/20230709170326if_/https://learn.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers#macros-for-conditional-declarations