1#	$NetBSD: Makefile,v 1.1 2023/08/19 22:56:44 christos Exp $
2
3.include <bsd.own.mk>
4
5TESTSDIR=	${TESTSBASE}/compat/linux
6TESTS_SH=	t_inotify
7
8TC_PROGS=	h_inotify_init
9TC_PROGS+=	h_inotify_directory
10TC_PROGS+=	h_inotify_single_file
11TC_PROGS+=	h_inotify_watch_change
12
13.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
14
15LDFLAGS+=	-nostartfiles -static
16CFLAGS+=	-I${.CURDIR}/../../../sys
17CFLAGS+=	-I${.CURDIR}
18CFLAGS+=	-D_STANDALONE
19
20FILESDIR=	${TESTSDIR}
21
22.for _P in ${TESTS_SH}
23.if ${MACHINE_ARCH} == "x86_64"
24TESTS_SH_SRC_${_P}=	h_common.sh
25.else
26TESTS_SH_SRC_${_P}=	h_not_supported.sh
27.endif
28TESTS_SH_SRC_${_P}+=	${_P}.sh
29.endfor
30
31.for _P in ${TC_PROGS}
32CLEANFILES+=		${_P}
33FILES+=			${_P}
34
35.if ${MACHINE_ARCH} == "x86_64"
36PROGS+=			${_P}.out
37SRCS.${_P}.out=		${_P}.c
38SRCS.${_P}.out+=	h_linux.c
39SRCS.${_P}.out+=	h_syscall.c
40MAN.${_P}.out=		# empty
41FILESMODE_${_P}=	${BINMODE}
42
43proginstall-${_P}.out:
44	# Do not install
45
46${_P}: ${_P}.out
47	${_MKTARGET_CREATE}
48	cp ${.ALLSRC} ${.TARGET}
49	${ELFEDIT} --output-osabi Linux ${.TARGET}
50.else
51${_P}:
52	echo '' > ${.TARGET}
53.endif
54
55realall: ${_P}
56.endfor
57
58CLEANFILES+=	${TESTS_SH}
59CLEANFILES+=	Atffile
60
61.include <bsd.test.mk>
62