Merge from vendor branch GCC:
[dragonfly.git] / usr.bin / truss / Makefile
1 # $FreeBSD: src/usr.bin/truss/Makefile,v 1.10.2.2 2002/07/23 09:18:30 ru Exp $
2 # $DragonFly: src/usr.bin/truss/Makefile,v 1.5 2004/02/04 14:36:11 rob Exp $
3
4 PROG=   truss
5 SRCS=   main.c setup.c syscalls.c syscalls.h ioctl.c
6 .if (${MACHINE_ARCH} == "alpha")
7 SRCS+=  alpha-fbsd.c
8 .elif (${MACHINE_ARCH} == "i386")
9 SRCS+=  i386-fbsd.c i386-linux.c linux_syscalls.h
10 .endif
11
12 CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys -I.
13 # kernel files need __FreeBSD__ defined for now
14 CFLAGS+= -D__FreeBSD__
15 CLEANFILES+=i386l-syscalls.master syscalls.master linux_syscalls.h \
16         syscalls.h ioctl.c
17
18 .SUFFIXES: .master
19
20 i386l-syscalls.master:  ${.CURDIR}/../../sys/emulation/linux/i386/syscalls.master
21         cp ${.ALLSRC} i386l-syscalls.master
22
23 linux_syscalls.h:       i386l-syscalls.master
24         /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh i386l-syscalls.master \
25                 ${.CURDIR}/i386linux.conf
26
27 syscalls.master:        ${.CURDIR}/../../sys/kern/syscalls.master
28         cp ${.ALLSRC} syscalls.master
29
30 syscalls.h:     syscalls.master
31         /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh syscalls.master \
32                 ${.CURDIR}/i386.conf
33
34 ioctl.c: ${.CURDIR}/../kdump/mkioctls
35         sh ${.CURDIR}/../kdump/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
36
37 .include <bsd.prog.mk>