]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - cddl/lib/libzpool/Makefile
Merge ZFS feature flags support and related bugfixes:
[FreeBSD/stable/8.git] / cddl / lib / libzpool / Makefile
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 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
19 .endif
20 .else
21 .PATH: ${.CURDIR}/../../../sys/cddl/compat/opensolaris/kern
22 ATOMIC_SRCS=    opensolaris_atomic.c
23 .endif
24 # UNICODE_SRCS
25 .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/unicode
26
27 LIB=            zpool
28
29 ZFS_COMMON_SRCS= ${ZFS_COMMON_OBJS:C/.o$/.c/} vdev_file.c
30 ZFS_SHARED_SRCS= ${ZFS_SHARED_OBJS:C/.o$/.c/}
31 KERNEL_SRCS=    kernel.c taskq.c util.c
32 LIST_SRCS=      list.c
33 UNICODE_SRCS=   u8_textprep.c
34
35 SRCS=           ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} \
36                 ${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS} \
37                 ${UNICODE_SRCS}
38
39 CFLAGS+=        -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
40 CFLAGS+=        -I${.CURDIR}/../../compat/opensolaris/include
41 CFLAGS+=        -I${.CURDIR}/../../compat/opensolaris/lib/libumem
42 CFLAGS+=        -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
43 CFLAGS+=        -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
44 CFLAGS+=        -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
45 CFLAGS+=        -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
46 CFLAGS+=        -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
47 CFLAGS+=        -I${.CURDIR}/../../contrib/opensolaris/head
48 CFLAGS+=        -I${.CURDIR}/../../lib/libumem
49 CFLAGS+=        -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
50 # XXX: pthread doesn't have mutex_owned() equivalent, so we need to look
51 #      into libthr private structures. That's sooo evil, but it's only for
52 #      ZFS debugging tools needs.
53 CFLAGS+=        -DWANTS_MUTEX_OWNED
54 CFLAGS+=        -I${.CURDIR}/../../../lib/libpthread/thread
55 CFLAGS+=        -I${.CURDIR}/../../../lib/libpthread/sys
56 CFLAGS+=        -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_ARCH}/include
57
58 DPADD=          ${LIBMD} ${LIBPTHREAD} ${LIBZ}
59 LDADD=          -lmd -lpthread -lz
60
61 # atomic.S doesn't like profiling.
62 NO_PROFILE=
63
64 CSTD=   c99
65
66 CFLAGS+=        -DDEBUG=1
67 #DEBUG_FLAGS+=  -g
68
69 .include <bsd.lib.mk>