]> git.proxmox.com Git - mirror_qemu.git/commitdiff
buildsys: Move libusb cflags/libs to per object
authorFam Zheng <famz@redhat.com>
Thu, 7 Sep 2017 08:29:17 +0000 (16:29 +0800)
committerFam Zheng <famz@redhat.com>
Fri, 22 Sep 2017 02:20:34 +0000 (10:20 +0800)
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170907082918.7299-9-famz@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
configure
hw/usb/Makefile.objs

index c5d5f02c08c47e40973440bddbf7291502a0d813..a6204651d5986b266cc6ded45d79ce35591fc396 100755 (executable)
--- a/configure
+++ b/configure
@@ -4221,8 +4221,6 @@ if test "$libusb" != "no" ; then
         libusb="yes"
         libusb_cflags=$($pkg_config --cflags libusb-1.0)
         libusb_libs=$($pkg_config --libs libusb-1.0)
-        QEMU_CFLAGS="$QEMU_CFLAGS $libusb_cflags"
-        libs_softmmu="$libs_softmmu $libusb_libs"
     else
         if test "$libusb" = "yes"; then
             feature_not_found "libusb" "Install libusb devel >= 1.0.13"
@@ -5789,6 +5787,8 @@ fi
 
 if test "$libusb" = "yes" ; then
   echo "CONFIG_USB_LIBUSB=y" >> $config_host_mak
+  echo "LIBUSB_CFLAGS=$libusb_cflags" >> $config_host_mak
+  echo "LIBUSB_LIBS=$libusb_libs" >> $config_host_mak
 fi
 
 if test "$usb_redir" = "yes" ; then
index 9aceb6cc3dfa4a5d03f38c1e5df04e9470899fda..05afbd36fa7343279f487361bf3961667c50a8be 100644 (file)
@@ -46,6 +46,11 @@ else
 common-obj-y += host-stub.o
 endif
 
+host-libusb.o-cflags := $(LIBUSB_CFLAGS)
+host-libusb.o-libs := $(LIBUSB_LIBS)
+
 ifeq ($(CONFIG_USB_LIBUSB),y)
 common-obj-$(CONFIG_XEN) += xen-usb.o
+xen-usb.o-cflags := $(LIBUSB_CFLAGS)
+xen-usb.o-libs := $(LIBUSB_LIBS)
 endif