diff options
Diffstat (limited to 'lib/libsysdecode/Makefile')
| -rw-r--r-- | lib/libsysdecode/Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile index 7f8175e7bd53..6fb32caebcb1 100644 --- a/lib/libsysdecode/Makefile +++ b/lib/libsysdecode/Makefile @@ -5,6 +5,10 @@ LIB= sysdecode SRCS= errno.c flags.c ioctl.c signal.c syscallnames.c utrace.c support.c +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "i386" +SRCS+= linux.c +.endif INCS= sysdecode.h CFLAGS+= -I${.OBJDIR} @@ -106,7 +110,7 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \ sysdecode_mask.3 sysdecode_wait4_options.3 \ sysdecode_mask.3 sysdecode_wait6_options.3 -CLEANFILES= ioctl.c ioctl.c.tmp tables.h +CLEANFILES= ioctl.c ioctl.c.tmp tables.h tables_linux.h .if defined(COMPAT_32BIT) CPP+= -m32 @@ -121,9 +125,11 @@ CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} -DEPENDOBJS+= tables.h +DEPENDOBJS+= tables.h tables_linux.h tables.h: mktables sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET} +tables_linux.h: mklinuxtables + sh ${.CURDIR}/mklinuxtables ${SRCTOP}/sys ${.TARGET} # mkioctls runs find(1) for headers so needs to rebuild every time. This used # to be a hack only done in buildworld. @@ -139,7 +145,7 @@ ioctl.c: ioctl.c.tmp mv -f ${.TARGET}.tmp ${.TARGET}; \ fi -beforedepend: ioctl.c tables.h +beforedepend: ioctl.c tables.h tables_linux.h HAS_TESTS= SUBDIR.${MK_TESTS}+= tests |
