1999-11-14 13:54:44 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2004-10-24 15:33:08 +00:00
|
|
|
NO_WERROR=
|
1997-12-06 05:23:12 +00:00
|
|
|
PROG= truss
|
2015-12-22 20:33:49 +00:00
|
|
|
SRCS= cloudabi.c main.c setup.c syscalls.c
|
1998-10-03 00:43:05 +00:00
|
|
|
|
2015-12-15 00:05:07 +00:00
|
|
|
LIBADD= sysdecode
|
2015-10-06 21:58:38 +00:00
|
|
|
|
2015-10-08 05:27:45 +00:00
|
|
|
CFLAGS+= -I${.CURDIR} -I. -I${.CURDIR}/../../sys
|
1997-12-06 06:51:14 +00:00
|
|
|
|
2015-10-13 18:23:51 +00:00
|
|
|
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.
|
2015-10-30 08:11:37 +00:00
|
|
|
.if ${MACHINE_ARCH} == "aarch64"
|
|
|
|
ABIS+= cloudabi64
|
|
|
|
.endif
|
2015-10-13 18:23:51 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "i386"
|
|
|
|
ABIS+= i386-linux
|
2008-05-16 15:34:06 +00:00
|
|
|
.endif
|
2010-08-23 22:24:11 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "amd64"
|
2015-10-13 18:23:51 +00:00
|
|
|
ABIS+= amd64-linux32
|
|
|
|
ABIS+= freebsd32
|
|
|
|
ABIS+= cloudabi64
|
2008-05-16 15:34:06 +00:00
|
|
|
.endif
|
2010-08-28 15:04:53 +00:00
|
|
|
.if ${MACHINE_ARCH} == "powerpc64"
|
2015-10-13 18:23:51 +00:00
|
|
|
ABIS+= freebsd32
|
|
|
|
.endif
|
2010-08-28 15:04:53 +00:00
|
|
|
|
2015-10-13 18:23:51 +00:00
|
|
|
.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}
|
2010-08-28 15:04:53 +00:00
|
|
|
.endif
|
2015-10-13 18:23:51 +00:00
|
|
|
.endfor
|
2016-01-26 19:07:09 +00:00
|
|
|
SRCS:= ${SRCS} ${abi_src}
|
2015-10-13 18:23:51 +00:00
|
|
|
.endfor
|
2010-08-28 15:04:53 +00:00
|
|
|
|
1997-12-06 05:23:12 +00:00
|
|
|
.include <bsd.prog.mk>
|