3 .include "${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/Makefile.files"
6 .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
8 .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
10 .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
12 .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/os
14 .if exists(${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S)
15 .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}
16 ATOMIC_SRCS= opensolaris_atomic.S
17 .if ${MACHINE_ARCH} != "ia64" && ${MACHINE_ARCH} != "sparc64"
18 ACFLAGS+= -Wa,--noexecstack
21 .PATH: ${.CURDIR}/../../../sys/cddl/compat/opensolaris/kern
22 ATOMIC_SRCS= opensolaris_atomic.c
25 .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/unicode
29 ZFS_COMMON_SRCS= ${ZFS_COMMON_OBJS:C/.o$/.c/} vdev_file.c trim_map.c
30 ZFS_SHARED_SRCS= ${ZFS_SHARED_OBJS:C/.o$/.c/}
31 KERNEL_SRCS= kernel.c taskq.c util.c
33 UNICODE_SRCS= u8_textprep.c
35 SRCS= ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} \
36 ${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS} \
40 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
41 CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
42 CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
43 CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
44 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
45 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
46 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
47 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
48 CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head
49 CFLAGS+= -I${.CURDIR}/../../lib/libumem
50 CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
51 # XXX: pthread doesn't have mutex_owned() equivalent, so we need to look
52 # into libthr private structures. That's sooo evil, but it's only for
53 # ZFS debugging tools needs.
54 CFLAGS+= -DWANTS_MUTEX_OWNED
55 CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/thread
56 CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys
57 CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include
59 DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ}
60 LDADD= -lmd -lpthread -lz
62 # atomic.S doesn't like profiling.
67 # Since there are many asserts in this library, it makes no sense to compile
68 # it without debugging.