1# $FreeBSD$ 2 3.PATH: ${ZFSSRC} 4.PATH: ${SYSDIR}/crypto/skein 5.PATH: ${ZFSOSSRC}/spl 6.PATH: ${OZFS}/module/zstd/lib 7ZFSSRC= zfs.c nvlist.c skein.c skein_block.c list.c 8.if ${MACHINE_ARCH} != aarch64 9ZFSSRC+= zstd_shim.c zstd.c 10CFLAGS+= -DHAS_ZSTD_ZFS 11.endif 12SRCS+= ${ZFSSRC} 13 14CFLAGS+= -I${LDRSRC} 15CFLAGS+= -I${SYSDIR}/cddl/boot/zfs 16CFLAGS+= -I${SYSDIR}/crypto/skein 17 18ZFS_EARLY= -I${ZFSOSINC} \ 19 -I${ZFSOSINC}/spl \ 20 -I${ZFSOSINC}/zfs 21 22.for i in ${ZFSSRC} 23CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h 24.endfor 25 26CFLAGS_EARLY.list.c+= ${ZFS_EARLY} 27CFLAGS_EARLY.zstd_shim.c+= ${ZFS_EARLY} 28 29# Can't use the early flags because there's two conflicting definitions of boolean_t in 30# the zfs code that need to be unified. 31CFLAGS.nvlist.c+= -I${ZFSOSINC}/spl 32CFLAGS.zfs.c+= -I${ZFSOSINC}/spl \ 33 -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 34CFLAGS.zstd.c+= -U__BMI__ 35CFLAGS.zstd_shim.c+= -DIN_BASE -I${OZFS}/include 36 37# Do not unroll skein loops, reduce code size 38CFLAGS.skein_block.c+= -DSKEIN_LOOP=111 39 40CFLAGS+= -I${SYSDIR}/contrib/openzfs/include 41CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs 42CFLAGS.zfs.c+= -I${SYSDIR}/cddl/contrib/opensolaris/common/lz4 43 44CFLAGS+= -Wformat -Wall 45