1include $(top_srcdir)/config/Rules.am 2 3# Suppress unused but set variable warnings often due to ASSERTs 4AM_CFLAGS += $(NO_UNUSED_BUT_SET_VARIABLE) 5AM_CFLAGS += $(LIBBLKID_CFLAGS) $(LIBUDEV_CFLAGS) 6AM_CFLAGS += -fvisibility=hidden 7 8DEFAULT_INCLUDES += -I$(srcdir) 9 10noinst_LTLIBRARIES = libzutil.la 11 12USER_C = \ 13 zutil_device_path.c \ 14 zutil_import.c \ 15 zutil_import.h \ 16 zutil_nicenum.c \ 17 zutil_pool.c 18 19if BUILD_LINUX 20USER_C += \ 21 os/linux/zutil_device_path_os.c \ 22 os/linux/zutil_import_os.c \ 23 os/linux/zutil_compat.c 24endif 25 26if BUILD_FREEBSD 27DEFAULT_INCLUDES += -I$(top_srcdir)/include/os/freebsd/zfs 28 29USER_C += \ 30 os/freebsd/zutil_device_path_os.c \ 31 os/freebsd/zutil_import_os.c \ 32 os/freebsd/zutil_compat.c 33 34VPATH += $(top_srcdir)/module/os/freebsd/zfs 35 36nodist_libzutil_la_SOURCES = zfs_ioctl_compat.c 37endif 38 39libzutil_la_SOURCES = $(USER_C) 40 41libzutil_la_LIBADD = \ 42 $(abs_top_builddir)/lib/libavl/libavl.la \ 43 $(abs_top_builddir)/lib/libtpool/libtpool.la \ 44 $(abs_top_builddir)/lib/libnvpair/libnvpair.la \ 45 $(abs_top_builddir)/lib/libspl/libspl.la 46 47if BUILD_LINUX 48libzutil_la_LIBADD += \ 49 $(abs_top_builddir)/lib/libefi/libefi.la \ 50 -lrt 51endif 52 53libzutil_la_LIBADD += -lm $(LIBBLKID_LIBS) $(LIBUDEV_LIBS) 54 55include $(top_srcdir)/config/CppCheck.am 56