Received: from eggs.gnu.org ([2001:4830:134:3::10]:39832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoztA-0007Ag-3Q for qemu-devel@nongnu.org; Tue, 18 Jun 2013 13:40:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uozt6-0006pq-OA for qemu-devel@nongnu.org; Tue, 18 Jun 2013 13:40:16 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:53312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uozt6-0006pU-H8 for qemu-devel@nongnu.org; Tue, 18 Jun 2013 13:40:12 -0400 From: Michael Tokarev Date: Tue, 18 Jun 2013 21:34:04 +0400 Message-Id: <1371576844-28743-5-git-send-email-mjt@msgid.tls.msk.ru> In-Reply-To: <1371576844-28743-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1371576844-28743-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: [Qemu-devel] [RFC PATCH 4/4] build-sys: move -lcurl out of libs and specify it for curl.o List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Tokarev We only need to link -lcurl into executables which actually use/link curl.o, so make -lcurl object-specific library, using curl.libs variable. While at it, also use new curl.cflags variable to specify curl-specific cflags, for symmetry with .libs, and move whole declaration into the if..endif block where curl.o is defined. Signed-off-by: Michael Tokarev --- block/Makefile.objs | 4 ++-- configure | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/block/Makefile.objs b/block/Makefile.objs index 7b7189c..9dc54c9 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -13,6 +13,8 @@ ifeq ($(CONFIG_POSIX),y) block-obj-y += nbd.o sheepdog.o block-obj-$(CONFIG_LIBISCSI) += iscsi.o block-obj-$(CONFIG_CURL) += curl.o +$(obj)curl.cflags = $(CURL_CFLAGS) +$(obj)curl.libs = $(CURL_LIBS) block-obj-$(CONFIG_RBD) += rbd.o block-obj-$(CONFIG_GLUSTERFS) += gluster.o block-obj-$(CONFIG_LIBSSH2) += ssh.o @@ -21,5 +23,3 @@ endif common-obj-y += stream.o common-obj-y += commit.o common-obj-y += mirror.o - -$(obj)curl.o: QEMU_CFLAGS+=$(CURL_CFLAGS) diff --git a/configure b/configure index ad32f87..fe6d8b1 100755 --- a/configure +++ b/configure @@ -2176,8 +2176,6 @@ EOF curl_libs=`$curlconfig --libs 2>/dev/null` if compile_prog "$curl_cflags" "$curl_libs" ; then curl=yes - libs_tools="$curl_libs $libs_tools" - libs_softmmu="$curl_libs $libs_softmmu" else if test "$curl" = "yes" ; then feature_not_found "curl" @@ -3784,6 +3782,7 @@ fi if test "$curl" = "yes" ; then echo "CONFIG_CURL=y" >> $config_host_mak echo "CURL_CFLAGS=$curl_cflags" >> $config_host_mak + echo "CURL_LIBS=$curl_libs" >> $config_host_mak fi if test "$brlapi" = "yes" ; then echo "CONFIG_BRLAPI=y" >> $config_host_mak -- 1.7.10.4