daaf575910
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway.
35 lines
717 B
Makefile
35 lines
717 B
Makefile
# $FreeBSD$
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
LIB= ftpio
|
|
SHLIB_MAJOR= 8
|
|
|
|
SRCS= ftpio.c ftperr.c
|
|
INCS= ftpio.h
|
|
CFLAGS+= -I${.CURDIR} -Wall
|
|
MAN= ftpio.3
|
|
CLEANFILES= ftperr.c
|
|
|
|
.if ${MK_INET6_SUPPORT} != "no"
|
|
CFLAGS+= -DINET6
|
|
.endif
|
|
|
|
WARNS?= 2
|
|
|
|
ftperr.c: ftp.errors
|
|
@echo '#include <stdio.h>' > ${.TARGET}
|
|
@echo '#include "ftpio.h"' >> ${.TARGET}
|
|
@echo "struct ftperr ftpErrList[] = {" \ >> ${.TARGET}
|
|
@cat ${.ALLSRC} \
|
|
| grep -v ^# \
|
|
| sort \
|
|
| while read NUM STRING; do \
|
|
echo " { $${NUM}, \"$${STRING}\" },"; \
|
|
done >> ${.TARGET}
|
|
@echo "};" >> ${.TARGET}
|
|
@echo -n "int const ftpErrListLength = " >> ${.TARGET}
|
|
@echo "sizeof(ftpErrList) / sizeof(*ftpErrList);" >> ${.TARGET}
|
|
|
|
.include <bsd.lib.mk>
|