Skip to content

Commit

Permalink
buildsys: Move libusb 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-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>
  • Loading branch information
Fam Zheng committed Sep 22, 2017
1 parent 7b62bf5 commit b878b65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions hw/usb/Makefile.objs
Expand Up @@ -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

0 comments on commit b878b65

Please sign in to comment.