1# $FreeBSD$ 2 3SYSDIR?=${.CURDIR}/../.. 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+= gfs.c 50SRCS+= vnode.c 51 52.PATH: ${SUNW}/uts/common/os 53SRCS+= callb.c 54SRCS+= fm.c 55SRCS+= list.c 56SRCS+= nvpair_alloc_system.c 57 58.PATH: ${SUNW}/uts/common/zmod 59SRCS+= adler32.c 60SRCS+= opensolaris_crc32.c 61SRCS+= deflate.c 62SRCS+= inffast.c 63SRCS+= inflate.c 64SRCS+= inftrees.c 65SRCS+= trees.c 66SRCS+= zmod.c 67SRCS+= zmod_subr.c 68SRCS+= zutil.c 69 70.PATH: ${SYSDIR}/crypto/sha2 71SRCS+= sha256c.c sha512c.c 72 73.PATH: ${SYSDIR}/crypto/skein 74SRCS+= skein.c skein_block.c 75 76.PATH: ${SUNW}/common/zfs 77.include "${SUNW}/uts/common/Makefile.files" 78.PATH: ${SUNW}/uts/common/fs/zfs 79ZFS_SRCS= ${ZFS_OBJS:C/.o$/.c/} 80SRCS+= ${ZFS_SRCS} 81SRCS+= vdev_geom.c 82SRCS+= trim_map.c 83 84# Use FreeBSD's namecache. 85CFLAGS+=-DFREEBSD_NAMECACHE 86 87CFLAGS+=-I${SYSDIR}/cddl/compat/opensolaris 88CFLAGS+=-I${SUNW}/uts/common/fs/zfs 89CFLAGS+=-I${SUNW}/uts/common/zmod 90CFLAGS+=-I${SUNW}/uts/common 91CFLAGS+=-I${SYSDIR} 92CFLAGS+=-I${SUNW}/common/zfs 93CFLAGS+=-I${SUNW}/common 94CFLAGS+=-DBUILDING_ZFS 95 96.if ${MACHINE_ARCH} == "powerpc64" 97CFLAGS+=-mminimal-toc 98.endif 99 100.ifdef ZFS_DEBUG 101CFLAGS+=-DDEBUG=1 102DEBUG_FLAGS=-g 103.endif 104 105.include <bsd.kmod.mk> 106 107CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h 108 109CWARNFLAGS+=-Wno-missing-prototypes 110CWARNFLAGS+=-Wno-undef 111CWARNFLAGS+=-Wno-strict-prototypes 112CWARNFLAGS+=-Wno-cast-qual 113CWARNFLAGS+=-Wno-parentheses 114CWARNFLAGS+=-Wno-redundant-decls 115CWARNFLAGS+=-Wno-missing-braces 116CWARNFLAGS+=-Wno-uninitialized 117CWARNFLAGS+=-Wno-unused 118CWARNFLAGS+=-Wno-inline 119CWARNFLAGS+=-Wno-switch 120CWARNFLAGS+=-Wno-pointer-arith 121