lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | |
| 2 | include $(COMMON_BASE_MK) |
| 3 | |
| 4 | NAME=libcurl |
| 5 | SRC_DIR=curl-7.54.1 |
| 6 | INSTALL_DIR=$(LIB_DIR)/$(NAME)/install |
| 7 | BUILD_DIR=build |
| 8 | GEN_MAKEFILE=$(BUILD_DIR)/Makefile |
| 9 | |
| 10 | CONFIG_OPTS = --target=arm-linux --host=arm-linux |
| 11 | CONFIG_OPTS += --enable-static |
| 12 | ifeq ($(CONFIG_LIBCURL_SHARE_LIB), y) |
| 13 | CONFIG_OPTS += --enable-shared |
| 14 | else |
| 15 | CONFIG_OPTS += --disable-shared |
| 16 | endif |
| 17 | CONFIG_OPTS += --enable-threaded-resolver |
| 18 | CONFIG_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 | |
| 22 | all: $(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 | |
| 32 | clean: |
| 33 | -rm -fr $(BUILD_DIR) $(INSTALL_DIR) |
| 34 | |
| 35 | romfs: |
| 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 | |
| 45 | populate_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/ |