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+= zmod.c 59 60.PATH: ${SYSDIR}/crypto/sha2 61SRCS+= sha256c.c sha512c.c 62 63.PATH: ${SYSDIR}/crypto/skein 64SRCS+= skein.c skein_block.c 65 66.PATH: ${SUNW}/common/zfs 67.include "${SUNW}/uts/common/Makefile.files" 68.PATH: ${SUNW}/uts/common/fs/zfs 69ZFS_SRCS= ${ZFS_OBJS:C/.o$/.c/} 70SRCS+= ${ZFS_SRCS} 71SRCS+= vdev_geom.c 72SRCS+= trim_map.c 73.PATH: ${SUNW}/uts/common/fs/zfs/lua 74LUA_SRCS= ${LUA_OBJS:C/.o$/.c/} 75SRCS+= ${LUA_SRCS} 76 77# Use FreeBSD's namecache. 78CFLAGS+=-DFREEBSD_NAMECACHE 79 80CFLAGS+=-I${SYSDIR}/cddl/compat/opensolaris 81CFLAGS+=-I${SUNW}/uts/common/fs/zfs 82CFLAGS+=-I${SUNW}/uts/common/fs/zfs/lua 83CFLAGS+=-I${SUNW}/uts/common/zmod 84CFLAGS+=-I${SUNW}/uts/common 85CFLAGS+=-I${SYSDIR} 86CFLAGS+=-I${SUNW}/common/zfs 87CFLAGS+=-I${SUNW}/common 88CFLAGS+=-DBUILDING_ZFS 89CFLAGS.gcc+=-fms-extensions 90 91.if ${MACHINE_ARCH} == "powerpc64" 92CFLAGS.gcc+=-mminimal-toc 93.endif 94 95.ifdef ZFS_DEBUG 96CFLAGS+=-DDEBUG=1 97DEBUG_FLAGS=-g 98.endif 99 100.include <bsd.kmod.mk> 101 102CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h 103 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