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