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