xref: /freebsd/cddl/lib/libspl/Makefile (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
1# $FreeBSD$
2
3.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl
4.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/os/freebsd
5.PATH: ${SRCTOP}/sys/contrib/openzfs/include
6
7
8LIB=	spl
9LIBADD=
10PACKAGE=	runtime
11
12SRCS = \
13        assert.c \
14        list.c \
15        mkdirp.c \
16        page.c \
17        timestamp.c \
18        zone.c \
19        include/sys/list.h \
20        include/sys/list_impl.h
21
22# These functions are not required when bootstrapping and the atomic code
23# will not compile when building on macOS.
24.if !defined(BOOTSTRAPPING)
25SRCS += \
26        getexecname.c \
27        gethostid.c \
28        getmntany.c \
29        mnttab.c
30
31
32.if ${MACHINE_ARCH} == "amd64"
33.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-x86_64
34SRCS += atomic.S
35.elif ${MACHINE_ARCH} == "i386"
36.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-i386
37SRCS += atomic.S
38.else
39.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-generic
40SRCS += atomic.c
41.endif
42.endif
43
44
45WARNS?=	2
46CSTD=	c99
47CFLAGS+= -DIN_BASE
48CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
49CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
50CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
51CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
52CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include
53CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
54CFLAGS+= -DHAVE_ISSETUGID
55CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
56CFLAGS.atomic.S+= -DLOCORE
57
58.include <bsd.lib.mk>
59