xref: /dragonfly/lib/libftpio/Makefile (revision 2c603719)
1# $FreeBSD: src/lib/libftpio/Makefile,v 1.9.2.2 2001/04/25 10:04:30 ru Exp $
2# $DragonFly: src/lib/libftpio/Makefile,v 1.3 2004/08/16 12:59:21 joerg Exp $
3
4LIB=		ftpio
5SHLIB_MAJOR=	5
6
7SRCS=		ftpio.c ftperr.c
8INCS=		ftpio.h
9CFLAGS+=	-I${.CURDIR} -Wall
10CFLAGS+=	-DINET6
11MAN=		ftpio.3
12CLEANFILES=	ftperr.c
13WARNS?=		6
14
15ftperr.c:	ftp.errors
16	@echo '#include <stdio.h>' > ${.TARGET}
17	@echo '#include "ftpio.h"' >> ${.TARGET}
18	@echo "struct ftperr ftpErrList[] = {" \ >>  ${.TARGET}
19	@cat ${.ALLSRC} \
20	  | grep -v ^# \
21	  | sort \
22	  | while read NUM STRING; do \
23	    echo "  { $${NUM}, \"$${STRING}\" },"; \
24	  done >> ${.TARGET}
25	@echo "};" >> ${.TARGET}
26	@echo -n "int const ftpErrListLength = " >> ${.TARGET}
27	@echo "sizeof(ftpErrList) / sizeof(*ftpErrList);" >> ${.TARGET}
28
29.include <bsd.lib.mk>
30