blob: 878f7c179f11462e300115f0039153f2b5646ce1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# $NetBSD: Makefile,v 1.3 2020/03/04 17:22:49 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
.if ${MACHINE} == "vax"
# vax does not have NaN (no ieee754, so this code will not work anyway)
CPPFLAGS+=-DNAN=INFINITY
.endif
LIB= cbor
SRCS+= cbor.c
# For ldexp
LIBDPLIBS = m ${NETBSDSRCDIR}/lib/libm
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
.BEGIN:
|