aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2017-09-07 16:29:18 +0800
committerFam Zheng <famz@redhat.com>2017-09-22 10:20:34 +0800
commitcc7923fc0762c80f9cc140a20014b3cc8f3dd0aa (patch)
treea541616c8c70e28508b8a1c3d56ad299117c36ae
parentb878b652df08360e5440710acf987d6b6ab945b7 (diff)
buildsys: Move usb redir cflags/libs to per object
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170907082918.7299-10-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>
-rwxr-xr-xconfigure4
-rw-r--r--hw/usb/Makefile.objs2
2 files changed, 4 insertions, 2 deletions
diff --git a/configure b/configure
index a6204651d5..d8455d42e1 100755
--- a/configure
+++ b/configure
@@ -4235,8 +4235,6 @@ if test "$usb_redir" != "no" ; then
usb_redir="yes"
usb_redir_cflags=$($pkg_config --cflags libusbredirparser-0.5)
usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5)
- QEMU_CFLAGS="$QEMU_CFLAGS $usb_redir_cflags"
- libs_softmmu="$libs_softmmu $usb_redir_libs"
else
if test "$usb_redir" = "yes"; then
feature_not_found "usb-redir" "Install usbredir devel"
@@ -5793,6 +5791,8 @@ fi
if test "$usb_redir" = "yes" ; then
echo "CONFIG_USB_REDIR=y" >> $config_host_mak
+ echo "USB_REDIR_CFLAGS=$usb_redir_cflags" >> $config_host_mak
+ echo "USB_REDIR_LIBS=$usb_redir_libs" >> $config_host_mak
fi
if test "$opengl" = "yes" ; then
diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
index 05afbd36fa..9255234c63 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -38,6 +38,8 @@ endif
# usb redirection
common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
+redirect.o-cflags = $(USB_REDIR_CFLAGS)
+redirect.o-libs = $(USB_REDIR_LIBS)
# usb pass-through
ifeq ($(CONFIG_LIBUSB)$(CONFIG_USB),yy)