1include $(top_srcdir)/config/Rules.am 2 3VPATH = \ 4 $(top_srcdir)/module/icp \ 5 $(top_srcdir)/module/zcommon \ 6 $(top_srcdir)/lib/libzfs 7 8# Suppress unused but set variable warnings often due to ASSERTs 9AM_CFLAGS += $(NO_UNUSED_BUT_SET_VARIABLE) 10AM_CFLAGS += $(LIBCRYPTO_CFLAGS) $(ZLIB_CFLAGS) 11 12pkgconfig_DATA = libzfs.pc 13 14lib_LTLIBRARIES = libzfs.la 15 16USER_C = \ 17 libzfs_changelist.c \ 18 libzfs_config.c \ 19 libzfs_crypto.c \ 20 libzfs_dataset.c \ 21 libzfs_diff.c \ 22 libzfs_import.c \ 23 libzfs_iter.c \ 24 libzfs_mount.c \ 25 libzfs_pool.c \ 26 libzfs_sendrecv.c \ 27 libzfs_status.c \ 28 libzfs_util.c 29 30 31if BUILD_FREEBSD 32USER_C += \ 33 os/freebsd/libzfs_compat.c \ 34 os/freebsd/libzfs_ioctl_compat.c \ 35 os/freebsd/libzfs_zmount.c 36endif 37 38if BUILD_LINUX 39USER_C += \ 40 os/linux/libzfs_mount_os.c \ 41 os/linux/libzfs_pool_os.c \ 42 os/linux/libzfs_sendrecv_os.c \ 43 os/linux/libzfs_util_os.c 44endif 45 46KERNEL_C = \ 47 algs/sha2/sha2.c \ 48 cityhash.c \ 49 zfeature_common.c \ 50 zfs_comutil.c \ 51 zfs_deleg.c \ 52 zfs_fletcher.c \ 53 zfs_fletcher_aarch64_neon.c \ 54 zfs_fletcher_avx512.c \ 55 zfs_fletcher_intel.c \ 56 zfs_fletcher_sse.c \ 57 zfs_fletcher_superscalar.c \ 58 zfs_fletcher_superscalar4.c \ 59 zfs_namecheck.c \ 60 zfs_prop.c \ 61 zfs_uio.c \ 62 zpool_prop.c \ 63 zprop_common.c 64 65dist_libzfs_la_SOURCES = \ 66 $(USER_C) 67 68nodist_libzfs_la_SOURCES = \ 69 $(KERNEL_C) 70 71libzfs_la_LIBADD = \ 72 $(abs_top_builddir)/lib/libshare/libshare.la \ 73 $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \ 74 $(abs_top_builddir)/lib/libnvpair/libnvpair.la \ 75 $(abs_top_builddir)/lib/libuutil/libuutil.la 76 77libzfs_la_LIBADD += -lm $(LIBCRYPTO_LIBS) $(ZLIB_LIBS) $(LTLIBINTL) 78 79libzfs_la_LDFLAGS = -pthread 80 81if !ASAN_ENABLED 82libzfs_la_LDFLAGS += -Wl,-z,defs 83endif 84 85if BUILD_FREEBSD 86libzfs_la_LIBADD += -lutil -lgeom 87libzfs_la_LDFLAGS += -version-info 4:0:0 88else 89libzfs_la_LDFLAGS += -version-info 2:0:0 90endif 91 92# Licensing data 93EXTRA_DIST = THIRDPARTYLICENSE.openssl THIRDPARTYLICENSE.openssl.descrip 94