xref: /freebsd/sys/modules/zfs/Makefile (revision 526e1dc1c0d052b9d2a6cd6da7a16eb09c971c54)
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_zone.c
32
33_A=${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic
34.if exists(${_A}/${MACHINE_CPUARCH}/opensolaris_atomic.S)
35.PATH:	${_A}/${MACHINE_CPUARCH}
36SRCS+=		opensolaris_atomic.S
37.elif exists(${_A}/${MACHINE_ARCH}/opensolaris_atomic.S)
38.PATH:	${_A}/${MACHINE_ARCH}
39SRCS+=		opensolaris_atomic.S
40.else
41SRCS+=		opensolaris_atomic.c
42.endif
43
44.PATH:	${SUNW}/uts/common/fs
45SRCS+=	gfs.c
46SRCS+=	vnode.c
47
48.PATH:	${SUNW}/uts/common/os
49SRCS+=	callb.c
50SRCS+=	fm.c
51SRCS+=	list.c
52SRCS+=	nvpair_alloc_system.c
53
54.PATH:	${SUNW}/uts/common/zmod
55SRCS+=	adler32.c
56SRCS+=	opensolaris_crc32.c
57SRCS+=	deflate.c
58SRCS+=	inffast.c
59SRCS+=	inflate.c
60SRCS+=	inftrees.c
61SRCS+=	trees.c
62SRCS+=	zmod.c
63SRCS+=	zmod_subr.c
64SRCS+=	zutil.c
65
66.PATH:	${.CURDIR}/../../crypto/sha2
67SRCS+=	sha2.c
68
69.PATH:	${SUNW}/common/zfs
70.include "${SUNW}/uts/common/Makefile.files"
71.PATH:	${SUNW}/uts/common/fs/zfs
72ZFS_SRCS=	${ZFS_OBJS:C/.o$/.c/}
73SRCS+=	${ZFS_SRCS}
74SRCS+=	vdev_geom.c
75SRCS+=	trim_map.c
76
77# Use FreeBSD's namecache.
78CFLAGS+=-DFREEBSD_NAMECACHE
79
80CFLAGS+=-I${.CURDIR}/../../cddl/compat/opensolaris
81CFLAGS+=-I${SUNW}/uts/common/fs/zfs
82CFLAGS+=-I${SUNW}/uts/common/zmod
83CFLAGS+=-I${SUNW}/uts/common
84CFLAGS+=-I${.CURDIR}/../..
85CFLAGS+=-I${SUNW}/common/zfs
86CFLAGS+=-I${SUNW}/common
87CFLAGS+=-DBUILDING_ZFS
88
89.if ${MACHINE_ARCH} == "powerpc64"
90CFLAGS+=-mminimal-toc
91.endif
92
93#CFLAGS+=-DDEBUG=1
94#DEBUG_FLAGS=-g
95
96.include <bsd.kmod.mk>
97
98CWARNFLAGS+=-Wno-unknown-pragmas
99CWARNFLAGS+=-Wno-missing-prototypes
100CWARNFLAGS+=-Wno-undef
101CWARNFLAGS+=-Wno-strict-prototypes
102CWARNFLAGS+=-Wno-cast-qual
103CWARNFLAGS+=-Wno-parentheses
104CWARNFLAGS+=-Wno-redundant-decls
105CWARNFLAGS+=-Wno-missing-braces
106CWARNFLAGS+=-Wno-uninitialized
107CWARNFLAGS+=-Wno-unused
108CWARNFLAGS+=-Wno-inline
109CWARNFLAGS+=-Wno-switch
110CWARNFLAGS+=-Wno-pointer-arith
111