Makefile.ioctl-c revision 1.26
11.26Schristos# $NetBSD: Makefile.ioctl-c,v 1.26 2015/02/06 20:07:45 christos Exp $ 21.5Slukem 31.5Slukem# NOTE: <bsd.own.mk> needs to be previously .included for NETBSDSRCDIR 41.1Smrg 51.24Sdsl# We are trying to get the list of .h files that define all ioctls 61.24Sdsl# This version grabs the non-obsolete .h files from the set lists 71.24Sdsl# and silently ignores any that don't exist in ${DESTDIR}. 81.24Sdsl# NB: The compiler uses the .h files in ${NETBSDSRCDIR}. 91.24Sdsl 101.26SchristosSETBASES= ${NETBSDSRCDIR}/distrib/sets/lists/comp \ 111.26Schristos ${NETBSDSRCDIR}/distrib/sets/lists/xcomp 121.26Schristos 131.26Schristos.for sb in ${SETBASES} 141.26Schristos.if exists(${sb}/mi) 151.26SchristosSETFILES:=${SETFILES} ${sb}/mi 161.26Schristos.endif 171.24Sdsl.for md in md.${MACHINE} /md.${MACHINE}.${MACHINE_ARCH} 181.26Schristos.if exists(${sb}/${md}) 191.26SchristosSETFILES:= ${SETFILES} ${sb}/${md} 201.24Sdsl.endif 211.24Sdsl.endfor 221.26Schristos.endfor 231.8Sthorpej 241.25Suebayasi.if !make(cleandir) && !make(obj) && !make(includes) && !make(install) 251.26SchristosDEPFILEGLOB = ${TOOL_SED} -ne '/\/usr\/.*include\/.*\.h[ ]/{s/[ ]obsolete$$//;t' -e 's/xenio//;t' -e 's,\.\([^ ]*\).*,${DESTDIR}\1,;p;}' ${SETFILES} 261.25SuebayasiDEPFILES != ${DEPFILEGLOB} | xargs egrep -l '(_IO\(|_IOR\(|_IOW\(|_IOWR\()' 2>/dev/null || : 271.7Schristos.endif 281.6Schristos 291.24Sdsl${PROG}-ioctl.c: mkioctls Makefile ${DEPFILES} ${SETFILES} 301.10Slukem ${_MKTARGET_CREATE} 311.23Sapb AWK=${TOOL_AWK:Q} CC="${CC}" DESTDIR="${DESTDIR}" SED=${TOOL_SED:Q} \ 321.9Slukem ${HOST_SH} ${NETBSDSRCDIR}/usr.bin/kdump/mkioctls \ 331.16Stron ${DEPFILES} >${.TARGET} 341.16Stron 351.16StronSRCS+= ${PROG}-ioctl.c 361.16StronCLEANFILES+= ${PROG}-ioctl.c 371.19SmattDPSRCS+= ${PROG}-ioctl.c 381.26SchristosCPPFLAGS+= -I${DESTDIR}/usr/X11R7/include/libdrm 391.26SchristosCPPFLAGS+= -I${DESTDIR}/usr/X11R7/include/pixman-1 401.26SchristosCPPFLAGS+= -I${DESTDIR}/usr/X11R7/include 411.26SchristosCPPFLAGS+= -D_ALTQ_ALTQ_JOBS_H_ # redefinition of inline 421.26Schristos# De-select one, dup ioctls 431.26SchristosCPPFLAGS+= -D_VIA_DRM_H_ # Missing header 441.26Schristos#CPPFLAGS+= -D_I915_DRM_H_ # Dup ioctls 451.26SchristosCPPFLAGS+= -D__R128_DRM_H__ # Dup ioctls 461.26SchristosCPPFLAGS+= -D__SIS_DRM_H__ # Dup ioctls 471.26SchristosCPPFLAGS+= -D__SAVAGE_DRM_H__ # Dup ioctls 481.26SchristosCPPFLAGS+= -D__RADEON_DRM_H__ # Dup ioctls 491.26SchristosCPPFLAGS+= -D__MACH64_DRM_H__ # Dup ioctls 501.26SchristosCPPFLAGS+= -D__MGA_DRM_H__ # Dup ioctls 511.2Smrg 521.6Schristos${DEPFILES}: .PRECIOUS 53