1# $FreeBSD: releng/11.0/usr.bin/truss/Makefile 301715 2016-06-09 02:21:07Z jhb $
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-linux
22ABIS+=		amd64-linux32
23ABIS+=		freebsd32
24ABIS+=		cloudabi64
25.endif
26.if ${MACHINE_ARCH} == "powerpc64"
27ABIS+=		freebsd32
28.endif
29
30.for abi in ${ABIS}
31# Find the right file to handle this ABI.
32abi_src=
33ABI_SRCS=	${abi}.c ${MACHINE_ARCH}-${abi}.c ${MACHINE_CPUARCH}-${abi}.c
34.for f in ${ABI_SRCS}
35.if exists(${.CURDIR}/${f}) && empty(abi_src)
36abi_src=	${f}
37.endif
38.endfor
39SRCS:=		${SRCS} ${abi_src}
40.endfor
41
42.include <bsd.prog.mk>
43