1# $FreeBSD$ 2 3.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp 4.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon 5.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs 6.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs/os/freebsd 7.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare 8.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare/os/freebsd 9.PATH: ${SRCTOP}/sys/contrib/openzfs/include 10.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd 11.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib 12 13PACKAGE= runtime 14LIB= zfs 15LIBADD= md pthread umem util uutil m avl bsdxml geom nvpair z zfs_core zutil 16 17INCS= libzfs.h 18USER_C = \ 19 libzfs_changelist.c \ 20 libzfs_config.c \ 21 libzfs_crypto.c \ 22 libzfs_dataset.c \ 23 libzfs_diff.c \ 24 libzfs_import.c \ 25 libzfs_iter.c \ 26 libzfs_mount.c \ 27 libzfs_pool.c \ 28 libzfs_sendrecv.c \ 29 libzfs_status.c \ 30 libzfs_util.c 31 32# FreeBSD 33USER_C += \ 34 libzfs_compat.c \ 35 libzfs_ioctl_compat.c \ 36 libzfs_zmount.c 37 38# libshare 39USER_C += \ 40 libshare.c \ 41 nfs.c \ 42 smb.c 43 44 45KERNEL_C = \ 46 algs/sha2/sha2.c \ 47 cityhash.c \ 48 zfeature_common.c \ 49 zfs_comutil.c \ 50 zfs_deleg.c \ 51 zfs_fletcher.c \ 52 zfs_fletcher_superscalar.c \ 53 zfs_fletcher_superscalar4.c \ 54 zfs_namecheck.c \ 55 zfs_prop.c \ 56 zfs_uio.c \ 57 zpool_prop.c \ 58 zprop_common.c 59 60 61KERNEL_C+= zstd.c \ 62 zfs_zstd.c 63 64 65ARCH_C = 66.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" 67ARCH_C += zfs_fletcher_intel.c \ 68 zfs_fletcher_sse.c 69CFLAGS += -DHAVE_SSE2 70.endif 71.if ${MACHINE_ARCH} == "amd64" 72ARCH_C += zfs_fletcher_avx512.c 73CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_AVX512F 74.endif 75.if ${MACHINE_ARCH} == "aarch64" 76ARCH_C += zfs_fletcher_aarch64_neon.c 77.endif 78 79SRCS= $(USER_C) $(KERNEL_C) $(ARCH_C) 80 81WARNS?= 2 82SHLIB_MAJOR= 4 83CSTD= c99 84CFLAGS+= -DIN_BASE 85CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include 86CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd 87CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include 88CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd 89CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libshare 90CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include 91CFLAGS+= -I${SRCTOP}/sys 92CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include 93CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include 94CFLAGS+= -I${SRCDIR}/sys/contrib/openzfs/module/zstd/include 95CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h 96CFLAGS+= -DHAVE_ISSETUGID 97CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h 98CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith 99CFLAGS.zstd.c= -fno-tree-vectorize 100 101 102.include <bsd.lib.mk> 103