mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-24 17:44:17 +01:00
968a3db715
Systems that predate 971bac5ace
("kbd: consolidate kb interfaces
(phase one)") cannot build kbdcontrol since kbdelays and kbrates moved
to sys/kbio.h. Moreover, on non-FreeBSD, it requires all kinds of ioctls
and sysctls that are highly FreeBSD-specific to build, but we use it as
a bootstrap tool to generate the keymaps used by some kernels (LINT ones
in particular). Thus, when bootstrapping kbdcontrol, disable everything
that's not needed for that singular use, and use the in-tree kbio.h to
get the definitions of the necessary structures.
This allows KBDMUX_DFLT_KEYMAP, UKBD_DFLT_KEYMAP and ATKBD_DFLT_KEYMAP
to be enabled when building on non-FreeBSD, and thus LINT kernels.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D41541
20 lines
386 B
Makefile
20 lines
386 B
Makefile
|
|
PACKAGE= console-tools
|
|
PROG= kbdcontrol
|
|
MAN= kbdcontrol.1 kbdmap.5
|
|
MLINKS= kbdmap.5 keymap.5
|
|
SRCS= kbdcontrol.c lex.l
|
|
|
|
WARNS?= 4
|
|
CFLAGS+= -I${.CURDIR}
|
|
|
|
.ifdef BOOTSTRAPPING
|
|
# Provide minimal load and dump functionality
|
|
CFLAGS+= -DBOOTSTRAP_KBDCONTROL
|
|
.else
|
|
# temporarily added for pre-Unicode accent key API/ABI compatibility
|
|
CFLAGS+= -DCOMPAT_FREEBSD13
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|