xref: /openbsd/sbin/disklabel/Makefile (revision 891d7ab6)
1#	$OpenBSD: Makefile,v 1.53 2011/06/23 22:46:12 schwarze 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
20disklabel.cat8:	disklabel.8
21	mandoc ${.ALLSRC} > ${.TARGET}
22
23manual.c:	disklabel.cat8
24	(echo 'const unsigned char manpage[] = {'; \
25	cat disklabel.cat8 | gzip -9c | hexdump -ve '"0x" 1/1 "%02x,"'; \
26	echo '};'; echo 'const int manpage_sz = sizeof(manpage);') > manual.c
27.endif
28
29.if (${MACHINE} == "alpha")
30CFLAGS+= -DSEEALSO="\"fdisk(8), installboot(8)\""
31.endif
32
33.if (${MACHINE} == "amd64") || (${MACHINE} == "i386")
34CFLAGS+= -DSEEALSO="\"fdisk(8), installboot(8)\""
35.endif
36
37.if (${MACHINE} == "armish") || (${MACHINE} == "loongson")
38CFLAGS+= -DSEEALSO="\"fdisk(8)\""
39.endif
40
41.if (${MACHINE} == "hp300") || (${MACHINE} == "hppa") || \
42    (${MACHINE} == "hppa64") || (${MACHINE} == "vax")
43CFLAGS+= -DNUMBOOT=1
44.endif
45
46.if (${MACHINE} == "landisk")
47CFLAGS+= -DNUMBOOT=1
48CFLAGS+= -DSEEALSO="\"fdisk(8)\""
49.endif
50
51.if (${MACHINE} == "macppc" || ${MACHINE} == "socppc")
52CFLAGS+= -DSEEALSO="\"fdisk(8), pdisk(8)\""
53.endif
54
55.if (${MACHINE} == "mvme68k") || (${MACHINE} == "mvme88k")
56CFLAGS+= -DSEEALSO="\"installboot(8)\""
57.endif
58
59.if (${MACHINE} == "solbourne") || (${MACHINE} == "sparc") || \
60    (${MACHINE} == "sparc64")
61CFLAGS+= -DSEEALSO="\"installboot(8)\"" -DSUN_CYLCHECK -DSUN_AAT0
62.endif
63
64.if (${MACHINE} == "zaurus")
65CFLAGS+= -DSEEALSO="\"fdisk(8)\""
66.endif
67
68.ifdef NOPIC
69CFLAGS+= -DSTATICLINKING
70.endif
71
72.include <bsd.prog.mk>
73