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