xref: /netbsd-src/external/bsd/libfido2/lib/Makefile (revision 181254a7b1bdde6873432bffef2d2decc4b5c22f)
1# $NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 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+= -DHAVE_ARC4RANDOM_BUF -D_FIDO_INTERNAL -I${DIST}/src
10
11LDADD+=-lusbhid -lcbor
12DPADD+=${LIBUSBHID} ${LIBCBOR}
13
14LDFLAGS+=-Wl,--version-script=${.CURDIR}/fido2.map
15
16LIB=    fido2
17
18SRCS+= \
19aes256.c \
20assert.c \
21authkey.c \
22bio.c \
23blob.c \
24buf.c \
25cbor.c \
26cred.c \
27credman.c \
28dev.c \
29ecdh.c \
30eddsa.c \
31err.c \
32es256.c \
33hid.c \
34hid_openbsd.c \
35info.c \
36io.c \
37iso7816.c \
38log.c \
39pin.c \
40reset.c \
41rs256.c \
42u2f.c
43
44SRCS+= \
45explicit_bzero.c \
46recallocarray.c \
47timingsafe_bcmp.c
48
49INCS+= \
50fido.h \
51fido/bio.h \
52fido/credman.h \
53fido/eddsa.h \
54fido/err.h \
55fido/es256.h \
56fido/param.h \
57fido/rs256.h \
58fido/types.h
59
60INCSDIR=/usr/include
61
62MAN+= \
63eddsa_pk_new.3 \
64es256_pk_new.3 \
65fido_assert_allow_cred.3 \
66fido_assert_new.3 \
67fido_assert_set_authdata.3 \
68fido_assert_verify.3 \
69fido_bio_dev_get_info.3 \
70fido_bio_enroll_new.3 \
71fido_bio_info_new.3 \
72fido_bio_template.3 \
73fido_cbor_info_new.3 \
74fido_cred_exclude.3 \
75fido_cred_new.3 \
76fido_cred_set_authdata.3 \
77fido_cred_verify.3 \
78fido_credman_metadata_new.3 \
79fido_dev_get_assert.3 \
80fido_dev_info_manifest.3 \
81fido_dev_make_cred.3 \
82fido_dev_open.3 \
83fido_dev_set_io_functions.3 \
84fido_dev_set_pin.3 \
85fido_init.3 \
86fido_strerr.3 \
87rs256_pk_new.3
88
89SHLIB_MAJOR=2
90SHLIB_MINOR=0
91
92.SUFFIXES: .in
93.in:
94	${TOOL_SED} \
95		-e s%@CMAKE_INSTALL_PREFIX@%/usr% \
96		-e s%@CMAKE_INSTALL_LIBDIR@%lib% \
97		-e s%@PROJECT_NAME@%libfido2% \
98		-e s%@FIDO_VERSION@%${FIDO_VERSION}% \
99		< ${.ALLSRC} > ${.TARGET}
100
101FILESDIR=/usr/lib/pkgconfig
102FILES+=libfido2.pc
103FILESBUILD_libfido2.pc=yes
104
105.include <bsd.lib.mk>
106