1# $FreeBSD$ 2 3SYSDIR?=${.CURDIR}/../.. 4 5KMOD= zfs 6 7SRCS= bus_if.h device_if.h vnode_if.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+= nvpair.c 17SRCS+= nvpair_alloc_fixed.c 18SRCS+= 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_kobj.c 25SRCS+= opensolaris_kstat.c 26SRCS+= opensolaris_lookup.c 27SRCS+= opensolaris_policy.c 28SRCS+= opensolaris_string.c 29SRCS+= opensolaris_sysevent.c 30SRCS+= opensolaris_taskq.c 31SRCS+= opensolaris_uio.c 32SRCS+= opensolaris_vfs.c 33SRCS+= opensolaris_vm.c 34SRCS+= opensolaris_zone.c 35 36_A=${SYSDIR}/cddl/contrib/opensolaris/common/atomic 37.if exists(${_A}/${MACHINE_CPUARCH}/opensolaris_atomic.S) 38.PATH: ${_A}/${MACHINE_CPUARCH} 39SRCS+= opensolaris_atomic.S 40.elif exists(${_A}/${MACHINE_ARCH}/opensolaris_atomic.S) 41.PATH: ${_A}/${MACHINE_ARCH} 42SRCS+= opensolaris_atomic.S 43.else 44SRCS+= opensolaris_atomic.c 45.endif 46 47.PATH: ${SUNW}/uts/common/fs 48SRCS+= gfs.c 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+= sha2.c sha256c.c 71 72.PATH: ${SUNW}/common/zfs 73.include "${SUNW}/uts/common/Makefile.files" 74.PATH: ${SUNW}/uts/common/fs/zfs 75ZFS_SRCS= ${ZFS_OBJS:C/.o$/.c/} 76SRCS+= ${ZFS_SRCS} 77SRCS+= vdev_geom.c 78SRCS+= trim_map.c 79 80# Use FreeBSD's namecache. 81CFLAGS+=-DFREEBSD_NAMECACHE 82 83CFLAGS+=-I${SYSDIR}/cddl/compat/opensolaris 84CFLAGS+=-I${SUNW}/uts/common/fs/zfs 85CFLAGS+=-I${SUNW}/uts/common/zmod 86CFLAGS+=-I${SUNW}/uts/common 87CFLAGS+=-I${SYSDIR} 88CFLAGS+=-I${SUNW}/common/zfs 89CFLAGS+=-I${SUNW}/common 90CFLAGS+=-DBUILDING_ZFS 91 92.if ${MACHINE_ARCH} == "powerpc64" 93CFLAGS+=-mminimal-toc 94.endif 95 96#CFLAGS+=-DDEBUG=1 97#DEBUG_FLAGS=-g 98 99.include <bsd.kmod.mk> 100 101CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h 102 103CWARNFLAGS+=-Wno-unknown-pragmas 104CWARNFLAGS+=-Wno-missing-prototypes 105CWARNFLAGS+=-Wno-undef 106CWARNFLAGS+=-Wno-strict-prototypes 107CWARNFLAGS+=-Wno-cast-qual 108CWARNFLAGS+=-Wno-parentheses 109CWARNFLAGS+=-Wno-redundant-decls 110CWARNFLAGS+=-Wno-missing-braces 111CWARNFLAGS+=-Wno-uninitialized 112CWARNFLAGS+=-Wno-unused 113CWARNFLAGS+=-Wno-inline 114CWARNFLAGS+=-Wno-switch 115CWARNFLAGS+=-Wno-pointer-arith 116