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