summaryrefslogtreecommitdiff
path: root/tools/Makefile.disklabel
blob: d9b3574624e59b67a90ae9771bce91b77ce9d878 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#	$NetBSD: Makefile.disklabel,v 1.10 2007/02/07 17:49:23 cbiere Exp $

_ARCHDIR=	${.CURDIR}/../../sys/arch
_INCDIR=	${.CURDIR}/../../include
_SYSDIR=	${.CURDIR}/../../sys/sys
_UFSDIR=	${.CURDIR}/../../sys/ufs
_SUBDIR!=	cd ${_ARCHDIR} && ${MAKE} -V SUBDIR

_UFS_INCS!=	cd ${_UFSDIR} && find ffs ufs -name '*.h'
_ARCH_INCS!=	cd ${_ARCHDIR} && find . -name disklabel.h -o \
		    -name elf_machdep.h

_ARCH_INCS+=	ews4800mips/include/pdinfo.h ews4800mips/include/vtoc.h

_INCS=		disktab.h
_SYSINCS=	bootblock.h \
		disklabel.h disklabel_acorn.h disklabel_gpt.h dkbad.h

HOST_CPPFLAGS+=	-I${TOOLDIR}/include

beforedepend: 
	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude
	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys
	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/ufs
	cd ${_ARCHDIR} && \
	    ${TOOL_PAX} -s /include\\/// -rw ${_ARCH_INCS} \
	    ${TOOLDIR}/include/nbinclude
	cd ${_INCDIR} && \
	    ${TOOL_PAX} -rw ${_INCS} ${TOOLDIR}/include/nbinclude
	cd ${_SYSDIR} && \
	    ${TOOL_PAX} -rw ${_SYSINCS} ${TOOLDIR}/include/nbinclude/sys
	cd ${_UFSDIR} && \
	    ${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs
	cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
	    ${HOST_INSTALL_SYMLINK} ${MACHINE} machine