aboutsummaryrefslogtreecommitdiff
path: root/cddl/lib/libzfs/Makefile
blob: cd30840c5b2c88d00673d9dccba4b4690e678ef9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# $FreeBSD$

.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon
.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs
.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs/os/freebsd
.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare
.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare/os/freebsd
.PATH: ${SRCTOP}/sys/contrib/openzfs/include
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib

PACKAGE=	runtime
LIB=	zfs
LIBADD= \
	avl \
	bsdxml \
	crypto \
	geom \
	m \
	md \
	nvpair \
	pthread \
	umem \
	util \
	uutil \
	z \
	zfs_core \
	zutil

INCS=	libzfs.h
USER_C = \
        libzfs_changelist.c \
        libzfs_config.c \
        libzfs_crypto.c \
        libzfs_dataset.c \
        libzfs_diff.c \
        libzfs_import.c \
        libzfs_iter.c \
        libzfs_mount.c \
        libzfs_pool.c \
        libzfs_sendrecv.c \
        libzfs_status.c \
        libzfs_util.c

# FreeBSD
USER_C += \
        libzfs_compat.c \
        libzfs_ioctl_compat.c \
        libzfs_zmount.c

# libshare
USER_C += \
	libshare.c \
	nfs.c \
	smb.c


KERNEL_C = \
        algs/sha2/sha2.c \
        cityhash.c \
        zfeature_common.c \
        zfs_comutil.c \
        zfs_deleg.c \
        zfs_fletcher.c \
        zfs_fletcher_superscalar.c \
        zfs_fletcher_superscalar4.c \
        zfs_namecheck.c \
        zfs_prop.c \
        zfs_uio.c \
        zpool_prop.c \
        zprop_common.c


ARCH_C =
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
ARCH_C += 	zfs_fletcher_intel.c \
		zfs_fletcher_sse.c 
CFLAGS +=  -DHAVE_SSE2
.endif
.if ${MACHINE_ARCH} == "amd64"
ARCH_C +=	zfs_fletcher_avx512.c
CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_AVX512F
.endif
.if ${MACHINE_ARCH} == "aarch64"
ARCH_C +=	zfs_fletcher_aarch64_neon.c
.endif

SRCS= $(USER_C) $(KERNEL_C) $(ARCH_C)

WARNS?=	2
SHLIB_MAJOR= 4
CSTD=	c99
CFLAGS+= -DIN_BASE
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libshare
CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include
CFLAGS+= -I${SRCTOP}/sys
CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include
CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
CFLAGS+= -DHAVE_ISSETUGID
CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h


.include <bsd.lib.mk>