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