Makefile revision 1.3
1#	$OpenBSD: Makefile,v 1.3 2015/11/01 12:25:45 krw 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} == "vax")
41CFLAGS+= -DSEEALSO="\"installboot(8)\""
42.endif
43
44.if (${MACHINE} == "landisk")
45CFLAGS+= -DSEEALSO="\"fdisk(8), installboot(8)\""
46.endif
47
48.if (${MACHINE} == "macppc" || ${MACHINE} == "socppc")
49CFLAGS+= -DSEEALSO="\"fdisk(8), pdisk(8)\""
50.endif
51
52.if (${MACHINE} == "solbourne") || (${MACHINE} == "sparc") || \
53    (${MACHINE} == "sparc64")
54CFLAGS+= -DSEEALSO="\"installboot(8)\"" -DSUN_CYLCHECK -DSUN_AAT0
55.endif
56
57.if (${MACHINE} == "zaurus")
58CFLAGS+= -DSEEALSO="\"fdisk(8)\""
59.endif
60
61.ifdef NOPIC
62CFLAGS+= -DSTATICLINKING
63.endif
64
65.PATH:	${.CURDIR}/../../../sbin/disklabel
66.include <bsd.prog.mk>
67