1.include <src.opts.mk> 2 3PACKAGE= fetch 4 5LIB= fetch 6CFLAGS+= -I. 7SRCS= fetch.c common.c ftp.c http.c file.c \ 8 ftperr.h httperr.h 9INCS= fetch.h 10MAN= fetch.3 11CLEANFILES= ftperr.h httperr.h 12 13.if ${MK_INET6_SUPPORT} != "no" 14CFLAGS+= -DINET6 15.endif 16 17.if ${MK_OPENSSL} != "no" 18CFLAGS+= -DWITH_SSL 19CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L 20LIBADD+= ssl crypto 21.else 22LIBADD+= md 23.endif 24 25CFLAGS+= -DFTP_COMBINE_CWDS 26 27SHLIB_MAJOR= 6 28 29ftperr.h: ftp.errors ${.CURDIR}/Makefile 30 @echo "static struct fetcherr ftp_errlist[] = {" > ${.TARGET} 31 @cat ${.CURDIR}/ftp.errors \ 32 | grep -v ^# \ 33 | sort \ 34 | while read NUM CAT STRING; do \ 35 echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \ 36 done >> ${.TARGET} 37 @echo " { -1, FETCH_UNKNOWN, \"Unknown FTP error\" }" >> ${.TARGET} 38 @echo "};" >> ${.TARGET} 39 40httperr.h: http.errors ${.CURDIR}/Makefile 41 @echo "static struct fetcherr http_errlist[] = {" > ${.TARGET} 42 @cat ${.CURDIR}/http.errors \ 43 | grep -v ^# \ 44 | sort \ 45 | while read NUM CAT STRING; do \ 46 echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \ 47 done >> ${.TARGET} 48 @echo " { -1, FETCH_UNKNOWN, \"Unknown HTTP error\" }" >> ${.TARGET} 49 @echo "};" >> ${.TARGET} 50 51MLINKS+= fetch.3 fetchFreeURL.3 52MLINKS+= fetch.3 fetchGet.3 53MLINKS+= fetch.3 fetchGetFTP.3 54MLINKS+= fetch.3 fetchGetFile.3 55MLINKS+= fetch.3 fetchGetHTTP.3 56MLINKS+= fetch.3 fetchGetURL.3 57MLINKS+= fetch.3 fetchList.3 58MLINKS+= fetch.3 fetchListFTP.3 59MLINKS+= fetch.3 fetchListFile.3 60MLINKS+= fetch.3 fetchListHTTP.3 61MLINKS+= fetch.3 fetchListURL.3 62MLINKS+= fetch.3 fetchMakeURL.3 63MLINKS+= fetch.3 fetchParseURL.3 64MLINKS+= fetch.3 fetchPut.3 65MLINKS+= fetch.3 fetchPutFTP.3 66MLINKS+= fetch.3 fetchPutFile.3 67MLINKS+= fetch.3 fetchPutHTTP.3 68MLINKS+= fetch.3 fetchPutURL.3 69MLINKS+= fetch.3 fetchReqHTTP.3 70MLINKS+= fetch.3 fetchStat.3 71MLINKS+= fetch.3 fetchStatFTP.3 72MLINKS+= fetch.3 fetchStatFile.3 73MLINKS+= fetch.3 fetchStatHTTP.3 74MLINKS+= fetch.3 fetchStatURL.3 75MLINKS+= fetch.3 fetchXGet.3 76MLINKS+= fetch.3 fetchXGetFTP.3 77MLINKS+= fetch.3 fetchXGetFile.3 78MLINKS+= fetch.3 fetchXGetHTTP.3 79MLINKS+= fetch.3 fetchXGetURL.3 80 81.include <bsd.lib.mk> 82