blob: d93a98d7305dd1cf25a458fae0f26c488badd1a4 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001
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
45populate_sdk:
46 cp -afvp $(INSTALL_DIR)/include/* $(CROSS_COMPILE_SYSROOT)/usr/include/
47 cp -afvp $(INSTALL_DIR)/lib/* $(CROSS_COMPILE_SYSROOT)/usr/lib/
48 cp -afvp $(INSTALL_DIR)/bin/* $(CROSS_COMPILE_SYSROOT)/usr/bin/