xref: /openbsd/sbin/disklabel/Makefile (revision 404b540a)
1#	$OpenBSD: Makefile,v 1.50 2009/06/04 21:13:03 deraadt Exp $
2
3PROG=	disklabel
4SRCS=	disklabel.c dkcksum.c editor.c manual.c
5DPADD=	${LIBUTIL}
6LDADD=	-lutil
7MAN=	disklabel.8 disklabel.5
8
9
10CLEANFILES+=manual.c
11
12.include <bsd.own.mk>
13
14.ifdef NOMAN
15manual.c:
16	(echo 'const unsigned char manpage[] = {'; \
17	echo 'no manual' | gzip -9c | hexdump -ve '"0x" 1/1 "%02x,"'; \
18	echo '};'; echo 'const int manpage_sz = sizeof(manpage);') > manual.c
19.else
20manual.c:	disklabel.cat8
21	(echo 'const unsigned char manpage[] = {'; \
22	cat disklabel.cat8 | gzip -9c | hexdump -ve '"0x" 1/1 "%02x,"'; \
23	echo '};'; echo 'const int manpage_sz = sizeof(manpage);') > manual.c
24.endif
25
26.if (${MACHINE} == "alpha")
27CFLAGS+= -DSEEALSO="\"fdisk(8), installboot(8)\""
28.endif
29
30.if (${MACHINE} == "amd64") || (${MACHINE} == "i386")
31CFLAGS+= -DSEEALSO="\"fdisk(8), installboot(8)\""
32.endif
33
34.if (${MACHINE} == "armish")
35CFLAGS+= -DSEEALSO="\"fdisk(8)\""
36.endif
37
38.if (${MACHINE} == "hp300") || (${MACHINE} == "hppa") || \
39    (${MACHINE} == "hppa64") || (${MACHINE} == "vax")
40CFLAGS+= -DNUMBOOT=1
41.endif
42
43.if (${MACHINE} == "landisk")
44CFLAGS+= -DNUMBOOT=1
45CFLAGS+= -DSEEALSO="\"fdisk(8)\""
46.endif
47
48.if (${MACHINE} == "macppc" || ${MACHINE} == "socppc")
49CFLAGS+= -DSEEALSO="\"fdisk(8), pdisk(8)\""
50.endif
51
52.if (${MACHINE} == "mvme68k") || (${MACHINE} == "mvme88k")
53CFLAGS+= -DSEEALSO="\"installboot(8)\""
54.endif
55
56.if (${MACHINE} == "solbourne") || (${MACHINE} == "sparc") || \
57    (${MACHINE} == "sparc64")
58CFLAGS+= -DSEEALSO="\"installboot(8)\"" -DSUN_CYLCHECK -DSUN_AAT0
59.endif
60
61.if (${MACHINE} == "zaurus")
62CFLAGS+= -DSEEALSO="\"fdisk(8)\""
63.endif
64
65.include <bsd.prog.mk>
66