Blob
- Date:
- Message:
- portable: configure: split out dependencies Rather than assume all dependencies are required for all programs, split them out. This will make packaging easier, as well as splitting the code to use subprojects. Note that due to the use of config.h semantics, in most cases the got_compat.h header file is now at the top of the .c file it is included in, so that it can handle the system header inclusion properly.
- Actions:
- History | Blame | Raw File
1 noinst_LIBRARIES = libopenbsd-compat.a3 include $(top_builddir)/Makefile.common5 libopenbsd_compat_a_SOURCES = \6 asprintf.c \7 base64.c \8 fmt_scaled.c \9 freezero.c \10 getdtablecount.c \11 getopt.c \12 getprogname.c \13 merge.c \14 reallocarray.c \15 recallocarray.c \16 strndup.c \17 strnlen.c \18 strsep.c \19 strtonum.c \20 imsg.h \21 tree.h23 # For MacOS, don't build the compat versions of strl{cat,cpy}, but do for all24 # other systems.25 if !HOST_DARWIN26 libopenbsd_compat_a_SOURCES += strlcat.c strlcpy.c27 endif29 if HOST_DARWIN30 libopenbsd_compat_a_SOURCES += uuid.c bsd-poll.c bsd-poll.h31 endif33 if !HAVE_CLOSEFROM34 libopenbsd_compat_a_SOURCES += closefrom.c35 endif37 if HOST_NETBSD38 libopenbsd_compat_a_SOURCES += bsd-poll.c bsd-poll.h39 endif41 if HOST_LINUX42 libopenbsd_compat_a_SOURCES += uuid.c43 endif45 if HAVE_LINUX_LANDLOCK46 libopenbsd_compat_a_SOURCES += landlock.c47 endif49 if !HAVE_SIPHASH50 libopenbsd_compat_a_SOURCES += siphash.c siphash.h51 endif53 if !HAVE_SETPROCTITLE54 libopenbsd_compat_a_SOURCES += setproctitle.c55 endif57 if !HAVE_IMSG58 libopenbsd_compat_a_SOURCES += imsg-buffer.c imsg.c59 endif61 if !HOST_DARWIN62 # Fake an assigment here. It does nothing, but you cannot have consecutive63 # nested if statements in Makefiles, so we have to do something here, even if64 # it's a dummy assignment.65 NOTING=something66 if !HAVE_SHA267 libopenbsd_compat_a_SOURCES += sha2.c sha2.h68 endif69 endif71 LDADD = $(libbsd_LIBS)72 AM_CPPFLAGS = $(libbsd_CFLAGS)74 EXTRA_DIST = \75 $(top_srcdir)/include/got_compat.h \76 imsg.h \77 tree.h \78 bsd-poll.h