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}${INCLUDEDIR} > ${.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 62SRCS+= amd64-cloudabi64.c cloudabi64_syscalls.h 63CLEANFILES+=amd64cloudabi64-syscalls.master cloudabi64_syscalls.h 64 65amd64cloudabi64-syscalls.master: ${.CURDIR}/../../sys/compat/cloudabi64/syscalls.master 66 cat ${.ALLSRC} > ${.TARGET} 67 68cloudabi64_syscalls.h: amd64cloudabi64-syscalls.master 69 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ 70 ${.CURDIR}/amd64cloudabi64.conf 71.endif 72 73.if ${MACHINE_ARCH} == "powerpc64" 74SRCS+= powerpc-fbsd.c freebsd32_syscalls.h 75CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h 76 77fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master 78 cat ${.ALLSRC} > ${.TARGET} 79 80freebsd32_syscalls.h: fbsd32-syscalls.master 81 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ 82 ${.CURDIR}/fbsd32.conf 83.endif 84 85.include <bsd.prog.mk> 86