Makefile.nbincludes revision 1.6
11.6Slukem#	$NetBSD: Makefile.nbincludes,v 1.6 2023/06/04 10:00:20 lukem Exp $
21.1Sriz
31.6Slukem.include <bsd.hostinit.mk>
41.1Sriz
51.1Sriz_ARCHDIR=	${.CURDIR}/../../sys/arch
61.1Sriz_INCDIR=	${.CURDIR}/../../include
71.1Sriz_SYSDIR=	${.CURDIR}/../../sys/sys
81.1Sriz_UFSDIR=	${.CURDIR}/../../sys/ufs
91.1Sriz_SUBDIR!=	cd ${_ARCHDIR} && ${MAKE} -V SUBDIR
101.1Sriz
111.1Sriz.if make(depend) || make(all) || make(dependall) || make(install)
121.1Sriz# There's no need to run these commands for "make cleandir" or "make obj",
131.1Sriz# and TOOL_SED will not yet have been built.
141.1Sriz_UFS_INCS!=	cd ${_UFSDIR} && find ffs ufs -name '*.h'
151.1Sriz_ARCH_INCS!=	${TOOL_SED} -e 's/^\#.*//' ${.CURDIR}/../headerlist
161.1Sriz.endif
171.1Sriz
181.1Sriz_ARCH_INCS+=	ews4800mips/include/pdinfo.h ews4800mips/include/vtoc.h
191.1Sriz
201.4Suwe# for sh3/include/elf_machdep.h
211.4Suwe.for sh3mach in dreamcast evbsh3 hpcsh landisk mmeye sh3
221.4Suwe_ARCH_INCS+=	${sh3mach}/include/endian_machdep.h
231.4Suwe.endfor
241.4Suwe
251.1Sriz_INCS=		disktab.h
261.1Sriz_SYSINCS=	bootblock.h \
271.1Sriz		disklabel.h disklabel_acorn.h disklabel_gpt.h disklabel_rdb.h \
281.1Sriz		dkbad.h \
291.5Schristos		exec_elf.h exec_ecoff.h
301.1Sriz
311.3SchristosHOST_CPPFLAGS+=	-I${TOOLDIR}/include -I${TOOLDIR}/include/nbinclude
321.1Sriz
331.1Srizbeforedepend: 
341.1Sriz	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude
351.1Sriz	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys
361.1Sriz	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/ufs
371.1Sriz	cd ${_ARCHDIR} && \
381.1Sriz	    ${TOOL_PAX} -s /include\\/// -rw ${_ARCH_INCS} \
391.1Sriz	    ${TOOLDIR}/include/nbinclude
401.1Sriz	cd ${_INCDIR} && \
411.1Sriz	    ${TOOL_PAX} -rw ${_INCS} ${TOOLDIR}/include/nbinclude
421.1Sriz	cd ${_SYSDIR} && \
431.1Sriz	    ${TOOL_PAX} -rw ${_SYSINCS} ${TOOLDIR}/include/nbinclude/sys
441.1Sriz	cd ${_UFSDIR} && \
451.1Sriz	    ${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs
461.1Sriz	cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
471.1Sriz	    ${HOST_INSTALL_SYMLINK} ${MACHINE} machine
48