xref: /freebsd/contrib/libfido2/windows/const.ps1 (revision 4d846d26)
1 # Copyright (c) 2021 Yubico AB. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
4 
5 # LibreSSL coordinates.
6 New-Variable -Name 'LIBRESSL_URL' `
7     -Value 'https://fastly.cdn.openbsd.org/pub/OpenBSD/LibreSSL' `
8     -Option Constant
9 New-Variable -Name 'LIBRESSL' -Value 'libressl-3.4.2' -Option Constant
10 
11 # libcbor coordinates.
12 New-Variable -Name 'LIBCBOR' -Value 'libcbor-0.9.0' -Option Constant
13 New-Variable -Name 'LIBCBOR_BRANCH' -Value 'v0.9.0' -Option Constant
14 New-Variable -Name 'LIBCBOR_GIT' -Value 'https://github.com/pjk/libcbor' `
15     -Option Constant
16 
17 # zlib coordinates.
18 New-Variable -Name 'ZLIB' -Value 'zlib-1.2.11' -Option Constant
19 New-Variable -Name 'ZLIB_BRANCH' -Value 'v1.2.11' -Option Constant
20 New-Variable -Name 'ZLIB_GIT' -Value 'https://github.com/madler/zlib' `
21     -Option Constant
22 
23 # Work directories.
24 New-Variable -Name 'BUILD' -Value "$PSScriptRoot\..\build" -Option Constant
25 New-Variable -Name 'OUTPUT' -Value "$PSScriptRoot\..\output" -Option Constant
26 
27 # Prefixes.
28 New-Variable -Name 'STAGE' -Value "${BUILD}\${Arch}\${Type}" -Option Constant
29 New-Variable -Name 'PREFIX' -Value "${OUTPUT}\${Arch}\${Type}" -Option Constant
30 
31 # Build flags.
32 if ("${Type}" -eq "dynamic") {
33 	New-Variable -Name 'RUNTIME' -Value '/MD' -Option Constant
34 	New-Variable -Name 'SHARED' -Value 'ON' -Option Constant
35 } else {
36 	New-Variable -Name 'RUNTIME' -Value '/MT' -Option Constant
37 	New-Variable -Name 'SHARED' -Value 'OFF' -Option Constant
38 }
39 New-Variable -Name 'CFLAGS_DEBUG' -Value "${RUNTIME}d /Zi /guard:cf /sdl" `
40     -Option Constant
41 New-Variable -Name 'CFLAGS_RELEASE' -Value "${RUNTIME} /Zi /guard:cf /sdl" `
42     -Option Constant
43