[Spice-devel] [PATCH usbclerk 4/6] build-sys: link with libusbredir

Uri Lublin uril at redhat.com
Tue Feb 19 05:04:27 PST 2013


On 02/19/2013 12:35 PM, Marc-André Lureau wrote:
> There is no need to copy files, we have the lib already, and we can
> linking statically.
> ---
>   Makefile.am      |   4 +-
>   configure.ac     |   5 +-
>   stdint.h         | 256 ------------------------------------------------------
>   usbclerk.vcproj  |  40 ---------
>   usbredirfilter.c | 260 -------------------------------------------------------
>   usbredirfilter.h | 127 ---------------------------
>   6 files changed, 5 insertions(+), 687 deletions(-)
>   delete mode 100644 stdint.h
>   delete mode 100644 usbredirfilter.c
>   delete mode 100644 usbredirfilter.h
>
> diff --git a/Makefile.am b/Makefile.am
> index 77cf7a1..bb28145 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -3,8 +3,8 @@ NULL =
>
>   bin_PROGRAMS = usbclerk usbclerktest
>
> -usbclerk_LDFLAGS = $(LIBWDI_LIBS) -lversion -all-static
> -usbclerk_CPPFLAGS = $(LIBWDI_CFLAGS)
> +usbclerk_LDFLAGS = $(USBCLERK_LIBS) -lversion -lsetupapi -all-static
> +usbclerk_CPPFLAGS = $(USBCLERK_CFLAGS)

nitpick  - usually PKG_LIBS means libs provided by pkg, but here its 
libs required by pkg.
Maybe rename to USBCLERK_DEPS_LIBS and CFLAGS

>   usbclerk_SOURCES = usbclerk.cpp vdlog.cpp usbclerk.h vdlog.h
>
>   usbclerktest_LDFLAGS =
> diff --git a/configure.ac b/configure.ac
> index aafb51c..c6c9329 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -11,8 +11,9 @@ AM_MAINTAINER_MODE([enable])
>   LT_INIT
>   AC_PROG_CXX
>
> -PKG_CHECK_MODULES(LIBWDI, libwdi)
> -LIBWDI_LIBS=`$PKG_CONFIG --static --libs libwdi`
> +USBCLERK_DEPS="libwdi libusbredirparser-0.5>= 0.6"
> +PKG_CHECK_MODULES(USBCLERK, $USBCLERK_DEPS)
> +LIBWDI_LIBS=`$PKG_CONFIG --static --libs $USBCLERK_DEPS`

s/LIBWDI_LIBS/USBCLERK_LIBS/




More information about the Spice-devel mailing list