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