If HOSTPROG is empty, do not pull in libutil, since we do not need it in that

case, and several host platforms do not have libutil. Fixes the build of
these programs as host tools on platforms without libutil.
This commit is contained in:
fvdl 2005-06-23 00:54:47 +00:00
parent b14624e508
commit a33a5a18b5
2 changed files with 8 additions and 9 deletions

View File

@ -1,11 +1,13 @@
# $NetBSD: Makefile,v 1.56 2005/06/17 21:20:18 dsl Exp $
# $NetBSD: Makefile,v 1.57 2005/06/23 00:54:47 fvdl Exp $
# @(#)Makefile 8.2 (Berkeley) 3/17/94
PROG= disklabel
SRCS= main.c dkcksum.c interact.c printlabel.c
MAN= disklabel.5 disklabel.8
LDADD+= -lutil
.if (${HOSTPROG:U} == "")
DPADD+= ${LIBUTIL}
LDADD+= -lutil
.endif
# these have additional requirements on the alignment of a partition
.if (${MACHINE} == "sparc") || (${MACHINE} == "sparc64") \

View File

@ -1,13 +1,7 @@
# $NetBSD: Makefile,v 1.33 2005/06/12 19:14:10 dyoung Exp $
.if (${HOSTPROG:U} == "")
SUBDIR= mbr
.endif
# $NetBSD: Makefile,v 1.34 2005/06/23 00:54:47 fvdl Exp $
PROG= fdisk
SRCS= fdisk.c
DPADD+= ${LIBUTIL}
LDADD+= -lutil
MAN= fdisk.8
@ -21,5 +15,8 @@ CPPFLAGS+= -D_PATH_DEFDISK='"/dev/rwd0c"'
.include <bsd.prog.mk>
.if (${HOSTPROG:U} == "")
SUBDIR= mbr
DPADD+= ${LIBUTIL}
LDADD+= -lutil
.include <bsd.subdir.mk>
.endif