xref: /freebsd/usr.bin/truss/Makefile (revision 342af4d5efec74bb4bc11261fdd9991c53616f54)
1# $FreeBSD$
2
3NO_WERROR=
4PROG=	truss
5SRCS=	main.c setup.c syscalls.c
6
7LIBADD=	sysdecode
8
9CFLAGS+= -I${.CURDIR} -I. -I${.CURDIR}/../../sys
10
11ABIS+=		freebsd
12# Each ABI is expected to have an ABI.c, MACHINE_ARCH-ABI.c or
13# MACHINE_CPUARCH-ABI.c file that will be used to map the syscall arguments.
14.if ${MACHINE_ARCH} == "aarch64"
15ABIS+=		cloudabi64
16.endif
17.if ${MACHINE_CPUARCH} == "i386"
18ABIS+=		i386-linux
19.endif
20.if ${MACHINE_CPUARCH} == "amd64"
21ABIS+=		amd64-linux32
22ABIS+=		freebsd32
23ABIS+=		cloudabi64
24.endif
25.if ${MACHINE_ARCH} == "powerpc64"
26ABIS+=		freebsd32
27.endif
28
29.for abi in ${ABIS}
30# Find the right file to handle this ABI.
31abi_src=
32ABI_SRCS=	${abi}.c ${MACHINE_ARCH}-${abi}.c ${MACHINE_CPUARCH}-${abi}.c
33.for f in ${ABI_SRCS}
34.if exists(${.CURDIR}/${f}) && empty(abi_src)
35abi_src=	${f}
36.endif
37.endfor
38SRCS:=		${SRCS} ${abi_src}
39.endfor
40
41.include <bsd.prog.mk>
42