2007-05-07 05:58:30 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# curl
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-11-27 09:21:58 +01:00
|
|
|
CURL_VERSION:=7.17.1
|
|
|
|
LIBCURL_VERSION:=4.0.1
|
2007-05-07 05:58:30 +02:00
|
|
|
CURL_SOURCE:=curl-$(CURL_VERSION).tar.bz2
|
|
|
|
CURL_SITE:=http://curl.haxx.se/download/
|
|
|
|
CURL_CAT:=$(BZCAT)
|
|
|
|
CURL_DIR:=$(BUILD_DIR)/curl-$(CURL_VERSION)
|
|
|
|
CURL_BINARY:=curl
|
2007-11-28 09:57:26 +01:00
|
|
|
CURL_DESTDIR:=$(STAGING_DIR)/usr
|
2007-05-07 05:58:30 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(CURL_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(CURL_SITE)/$(CURL_SOURCE)
|
|
|
|
|
|
|
|
curl-source: $(DL_DIR)/$(CURL_SOURCE)
|
|
|
|
|
|
|
|
$(CURL_DIR)/.unpacked: $(DL_DIR)/$(CURL_SOURCE)
|
|
|
|
$(CURL_CAT) $(DL_DIR)/$(CURL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-11-27 09:21:58 +01:00
|
|
|
toolchain/patch-kernel.sh $(CURL_DIR) package/curl/ curl-$(CURL_VERSION)-\*.patch*
|
2007-05-07 05:58:30 +02:00
|
|
|
touch $(CURL_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(CURL_DIR)/.configured: $(CURL_DIR)/.unpacked
|
|
|
|
(cd $(CURL_DIR); rm -rf config.cache; \
|
|
|
|
aclocal; \
|
|
|
|
libtoolize --force; \
|
|
|
|
./reconf; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2007-05-07 05:58:30 +02:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2007-11-28 09:57:26 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--libdir=/usr/lib \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--includedir=/usr/include \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-05-07 05:58:30 +02:00
|
|
|
touch $(CURL_DIR)/.configured
|
|
|
|
|
|
|
|
$(CURL_DIR)/src/.libs/$(CURL_BINARY): $(CURL_DIR)/.configured
|
|
|
|
$(MAKE) -C $(CURL_DIR)
|
|
|
|
|
2007-11-28 09:57:26 +01:00
|
|
|
$(CURL_DESTDIR)/bin/$(CURL_BINARY): $(CURL_DIR)/src/.libs/$(CURL_BINARY)
|
|
|
|
-mkdir $(CURL_DESTDIR)/bin
|
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(CURL_DIR) install
|
|
|
|
$(SED) "s,^libdir=.*,libdir=\'$(CURL_DESTDIR)/lib\',g" $(CURL_DESTDIR)/lib/libcurl.la
|
|
|
|
touch $(CURL_DESTDIR)/bin/$(CURL_BINARY)
|
2007-05-07 05:58:30 +02:00
|
|
|
|
2007-11-28 09:57:26 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/libcurl.so.$(LIBCURL_VERSION): $(CURL_DESTDIR)/bin/$(CURL_BINARY)
|
2007-05-07 05:58:30 +02:00
|
|
|
-mkdir $(TARGET_DIR)/usr/lib
|
|
|
|
-mkdir $(TARGET_DIR)/usr/bin
|
2007-11-28 09:57:26 +01:00
|
|
|
cp -a $(CURL_DESTDIR)/lib/libcurl.so* $(TARGET_DIR)/usr/lib
|
2007-11-27 09:21:58 +01:00
|
|
|
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libcurl.so.$(LIBCURL_VERSION)
|
2007-05-07 05:58:30 +02:00
|
|
|
|
2007-11-27 09:21:58 +01:00
|
|
|
$(TARGET_DIR)/usr/bin/$(CURL_BINARY): $(TARGET_DIR)/usr/lib/libcurl.so.$(LIBCURL_VERSION)
|
2007-11-28 09:57:26 +01:00
|
|
|
cp -a $(CURL_DESTDIR)/bin/$(CURL_BINARY) $(TARGET_DIR)/usr/bin
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/$(CURL_BINARY)
|
2007-05-07 05:58:30 +02:00
|
|
|
|
|
|
|
curl: uclibc $(TARGET_DIR)/usr/bin/$(CURL_BINARY)
|
|
|
|
|
2007-11-28 09:57:26 +01:00
|
|
|
libcurl: $(CURL_DESTDIR)/bin/$(CURL_BINARY)
|
2007-05-07 05:58:30 +02:00
|
|
|
|
|
|
|
curl-clean:
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/libcurl.so*
|
|
|
|
rm -f $(TARGET_DIR)/usr/bin/curl
|
2007-11-28 09:57:26 +01:00
|
|
|
rm -f $(CURL_DESTDIR)/bin/curl*
|
|
|
|
rm -f $(CURL_DESTDIR)/lib/libcurl.so*
|
|
|
|
rm -rf $(CURL_DESTDIR)/include/curl
|
2007-05-07 05:58:30 +02:00
|
|
|
-$(MAKE) -C $(CURL_DIR) clean
|
|
|
|
|
|
|
|
curl-dirclean:
|
|
|
|
rm -rf $(CURL_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_CURL)),y)
|
|
|
|
TARGETS+=curl
|
|
|
|
endif
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LIBCURL)),y)
|
|
|
|
TARGETS+=libcurl
|
|
|
|
endif
|