diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2019-11-14 21:11:36 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2019-11-14 21:11:36 +0000 |
commit | 026b04c43113033f1b763d5d26418ed1d6f78396 (patch) | |
tree | 037ba323b66906a3965e5c6c91158dc0ddbd5743 /lib/libcbor/Makefile | |
parent | 2b318a24339d4b023a7b96f06e1a2fefbe4e9ca2 (diff) |
Add libcbor; an implementation of the Concise Binary Object
Representation (CBOR) encoding format defined in RFC7049.
This is a dependency of libfido2, that we'll use for U2F/FIDO
support in OpenSSH.
feedback and "Looks good enough to me" deraadt@
Diffstat (limited to 'lib/libcbor/Makefile')
-rw-r--r-- | lib/libcbor/Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/libcbor/Makefile b/lib/libcbor/Makefile new file mode 100644 index 00000000000..3ef26156725 --- /dev/null +++ b/lib/libcbor/Makefile @@ -0,0 +1,45 @@ +# $OpenBSD: Makefile,v 1.1 2019/11/14 21:11:34 djm Exp $ + +.PATH: ${.CURDIR}/src ${.CURDIR}/src/cbor ${.CURDIR}/src/cbor/internal + +CFLAGS+= -I${.CURDIR}/src -DHAVE_ENDIAN_H + +LIB= cbor +SRCS= cbor.c +#SRCS+= allocators.c + +WARNINGS=yes +CDIAGFLAGS+= -Wall -Wextra -Wno-unused-parameter +#CDIAGFLAGS+= -Werror + +# cbor/ +SRCS+= arrays.c bytestrings.c callbacks.c common.c encoding.c floats_ctrls.c +SRCS+= ints.c maps.c serialization.c streaming.c tags.c strings.c + +# cbor/internal +SRCS+= builder_callbacks.c encoders.c loaders.c memory_utils.c +SRCS+= stack.c unicode.c + +HDRS= cbor.h +HDRS+= cbor/arrays.h cbor/bytestrings.h cbor/callbacks.h cbor/common.h +HDRS+= cbor/configuration.h cbor/data.h cbor/encoding.h cbor/floats_ctrls.h +HDRS+= cbor/ints.h cbor/maps.h cbor/serialization.h cbor/streaming.h +HDRS+= cbor/strings.h cbor/tags.h + +NOMAN= + +includes: + @for i in $(HDRS); do \ + j="test -d ${DESTDIR}/usr/include/`dirname $$i` || \ + ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ + ${DESTDIR}/usr/include/`dirname $$i`"; \ + echo $$j; \ + eval "$$j"; \ + j="cmp -s src/$$i ${DESTDIR}/usr/include/$$i || \ + ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \ + -m 444 ${.CURDIR}/src/$$i ${DESTDIR}/usr/include/$$i"; \ + echo $$j; \ + eval "$$j"; \ + done + +.include <bsd.lib.mk> |