render / rpms / qemu

Forked from rpms/qemu 10 months ago
Clone

Blame 0002-configure-move-vscclient-binary-under-libcacard.patch

22d63f
From df9d09b15cb4b8397bfe984bf3f54dbb5457d446 Mon Sep 17 00:00:00 2001
22d63f
From: Alon Levy <alevy@redhat.com>
22d63f
Date: Thu, 29 Nov 2012 14:11:19 +0200
22d63f
Subject: [PATCH] configure: move vscclient binary under libcacard
22d63f
22d63f
build rule is in top level Makefile like other tools.
22d63f
22d63f
build rule also exists in libcacard for installation purposes. This was
22d63f
fixed in a better way in 1.3.0-rc2
22d63f
---
22d63f
 Makefile           |  4 ++--
22d63f
 Makefile.objs      | 11 ++++++-----
22d63f
 configure          |  2 +-
22d63f
 libcacard/Makefile |  6 +++++-
22d63f
 4 files changed, 14 insertions(+), 9 deletions(-)
22d63f
22d63f
diff --git a/Makefile b/Makefile
22d63f
index 9ecbcbb..c2d34a9 100644
22d63f
--- a/Makefile
22d63f
+++ b/Makefile
22d63f
@@ -197,8 +197,8 @@ qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y) libqemustub.a
22d63f
 
22d63f
 qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
22d63f
 
22d63f
-vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) libcacard/vscclient.o libqemustub.a
22d63f
-	$(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(libcacard_libs) $(LIBS),"  LINK  $@")
22d63f
+libcacard/vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) iov.o cutils.o qemu-user.o libcacard/vscclient.o libqemustub.a
22d63f
+libcacard/vscclient$(EXESUF): LIBS += $(libcacard_libs)
22d63f
 
22d63f
 fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y)
22d63f
 fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
22d63f
diff --git a/Makefile.objs b/Makefile.objs
22d63f
index 3c7abca..140d592 100644
22d63f
--- a/Makefile.objs
22d63f
+++ b/Makefile.objs
22d63f
@@ -211,11 +211,12 @@ $(trace-obj-y): $(GENERATED_HEADERS)
22d63f
 ######################################################################
22d63f
 # smartcard
22d63f
 
22d63f
-libcacard-y += libcacard/cac.o libcacard/event.o
22d63f
-libcacard-y += libcacard/vcard.o libcacard/vreader.o
22d63f
-libcacard-y += libcacard/vcard_emul_nss.o
22d63f
-libcacard-y += libcacard/vcard_emul_type.o
22d63f
-libcacard-y += libcacard/card_7816.o
22d63f
+libcacard-base-y += cac.o event.o
22d63f
+libcacard-base-y += vcard.o vreader.o
22d63f
+libcacard-base-y += vcard_emul_nss.o
22d63f
+libcacard-base-y += vcard_emul_type.o
22d63f
+libcacard-base-y += card_7816.o
22d63f
+libcacard-y = $(addprefix libcacard/,$(libcacard-base-y))
22d63f
 
22d63f
 common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
22d63f
 
22d63f
diff --git a/configure b/configure
22d63f
index 994f731..7498e3f 100755
22d63f
--- a/configure
22d63f
+++ b/configure
22d63f
@@ -3136,7 +3136,7 @@ if test "$softmmu" = yes ; then
22d63f
     fi
22d63f
   fi
22d63f
   if test "$smartcard_nss" = "yes" ; then
22d63f
-    tools="vscclient\$(EXESUF) $tools"
22d63f
+    tools="libcacard/vscclient\$(EXESUF) $tools"
22d63f
   fi
22d63f
 fi
22d63f
 
22d63f
diff --git a/libcacard/Makefile b/libcacard/Makefile
22d63f
index 49a9729..750713a 100644
22d63f
--- a/libcacard/Makefile
22d63f
+++ b/libcacard/Makefile
22d63f
@@ -47,6 +47,10 @@ libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in
22d63f
 		< $(libcacard_srcpath)/libcacard.pc.in > libcacard.pc,\
22d63f
 	"  GEN   $@")
22d63f
 
22d63f
+VSCCLIENT_QEMU_OBJS=$(addprefix ../,$(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o iov.o cutils.o qemu-user.o)
22d63f
+vscclient$(EXESUF): $(VSCCLIENT_QEMU_OBJS) $(libcacard-base-y) vscclient.o
22d63f
+vscclient$(EXESUF): LIBS += $(libcacard_libs)
22d63f
+
22d63f
 .PHONY: install-libcacard
22d63f
 
22d63f
 install-libcacard: libcacard.pc libcacard.la vscclient
22d63f
@@ -54,7 +58,7 @@ install-libcacard: libcacard.pc libcacard.la vscclient
22d63f
 	$(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
22d63f
 	$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
22d63f
 	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
22d63f
-	$(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
22d63f
+	$(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient$(EXESUF) "$(DESTDIR)$(bindir)"
22d63f
 	$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)"
22d63f
 	$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
22d63f
 	for inc in *.h; do \
22d63f
-- 
6986e1
1.8.1
22d63f