1# $FreeBSD$ 2 3NO_WERROR= 4PROG= truss 5SRCS= main.c setup.c syscalls.c syscalls.h ioctl.c 6 7.if exists(${.CURDIR}/${MACHINE_ARCH}-fbsd.c) 8SRCS+= ${MACHINE_ARCH}-fbsd.c 9.else 10SRCS+= ${MACHINE_CPUARCH}-fbsd.c 11.endif 12 13CFLAGS+= -I${.CURDIR} -I. 14CLEANFILES= syscalls.master syscalls.h ioctl.c 15 16.SUFFIXES: .master 17 18syscalls.master: ${.CURDIR}/../../sys/kern/syscalls.master 19 cat ${.ALLSRC} > syscalls.master 20 21syscalls.h: syscalls.master 22 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh syscalls.master \ 23 ${.CURDIR}/i386.conf 24 25ioctl.c: ${.CURDIR}/../kdump/mkioctls 26 env MACHINE=${MACHINE} CPP="${CPP}" \ 27 /bin/sh ${.CURDIR}/../kdump/mkioctls return ${DESTDIR}/usr/include > ${.TARGET} 28 29.if ${MACHINE_CPUARCH} == "i386" 30SRCS+= i386-linux.c linux_syscalls.h 31CLEANFILES+=i386l-syscalls.master linux_syscalls.h 32 33i386l-syscalls.master: ${.CURDIR}/../../sys/i386/linux/syscalls.master 34 cat ${.ALLSRC} > ${.TARGET} 35 36linux_syscalls.h: i386l-syscalls.master 37 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ 38 ${.CURDIR}/i386linux.conf 39.endif 40 41.if ${MACHINE_CPUARCH} == "amd64" 42SRCS+= amd64-linux32.c linux32_syscalls.h 43CLEANFILES+=amd64l32-syscalls.master linux32_syscalls.h 44 45amd64l32-syscalls.master: ${.CURDIR}/../../sys/amd64/linux32/syscalls.master 46 cat ${.ALLSRC} > ${.TARGET} 47 48linux32_syscalls.h: amd64l32-syscalls.master 49 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ 50 ${.CURDIR}/amd64linux32.conf 51 52SRCS+= amd64-fbsd32.c freebsd32_syscalls.h 53CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h 54 55fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master 56 cat ${.ALLSRC} > ${.TARGET} 57 58freebsd32_syscalls.h: fbsd32-syscalls.master 59 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ 60 ${.CURDIR}/fbsd32.conf 61.endif 62 63.if ${MACHINE_ARCH} == "powerpc64" 64SRCS+= powerpc-fbsd.c freebsd32_syscalls.h 65CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h 66 67fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master 68 cat ${.ALLSRC} > ${.TARGET} 69 70freebsd32_syscalls.h: fbsd32-syscalls.master 71 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ 72 ${.CURDIR}/fbsd32.conf 73.endif 74 75.include <bsd.prog.mk> 76