freebsd-skq/sys/modules/opensolaris/Makefile
avg a07c9d34c3 opensolaris code: translate INVARIANTS to DEBUG and ZFS_DEBUG
Do this by forcing inclusion of
sys/cddl/compat/opensolaris/sys/debug_compat.h
via -include option into all source files from OpenSolaris.
Note that this -include option must always be after -include opt_global.h.

Additionally, remove forced definition of DEBUG for some modules and fix
their build without DEBUG.

Also, meaning of DEBUG was overloaded to enable WITNESS support for some
OpenSolaris (primarily ZFS) locks.  Now this overloading is removed and
that use of DEBUG is replaced with a new option OPENSOLARIS_WITNESS.

MFC after:	17 days
2013-08-06 15:51:56 +00:00

32 lines
798 B
Makefile

# $FreeBSD$
.PATH: ${.CURDIR}/../../cddl/compat/opensolaris/kern
KMOD= opensolaris
SRCS= opensolaris.c \
opensolaris_cmn_err.c \
opensolaris_kmem.c \
opensolaris_misc.c \
opensolaris_sunddi.c
_A=${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic
.if exists(${_A}/${MACHINE_CPUARCH}/opensolaris_atomic.S)
.PATH: ${_A}/${MACHINE_CPUARCH}
SRCS+= opensolaris_atomic.S
.elif exists(${_A}/${MACHINE_ARCH}/opensolaris_atomic.S)
.PATH: ${_A}/${MACHINE_ARCH}
SRCS+= opensolaris_atomic.S
.else
SRCS+= opensolaris_atomic.c
.endif
CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris \
-I${.CURDIR}/../../cddl/contrib/opensolaris/uts/common \
-I${.CURDIR}/../..
IGNORE_PRAGMA= 1
.include <bsd.kmod.mk>
CFLAGS+= -include ${.CURDIR}/../../cddl/compat/opensolaris/sys/debug_compat.h