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 tree.h
26 # For MacOS, don't build the compat versions of strl{cat,cpy}, but do for all
27 # other systems.
28 if !HOST_DARWIN
29 libopenbsd_compat_a_SOURCES += strlcat.c strlcpy.c
30 endif
32 if HOST_DARWIN
33 libopenbsd_compat_a_SOURCES += uuid.c bsd-poll.c bsd-poll.h
34 endif
36 if HOST_NETBSD
37 libopenbsd_compat_a_SOURCES += bsd-poll.c bsd-poll.h
38 endif
40 if HOST_LINUX
41 libopenbsd_compat_a_SOURCES += uuid.c
42 endif
44 if HAVE_LINUX_LANDLOCK
45 libopenbsd_compat_a_SOURCES += landlock.c
46 endif
48 if !HAVE_SIPHASH
49 libopenbsd_compat_a_SOURCES += siphash.c siphash.h
50 endif
52 if !HAVE_SETPROCTITLE
53 libopenbsd_compat_a_SOURCES += setproctitle.c
54 endif
56 EXTRA_DIST = \
57 $(top_srcdir)/include/got_compat.h \
58 imsg.h \
59 tree.h \
60 bsd-poll.h