summaryrefslogtreecommitdiff
path: root/cddl/lib/libspl/Makefile
blob: b0f47172e52d69b6f5c2af2cf25ac8b8772b0745 (plain)
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
.include <bsd.init.mk>
.include <bsd.compiler.mk>

.PATH: ${ZFSTOP}/lib/libspl
.PATH: ${ZFSTOP}/include

PACKAGE=	zfs
LIB_PACKAGE=

LIB=	spl
LIBADD=

SRCS = \
        assert.c \
	backtrace.c \
	condvar.c \
	kmem.c \
	libspl.c \
        list.c \
        mkdirp.c \
        mutex.c \
        os/freebsd/zone.c \
        page.c \
	procfs_list.c \
	random.c \
	rwlock.c \
	sid.c \
	taskq.c \
        timestamp.c \
        include/sys/list.h \
        include/sys/list_impl.h

# These functions are not required when bootstrapping and the atomic code,
# among others, will not compile when building on macOS.
.if !defined(BOOTSTRAPPING)
SRCS += \
        atomic.c \
	cred.c \
        getexecname.c \
	kstat.c \
	thread.c \
        tunables.c \
        os/freebsd/getexecname.c \
        os/freebsd/gethostid.c \
        os/freebsd/getmntany.c \
        os/freebsd/mnttab.c
.endif

WARNS?=	2
CSTD=	c99
CFLAGS+= -DIN_BASE
CFLAGS+= -I${ZFSTOP}/include
CFLAGS+= -I${ZFSTOP}/lib/libspl/include/
CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd
CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
CFLAGS+= -I${ZFSTOP}/module/icp/include
CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h
CFLAGS+= -DHAVE_ISSETUGID
CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
.if ${COMPILER_TYPE} == "clang"
CFLAGS.atomic.c+=	-Wno-error=atomic-alignment
.endif

.include <bsd.lib.mk>