1 # $NetBSD: Makefile.nbincludes,v 1.4 2015/01/24 16:21:33 uwe Exp $
3 # NOxxx definitions are copied from Makefile.host, and are
4 # required before .include <bsd.own.mk>. The include of bsd.own.mk
5 # itself is required to get definitions of TOOL_* variables used in
6 # "!=" variable assignments (which are performed early).
14 _ARCHDIR= ${.CURDIR}/../../sys/arch
15 _INCDIR= ${.CURDIR}/../../include
16 _SYSDIR= ${.CURDIR}/../../sys/sys
17 _UFSDIR= ${.CURDIR}/../../sys/ufs
18 _SUBDIR!= cd ${_ARCHDIR} && ${MAKE} -V SUBDIR
20 .if make(depend) || make(all) || make(dependall) || make(install)
21 # There's no need to run these commands for "make cleandir" or "make obj",
22 # and TOOL_SED will not yet have been built.
23 _UFS_INCS!= cd ${_UFSDIR} && find ffs ufs -name '*.h'
24 _ARCH_INCS!= ${TOOL_SED} -e 's/^\#.*//' ${.CURDIR}/../headerlist
28 _ARCH_INCS+= ews4800mips/include/pdinfo.h ews4800mips/include/vtoc.h
30 # for sh3/include/elf_machdep.h
31 .for sh3mach in dreamcast evbsh3 hpcsh landisk mmeye sh3
32 _ARCH_INCS+= ${sh3mach}/include/endian_machdep.h
34 .endif # !defined(__MINIX)
37 _SYSINCS= bootblock.h \
38 disklabel.h disklabel_acorn.h disklabel_gpt.h disklabel_rdb.h \
42 HOST_CPPFLAGS+= -I${TOOLDIR}/include -I${TOOLDIR}/include/nbinclude
45 ${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude
46 ${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys
47 ${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/ufs
49 ${TOOL_PAX} -s /include\\/// -rw ${_ARCH_INCS} \
50 ${TOOLDIR}/include/nbinclude
52 ${TOOL_PAX} -rw ${_INCS} ${TOOLDIR}/include/nbinclude
54 ${TOOL_PAX} -rw ${_SYSINCS} ${TOOLDIR}/include/nbinclude/sys
56 ${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs
57 cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
58 ${HOST_INSTALL_SYMLINK} ${MACHINE} machine