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