1# $FreeBSD$ 2 3.include "${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/Makefile.files" 4 5# ZFS_COMMON_SRCS 6.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs 7# ZFS_SHARED_SRCS 8.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs 9# KERNEL_SRCS 10.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common 11# LIST_SRCS 12.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/os 13# ATOMIC_SRCS 14.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc64" 15.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} 16ATOMIC_SRCS= opensolaris_atomic.S 17.else 18.PATH: ${.CURDIR}/../../../sys/cddl/compat/opensolaris/kern 19ATOMIC_SRCS= opensolaris_atomic.c 20.endif 21# UNICODE_SRCS 22.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/unicode 23 24LIB= zpool 25 26ZFS_COMMON_SRCS= ${ZFS_COMMON_OBJS:C/.o$/.c/} vdev_file.c 27ZFS_SHARED_SRCS= ${ZFS_SHARED_OBJS:C/.o$/.c/} 28KERNEL_SRCS= kernel.c taskq.c util.c 29LIST_SRCS= list.c 30UNICODE_SRCS= u8_textprep.c 31 32SRCS= ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} \ 33 ${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS} \ 34 ${UNICODE_SRCS} 35 36WARNS?= 0 37CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris 38CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include 39CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem 40CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common 41CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys 42CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs 43CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs 44CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common 45CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head 46CFLAGS+= -I${.CURDIR}/../../../cddl/lib/libumem 47CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair 48# XXX: pthread doesn't have mutex_owned() equivalent, so we need to look 49# into libthr private structures. That's sooo evil, but it's only for 50# ZFS debugging tools needs. 51CFLAGS+= -DWANTS_MUTEX_OWNED 52CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/thread 53CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys 54CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include 55 56DPADD= ${LIBPTHREAD} ${LIBZ} 57LDADD= -lpthread -lz 58 59# atomic.S doesn't like profiling. 60NO_PROFILE= 61 62CSTD= c99 63 64.include <bsd.lib.mk> 65