blob: f683860a12ef0481dddd32644a390e58b08df139 [file] [log] [blame]
yuezonghec78e2ef2025-02-13 17:57:46 -08001
2include $(COMMON_BASE_MK)
3
4NAME=libcurl
5SRC_DIR=curl-7.54.1
6INSTALL_DIR=$(LIB_DIR)/$(NAME)/install
7BUILD_DIR=build
8GEN_MAKEFILE=$(BUILD_DIR)/Makefile
9
10CONFIG_OPTS = --target=arm-linux --host=arm-linux
11CONFIG_OPTS += --enable-static
12ifeq ($(CONFIG_LIBCURL_SHARE_LIB), y)
13CONFIG_OPTS += --enable-shared
14else
15CONFIG_OPTS += --disable-shared
16endif
17CONFIG_OPTS += --enable-threaded-resolver
18CONFIG_OPTS += --without-libidn --without-ssl --without-librtmp --without-gnutls --without-nss --without-libssh2 \
19 --without-zlib --without-winidn --disable-telnet --disable-tftp --disable-smtp \
20 --disable-imap --disable-pop3 --disable-rtsp --disable-ldap --disable-ldaps --disable-ipv6
21
22all: $(GEN_MAKEFILE)
23 make -C build all
24 make -C build install
25 cp -v $(SRC_DIR)/lib/curl_md5.h $(INSTALL_DIR)/include/curl/
26 cp -v $(SRC_DIR)/lib/curl_hmac.h $(INSTALL_DIR)/include/curl/
27
28$(GEN_MAKEFILE):
29 mkdir -p $(BUILD_DIR)
30 cd $(BUILD_DIR); ../$(SRC_DIR)/configure --prefix=$(INSTALL_DIR) $(CONFIG_OPTS)
31
32clean:
33 -rm -fr $(BUILD_DIR) $(INSTALL_DIR)
34
35romfs:
36 cd $(INSTALL_DIR)/lib; \
37 for i in *.so*; do \
38 if [ -L $$i ]; then \
39 $(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \
40 elif [ -f $$i ]; then \
41 $(ROMFSINST) /lib/$$i; \
42 fi; \
43 done
44