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