From 7ce28b7066d5299134f831d522470bcecba74fce Mon Sep 17 00:00:00 2001 From: nwhitehorn Date: Sat, 28 Aug 2010 15:04:53 +0000 Subject: Fix breakage introduced in r211725 and improve functionality of truss on 64-bit powerpc by adding 32-bit compatibility features. --- usr.bin/truss/Makefile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'usr.bin/truss/Makefile') diff --git a/usr.bin/truss/Makefile b/usr.bin/truss/Makefile index ca0ce92..f80ac03 100644 --- a/usr.bin/truss/Makefile +++ b/usr.bin/truss/Makefile @@ -2,7 +2,13 @@ NO_WERROR= PROG= truss -SRCS= main.c setup.c syscalls.c syscalls.h ioctl.c ${MACHINE_CPUARCH}-fbsd.c +SRCS= main.c setup.c syscalls.c syscalls.h ioctl.c + +.if exists(${.CURDIR}/${MACHINE_ARCH}-fbsd.c) +SRCS+= ${MACHINE_ARCH}-fbsd.c +.else +SRCS+= ${MACHINE_CPUARCH}-fbsd.c +.endif CFLAGS+= -I${.CURDIR} -I. CLEANFILES= syscalls.master syscalls.h ioctl.c @@ -53,4 +59,16 @@ freebsd32_syscalls.h: fbsd32-syscalls.master ${.CURDIR}/fbsd32.conf .endif +.if ${MACHINE_ARCH} == "powerpc64" +SRCS+= powerpc-fbsd.c freebsd32_syscalls.h +CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h + +fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master + cat ${.ALLSRC} > ${.TARGET} + +freebsd32_syscalls.h: fbsd32-syscalls.master + /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ + ${.CURDIR}/fbsd32.conf +.endif + .include -- cgit v1.1