summaryrefslogtreecommitdiffstats
path: root/lib/libzutil/Makefile.am
diff options
context:
space:
mode:
authorDon Brady <[email protected]>2018-11-05 12:22:33 -0700
committerBrian Behlendorf <[email protected]>2018-11-05 11:22:33 -0800
commite89f1295d4faa88bb05a62c8dd5f781657db5955 (patch)
tree8e39dfe33c6849e00813e54ec95c09a24448a43a /lib/libzutil/Makefile.am
parent6644e5bb6e1a6c25c5006c819abf93c7bb662e80 (diff)
Add libzutil for libzfs or libzpool consumers
Adds a libzutil for utility functions that are common to libzfs and libzpool consumers (most of what was in libzfs_import.c). This removes the need for utilities to link against both libzpool and libzfs. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Don Brady <[email protected]> Closes #8050
Diffstat (limited to 'lib/libzutil/Makefile.am')
-rw-r--r--lib/libzutil/Makefile.am27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/libzutil/Makefile.am b/lib/libzutil/Makefile.am
new file mode 100644
index 000000000..720b843ab
--- /dev/null
+++ b/lib/libzutil/Makefile.am
@@ -0,0 +1,27 @@
+include $(top_srcdir)/config/Rules.am
+
+# Suppress unused but set variable warnings often due to ASSERTs
+AM_CFLAGS += $(NO_UNUSED_BUT_SET_VARIABLE)
+
+DEFAULT_INCLUDES += \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/lib/libspl/include
+
+noinst_LTLIBRARIES = libzutil.la
+
+USER_C = \
+ zutil_device_path.c \
+ zutil_import.c \
+ zutil_nicenum.c \
+ zutil_pool.c
+
+nodist_libzutil_la_SOURCES = $(USER_C)
+
+libzutil_la_LIBADD = \
+ $(top_builddir)/lib/libavl/libavl.la \
+ $(top_builddir)/lib/libefi/libefi.la \
+ $(top_builddir)/lib/libtpool/libtpool.la
+
+libzutil_la_LIBADD += -lm $(LIBBLKID) $(LIBUDEV)
+
+EXTRA_DIST = $(USER_C)