xref: /minix3/tools/Makefile.nbincludes (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc#	$NetBSD: Makefile.nbincludes,v 1.4 2015/01/24 16:21:33 uwe Exp $
29152e1c5SLionel Sambuc
39152e1c5SLionel Sambuc# NOxxx definitions are copied from Makefile.host, and are
49152e1c5SLionel Sambuc# required before .include <bsd.own.mk>.   The include of bsd.own.mk
59152e1c5SLionel Sambuc# itself is required to get definitions of TOOL_* variables used in
69152e1c5SLionel Sambuc# "!=" variable assignments (which are performed early).
79152e1c5SLionel Sambuc#
89152e1c5SLionel SambucNOINFO=		# defined
99152e1c5SLionel SambucNOLINT=		# defined
109152e1c5SLionel SambucNOMAN=		# defined
119152e1c5SLionel Sambuc
129152e1c5SLionel Sambuc.include <bsd.own.mk>
139152e1c5SLionel Sambuc
149152e1c5SLionel Sambuc_ARCHDIR=	${.CURDIR}/../../sys/arch
159152e1c5SLionel Sambuc_INCDIR=	${.CURDIR}/../../include
169152e1c5SLionel Sambuc_SYSDIR=	${.CURDIR}/../../sys/sys
179152e1c5SLionel Sambuc_UFSDIR=	${.CURDIR}/../../sys/ufs
189152e1c5SLionel Sambuc_SUBDIR!=	cd ${_ARCHDIR} && ${MAKE} -V SUBDIR
199152e1c5SLionel Sambuc
209152e1c5SLionel Sambuc.if make(depend) || make(all) || make(dependall) || make(install)
219152e1c5SLionel Sambuc# There's no need to run these commands for "make cleandir" or "make obj",
229152e1c5SLionel Sambuc# and TOOL_SED will not yet have been built.
239152e1c5SLionel Sambuc_UFS_INCS!=	cd ${_UFSDIR} && find ffs ufs -name '*.h'
249152e1c5SLionel Sambuc_ARCH_INCS!=	${TOOL_SED} -e 's/^\#.*//' ${.CURDIR}/../headerlist
259152e1c5SLionel Sambuc.endif
269152e1c5SLionel Sambuc
2743afffcdSJean-Baptiste Boric.if !defined(__MINIX)
289152e1c5SLionel Sambuc_ARCH_INCS+=	ews4800mips/include/pdinfo.h ews4800mips/include/vtoc.h
29*0a6a1f1dSLionel Sambuc
30*0a6a1f1dSLionel Sambuc# for sh3/include/elf_machdep.h
31*0a6a1f1dSLionel Sambuc.for sh3mach in dreamcast evbsh3 hpcsh landisk mmeye sh3
32*0a6a1f1dSLionel Sambuc_ARCH_INCS+=	${sh3mach}/include/endian_machdep.h
33*0a6a1f1dSLionel Sambuc.endfor
3443afffcdSJean-Baptiste Boric.endif # !defined(__MINIX)
359152e1c5SLionel Sambuc
369152e1c5SLionel Sambuc_INCS=		disktab.h
379152e1c5SLionel Sambuc_SYSINCS=	bootblock.h \
389152e1c5SLionel Sambuc		disklabel.h disklabel_acorn.h disklabel_gpt.h disklabel_rdb.h \
399152e1c5SLionel Sambuc		dkbad.h \
409152e1c5SLionel Sambuc		exec_elf.h
419152e1c5SLionel Sambuc
429152e1c5SLionel SambucHOST_CPPFLAGS+=	-I${TOOLDIR}/include -I${TOOLDIR}/include/nbinclude
439152e1c5SLionel Sambuc
449152e1c5SLionel Sambucbeforedepend:
459152e1c5SLionel Sambuc	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude
469152e1c5SLionel Sambuc	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys
479152e1c5SLionel Sambuc	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/ufs
489152e1c5SLionel Sambuc	cd ${_ARCHDIR} && \
499152e1c5SLionel Sambuc	    ${TOOL_PAX} -s /include\\/// -rw ${_ARCH_INCS} \
509152e1c5SLionel Sambuc	    ${TOOLDIR}/include/nbinclude
519152e1c5SLionel Sambuc	cd ${_INCDIR} && \
529152e1c5SLionel Sambuc	    ${TOOL_PAX} -rw ${_INCS} ${TOOLDIR}/include/nbinclude
539152e1c5SLionel Sambuc	cd ${_SYSDIR} && \
549152e1c5SLionel Sambuc	    ${TOOL_PAX} -rw ${_SYSINCS} ${TOOLDIR}/include/nbinclude/sys
559152e1c5SLionel Sambuc	cd ${_UFSDIR} && \
569152e1c5SLionel Sambuc	    ${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs
579152e1c5SLionel Sambuc	cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
589152e1c5SLionel Sambuc	    ${HOST_INSTALL_SYMLINK} ${MACHINE} machine
59