]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.bin/truss/Makefile
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.bin / truss / Makefile
1 # $FreeBSD$
2
3 NO_WERROR=
4 PROG=   truss
5 SRCS=   main.c setup.c syscalls.c syscalls.h ioctl.c
6
7 .if exists(${.CURDIR}/${MACHINE_ARCH}-fbsd.c)
8 SRCS+= ${MACHINE_ARCH}-fbsd.c
9 .else
10 SRCS+= ${MACHINE_CPUARCH}-fbsd.c
11 .endif
12
13 CFLAGS+= -I${.CURDIR} -I.
14 CLEANFILES= syscalls.master syscalls.h ioctl.c
15
16 .SUFFIXES: .master
17
18 syscalls.master:        ${.CURDIR}/../../sys/kern/syscalls.master
19         cat ${.ALLSRC} > syscalls.master
20
21 syscalls.h:     syscalls.master
22         /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh syscalls.master \
23                 ${.CURDIR}/i386.conf
24
25 ioctl.c: ${.CURDIR}/../kdump/mkioctls
26         env CPP="${CPP}" \
27             sh ${.CURDIR}/../kdump/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
28
29 .if ${MACHINE_CPUARCH} == "i386"
30 SRCS+=  i386-linux.c linux_syscalls.h
31 CLEANFILES+=i386l-syscalls.master linux_syscalls.h
32
33 i386l-syscalls.master:  ${.CURDIR}/../../sys/i386/linux/syscalls.master
34         cat ${.ALLSRC} > ${.TARGET}
35
36 linux_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"
42 SRCS+=  amd64-linux32.c linux32_syscalls.h
43 CLEANFILES+=amd64l32-syscalls.master linux32_syscalls.h
44
45 amd64l32-syscalls.master: ${.CURDIR}/../../sys/amd64/linux32/syscalls.master
46         cat ${.ALLSRC} > ${.TARGET}
47
48 linux32_syscalls.h:     amd64l32-syscalls.master
49         /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
50                 ${.CURDIR}/amd64linux32.conf
51
52 SRCS+=  amd64-fbsd32.c freebsd32_syscalls.h
53 CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h
54
55 fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master
56         cat ${.ALLSRC} > ${.TARGET}
57
58 freebsd32_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"
64 SRCS+=  powerpc-fbsd.c freebsd32_syscalls.h
65 CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h
66
67 fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master
68         cat ${.ALLSRC} > ${.TARGET}
69
70 freebsd32_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>