Home | History | Annotate | Line # | Download | only in kdump
Makefile.ioctl-c revision 1.29
      1 #	$NetBSD: Makefile.ioctl-c,v 1.29 2015/09/26 03:31:11 christos Exp $
      2 
      3 # NOTE: <bsd.own.mk> needs to be previously .included for NETBSDSRCDIR
      4 
      5 # We are trying to get the list of .h files that define all ioctls
      6 # This version grabs the non-obsolete .h files from the set lists
      7 # and silently ignores any that don't exist in ${DESTDIR}.
      8 # NB: The compiler uses the .h files in ${NETBSDSRCDIR}.
      9 
     10 SETBASES=	${NETBSDSRCDIR}/distrib/sets/lists/comp \
     11 		${NETBSDSRCDIR}/distrib/sets/lists/xcomp
     12 
     13 .for sb in ${SETBASES}
     14 .if exists(${sb}/mi)
     15 SETFILES:=${SETFILES} ${sb}/mi
     16 .endif
     17 .for md in md.${MACHINE} /md.${MACHINE}.${MACHINE_ARCH}
     18 .if exists(${sb}/${md})
     19 SETFILES:= ${SETFILES} ${sb}/${md}
     20 .endif
     21 .endfor
     22 .endfor
     23 .if ${MKDTRACE} != 'no"
     24 EXTRAS=	${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common/sys/dtrace.h
     25 .endif
     26 
     27 .if !make(cleandir) && !make(obj) && !make(includes) && !make(install)
     28 DEPFILEGLOB = ${TOOL_SED} -ne '/\/usr\/.*include\/.*\.h[ 	]/{s/[ 	]obsolete$$//;t' -e 's/xenio//;t' -e 's,\.\([^ 	]*\).*,${DESTDIR}\1,;p;}' ${SETFILES}
     29 DEPFILES != (${DEPFILEGLOB}; echo ${EXTRAS}) | xargs egrep -l '(_IO\(|_IOR\(|_IOW\(|_IOWR\()' 2>/dev/null || :
     30 .endif
     31 
     32 ${PROG}-ioctl.c: mkioctls Makefile ${DEPFILES} ${SETFILES}
     33 	${_MKTARGET_CREATE}
     34 	AWK=${TOOL_AWK:Q} CC="${CC}" DESTDIR="${DESTDIR}" SED=${TOOL_SED:Q} \
     35 	    ${HOST_SH} ${NETBSDSRCDIR}/usr.bin/kdump/mkioctls \
     36 	    ${DEPFILES} >${.TARGET}
     37 
     38 SRCS+=		${PROG}-ioctl.c
     39 CLEANFILES+=	${PROG}-ioctl.c
     40 DPSRCS+=	${PROG}-ioctl.c
     41 CPPFLAGS+=	-I${DESTDIR}/usr/X11R7/include/libdrm
     42 CPPFLAGS+=	-I${DESTDIR}/usr/X11R7/include/pixman-1
     43 CPPFLAGS+=	-I${DESTDIR}/usr/X11R7/include
     44 .if ${MKDTRACE} != 'no"
     45 CPPFLAGS+=	-I${NETBSDSRCDIR}/external/cddl/osnet/sys
     46 CPPFLAGS+=	-I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common
     47 .endif
     48 CPPFLAGS+=	-D_ALTQ_ALTQ_JOBS_H_	# redefinition of inline
     49 # De-select one, dup ioctls
     50 CPPFLAGS+=	-D_VIA_DRM_H_		# Missing header
     51 #CPPFLAGS+=	-D_I915_DRM_H_		# Dup ioctls
     52 CPPFLAGS+=	-DQXL_DRM_H		# Dup ioctls
     53 CPPFLAGS+=	-D__R128_DRM_H__	# Dup ioctls
     54 CPPFLAGS+=	-D__SIS_DRM_H__		# Dup ioctls
     55 CPPFLAGS+=	-D__SAVAGE_DRM_H__	# Dup ioctls
     56 CPPFLAGS+=	-D__RADEON_DRM_H__	# Dup ioctls
     57 CPPFLAGS+=	-D__MACH64_DRM_H__	# Dup ioctls
     58 CPPFLAGS+=	-D__MGA_DRM_H__		# Dup ioctls
     59 
     60 ${DEPFILES}: .PRECIOUS
     61