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