1# $FreeBSD$ 2 3SYSDIR?=${SRCTOP}/sys 4 5KMOD= zfs 6 7SRCS= bus_if.h device_if.h vnode_if.h opt_kstack_pages.h 8 9SUNW= ${SYSDIR}/cddl/contrib/opensolaris 10 11.PATH: ${SUNW}/common/acl 12SRCS+= acl_common.c 13.PATH: ${SUNW}/common/avl 14SRCS+= avl.c 15.PATH: ${SUNW}/common/nvpair 16SRCS+= opensolaris_nvpair.c 17SRCS+= opensolaris_nvpair_alloc_fixed.c 18SRCS+= opensolaris_fnvpair.c 19.PATH: ${SYSDIR}/cddl/contrib/opensolaris/common/unicode 20SRCS+= u8_textprep.c 21 22.PATH: ${SYSDIR}/cddl/compat/opensolaris/kern 23SRCS+= opensolaris_acl.c 24SRCS+= opensolaris_dtrace.c 25SRCS+= opensolaris_kobj.c 26SRCS+= opensolaris_kstat.c 27SRCS+= opensolaris_lookup.c 28SRCS+= opensolaris_policy.c 29SRCS+= opensolaris_string.c 30SRCS+= opensolaris_sysevent.c 31SRCS+= opensolaris_taskq.c 32SRCS+= opensolaris_uio.c 33SRCS+= opensolaris_vfs.c 34SRCS+= opensolaris_vm.c 35SRCS+= opensolaris_zone.c 36 37_A=${SYSDIR}/cddl/contrib/opensolaris/common/atomic 38.if exists(${_A}/${MACHINE_CPUARCH}/opensolaris_atomic.S) 39.PATH: ${_A}/${MACHINE_CPUARCH} 40SRCS+= opensolaris_atomic.S 41.elif exists(${_A}/${MACHINE_ARCH}/opensolaris_atomic.S) 42.PATH: ${_A}/${MACHINE_ARCH} 43SRCS+= opensolaris_atomic.S 44.else 45SRCS+= opensolaris_atomic.c 46.endif 47 48.PATH: ${SUNW}/uts/common/fs 49SRCS+= vnode.c 50 51.PATH: ${SUNW}/uts/common/os 52SRCS+= callb.c 53SRCS+= fm.c 54SRCS+= list.c 55SRCS+= nvpair_alloc_system.c 56 57.PATH: ${SUNW}/uts/common/zmod 58SRCS+= adler32.c 59SRCS+= opensolaris_crc32.c 60SRCS+= deflate.c 61SRCS+= inffast.c 62SRCS+= inflate.c 63SRCS+= inftrees.c 64SRCS+= trees.c 65SRCS+= zmod.c 66SRCS+= zmod_subr.c 67SRCS+= zutil.c 68 69.PATH: ${SYSDIR}/crypto/sha2 70SRCS+= sha256c.c sha512c.c 71 72.PATH: ${SYSDIR}/crypto/skein 73SRCS+= skein.c skein_block.c 74 75.PATH: ${SUNW}/common/zfs 76.include "${SUNW}/uts/common/Makefile.files" 77.PATH: ${SUNW}/uts/common/fs/zfs 78ZFS_SRCS= ${ZFS_OBJS:C/.o$/.c/} 79SRCS+= ${ZFS_SRCS} 80SRCS+= vdev_geom.c 81SRCS+= trim_map.c 82.PATH: ${SUNW}/uts/common/fs/zfs/lua 83LUA_SRCS= ${LUA_OBJS:C/.o$/.c/} 84SRCS+= ${LUA_SRCS} 85 86# Use FreeBSD's namecache. 87CFLAGS+=-DFREEBSD_NAMECACHE 88 89CFLAGS+=-I${SYSDIR}/cddl/compat/opensolaris 90CFLAGS+=-I${SUNW}/uts/common/fs/zfs 91CFLAGS+=-I${SUNW}/uts/common/fs/zfs/lua 92CFLAGS+=-I${SUNW}/uts/common/zmod 93CFLAGS+=-I${SUNW}/uts/common 94CFLAGS+=-I${SYSDIR} 95CFLAGS+=-I${SUNW}/common/zfs 96CFLAGS+=-I${SUNW}/common 97CFLAGS+=-DBUILDING_ZFS 98 99.if ${MACHINE_ARCH} == "powerpc64" 100CFLAGS.gcc+=-mminimal-toc 101.endif 102 103.ifdef ZFS_DEBUG 104CFLAGS+=-DDEBUG=1 105DEBUG_FLAGS=-g 106.endif 107 108.include <bsd.kmod.mk> 109 110CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h 111 112CWARNFLAGS+=-Wno-missing-prototypes 113CWARNFLAGS+=-Wno-undef 114CWARNFLAGS+=-Wno-strict-prototypes 115CWARNFLAGS+=-Wno-cast-qual 116CWARNFLAGS+=-Wno-parentheses 117CWARNFLAGS+=-Wno-redundant-decls 118CWARNFLAGS+=-Wno-missing-braces 119CWARNFLAGS+=-Wno-uninitialized 120CWARNFLAGS+=-Wno-unused 121CWARNFLAGS+=-Wno-inline 122CWARNFLAGS+=-Wno-switch 123CWARNFLAGS+=-Wno-pointer-arith 124