1 # Copyright (c) 2021-2023 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 # SPDX-License-Identifier: BSD-2-Clause 5 6 # LibreSSL coordinates. 7 New-Variable -Name 'LIBRESSL_URL' ` 8 -Value 'https://fastly.cdn.openbsd.org/pub/OpenBSD/LibreSSL' ` 9 -Option Constant 10 New-Variable -Name 'LIBRESSL' -Value 'libressl-3.6.2' -Option Constant 11 New-Variable -Name 'CRYPTO_LIBRARIES' -Value 'crypto-50' -Option Constant 12 13 # libcbor coordinates. 14 New-Variable -Name 'LIBCBOR' -Value 'libcbor-0.10.1' -Option Constant 15 New-Variable -Name 'LIBCBOR_BRANCH' -Value 'v0.10.1' -Option Constant 16 New-Variable -Name 'LIBCBOR_GIT' -Value 'https://github.com/pjk/libcbor' ` 17 -Option Constant 18 19 # zlib coordinates. 20 New-Variable -Name 'ZLIB' -Value 'zlib-1.2.13' -Option Constant 21 New-Variable -Name 'ZLIB_BRANCH' -Value 'v1.2.13' -Option Constant 22 New-Variable -Name 'ZLIB_GIT' -Value 'https://github.com/madler/zlib' ` 23 -Option Constant 24 25 # Work directories. 26 New-Variable -Name 'BUILD' -Value "$PSScriptRoot\..\build" -Option Constant 27 New-Variable -Name 'OUTPUT' -Value "$PSScriptRoot\..\output" -Option Constant 28 29 # Prefixes. 30 New-Variable -Name 'STAGE' -Value "${BUILD}\${Arch}\${Type}" -Option Constant 31 New-Variable -Name 'PREFIX' -Value "${OUTPUT}\${Arch}\${Type}" -Option Constant 32 33 # Build flags. 34 if ("${Type}" -eq "dynamic") { 35 New-Variable -Name 'RUNTIME' -Value '/MD' -Option Constant 36 New-Variable -Name 'SHARED' -Value 'ON' -Option Constant 37 } else { 38 New-Variable -Name 'RUNTIME' -Value '/MT' -Option Constant 39 New-Variable -Name 'SHARED' -Value 'OFF' -Option Constant 40 } 41 New-Variable -Name 'CFLAGS_DEBUG' -Value "${RUNTIME}d /Zi /guard:cf /sdl" ` 42 -Option Constant 43 New-Variable -Name 'CFLAGS_RELEASE' -Value "${RUNTIME} /Zi /guard:cf /sdl" ` 44 -Option Constant 45