2010-08-26 18:22:58 +00:00
|
|
|
include $(top_srcdir)/config/Rules.am
|
2020-11-15 04:35:31 +00:00
|
|
|
PHONY =
|
2010-08-26 18:22:58 +00:00
|
|
|
|
|
|
|
lib_LTLIBRARIES = libuutil.la
|
|
|
|
|
2020-11-15 04:35:31 +00:00
|
|
|
include $(top_srcdir)/config/Abigail.am
|
|
|
|
|
2014-06-09 21:55:31 +00:00
|
|
|
USER_C = \
|
|
|
|
uu_alloc.c \
|
|
|
|
uu_avl.c \
|
|
|
|
uu_dprintf.c \
|
|
|
|
uu_ident.c \
|
|
|
|
uu_list.c \
|
|
|
|
uu_misc.c \
|
|
|
|
uu_open.c \
|
|
|
|
uu_pname.c \
|
2017-09-19 19:17:29 +00:00
|
|
|
uu_string.c
|
2014-06-09 21:55:31 +00:00
|
|
|
|
2020-06-25 18:14:54 +00:00
|
|
|
libuutil_la_SOURCES = $(USER_C)
|
2011-07-05 19:12:08 +00:00
|
|
|
|
2011-12-31 23:30:52 +00:00
|
|
|
libuutil_la_LIBADD = \
|
2020-07-06 20:01:29 +00:00
|
|
|
$(abs_top_builddir)/lib/libavl/libavl.la \
|
|
|
|
$(abs_top_builddir)/lib/libspl/libspl.la
|
2011-12-31 23:30:52 +00:00
|
|
|
|
2020-07-06 01:08:40 +00:00
|
|
|
libuutil_la_LIBADD += $(LTLIBINTL)
|
|
|
|
|
2020-07-14 19:17:44 +00:00
|
|
|
libuutil_la_LDFLAGS = -pthread
|
|
|
|
|
|
|
|
if !ASAN_ENABLED
|
|
|
|
libuutil_la_LDFLAGS += -Wl,-z,defs
|
|
|
|
endif
|
Clean up lib dependencies
libzutil is currently statically linked into libzfs, libzfs_core and
libzpool. Avoid the unnecessary duplication by removing it from libzfs
and libzpool, and adding libzfs_core to libzpool.
Remove a few unnecessary dependencies:
- libuutil from libzfs_core
- libtirpc from libspl
- keep only libcrypto in libzfs, as we don't use any functions from
libssl
- librt is only used for clock_gettime, however on modern systems that's
in libc rather than librt. Add a configure check to see if we actually
need librt
- libdl from raidz_test
Add a few missing dependencies:
- zlib to libefi and libzfs
- libuuid to zpool, and libuuid and libudev to zed
- libnvpair uses assertions, so add assert.c to provide aok and
libspl_assertf
Sort the LDADD for programs so that libraries that satisfy dependencies
come at the end rather than the beginning of the linker command line.
Revamp the configure tests for libaries to use FIND_SYSTEM_LIBRARY
instead. This can take advantage of pkg-config, and it also avoids
polluting LIBS.
List all the required dependencies in the pkgconfig files, and move the
one for libzfs_core into the latter's directory. Install pkgconfig files
in $(libdir)/pkgconfig on linux and $(prefix)/libdata/pkgconfig on
FreeBSD, instead of /usr/share/pkgconfig, as the more correct location
for library .pc files.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10538
2020-06-30 17:10:41 +00:00
|
|
|
|
|
|
|
libuutil_la_LDFLAGS += -version-info 3:0:0
|