summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/Makefile
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-05-16 15:34:06 +0000
committerjhb <jhb@FreeBSD.org>2008-05-16 15:34:06 +0000
commit697ba009c1ef04ed9c402d207914b5edf574fad0 (patch)
treeb0307ce830d4958d3a7ad66908dcf16ee56adbdd /usr.bin/truss/Makefile
parent0e99128934a93076b49efa4bef1c1d97b81e3398 (diff)
downloadFreeBSD-src-697ba009c1ef04ed9c402d207914b5edf574fad0.zip
FreeBSD-src-697ba009c1ef04ed9c402d207914b5edf574fad0.tar.gz
Teach truss about 32-bit FreeBSD and Linux binaries on amd64. Some
additional work is needed to handle ABI-specific syscall argument parsing, but this gets the basic tracing working. MFC after: 1 week
Diffstat (limited to 'usr.bin/truss/Makefile')
-rw-r--r--usr.bin/truss/Makefile47
1 files changed, 35 insertions, 12 deletions
diff --git a/usr.bin/truss/Makefile b/usr.bin/truss/Makefile
index d1ae0ac..104cd96 100644
--- a/usr.bin/truss/Makefile
+++ b/usr.bin/truss/Makefile
@@ -4,23 +4,12 @@ WARNS?= 6
NO_WERROR=
PROG= truss
SRCS= main.c setup.c syscalls.c syscalls.h ioctl.c ${MACHINE_ARCH}-fbsd.c
-.if ${MACHINE_ARCH} == "i386"
-SRCS+= i386-linux.c linux_syscalls.h
-.endif
CFLAGS+= -I${.CURDIR} -I.
-CLEANFILES=i386l-syscalls.master syscalls.master linux_syscalls.h \
- syscalls.h ioctl.c
+CLEANFILES= syscalls.master syscalls.h ioctl.c
.SUFFIXES: .master
-i386l-syscalls.master: ${.CURDIR}/../../sys/i386/linux/syscalls.master
- cat ${.ALLSRC} > i386l-syscalls.master
-
-linux_syscalls.h: i386l-syscalls.master
- /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh i386l-syscalls.master \
- ${.CURDIR}/i386linux.conf
-
syscalls.master: ${.CURDIR}/../../sys/kern/syscalls.master
cat ${.ALLSRC} > syscalls.master
@@ -31,4 +20,38 @@ syscalls.h: syscalls.master
ioctl.c: ${.CURDIR}/../kdump/mkioctls
sh ${.CURDIR}/../kdump/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
+.if ${MACHINE_ARCH} == "i386"
+SRCS+= i386-linux.c linux_syscalls.h
+CLEANFILES+=i386l-syscalls.master linux_syscalls.h
+
+i386l-syscalls.master: ${.CURDIR}/../../sys/i386/linux/syscalls.master
+ cat ${.ALLSRC} > ${.TARGET}
+
+linux_syscalls.h: i386l-syscalls.master
+ /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
+ ${.CURDIR}/i386linux.conf
+.endif
+
+.if ${MACHINE_ARCH} == "amd64"
+SRCS+= amd64-linux32.c linux32_syscalls.h
+CLEANFILES+=amd64l32-syscalls.master linux32_syscalls.h
+
+amd64l32-syscalls.master: ${.CURDIR}/../../sys/amd64/linux32/syscalls.master
+ cat ${.ALLSRC} > ${.TARGET}
+
+linux32_syscalls.h: amd64l32-syscalls.master
+ /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
+ ${.CURDIR}/amd64linux32.conf
+
+SRCS+= amd64-fbsd32.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 <bsd.prog.mk>
OpenPOWER on IntegriCloud