2015-12-15 00:05:07 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
.include <src.opts.mk>
|
|
|
|
|
2016-02-04 21:16:35 +00:00
|
|
|
PACKAGE=lib${LIB}
|
2015-12-15 00:05:07 +00:00
|
|
|
LIB= sysdecode
|
|
|
|
|
2016-02-23 20:00:55 +00:00
|
|
|
SRCS= errno.c ioctl.c syscallnames.c utrace.c
|
2015-12-15 00:05:07 +00:00
|
|
|
INCS= sysdecode.h
|
|
|
|
|
2016-01-26 19:07:09 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../sys
|
2016-08-12 19:31:41 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../libexec/rtld-elf
|
2016-01-26 19:07:09 +00:00
|
|
|
|
2015-12-15 00:05:07 +00:00
|
|
|
MAN+= sysdecode.3 \
|
2016-02-23 20:00:55 +00:00
|
|
|
sysdecode_abi_to_freebsd_errno.3 \
|
2015-12-22 20:33:49 +00:00
|
|
|
sysdecode_ioctlname.3 \
|
2016-01-26 19:07:09 +00:00
|
|
|
sysdecode_syscallnames.3 \
|
2015-12-15 00:05:07 +00:00
|
|
|
sysdecode_utrace.3
|
2016-02-23 20:00:55 +00:00
|
|
|
MLINKS+= sysdecode_abi_to_freebsd_errno.3 sysdecode_freebsd_to_abi_errno.3
|
2015-12-15 00:05:07 +00:00
|
|
|
|
2015-12-22 20:33:49 +00:00
|
|
|
CLEANFILES= ioctl.c
|
|
|
|
|
|
|
|
.if defined(COMPAT_32BIT)
|
|
|
|
CPP+= -m32
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MK_PF} != "no"
|
|
|
|
CFLAGS+=-DPF
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Workaround duplicate declarations in <netinet/ip_compat.h>
|
|
|
|
CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls
|
2016-01-26 19:07:09 +00:00
|
|
|
|
|
|
|
# Workaround warning for unused ssi_cables[] in <dev/lmc/if_lmc.h>
|
|
|
|
CFLAGS.gcc.ioctl.c+= -Wno-unused
|
|
|
|
|
2015-12-22 20:33:49 +00:00
|
|
|
CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}}
|
|
|
|
|
|
|
|
ioctl.c: mkioctls
|
|
|
|
env MACHINE=${MACHINE} CPP="${CPP}" \
|
|
|
|
/bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > ${.TARGET}
|
|
|
|
|
|
|
|
beforedepend: ioctl.c
|
|
|
|
|
2015-12-15 00:05:07 +00:00
|
|
|
.include <bsd.lib.mk>
|