xref: /freebsd/contrib/libfido2/tools/include_check.sh (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
1#!/bin/sh
2
3# Copyright (c) 2019 Yubico AB. All rights reserved.
4# Use of this source code is governed by a BSD-style
5# license that can be found in the LICENSE file.
6
7check() {
8	for f in $(find $1 -maxdepth 1 -name '*.h'); do
9		echo "#include \"$f\"" | \
10			cc $CFLAGS -Isrc -xc -c - -o /dev/null 2>&1
11		echo "$f $CFLAGS $?"
12	done
13}
14
15check examples
16check fuzz
17check openbsd-compat
18CFLAGS="${CFLAGS} -D_FIDO_INTERNAL" check src
19check src/fido.h
20check src/fido
21check tools
22