Makefile revision 1.12
1# $OpenBSD: Makefile,v 1.12 2021/06/24 21:11:40 jmc 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.ifdef NOPIC 29CFLAGS+= -DSTATICLINKING 30.endif 31 32.PATH: ${.CURDIR}/../../../sbin/disklabel 33.include <bsd.prog.mk> 34