The following Makefile, untars libcurl, configures it, creates a static library and links to the main program.
How do I do translate it to Scons?
I tried to do something like this but of no avail.
Snippet of a 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