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