-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In particular simplify the Windows build instructions, by only having a short CMake section about it. While mentioning that bash shell is required also on Windows up-front. Splits the build section into a section for configure and one for CMake so it is easier to pick one of them. Moves the additional CMake options into the CMake section. Moves dist.sh text into the configure section as it is configure specific.
- Loading branch information
1 parent
ad6e77c
commit 937a3d9
Showing
2 changed files
with
52 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ LibreSSL also supports the following Windows environments: | |
|
||
* Microsoft Windows (Windows 7 / Windows Server 2008r2 or later, x86 and x64) | ||
* Wine (32-bit and 64-bit) | ||
* Mingw-w64, Cygwin, and Visual Studio | ||
* MinGW-w64, Cygwin, and Visual Studio | ||
|
||
Official release tarballs are available at your friendly neighborhood | ||
OpenBSD mirror in directory | ||
|
@@ -68,35 +68,36 @@ sent to the core team at [email protected]. | |
|
||
# Building LibreSSL | ||
|
||
## Prerequisites when building from a Git checkout | ||
## Building from a Git checkout | ||
|
||
If you have checked this source using Git, or have downloaded a source tarball | ||
from GitHub, follow these initial steps to prepare the source tree for | ||
If you have checked out this source using Git, or have downloaded a source | ||
tarball from GitHub, follow these initial steps to prepare the source tree for | ||
building. _Note: Your build will fail if you do not follow these instructions! | ||
If you cannot follow these instructions (e.g. Windows system using CMake) or | ||
cannot meet these prerequistes, please download an official release distribution | ||
from https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/ instead. Using official | ||
If you cannot follow these instructions or cannot meet these prerequisites, | ||
please download an official release distribution from | ||
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/ instead. Using official | ||
releases is strongly advised if you are not a developer._ | ||
|
||
1. Ensure you have the following packages installed: | ||
automake, autoconf, git, libtool, perl | ||
2. Run `./autogen.sh` to prepare the source tree for building or | ||
run `./dist.sh` to prepare a tarball. | ||
1. Ensure that you have a bash shell. This is also required on Windows. | ||
2. Ensure that you have the following packages installed: | ||
automake, autoconf, git, libtool, perl. | ||
3. Run `./autogen.sh` to prepare the source tree for building. | ||
|
||
## Steps that apply to all builds | ||
## Build steps using configure | ||
|
||
Once you have a source tree, either by downloaded using git and having | ||
run the `autogen.sh` script above, or by downloading a release distribution from | ||
an OpenBSD mirror, run these commands to build and install the package on most | ||
systems: | ||
Once you have the source tree prepared, run these commands to build and install: | ||
|
||
```sh | ||
./configure # see ./configure --help for configuration options | ||
make check # runs builtin unit tests | ||
make install # set DESTDIR= to install to an alternate location | ||
``` | ||
|
||
If you wish to use the CMake build system, use these commands: | ||
Alternatively, it is possible to run `./dist.sh` to prepare a tarball. | ||
|
||
## Build steps using CMake | ||
|
||
Once you have the source tree prepared, run these commands to build and install: | ||
|
||
```sh | ||
mkdir build | ||
|
@@ -106,7 +107,7 @@ make | |
make test | ||
``` | ||
|
||
For faster builds, you can use Ninja as well: | ||
For faster builds, you can use Ninja: | ||
|
||
```sh | ||
mkdir build-ninja | ||
|
@@ -116,44 +117,15 @@ ninja | |
ninja test | ||
``` | ||
|
||
### OS specific build information | ||
|
||
#### HP-UX (11i) | ||
|
||
Set the UNIX_STD environment variable to `2003` before running `configure` | ||
in order to build with the HP C/aC++ compiler. See the "standards(5)" man | ||
page for more details. | ||
|
||
```sh | ||
export UNIX_STD=2003 | ||
./configure | ||
make | ||
``` | ||
|
||
#### Windows - Mingw-w64 | ||
|
||
LibreSSL builds against relatively recent versions of Mingw-w64, not to be | ||
confused with the original mingw.org project. Mingw-w64 3.2 or later | ||
should work. See README.mingw.md for more information. | ||
|
||
#### Windows - Visual Studio | ||
|
||
LibreSSL builds using the CMake target "Visual Studio 12 2013" and newer. To | ||
generate a Visual Studio project, install CMake, enter the LibreSSL source | ||
directory and run: | ||
Or another supported build system like Visual Studio: | ||
|
||
```sh | ||
./update.sh | ||
mkdir build-vs2013 | ||
cd build-vs2013 | ||
cmake -G"Visual Studio 12 2013" .. | ||
mkdir build-vs2022 | ||
cd build-vs2022 | ||
cmake -G"Visual Studio 17 2022" .. | ||
``` | ||
|
||
Replace "Visual Studio 12 2013" with whatever version of Visual Studio you | ||
have installed. This will generate a LibreSSL.sln file that you can incorporate | ||
into other projects or build by itself. | ||
|
||
#### CMake - Additional Options | ||
#### Additional CMake Options | ||
|
||
| Option Name | Default | Description | | ||
|-------------------------|--------:|-----------------------------------------------------------------------------------------------------------------| | ||
|
@@ -166,6 +138,26 @@ into other projects or build by itself. | |
| `ENABLE_NC` | `OFF` | Enable installing TLS-enabled nc(1) | | ||
| `OPENSSLDIR` | Blank | Set the default openssl directory. Can be specified from command line using <br>```-DOPENSSLDIR=<dirname>``` | | ||
|
||
## Build information for specific systems | ||
|
||
### HP-UX (11i) | ||
|
||
Set the UNIX_STD environment variable to `2003` before running `configure` | ||
in order to build with the HP C/aC++ compiler. See the "standards(5)" man | ||
page for more details. | ||
|
||
```sh | ||
export UNIX_STD=2003 | ||
./configure | ||
make | ||
``` | ||
|
||
### MinGW-w64 - Windows | ||
|
||
LibreSSL builds against relatively recent versions of [MinGW-w64](https://www.mingw-w64.org/), not to be | ||
confused with the original mingw.org project. MinGW-w64 3.2 or later | ||
should work. See [README.mingw.md](README.mingw.md) for more information. | ||
|
||
# Using LibreSSL | ||
|
||
## CMake | ||
|
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