]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libfetch/Makefile
Merge llvm-project release/16.x llvmorg-16.0.3-0-gda3cd333bea5
[FreeBSD/FreeBSD.git] / lib / libfetch / Makefile
1 # $FreeBSD$
2
3 .include <src.opts.mk>
4
5 PACKAGE=        fetch
6
7 LIB=            fetch
8 CFLAGS+=        -I.
9 SRCS=           fetch.c common.c ftp.c http.c file.c \
10                 ftperr.h httperr.h
11 INCS=           fetch.h
12 MAN=            fetch.3
13 CLEANFILES=     ftperr.h httperr.h
14
15 .if ${MK_INET6_SUPPORT} != "no"
16 CFLAGS+=        -DINET6
17 .endif
18
19 .if ${MK_OPENSSL} != "no"
20 CFLAGS+=        -DWITH_SSL
21 CFLAGS+=        -DOPENSSL_API_COMPAT=0x10100000L
22 LIBADD+=        ssl crypto
23 .else
24 LIBADD+=        md
25 .endif
26
27 CFLAGS+=        -DFTP_COMBINE_CWDS
28
29 SHLIB_MAJOR=    6
30
31 ftperr.h: ftp.errors ${.CURDIR}/Makefile
32         @echo "static struct fetcherr ftp_errlist[] = {" > ${.TARGET}
33         @cat ${.CURDIR}/ftp.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 FTP error\" }" >> ${.TARGET}
40         @echo "};" >> ${.TARGET}
41
42 httperr.h: http.errors ${.CURDIR}/Makefile
43         @echo "static struct fetcherr http_errlist[] = {" > ${.TARGET}
44         @cat ${.CURDIR}/http.errors \
45           | grep -v ^# \
46           | sort \
47           | while read NUM CAT STRING; do \
48             echo "    { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
49           done >> ${.TARGET}
50         @echo "    { -1, FETCH_UNKNOWN, \"Unknown HTTP error\" }" >> ${.TARGET}
51         @echo "};" >> ${.TARGET}
52
53 MLINKS+= fetch.3 fetchFreeURL.3
54 MLINKS+= fetch.3 fetchGet.3
55 MLINKS+= fetch.3 fetchGetFTP.3
56 MLINKS+= fetch.3 fetchGetFile.3
57 MLINKS+= fetch.3 fetchGetHTTP.3
58 MLINKS+= fetch.3 fetchGetURL.3
59 MLINKS+= fetch.3 fetchList.3
60 MLINKS+= fetch.3 fetchListFTP.3
61 MLINKS+= fetch.3 fetchListFile.3
62 MLINKS+= fetch.3 fetchListHTTP.3
63 MLINKS+= fetch.3 fetchListURL.3
64 MLINKS+= fetch.3 fetchMakeURL.3
65 MLINKS+= fetch.3 fetchParseURL.3
66 MLINKS+= fetch.3 fetchPut.3
67 MLINKS+= fetch.3 fetchPutFTP.3
68 MLINKS+= fetch.3 fetchPutFile.3
69 MLINKS+= fetch.3 fetchPutHTTP.3
70 MLINKS+= fetch.3 fetchPutURL.3
71 MLINKS+= fetch.3 fetchReqHTTP.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>