2009-02-14 16:50:50 +03:00
|
|
|
# $NetBSD: Makefile,v 1.3 2009/02/14 13:56:41 abs Exp $
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
|
|
|
|
HOSTPROGNAME= ${MACHINE_GNU_PLATFORM}-fdisk
|
|
|
|
HOST_SRCDIR= sbin/fdisk
|
|
|
|
HOST_SRCS= getcap.c disklabel.c
|
|
|
|
|
2009-02-14 16:50:50 +03:00
|
|
|
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
|
2006-02-14 07:49:50 +03:00
|
|
|
CPPFLAGS+= -DBOOTSEL
|
|
|
|
.endif
|
|
|
|
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
.include "${.CURDIR}/../Makefile.disklabel"
|
|
|
|
.include "${.CURDIR}/../Makefile.host"
|
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/../../lib/libc/gen
|