xref: /netbsd-src/distrib/utils/x_disklabel/Makefile (revision ac344355818cabb30d36c6cae34daa86658a1d2e)
1# $NetBSD: Makefile,v 1.2 2018/01/24 09:04:41 skrll Exp $
2# Build a small disklabel (for tiny boot media)
3
4SRCDIR=	${.CURDIR}/../../../sbin/disklabel
5
6PROG=	disklabel
7SRCS=	main.c dkcksum.c printlabel.c
8#SRCS+=	interact.c
9NOMAN=	# defined
10
11CPPFLAGS+=	-DNO_INTERACT
12CPPFLAGS+=	-DNATIVELABEL_ONLY
13
14DPADD+= ${LIBUTIL}
15LDADD+= -lutil
16
17# these have additional requirements on the alignment of a partition
18.if (${MACHINE} == "sparc") || (${MACHINE} == "sparc64") \
19	|| (${MACHINE} == "sun3")
20CPPFLAGS+= -DSTRICT_CYLINDER_ALIGNMENT
21.endif
22
23.if ${MACHINE} == "acorn32"
24# Support FileCore boot block
25CPPFLAGS+= -DUSE_ACORN
26.endif
27
28.if (${MACHINE_ARCH} == "alpha")
29# alpha requires boot block checksum
30CPPFLAGS+= -DALPHA_BOOTBLOCK_CKSUM
31.endif
32
33.if (${MACHINE_ARCH} == "vax")
34# vax requires labels in alternative sectors on SMD disk
35CPPFLAGS+= -DVAX_ALTLABELS
36.endif
37
38.include <bsd.prog.mk>
39
40.PATH:	${SRCDIR}
41