[Spice-devel] [PATCH] make spice-server-replay utility smaller

Frediano Ziglio fziglio at redhat.com
Mon May 16 16:13:49 UTC 2016


spice-server-replay is built inside tests.
However tests are built linking to a convenience library causing all
spice-server code to be linked inside of the executable.
This is not a big problem however do not allow to easily use this
utility to test different binary version libraries.
Linking to just files and to the dynamic library allows to use
with different binary versions.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/tests/Makefile.am | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index b3e9740..91edd7c 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -67,7 +67,18 @@ noinst_LIBRARIES += \
 	libstat_test4.a \
 	$(NULL)
 
-spice_server_replay_SOURCES = replay.c
+spice_server_replay_SOURCES = replay.c		\
+	../event-loop.c				\
+	basic_event_loop.c			\
+	basic_event_loop.h
+
+spice_server_replay_LDADD =					\
+	$(top_builddir)/spice-common/common/libspice-common.la	\
+	$(top_builddir)/server/libspice-server.la		\
+	$(GLIB2_LIBS)						\
+	$(GOBJECT2_LIBS)					\
+	$(SPICE_NONPKGCONFIG_LIBS)		                \
+	$(NULL)
 
 stat_test_SOURCES = stat-main.c
 stat_test_LDADD = \
-- 
2.7.4



More information about the Spice-devel mailing list