Makefile revision 169807
1178172Simp# $FreeBSD: head/lib/libfetch/Makefile 169807 2007-05-21 02:49:08Z deischen $ 2178172Simp 3178172Simp.include <bsd.own.mk> 4178172Simp 5178172SimpLIB= fetch 6178172SimpCFLAGS+= -I. 7178172SimpSRCS= fetch.c common.c ftp.c http.c file.c \ 8178172Simp ftperr.h httperr.h 9178172SimpINCS= fetch.h 10178172SimpMAN= fetch.3 11178172SimpCLEANFILES= ftperr.h httperr.h 12178172Simp 13178172Simp.if ${MK_INET6_SUPPORT} != "no" 14178172SimpCFLAGS+= -DINET6 15178172Simp.endif 16178172Simp 17178172Simp.if ${MK_OPENSSL} != "no" 18178172SimpCFLAGS+= -DWITH_SSL 19178172SimpDPADD= ${LIBSSL} ${LIBCRYPTO} 20178172SimpLDADD= -lssl -lcrypto 21178172Simp.endif 22178172Simp 23178172SimpCSTD?= c99 24178172SimpWARNS?= 2 25178172Simp 26178172SimpSHLIB_MAJOR= 5 27178172Simp 28178172Simpftperr.h: ftp.errors 29178172Simp @echo "static struct fetcherr _ftp_errlist[] = {" > ${.TARGET} 30178172Simp @cat ${.ALLSRC} \ 31178172Simp | grep -v ^# \ 32178172Simp | sort \ 33178172Simp | while read NUM CAT STRING; do \ 34178172Simp echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \ 35178172Simp done >> ${.TARGET} 36178172Simp @echo " { -1, FETCH_UNKNOWN, \"Unknown FTP error\" }" >> ${.TARGET} 37178172Simp @echo "};" >> ${.TARGET} 38178172Simp 39178172Simphttperr.h: http.errors 40178172Simp @echo "static struct fetcherr _http_errlist[] = {" > ${.TARGET} 41178172Simp @cat ${.ALLSRC} \ 42178172Simp | grep -v ^# \ 43178172Simp | sort \ 44178172Simp | while read NUM CAT STRING; do \ 45178172Simp echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \ 46178172Simp done >> ${.TARGET} 47178172Simp @echo " { -1, FETCH_UNKNOWN, \"Unknown HTTP error\" }" >> ${.TARGET} 48178172Simp @echo "};" >> ${.TARGET} 49178172Simp 50178172SimpMLINKS+= fetch.3 fetchFreeURL.3 51178172SimpMLINKS+= fetch.3 fetchGet.3 52178172SimpMLINKS+= fetch.3 fetchGetFTP.3 53178172SimpMLINKS+= fetch.3 fetchGetFile.3 54178172SimpMLINKS+= fetch.3 fetchGetHTTP.3 55178172SimpMLINKS+= fetch.3 fetchGetURL.3 56178172SimpMLINKS+= fetch.3 fetchList.3 57178172SimpMLINKS+= fetch.3 fetchListFTP.3 58178172SimpMLINKS+= fetch.3 fetchListFile.3 59178172SimpMLINKS+= fetch.3 fetchListHTTP.3 60178172SimpMLINKS+= fetch.3 fetchListURL.3 61178172SimpMLINKS+= fetch.3 fetchMakeURL.3 62178172SimpMLINKS+= fetch.3 fetchParseURL.3 63178172SimpMLINKS+= fetch.3 fetchPut.3 64178172SimpMLINKS+= fetch.3 fetchPutFTP.3 65178172SimpMLINKS+= fetch.3 fetchPutFile.3 66178172SimpMLINKS+= fetch.3 fetchPutHTTP.3 67178172SimpMLINKS+= fetch.3 fetchPutURL.3 68178172SimpMLINKS+= fetch.3 fetchStat.3 69178172SimpMLINKS+= fetch.3 fetchStatFTP.3 70178172SimpMLINKS+= fetch.3 fetchStatFile.3 71178172SimpMLINKS+= fetch.3 fetchStatHTTP.3 72178172SimpMLINKS+= fetch.3 fetchStatURL.3 73178172SimpMLINKS+= fetch.3 fetchXGet.3 74178172SimpMLINKS+= fetch.3 fetchXGetFTP.3 75178172SimpMLINKS+= fetch.3 fetchXGetFile.3 76178172SimpMLINKS+= fetch.3 fetchXGetHTTP.3 77178172SimpMLINKS+= fetch.3 fetchXGetURL.3 78178172Simp 79178172Simp.include <bsd.lib.mk> 80178172Simp