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: ${SUNW}/common/zfs 74.include "${SUNW}/uts/common/Makefile.files" 75.PATH: ${SUNW}/uts/common/fs/zfs 76ZFS_SRCS= ${ZFS_OBJS:C/.o$/.c/} 77SRCS+= ${ZFS_SRCS} 78SRCS+= vdev_geom.c 79SRCS+= trim_map.c 80 81# Use FreeBSD's namecache. 82CFLAGS+=-DFREEBSD_NAMECACHE 83 84CFLAGS+=-I${SYSDIR}/cddl/compat/opensolaris 85CFLAGS+=-I${SUNW}/uts/common/fs/zfs 86CFLAGS+=-I${SUNW}/uts/common/zmod 87CFLAGS+=-I${SUNW}/uts/common 88CFLAGS+=-I${SYSDIR} 89CFLAGS+=-I${SUNW}/common/zfs 90CFLAGS+=-I${SUNW}/common 91CFLAGS+=-DBUILDING_ZFS 92 93.if ${MACHINE_ARCH} == "powerpc64" 94CFLAGS+=-mminimal-toc 95.endif 96 97.ifdef ZFS_DEBUG 98CFLAGS+=-DDEBUG=1 99DEBUG_FLAGS=-g 100.endif 101 102.include <bsd.kmod.mk> 103 104CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h 105 106CWARNFLAGS+=-Wno-missing-prototypes 107CWARNFLAGS+=-Wno-undef 108CWARNFLAGS+=-Wno-strict-prototypes 109CWARNFLAGS+=-Wno-cast-qual 110CWARNFLAGS+=-Wno-parentheses 111CWARNFLAGS+=-Wno-redundant-decls 112CWARNFLAGS+=-Wno-missing-braces 113CWARNFLAGS+=-Wno-uninitialized 114CWARNFLAGS+=-Wno-unused 115CWARNFLAGS+=-Wno-inline 116CWARNFLAGS+=-Wno-switch 117CWARNFLAGS+=-Wno-pointer-arith 118