以下Makefile,解压libcurl,配置它,创建一个静态库并链接到主程序。
如何将其翻译成Scons?
我尝试做this这样的事情,但没有用。
Makefile的片段:
LIBCURL:=./lib/libcurl.a
all: $(TARGET)
$(TARGET): $(LIBCURL)
$(LIBCURL):
cd ./packages; tar jxfv curl-$(CURL_VER).tar.bz2; ln -sf curl-$(CURL_VER) curl; \
patch -d curl -p1 < ../patches/curl-trace-info-error.patch
mkdir -p $(CURL_BUILD);
cd $(CURL_BUILD); ../../packages/curl/configure --prefix=$(CURL_BUILD) \
--without-libidn \
--without-libssh2 \
--disable-ldap \
--disable-ipv6 \
--enable-thread \
--with-random=/dev/urandom \
--with-ssl=/usr/include/openssl \
--enable-shared=no \
--enable-ares=$(CARES_MAKE_DIR) \
CFLAGS="$(PROF_FLAG) $(DEBUG_FLAGS) $(OPT_FLAGS) -DCURL_MAX_WRITE_SIZE=4096"
make -C $(CURL_BUILD); make -C $(CURL_BUILD)/lib install; make -C $(CURL_BUILD)/include/curl install;
mkdir -p ./inc; mkdir -p ./lib
cp -a $(CURL_BUILD)/include/curl ./inc/curl
cp -pf $(CURL_BUILD)/lib/libcurl.*a ./lib