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