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