Make this WARNS?=6 clean by explicitly using __DECONST for the write
[dragonfly.git] / lib / libfetch / Makefile
1 # $FreeBSD: src/lib/libfetch/Makefile,v 1.14.2.5 2003/01/09 11:50:32 des Exp $
2 # $DragonFly: src/lib/libfetch/Makefile,v 1.5 2004/08/16 14:19:31 joerg Exp $
3
4 LIB=            fetch
5 WARNS?=         6
6 CFLAGS+=        -I.
7 CFLAGS+=        -DINET6
8 SRCS=           fetch.c common.c ftp.c http.c file.c \
9                 ftperr.h httperr.h
10 INCS=           fetch.h
11 MAN=            fetch.3
12 CLEANFILES=     ftperr.h httperr.h
13
14 .if !defined(NOCRYPT) && !defined(NO_OPENSSL)
15 CFLAGS+=        -DWITH_SSL
16 DPADD=          ${LIBSSL} ${LIBCRYPTO}
17 LDADD=          -lssl -lcrypto
18 .endif
19
20 NO_WERROR=      yes
21
22 SHLIB_MAJOR=    3
23 SHLIB_MINOR=    0
24
25 ftperr.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
36 httperr.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
47 MLINKS+= fetch.3 fetchFreeURL.3
48 MLINKS+= fetch.3 fetchGet.3
49 MLINKS+= fetch.3 fetchGetFTP.3
50 MLINKS+= fetch.3 fetchGetFile.3
51 MLINKS+= fetch.3 fetchGetHTTP.3
52 MLINKS+= fetch.3 fetchGetURL.3
53 MLINKS+= fetch.3 fetchList.3
54 MLINKS+= fetch.3 fetchListFTP.3
55 MLINKS+= fetch.3 fetchListFile.3
56 MLINKS+= fetch.3 fetchListHTTP.3
57 MLINKS+= fetch.3 fetchListURL.3
58 MLINKS+= fetch.3 fetchMakeURL.3
59 MLINKS+= fetch.3 fetchParseURL.3
60 MLINKS+= fetch.3 fetchPut.3
61 MLINKS+= fetch.3 fetchPutFTP.3
62 MLINKS+= fetch.3 fetchPutFile.3
63 MLINKS+= fetch.3 fetchPutHTTP.3
64 MLINKS+= fetch.3 fetchPutURL.3
65 MLINKS+= fetch.3 fetchStat.3
66 MLINKS+= fetch.3 fetchStatFTP.3
67 MLINKS+= fetch.3 fetchStatFile.3
68 MLINKS+= fetch.3 fetchStatHTTP.3
69 MLINKS+= fetch.3 fetchStatURL.3
70 MLINKS+= fetch.3 fetchXGet.3
71 MLINKS+= fetch.3 fetchXGetFTP.3
72 MLINKS+= fetch.3 fetchXGetFile.3
73 MLINKS+= fetch.3 fetchXGetHTTP.3
74 MLINKS+= fetch.3 fetchXGetURL.3
75
76 .include <bsd.lib.mk>