dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

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

Alon Levy c8a79a
From 373d00412f13f280619fd161e780cd5da5dfc1a3 Mon Sep 17 00:00:00 2001
Alon Levy c8a79a
From: Alon Levy <alevy@redhat.com>
Alon Levy c8a79a
Date: Thu, 29 Nov 2012 14:11:19 +0200
Alon Levy c8a79a
Subject: [PATCH] configure: move vscclient binary under libcacard
Alon Levy c8a79a
Alon Levy c8a79a
build rule is in top level Makefile like other tools.
Alon Levy c8a79a
Alon Levy c8a79a
build rule also exists in libcacard for installation purposes. This was
Alon Levy c8a79a
fixed in a better way in 1.3.0-rc2
Alon Levy c8a79a
---
Alon Levy c8a79a
 Makefile           |  4 ++--
Alon Levy c8a79a
 Makefile.objs      | 11 ++++++-----
Alon Levy c8a79a
 configure          |  2 +-
Alon Levy c8a79a
 libcacard/Makefile |  6 +++++-
Alon Levy c8a79a
 4 files changed, 14 insertions(+), 9 deletions(-)
Alon Levy c8a79a
Alon Levy c8a79a
diff --git a/Makefile b/Makefile
Alon Levy c8a79a
index dd11e3c..13c1693 100644
Alon Levy c8a79a
--- a/Makefile
Alon Levy c8a79a
+++ b/Makefile
Alon Levy c8a79a
@@ -168,8 +168,8 @@ qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y)
Alon Levy c8a79a
 
Alon Levy c8a79a
 qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
Alon Levy c8a79a
 
Alon Levy c8a79a
-vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) $(tools-obj-y) qemu-timer-common.o libcacard/vscclient.o
Alon Levy c8a79a
-	$(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(libcacard_libs) $(LIBS),"  LINK  $@")
Alon Levy c8a79a
+libcacard/vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o iov.o cutils.o qemu-user.o libcacard/vscclient.o
Alon Levy c8a79a
+libcacard/vscclient$(EXESUF): LIBS += $(libcacard_libs)
Alon Levy c8a79a
 
Alon Levy c8a79a
 fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y)
Alon Levy c8a79a
 fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
Alon Levy c8a79a
diff --git a/Makefile.objs b/Makefile.objs
Alon Levy c8a79a
index 4412757..92d6b4a 100644
Alon Levy c8a79a
--- a/Makefile.objs
Alon Levy c8a79a
+++ b/Makefile.objs
Alon Levy c8a79a
@@ -206,11 +206,12 @@ $(trace-obj-y): $(GENERATED_HEADERS)
Alon Levy c8a79a
 ######################################################################
Alon Levy c8a79a
 # smartcard
Alon Levy c8a79a
 
Alon Levy c8a79a
-libcacard-y += libcacard/cac.o libcacard/event.o
Alon Levy c8a79a
-libcacard-y += libcacard/vcard.o libcacard/vreader.o
Alon Levy c8a79a
-libcacard-y += libcacard/vcard_emul_nss.o
Alon Levy c8a79a
-libcacard-y += libcacard/vcard_emul_type.o
Alon Levy c8a79a
-libcacard-y += libcacard/card_7816.o
Alon Levy c8a79a
+libcacard-base-y += cac.o event.o
Alon Levy c8a79a
+libcacard-base-y += vcard.o vreader.o
Alon Levy c8a79a
+libcacard-base-y += vcard_emul_nss.o
Alon Levy c8a79a
+libcacard-base-y += vcard_emul_type.o
Alon Levy c8a79a
+libcacard-base-y += card_7816.o
Alon Levy c8a79a
+libcacard-y = $(addprefix libcacard/,$(libcacard-base-y))
Alon Levy c8a79a
 
Alon Levy c8a79a
 common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
Alon Levy c8a79a
 
Alon Levy c8a79a
diff --git a/configure b/configure
Alon Levy c8a79a
index 950912a..64b8aa7 100755
Alon Levy c8a79a
--- a/configure
Alon Levy c8a79a
+++ b/configure
Alon Levy c8a79a
@@ -3073,7 +3073,7 @@ if test "$softmmu" = yes ; then
Alon Levy c8a79a
     fi
Alon Levy c8a79a
   fi
Alon Levy c8a79a
   if test "$smartcard_nss" = "yes" ; then
Alon Levy c8a79a
-    tools="vscclient\$(EXESUF) $tools"
Alon Levy c8a79a
+    tools="libcacard/vscclient\$(EXESUF) $tools"
Alon Levy c8a79a
   fi
Alon Levy c8a79a
 fi
Alon Levy c8a79a
 
Alon Levy c8a79a
diff --git a/libcacard/Makefile b/libcacard/Makefile
Alon Levy c8a79a
index 9ce3117..88ed064 100644
Alon Levy c8a79a
--- a/libcacard/Makefile
Alon Levy c8a79a
+++ b/libcacard/Makefile
Alon Levy c8a79a
@@ -44,6 +44,10 @@ libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in
Alon Levy c8a79a
 		< $(libcacard_srcpath)/libcacard.pc.in > libcacard.pc,\
Alon Levy c8a79a
 	"  GEN   $@")
Alon Levy c8a79a
 
Alon Levy c8a79a
+VSCCLIENT_QEMU_OBJS=$(addprefix ../,$(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o iov.o cutils.o qemu-user.o)
Alon Levy c8a79a
+vscclient$(EXESUF): $(VSCCLIENT_QEMU_OBJS) $(libcacard-base-y) vscclient.o
Alon Levy c8a79a
+vscclient$(EXESUF): LIBS += $(libcacard_libs)
Alon Levy c8a79a
+
Alon Levy c8a79a
 .PHONY: install-libcacard
Alon Levy c8a79a
 
Alon Levy c8a79a
 install-libcacard: libcacard.pc libcacard.la vscclient
Alon Levy c8a79a
@@ -51,7 +55,7 @@ install-libcacard: libcacard.pc libcacard.la vscclient
Alon Levy c8a79a
 	$(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
Alon Levy c8a79a
 	$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
Alon Levy c8a79a
 	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
Alon Levy c8a79a
-	$(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
Alon Levy c8a79a
+	$(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient$(EXESUF) "$(DESTDIR)$(bindir)"
Alon Levy c8a79a
 	$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)"
Alon Levy c8a79a
 	$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
Alon Levy c8a79a
 	for inc in *.h; do \
Alon Levy c8a79a
-- 
Alon Levy c8a79a
1.8.0.1
Alon Levy c8a79a