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