08.05.2014 17:08, Paolo Bonzini wrote: > To be squashed in Michael's "libcacard: remove libcacard-specific CFLAGS > and LIBS from global vars".
This should be squashed into that commit, no need to have two halves touching the same place. I thought about removing the indirection for SMARTCARD_INCLUDES but didn't bother really, yes it is nicer this way. However, I still (in combined result of the 2 patches) miss one little detail about libcacard and this stuff, which this patch also does a bit wrong. $(NSS_LIBS) is not a dependency of hw/usb/ccid-card-emulated.o, it is a dependency of libcacard/vcard_emul_nss.o - the only single file in whole qemu tree which actually uses nss stuff. Hopefully, it works after the per-object -libs fixup patch.. ;) (To my taste, qemu should link with libcacard.so, not with individual objects of libcacard. Or should be able to do that, anyway.) Thanks, /mjt > Signed-off-by: Paolo Bonzini <[email protected]> > --- > configure | 2 -- > hw/usb/Makefile.objs | 4 ++-- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/configure b/configure > index b0c0c9c..25d59f9 100755 > --- a/configure > +++ b/configure > @@ -3470,7 +3470,6 @@ if test "$smartcard_nss" != "no"; then > #include <pk11pub.h> > int main(void) { PK11_FreeSlot(0); return 0; } > EOF > - smartcard_includes="-I\$(SRC_PATH)/libcacard" > # FIXME: do not include $glib_* in here > nss_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs" > nss_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags" > @@ -4497,7 +4496,6 @@ fi > > if test "$smartcard_nss" = "yes" ; then > echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak > - echo "SMARTCARD_INCLUDES=$smartcard_includes" >> $config_host_mak > echo "NSS_LIBS=$nss_libs" >> $config_host_mak > echo "NSS_CFLAGS=$nss_cflags" >> $config_host_mak > fi > diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs > index 54d3982..a32b38b 100644 > --- a/hw/usb/Makefile.objs > +++ b/hw/usb/Makefile.objs > @@ -24,8 +24,8 @@ ifeq ($(CONFIG_USB_SMARTCARD),y) > common-obj-y += dev-smartcard-reader.o > common-obj-y += ccid-card-passthru.o > common-obj-$(CONFIG_SMARTCARD_NSS) += ccid-card-emulated.o > -ccid-card-emulated.o-cflags := $(SMARTCARD_INCLUDES) > -libs_softmmu += $(NSS_LIBS) > +ccid-card-emulated.o-cflags := -I$(SRC_PATH)/libcacard > +ccid-card-emulated.o-libs += $(NSS_LIBS) > endif > > ifeq ($(CONFIG_POSIX),y) >
