diff --git a/cmd/mount_zfs/Makefile.am b/cmd/mount_zfs/Makefile.am index 7abcc30c10..74524f031a 100644 --- a/cmd/mount_zfs/Makefile.am +++ b/cmd/mount_zfs/Makefile.am @@ -20,5 +20,4 @@ mount_zfs_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -mount_zfs_LDFLAGS = \ - -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) $(LIBSELINUX) +mount_zfs_LDADD += $(LIBSELINUX) diff --git a/cmd/zdb/Makefile.am b/cmd/zdb/Makefile.am index f82f1a3b55..49dbf50bcd 100644 --- a/cmd/zdb/Makefile.am +++ b/cmd/zdb/Makefile.am @@ -16,4 +16,4 @@ zdb_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zdb_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) +zdb_LDADD += $(ZLIB) diff --git a/cmd/zfs/Makefile.am b/cmd/zfs/Makefile.am index c1499a2a89..08580c92de 100644 --- a/cmd/zfs/Makefile.am +++ b/cmd/zfs/Makefile.am @@ -19,4 +19,5 @@ zfs_LDADD = \ $(top_builddir)/lib/libzfs/libzfs.la \ $(top_builddir)/lib/libzfs_core/libzfs_core.la -zfs_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) +zfs_LDADD += $(ZLIB) +zfs_LDFLAGS = -pthread diff --git a/cmd/zhack/Makefile.am b/cmd/zhack/Makefile.am index 47da2453e8..944e642574 100644 --- a/cmd/zhack/Makefile.am +++ b/cmd/zhack/Makefile.am @@ -15,4 +15,4 @@ zhack_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zhack_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) +zhack_LDADD += $(ZLIB) diff --git a/cmd/zinject/Makefile.am b/cmd/zinject/Makefile.am index d1d32d57fa..f539569111 100644 --- a/cmd/zinject/Makefile.am +++ b/cmd/zinject/Makefile.am @@ -16,5 +16,3 @@ zinject_LDADD = \ $(top_builddir)/lib/libuutil/libuutil.la \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la - -zinject_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) diff --git a/cmd/zpool/Makefile.am b/cmd/zpool/Makefile.am index 2ce8efc5c4..e7d31c60c9 100644 --- a/cmd/zpool/Makefile.am +++ b/cmd/zpool/Makefile.am @@ -18,5 +18,3 @@ zpool_LDADD = \ $(top_builddir)/lib/libuutil/libuutil.la \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la - -zpool_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) diff --git a/cmd/zstreamdump/Makefile.am b/cmd/zstreamdump/Makefile.am index 3d7ec4124c..175874ffac 100644 --- a/cmd/zstreamdump/Makefile.am +++ b/cmd/zstreamdump/Makefile.am @@ -15,4 +15,4 @@ zstreamdump_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zstreamdump_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) +zstreamdump_LDADD += $(ZLIB) diff --git a/cmd/ztest/Makefile.am b/cmd/ztest/Makefile.am index 39892013a0..403b858c47 100644 --- a/cmd/ztest/Makefile.am +++ b/cmd/ztest/Makefile.am @@ -17,4 +17,4 @@ ztest_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -ztest_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) +ztest_LDADD += -lm -ldl diff --git a/lib/libefi/Makefile.am b/lib/libefi/Makefile.am index aa57dba9ac..55f7b11966 100644 --- a/lib/libefi/Makefile.am +++ b/lib/libefi/Makefile.am @@ -10,3 +10,5 @@ noinst_LTLIBRARIES = libefi.la libefi_la_SOURCES = \ $(top_srcdir)/lib/libefi/rdwr_efi.c + +libefi_la_LIBADD = $(LIBUUID) $(ZLIB) diff --git a/lib/libspl/Makefile.am b/lib/libspl/Makefile.am index 089056c567..dbf85c40fe 100644 --- a/lib/libspl/Makefile.am +++ b/lib/libspl/Makefile.am @@ -30,4 +30,4 @@ libspl_la_SOURCES = \ $(top_srcdir)/lib/libspl/include/sys/list.h \ $(top_srcdir)/lib/libspl/include/sys/list_impl.h -libspl_la_LDFLAGS = -lrt +libspl_la_LIBADD = -lrt diff --git a/lib/libzfs/Makefile.am b/lib/libzfs/Makefile.am index 14abd7ab3c..75f1775a2f 100644 --- a/lib/libzfs/Makefile.am +++ b/lib/libzfs/Makefile.am @@ -27,4 +27,5 @@ libzfs_la_LIBADD = \ $(top_builddir)/lib/libnvpair/libnvpair.la \ $(top_builddir)/lib/libzpool/libzpool.la -libzfs_la_LDFLAGS = -lm -ldl -version-info 1:1:0 $(LIBSELINUX) +libzfs_la_LIBADD += -lm -ldl $(LIBBLKID) +libzfs_la_LDFLAGS = -version-info 1:1:0 diff --git a/lib/libzfs_core/Makefile.am b/lib/libzfs_core/Makefile.am index 180292de14..d8e2061ac3 100644 --- a/lib/libzfs_core/Makefile.am +++ b/lib/libzfs_core/Makefile.am @@ -12,4 +12,4 @@ libzfs_core_la_SOURCES = \ libzfs_core_la_LIBADD = \ $(top_builddir)/lib/libnvpair/libnvpair.la -libzfs_core_la_LDFLAGS = -pthread -version-info 1:1:0 +libzfs_core_la_LDFLAGS = -version-info 1:1:0 diff --git a/lib/libzpool/Makefile.am b/lib/libzpool/Makefile.am index 637dc15da8..32221694a6 100644 --- a/lib/libzpool/Makefile.am +++ b/lib/libzpool/Makefile.am @@ -99,7 +99,8 @@ libzpool_la_LIBADD = \ $(top_builddir)/lib/libuutil/libuutil.la \ $(top_builddir)/lib/libnvpair/libnvpair.la -libzpool_la_LDFLAGS = -pthread -version-info 1:1:0 +libzpool_la_LIBADD += $(ZLIB) +libzpool_la_LDFLAGS = -version-info 1:1:0 EXTRA_DIST = \ $(top_srcdir)/module/zfs/vdev_disk.c \