1# $FreeBSD$ 2 3.include <bsd.init.mk> 4.include <bsd.compiler.mk> 5 6.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl 7.PATH: ${SRCTOP}/sys/contrib/openzfs/include 8 9LIB= spl 10LIBADD= 11PACKAGE= zfs 12 13SRCS = \ 14 assert.c \ 15 list.c \ 16 mkdirp.c \ 17 os/freebsd/zone.c \ 18 page.c \ 19 timestamp.c \ 20 include/sys/list.h \ 21 include/sys/list_impl.h 22 23# These functions are not required when bootstrapping and the atomic code 24# will not compile when building on macOS. 25.if !defined(BOOTSTRAPPING) 26SRCS += \ 27 atomic.c \ 28 getexecname.c \ 29 os/freebsd/getexecname.c \ 30 os/freebsd/gethostid.c \ 31 os/freebsd/getmntany.c \ 32 os/freebsd/mnttab.c 33.endif 34 35WARNS?= 2 36CSTD= c99 37CFLAGS+= -DIN_BASE 38CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include 39CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ 40CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd 41CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include 42CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include 43CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h 44CFLAGS+= -DHAVE_ISSETUGID 45CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h 46.if ${COMPILER_TYPE} == "clang" 47CFLAGS.atomic.c+= -Wno-error=atomic-alignment 48.endif 49 50.include <bsd.lib.mk> 51