[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 4/4] build-sys: move -lcurl out of libs and spec
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [RFC PATCH 4/4] build-sys: move -lcurl out of libs and specify it for curl.o |
Date: |
Tue, 18 Jun 2013 21:34:04 +0400 |
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 <address@hidden>
---
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
- [Qemu-devel] [RFC PATCH 0/4] per-object libraries, Michael Tokarev, 2013/06/18
- [Qemu-devel] [RFC PATCH 2/4] build-sys: allow object-specific libraries to be used to link executables, Michael Tokarev, 2013/06/18
- [Qemu-devel] [RFC PATCH 1/4] build-sys: strip leading ./ from $(obj), Michael Tokarev, 2013/06/18
- [Qemu-devel] [RFC PATCH 3/4] build-sys: allow per-object foo.cflags variables, Michael Tokarev, 2013/06/18
- [Qemu-devel] [RFC PATCH 4/4] build-sys: move -lcurl out of libs and specify it for curl.o,
Michael Tokarev <=
- Re: [Qemu-devel] [RFC PATCH 0/4] per-object libraries, Michael Tokarev, 2013/06/18
- Re: [Qemu-devel] [RFC PATCH 0/4] per-object libraries, Stefan Hajnoczi, 2013/06/19
- Re: [Qemu-devel] [RFC PATCH 0/4] per-object libraries, Paolo Bonzini, 2013/06/19