-
Notifications
You must be signed in to change notification settings - Fork 3.7k
/
Makefile
77 lines (69 loc) · 1.71 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
SRC_NAME=curl-7.62.0
SRC_URL=https://github.com/curl/curl/releases/download/curl-7_62_0/curl-7.62.0.tar.gz
all: download_test extract_test config_test
$(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME)
download_test:
( if [ ! -f $(SRC_NAME).tar.gz ]; then \
wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.gz $(SRC_URL); \
fi )
extract_test:
( if [ ! -d $(SRC_NAME) ]; then \
tar zxf $(SRC_NAME).tar.gz; \
fi )
config_test:
( if [ -f ./config_done ]; then \
echo "the same configuration"; \
else \
make configure && touch config_done; \
fi )
configure:
( cd $(SRC_NAME) ; \
./configure \
--prefix=$(STAGEDIR) \
--enable-static \
--enable-shared \
$(if $(CONFIG_IPV6),--enable-ipv6,--disable-ipv6) \
--disable-gopher \
--disable-ldap \
--disable-ldaps \
--disable-rtsp \
--disable-telnet \
--disable-tftp \
--disable-smtp \
--disable-pop3 \
--disable-imap \
--disable-sspi \
--disable-dict \
--disable-ares \
--disable-debug \
--disable-curldebug \
--disable-manual \
--disable-verbose \
--disable-tls-srp \
--disable-libcurl-option \
--disable-threaded-resolver \
--without-gnutls \
--without-ca-bundle \
--without-libidn \
--without-libssh2 \
--without-krb4 \
--without-nss \
--without-ssl \
--with-random=/dev/urandom \
--with-zlib=$(STAGEDIR) \
--with-mbedtls=$(STAGEDIR) \
--host=$(HOST_TARGET) \
--build=$(HOST_BUILD) ; \
)
clean:
if [ -f $(SRC_NAME)/Makefile ] ; then \
$(MAKE) -C $(SRC_NAME) distclean ; \
fi ; \
rm -f config_done
install:
$(MAKE) -C $(SRC_NAME) install DESTDIR=""
romfs:
ifeq ($(CONFIG_FIRMWARE_INCLUDE_CURL),y)
$(ROMFSINST) -d $(DESTDIR)/bin/curl /usr/bin/curl
endif
cp -fP $(DESTDIR)/lib/libcurl.so* $(ROMFSDIR)/lib