Module Name:    src
Committed By:   christos
Date:           Tue Mar  3 00:36:18 UTC 2020

Added Files:
        src/external/mit/libcbor: Makefile
        src/external/mit/libcbor/lib: Makefile

Log Message:
Add build glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/mit/libcbor/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mit/libcbor/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/mit/libcbor/Makefile
diff -u /dev/null src/external/mit/libcbor/Makefile:1.1
--- /dev/null	Mon Mar  2 19:36:18 2020
+++ src/external/mit/libcbor/Makefile	Mon Mar  2 19:36:18 2020
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2020/03/03 00:36:18 christos Exp $
+
+SUBDIR+=	lib
+
+.include <bsd.subdir.mk>

Index: src/external/mit/libcbor/lib/Makefile
diff -u /dev/null src/external/mit/libcbor/lib/Makefile:1.1
--- /dev/null	Mon Mar  2 19:36:18 2020
+++ src/external/mit/libcbor/lib/Makefile	Mon Mar  2 19:36:18 2020
@@ -0,0 +1,103 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 00:36:18 christos Exp $
+
+NOLINT=
+NOMAN=
+.include <bsd.own.mk>
+
+DIST = ${.CURDIR}/../dist
+
+.PATH: ${DIST}/src ${DIST}/src/cbor ${DIST}/src/cbor/internal
+
+CPPFLAGS+= -I${DIST}/src -DHAVE_ENDIAN_H -I. -DEIGHT_BYTE_SIZE_T
+
+LIB=    cbor
+
+SRCS+=   cbor.c
+
+VERS_FILE=${DIST}/CMakeLists.txt
+
+.for i in MAJOR MINOR PATCH
+CBOR_VERSION_${i} != \
+    ${TOOL_SED} -ne '/CBOR_VERSION_${i}/s/.*"\([0-9]*\)")$$/\1/p' ${VERS_FILE}
+.endfor
+
+CBOR_VERSION = ${CBOR_VERSION_MAJOR}.${CBOR_VERSION_MINOR}.${CBOR_VERSION_PATCH}
+
+# cbor/
+SRCS+= \
+arrays.c \
+bytestrings.c \
+callbacks.c \
+common.c \
+encoding.c \
+floats_ctrls.c \
+ints.c \
+maps.c \
+serialization.c \
+streaming.c \
+strings.c \
+tags.c
+
+# cbor/internal
+SRCS+= \
+builder_callbacks.c \
+encoders.c \
+loaders.c \
+memory_utils.c \
+stack.c \
+unicode.c
+
+INCS+= \
+cbor.h \
+cbor/arrays.h \
+cbor/bytestrings.h \
+cbor/callbacks.h \
+cbor/common.h \
+cbor/configuration.h \
+cbor/data.h \
+cbor/encoding.h \
+cbor/floats_ctrls.h \
+cbor/ints.h \
+cbor/maps.h \
+cbor/serialization.h \
+cbor/streaming.h \
+cbor/strings.h \
+cbor/tags.h
+
+INCSDIR=/usr/include
+
+PKGCONFIG=libcbor
+
+.SUFFIXES: .in
+
+.in:
+	${TOOL_SED} \
+	    -e s@CMAKE_INSTALL_PREFIX@/usr@ \
+	    -e s@CMAKE_INSTALL_LIBDIR@/lib@ \
+	    -e s@PROJECT_NAME@libcbor@ \
+	    -e s@CBOR_VERSION@${CBOR_VERSION}@ ${.ALLSRC} > ${.TARGET}
+
+libcbor.pc: libcbor.pc.in
+
+SHLIB_MAJOR=    0
+SHLIB_MINOR=    5
+
+.include <bsd.lib.mk>
+
+${OBJS}: cbor/configuration.h
+
+cbor/configuration.h: ${VERS_FILE}
+	@mkdir -p cbor && ( \
+	echo	'#define CBOR_MAJOR_VERSION ${CBOR_VERSION_MAJOR}' && \
+	echo	'#define CBOR_MINOR_VERSION ${CBOR_VERSION_MINOR}' && \
+	echo	'#define CBOR_PATCH_VERSION ${CBOR_VERSION_PATCH}' && \
+	echo	'#define CBOR_CUSTOM_ALLOC 0' && \
+	echo	'#define CBOR_BUFFER_GROWTH 2' && \
+	echo	'#define CBOR_PRETTY_PRINTER 1' && \
+	echo	'#define CBOR_RESTRICT_SPECIFIER restrict' && \
+	echo	'#define CBOR_INLINE_SPECIFIER ') > ${.TARGET}
+
+CLEANFILES+= cbor/configuration.h cbor
+
+.BEGIN:
+

Reply via email to