xref: /freebsd/contrib/libfido2/.actions/build-osx-clang (revision 60a517b66a69b8c011b04063ef63a938738719bd)
1*60a517b6SEd Maste#!/bin/sh -eux
2*60a517b6SEd Maste
3*60a517b6SEd Maste# Copyright (c) 2022 Yubico AB. All rights reserved.
4*60a517b6SEd Maste# Use of this source code is governed by a BSD-style
5*60a517b6SEd Maste# license that can be found in the LICENSE file.
6*60a517b6SEd Maste# SPDX-License-Identifier: BSD-2-Clause
7*60a517b6SEd Maste
8*60a517b6SEd Masteexport PKG_CONFIG_PATH="$(brew --prefix openssl@3.0)/lib/pkgconfig"
9*60a517b6SEd MasteSCAN="$(brew --prefix llvm)/bin/scan-build"
10*60a517b6SEd Maste
11*60a517b6SEd Maste# Build, analyze, and install libfido2.
12*60a517b6SEd Mastefor T in Debug Release; do
13*60a517b6SEd Maste	mkdir build-$T
14*60a517b6SEd Maste	(cd build-$T && ${SCAN} cmake -DCMAKE_BUILD_TYPE=$T ..)
15*60a517b6SEd Maste	${SCAN} --status-bugs make -j"$(sysctl -n hw.ncpu)" -C build-$T
16*60a517b6SEd Maste	make -C build-$T man_symlink_html
17*60a517b6SEd Maste	make -C build-$T regress
18*60a517b6SEd Maste	sudo make -C build-$T install
19*60a517b6SEd Mastedone
20