Skip to content

Commit

Permalink
buildsys: Move usb redir cflags/libs to per object
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fam Zheng committed Sep 22, 2017
1 parent b878b65 commit cc7923f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions hw/usb/Makefile.objs
Expand Up @@ -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)
Expand Down

0 comments on commit cc7923f

Please sign in to comment.