Makefile revision 97930
1# $FreeBSD: head/lib/libfetch/Makefile 97930 2002-06-06 13:45:46Z ru $
2
3MAINTAINER=	des@freebsd.org
4LIB=		fetch
5WARNS?=		4
6CFLAGS+=	-I.
7CFLAGS+=	-DINET6
8SRCS=		fetch.c common.c ftp.c http.c file.c \
9		ftperr.h httperr.h
10INCS=		fetch.h
11MAN=		fetch.3
12CLEANFILES=	ftperr.h httperr.h
13
14.if !defined(NOCRYPT) && !defined(NOSECURE) && !defined(NO_OPENSSL)
15CFLAGS+=	-DWITH_SSL
16DPADD=		${LIBCRYPTO} ${LIBSSL}
17LDADD=		-lcrypto -lssl
18.endif
19
20NO_WERROR=	yes
21
22SHLIB_MAJOR=    3
23SHLIB_MINOR=	0
24
25ftperr.h: ftp.errors
26	@echo "static struct fetcherr _ftp_errlist[] = {" > ${.TARGET}
27	@cat ${.ALLSRC} \
28	  | grep -v ^# \
29	  | sort \
30	  | while read NUM CAT STRING; do \
31	    echo "    { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
32	  done >> ${.TARGET}
33	@echo "    { -1, FETCH_UNKNOWN, \"Unknown FTP error\" }" >> ${.TARGET}
34	@echo "};" >> ${.TARGET}
35
36httperr.h: http.errors
37	@echo "static struct fetcherr _http_errlist[] = {" > ${.TARGET}
38	@cat ${.ALLSRC} \
39	  | grep -v ^# \
40	  | sort \
41	  | while read NUM CAT STRING; do \
42	    echo "    { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
43	  done >> ${.TARGET}
44	@echo "    { -1, FETCH_UNKNOWN, \"Unknown HTTP error\" }" >> ${.TARGET}
45	@echo "};" >> ${.TARGET}
46
47MLINKS+= fetch.3 fetchFreeURL.3
48MLINKS+= fetch.3 fetchGet.3
49MLINKS+= fetch.3 fetchGetFTP.3
50MLINKS+= fetch.3 fetchGetFile.3
51MLINKS+= fetch.3 fetchGetHTTP.3
52MLINKS+= fetch.3 fetchGetURL.3
53MLINKS+= fetch.3 fetchList.3
54MLINKS+= fetch.3 fetchListFTP.3
55MLINKS+= fetch.3 fetchListFile.3
56MLINKS+= fetch.3 fetchListHTTP.3
57MLINKS+= fetch.3 fetchListURL.3
58MLINKS+= fetch.3 fetchMakeURL.3
59MLINKS+= fetch.3 fetchParseURL.3
60MLINKS+= fetch.3 fetchPut.3
61MLINKS+= fetch.3 fetchPutFTP.3
62MLINKS+= fetch.3 fetchPutFile.3
63MLINKS+= fetch.3 fetchPutHTTP.3
64MLINKS+= fetch.3 fetchPutURL.3
65MLINKS+= fetch.3 fetchStat.3
66MLINKS+= fetch.3 fetchStatFTP.3
67MLINKS+= fetch.3 fetchStatFile.3
68MLINKS+= fetch.3 fetchStatHTTP.3
69MLINKS+= fetch.3 fetchStatURL.3
70MLINKS+= fetch.3 fetchXGet.3
71MLINKS+= fetch.3 fetchXGetFTP.3
72MLINKS+= fetch.3 fetchXGetFile.3
73MLINKS+= fetch.3 fetchXGetHTTP.3
74MLINKS+= fetch.3 fetchXGetURL.3
75
76.include <bsd.lib.mk>
77