Changeset View
Changeset View
Standalone View
Standalone View
lib/libsysdecode/Makefile
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | |||||
.if ${COMPAT_LIBCOMPAT:U} == "32" | .if ${COMPAT_LIBCOMPAT:U} == "32" | ||||
CPP+= -m32 | CPP+= -m32 | ||||
.endif | .endif | ||||
.if ${MK_PF} != "no" | .if ${MK_PF} != "no" | ||||
CFLAGS+=-DPF | CFLAGS+=-DPF | ||||
.endif | .endif | ||||
ZFSINC= ${SRCTOP}/sys/contrib/openzfs/include | |||||
.if ${MK_ZFS} != "no" | |||||
CFLAGS+=-DZFS -I${ZFSINC} | |||||
.endif | |||||
# Workaround duplicate declarations in <netinet/ip_compat.h> | # Workaround duplicate declarations in <netinet/ip_compat.h> | ||||
CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls | CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls | ||||
CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} | CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} | ||||
DEPENDOBJS+= tables.h tables_linux.h | DEPENDOBJS+= tables.h tables_linux.h | ||||
tables.h: mktables | tables.h: mktables | ||||
sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET} | sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET} | ||||
tables_linux.h: mklinuxtables | tables_linux.h: mklinuxtables | ||||
sh ${.CURDIR}/mklinuxtables ${SRCTOP}/sys ${.TARGET} | sh ${.CURDIR}/mklinuxtables ${SRCTOP}/sys ${.TARGET} | ||||
# mkioctls runs find(1) for headers so needs to rebuild every time. This used | # mkioctls runs find(1) for headers so needs to rebuild every time. This used | ||||
# to be a hack only done in buildworld. | # to be a hack only done in buildworld. | ||||
.if !defined(_SKIP_BUILD) | .if !defined(_SKIP_BUILD) | ||||
ioctl.c.tmp: .PHONY | ioctl.c.tmp: .PHONY | ||||
.endif | .endif | ||||
ioctl.c.tmp: mkioctls .META | ioctl.c.tmp: mkioctls .META | ||||
env CPP="${CPP}" MK_PF="${MK_PF}" \ | env CPP="${CPP}" MK_PF="${MK_PF}" \ | ||||
MK_ZFS="${MK_ZFS}" ZFSINC="${ZFSINC}" \ | |||||
/bin/sh ${.CURDIR}/mkioctls ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} > ${.TARGET} | /bin/sh ${.CURDIR}/mkioctls ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} > ${.TARGET} | ||||
ioctl.c: ioctl.c.tmp | ioctl.c: ioctl.c.tmp | ||||
if [ ! -e ${.TARGET} ] || ! cmp -s ${.TARGET} ${.TARGET}.tmp; then \ | if [ ! -e ${.TARGET} ] || ! cmp -s ${.TARGET} ${.TARGET}.tmp; then \ | ||||
mv -f ${.TARGET}.tmp ${.TARGET}; \ | mv -f ${.TARGET}.tmp ${.TARGET}; \ | ||||
fi | fi | ||||
beforedepend: ioctl.c tables.h tables_linux.h | beforedepend: ioctl.c tables.h tables_linux.h | ||||
HAS_TESTS= | HAS_TESTS= | ||||
SUBDIR.${MK_TESTS}+= tests | SUBDIR.${MK_TESTS}+= tests | ||||
.include <bsd.lib.mk> | .include <bsd.lib.mk> |