Patchwork [RFC,3/6] Makefile: define curl cflags and libs with object

login
register
mail settings
Submitter Fam Zheng
Date Sept. 5, 2013, 10:20 a.m.
Message ID <1378376448-29036-4-git-send-email-famz@redhat.com>
Download mbox | patch
Permalink /patch/272847/
State New
Headers show

Comments

Fam Zheng - Sept. 5, 2013, 10:20 a.m.
We have per object cflags and libs support now, move CURL_CFLAGS and
CURL_LIBS from global option variables to a per object basis.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/Makefile.objs | 3 ++-
 configure           | 3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/block/Makefile.objs b/block/Makefile.objs
index 4cf9aa4..b1e1520 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -23,4 +23,5 @@  common-obj-y += commit.o
 common-obj-y += mirror.o
 common-obj-y += backup.o
 
-$(obj)/curl.o: QEMU_CFLAGS+=$(CURL_CFLAGS)
+$(obj)/curl.o-cflags := $(CURL_CFLAGS)
+$(obj)/curl.o-libs := $(CURL_LIBS)
diff --git a/configure b/configure
index 0a55c20..48e14b8 100755
--- a/configure
+++ b/configure
@@ -2199,8 +2199,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"
@@ -3878,6 +3876,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