summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/Makefile
blob: b28098c802a8d00a61a90671e70af5f270d18678 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# $FreeBSD$

NO_WERROR=
PROG=	truss
SRCS=	cloudabi.c main.c setup.c syscalls.c

LIBADD=	sysdecode

CFLAGS+= -I${.CURDIR} -I. -I${.CURDIR}/../../sys

ABIS+=		freebsd
# Each ABI is expected to have an ABI.c, MACHINE_ARCH-ABI.c or
# MACHINE_CPUARCH-ABI.c file that will be used to map the syscall arguments.
.if ${MACHINE_ARCH} == "aarch64"
ABIS+=		cloudabi64
.endif
.if ${MACHINE_CPUARCH} == "i386"
ABIS+=		i386-linux
.endif
.if ${MACHINE_CPUARCH} == "amd64"
ABIS+=		amd64-linux32
ABIS+=		freebsd32
ABIS+=		cloudabi64
.endif
.if ${MACHINE_ARCH} == "powerpc64"
ABIS+=		freebsd32
.endif

.for abi in ${ABIS}
# Find the right file to handle this ABI.
abi_src=
ABI_SRCS=	${abi}.c ${MACHINE_ARCH}-${abi}.c ${MACHINE_CPUARCH}-${abi}.c
.for f in ${ABI_SRCS}
.if exists(${.CURDIR}/${f}) && empty(abi_src)
abi_src=	${f}
.endif
.endfor
SRCS:=		${SRCS} ${abi_src}
.endfor

.include <bsd.prog.mk>
OpenPOWER on IntegriCloud