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