Blob


1 noinst_LIBRARIES = libopenbsd-compat.a
3 include $(top_builddir)/Makefile.common
5 libopenbsd_compat_a_SOURCES = \
6 asprintf.c \
7 base64.c \
8 closefrom.c \
9 fmt_scaled.c \
10 freezero.c \
11 getdtablecount.c \
12 getopt.c \
13 getprogname.c \
14 imsg-buffer.c \
15 imsg.c \
16 merge.c \
17 reallocarray.c \
18 recallocarray.c \
19 strndup.c \
20 strnlen.c \
21 strsep.c \
22 strtonum.c \
23 imsg.h \
24 queue.h \
25 tree.h
27 # For MacOS, don't build the compat versions of strl{cat,cpy}, but do for all
28 # other systems.
29 if !HOST_DARWIN
30 libopenbsd_compat_a_SOURCES += strlcat.c strlcpy.c
31 endif
33 if HOST_DARWIN
34 libopenbsd_compat_a_SOURCES += uuid.c bsd-poll.c bsd-poll.h
35 endif
37 if HOST_NETBSD
38 libopenbsd_compat_a_SOURCES += bsd-poll.c bsd-poll.h
39 endif
41 if HOST_LINUX
42 libopenbsd_compat_a_SOURCES += uuid.c
43 endif
45 if HAVE_LINUX_LANDLOCK
46 libopenbsd_compat_a_SOURCES += landlock.c
47 endif
49 if !HAVE_SIPHASH
50 libopenbsd_compat_a_SOURCES += siphash.c siphash.h
51 endif
53 if !HAVE_SETPROCTITLE
54 libopenbsd_compat_a_SOURCES += setproctitle.c
55 endif
57 EXTRA_DIST = \
58 $(top_srcdir)/include/got_compat.h \
59 imsg.h \
60 queue.h \
61 tree.h \
62 bsd-poll.h