Home | History | Annotate | Line # | Download | only in tools
Makefile.nbincludes revision 1.6
      1 #	$NetBSD: Makefile.nbincludes,v 1.6 2023/06/04 10:00:20 lukem Exp $
      2 
      3 .include <bsd.hostinit.mk>
      4 
      5 _ARCHDIR=	${.CURDIR}/../../sys/arch
      6 _INCDIR=	${.CURDIR}/../../include
      7 _SYSDIR=	${.CURDIR}/../../sys/sys
      8 _UFSDIR=	${.CURDIR}/../../sys/ufs
      9 _SUBDIR!=	cd ${_ARCHDIR} && ${MAKE} -V SUBDIR
     10 
     11 .if make(depend) || make(all) || make(dependall) || make(install)
     12 # There's no need to run these commands for "make cleandir" or "make obj",
     13 # and TOOL_SED will not yet have been built.
     14 _UFS_INCS!=	cd ${_UFSDIR} && find ffs ufs -name '*.h'
     15 _ARCH_INCS!=	${TOOL_SED} -e 's/^\#.*//' ${.CURDIR}/../headerlist
     16 .endif
     17 
     18 _ARCH_INCS+=	ews4800mips/include/pdinfo.h ews4800mips/include/vtoc.h
     19 
     20 # for sh3/include/elf_machdep.h
     21 .for sh3mach in dreamcast evbsh3 hpcsh landisk mmeye sh3
     22 _ARCH_INCS+=	${sh3mach}/include/endian_machdep.h
     23 .endfor
     24 
     25 _INCS=		disktab.h
     26 _SYSINCS=	bootblock.h \
     27 		disklabel.h disklabel_acorn.h disklabel_gpt.h disklabel_rdb.h \
     28 		dkbad.h \
     29 		exec_elf.h exec_ecoff.h
     30 
     31 HOST_CPPFLAGS+=	-I${TOOLDIR}/include -I${TOOLDIR}/include/nbinclude
     32 
     33 beforedepend: 
     34 	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude
     35 	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys
     36 	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/ufs
     37 	cd ${_ARCHDIR} && \
     38 	    ${TOOL_PAX} -s /include\\/// -rw ${_ARCH_INCS} \
     39 	    ${TOOLDIR}/include/nbinclude
     40 	cd ${_INCDIR} && \
     41 	    ${TOOL_PAX} -rw ${_INCS} ${TOOLDIR}/include/nbinclude
     42 	cd ${_SYSDIR} && \
     43 	    ${TOOL_PAX} -rw ${_SYSINCS} ${TOOLDIR}/include/nbinclude/sys
     44 	cd ${_UFSDIR} && \
     45 	    ${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs
     46 	cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
     47 	    ${HOST_INSTALL_SYMLINK} ${MACHINE} machine
     48