Makefile revision 211935
1# $FreeBSD: head/usr.bin/truss/Makefile 211935 2010-08-28 15:04:53Z nwhitehorn $
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	sh ${.CURDIR}/../kdump/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
27
28.if ${MACHINE_CPUARCH} == "i386"
29SRCS+=	i386-linux.c linux_syscalls.h
30CLEANFILES+=i386l-syscalls.master linux_syscalls.h
31
32i386l-syscalls.master:	${.CURDIR}/../../sys/i386/linux/syscalls.master
33	cat ${.ALLSRC} > ${.TARGET}
34
35linux_syscalls.h:	i386l-syscalls.master
36	/bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
37		${.CURDIR}/i386linux.conf
38.endif
39
40.if ${MACHINE_CPUARCH} == "amd64"
41SRCS+=	amd64-linux32.c linux32_syscalls.h
42CLEANFILES+=amd64l32-syscalls.master linux32_syscalls.h
43
44amd64l32-syscalls.master: ${.CURDIR}/../../sys/amd64/linux32/syscalls.master
45	cat ${.ALLSRC} > ${.TARGET}
46
47linux32_syscalls.h:	amd64l32-syscalls.master
48	/bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
49		${.CURDIR}/amd64linux32.conf
50
51SRCS+=	amd64-fbsd32.c freebsd32_syscalls.h
52CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h
53
54fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master
55	cat ${.ALLSRC} > ${.TARGET}
56
57freebsd32_syscalls.h:	fbsd32-syscalls.master
58	/bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
59		${.CURDIR}/fbsd32.conf
60.endif
61
62.if ${MACHINE_ARCH} == "powerpc64"
63SRCS+=	powerpc-fbsd.c freebsd32_syscalls.h
64CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h
65
66fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master
67	cat ${.ALLSRC} > ${.TARGET}
68
69freebsd32_syscalls.h:	fbsd32-syscalls.master
70	/bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
71		${.CURDIR}/fbsd32.conf
72.endif
73
74.include <bsd.prog.mk>
75