1# $NetBSD: Makefile,v 1.11 2023/08/11 23:02:08 christos Exp $
2
3NOLINT=
4.include <bsd.own.mk>
5.include <bsd.init.mk>
6
7.PATH: ${DIST}/src ${DIST}/man ${DIST}/openbsd-compat
8
9CPPFLAGS+= -D_FIDO_INTERNAL -I${DIST}/src
10
11LDADD+=-lusbhid -lcbor -lz
12DPADD+=${LIBUSBHID} ${LIBCBOR} ${LIBZ}
13
14LDFLAGS+=-Wl,--version-script=${DIST}/src/export.gnu
15
16LIB=    fido2
17
18SRCS+= \
19aes256.c \
20assert.c \
21authkey.c \
22bio.c \
23blob.c \
24buf.c \
25cbor.c \
26compress.c \
27config.c \
28cred.c \
29credman.c \
30dev.c \
31ecdh.c \
32eddsa.c \
33err.c \
34es256.c \
35es384.c \
36hid.c \
37hid_netbsd.c \
38hid_unix.c \
39info.c \
40io.c \
41iso7816.c \
42largeblob.c \
43log.c \
44pin.c \
45random.c \
46reset.c \
47rs1.c \
48rs256.c \
49time.c \
50tpm.c \
51touch.c \
52types.c \
53u2f.c
54
55SRCS+= \
56explicit_bzero.c \
57freezero.c \
58recallocarray.c \
59timingsafe_bcmp.c
60
61INCS+= \
62fido.h \
63fido/bio.h \
64fido/config.h \
65fido/credman.h \
66fido/eddsa.h \
67fido/err.h \
68fido/es256.h \
69fido/es384.h \
70fido/param.h \
71fido/rs256.h \
72fido/types.h
73
74INCSDIR=/usr/include
75
76MAN+= \
77eddsa_pk_new.3 \
78es256_pk_new.3 \
79es384_pk_new.3 \
80fido_assert_allow_cred.3 \
81fido_assert_new.3 \
82fido_assert_set_authdata.3 \
83fido_assert_verify.3 \
84fido_bio_dev_get_info.3 \
85fido_bio_enroll_new.3 \
86fido_bio_info_new.3 \
87fido_bio_template.3 \
88fido_cbor_info_new.3 \
89fido_cred_exclude.3 \
90fido_cred_new.3 \
91fido_cred_set_authdata.3 \
92fido_cred_verify.3 \
93fido_credman_metadata_new.3 \
94fido_dev_enable_entattest.3 \
95fido_dev_get_assert.3 \
96fido_dev_get_touch_begin.3 \
97fido_dev_info_manifest.3 \
98fido_dev_largeblob_get.3 \
99fido_dev_make_cred.3 \
100fido_dev_open.3 \
101fido_dev_set_io_functions.3 \
102fido_dev_set_pin.3 \
103fido_init.3 \
104fido_strerr.3 \
105rs256_pk_new.3
106
107SHLIB_MAJOR=5
108SHLIB_MINOR=0
109
110.SUFFIXES: .in
111.in:
112	${TOOL_SED} \
113		-e s%@CMAKE_INSTALL_PREFIX@%/usr% \
114		-e s%@CMAKE_INSTALL_LIBDIR@%lib% \
115		-e s%@PROJECT_NAME@%libfido2% \
116		-e s%@FIDO_VERSION@%${FIDO_VERSION}% \
117		< ${.ALLSRC} > ${.TARGET}
118
119FILESDIR=/usr/lib/pkgconfig
120FILES+=libfido2.pc
121FILESBUILD_libfido2.pc=yes
122
123COPTS.assert.c+=-Wno-error=deprecated-declarations
124COPTS.cbor.c+=-Wno-error=deprecated-declarations
125COPTS.cred.c+=-Wno-error=deprecated-declarations
126COPTS.ecdh.c+=-Wno-error=deprecated-declarations
127COPTS.ecdh.c+=-Wno-error=pointer-sign
128COPTS.es256.c+=-Wno-error=deprecated-declarations
129COPTS.es384.c+=-Wno-error=deprecated-declarations
130COPTS.rs256.c+=-Wno-error=deprecated-declarations
131
132.include <bsd.lib.mk>
133