From: Victor Toso <me@xxxxxxxxxxxxxx> So we can have the tools and the libraries in different folders. - In the src/Makefile.am I've only removed the lines related to the tools but not all lines were copied into tools/Makefile.am as we don't really need them. Other lines were adjusted to have the paths correctly; - For completeness, I've included a --enable-spicy-tools options with default set to 'yes'. Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx> --- Makefile.am | 4 +++ configure.ac | 15 +++++++++ src/Makefile.am | 53 ------------------------------ tools/Makefile.am | 68 +++++++++++++++++++++++++++++++++++++++ {src => tools}/spice-cmdline.c | 0 {src => tools}/spice-cmdline.h | 0 {src => tools}/spicy-connect.c | 0 {src => tools}/spicy-connect.h | 0 {src => tools}/spicy-screenshot.c | 0 {src => tools}/spicy-stats.c | 0 {src => tools}/spicy.c | 0 11 files changed, 87 insertions(+), 53 deletions(-) create mode 100644 tools/Makefile.am rename {src => tools}/spice-cmdline.c (100%) rename {src => tools}/spice-cmdline.h (100%) rename {src => tools}/spicy-connect.c (100%) rename {src => tools}/spicy-connect.h (100%) rename {src => tools}/spicy-screenshot.c (100%) rename {src => tools}/spicy-stats.c (100%) rename {src => tools}/spicy.c (100%) diff --git a/Makefile.am b/Makefile.am index 47cf840..4d79a4d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,6 +3,10 @@ NULL = SUBDIRS = spice-common src man po doc data +if WITH_SPICY_TOOLS +SUBDIRS += tools +endif + if BUILD_TESTS SUBDIRS += tests endif diff --git a/configure.ac b/configure.ac index f3e7f8d..ed8ce80 100644 --- a/configure.ac +++ b/configure.ac @@ -364,6 +364,19 @@ else fi AM_CONDITIONAL([WITH_USBREDIR], [test "x$have_usbredir" = "xyes"]) +AC_ARG_ENABLE([spicy-tools], + AS_HELP_STRING([--enable-spicy-tools=@<:@auto/yes/no@:>@], + [Enable spicy testing tools @<:@default=yes@:>@]), + [], + [enable_spicy_tools="yes"]) + +if test "x$enable_spicy_tools" = "xno"; then + have_spicy_tools="no" +else + have_spicy_tools="yes" +fi +AM_CONDITIONAL([WITH_SPICY_TOOLS], [test "x$have_spicy_tools" = "xyes"]) + AC_ARG_ENABLE([polkit], AS_HELP_STRING([--enable-polkit=@<:@auto/yes/no@:>@], [Enable PolicyKit support (for the usb acl helper)@<:@default=auto@:>@]), @@ -590,6 +603,7 @@ po/Makefile.in src/Makefile src/spice-version.h src/controller/Makefile +tools/Makefile doc/Makefile doc/reference/Makefile man/Makefile @@ -618,6 +632,7 @@ AC_MSG_NOTICE([ DBus: ${have_dbus} WebDAV support: ${have_phodav} LZ4 support: ${have_lz4} + Spicy tools: ${have_spicy_tools} Now type 'make' to build $PACKAGE diff --git a/src/Makefile.am b/src/Makefile.am index e43cee0..b991a5f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,10 +45,6 @@ EXTRA_DIST = \ DISTCLEANFILES = spice-version.h -bin_PROGRAMS = spicy-stats spicy-screenshot -if WITH_GTK -bin_PROGRAMS += spicy -endif if WITH_POLKIT acldir = $(ACL_HELPER_DIR) acl_PROGRAMS = spice-client-glib-usb-acl-helper @@ -383,31 +379,6 @@ endif libspice_client_glib_2_0_la_LIBADD += -lws2_32 -lgdi32 endif -spicy_SOURCES = \ - spicy.c \ - spicy-connect.h \ - spicy-connect.c \ - spice-cmdline.h \ - spice-cmdline.c \ - $(NULL) - -spicy_LDADD = \ - libspice-client-gtk-3.0.la \ - libspice-client-glib-2.0.la \ - $(GTHREAD_LIBS) \ - $(GTK_LIBS) \ - $(LIBM) \ - $(NULL) - -# FIXME: GtkAction and lots of GtkUIManager APIs are deprecated -spicy_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - $(GTHREAD_CFLAGS) \ - -DSPICE_DISABLE_DEPRECATED \ - -Wno-deprecated-declarations \ - $(NULL) - - if WITH_POLKIT spice_client_glib_usb_acl_helper_SOURCES = \ spice-client-glib-usb-acl-helper.c \ @@ -436,30 +407,6 @@ install-data-hook: endif -spicy_screenshot_SOURCES = \ - spicy-screenshot.c \ - spice-cmdline.h \ - spice-cmdline.c \ - $(NULL) - -spicy_screenshot_LDADD = \ - libspice-client-glib-2.0.la \ - $(GOBJECT2_LIBS) \ - $(NULL) - -spicy_stats_SOURCES = \ - spicy-stats.c \ - spice-cmdline.h \ - spice-cmdline.c \ - $(NULL) - -spicy_stats_LDADD = \ - libspice-client-glib-2.0.la \ - $(GOBJECT2_LIBS) \ - $(NULL) - - - $(libspice_client_glib_2_0_la_SOURCES): spice-glib-enums.h spice-marshal.h if WITH_GTK diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 0000000..204dc50 --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1,68 @@ +bin_PROGRAMS = spicy-stats spicy-screenshot + +TOOLS_CPPFLAGS = \ + -DSPICE_COMPILATION \ + -I$(top_srcdir) \ + -I$(top_srcdir)/src \ + $(COMMON_CFLAGS) \ + $(GLIB2_CFLAGS) \ + $(GIO_CFLAGS) \ + $(SMARTCARD_CFLAGS) \ + $(SPICE_CFLAGS) \ + $(NULL) + +if WITH_GTK +bin_PROGRAMS += spicy +TOOLS_CPPFLAGS += $(GTK_CFLAGS) +endif + +spicy_SOURCES = \ + spicy.c \ + spicy-connect.h \ + spicy-connect.c \ + spice-cmdline.h \ + spice-cmdline.c \ + $(NULL) + +spicy_LDADD = \ + $(top_builddir)/src/libspice-client-gtk-3.0.la \ + $(top_builddir)/src/libspice-client-glib-2.0.la \ + $(NULL) + +# FIXME: GtkAction and lots of GtkUIManager APIs are deprecated +spicy_CPPFLAGS = \ + $(TOOLS_CPPFLAGS) \ + -DSPICE_DISABLE_DEPRECATED \ + -Wno-deprecated-declarations \ + $(NULL) + +spicy_screenshot_SOURCES = \ + spicy-screenshot.c \ + spice-cmdline.h \ + spice-cmdline.c \ + $(NULL) + +spicy_screenshot_LDADD = \ + $(top_builddir)/src/libspice-client-glib-2.0.la \ + $(GOBJECT2_LIBS) \ + $(NULL) + +spicy_screenshot_CPPFLAGS = \ + $(TOOLS_CPPFLAGS) \ + $(NULL) + +spicy_stats_SOURCES = \ + spicy-stats.c \ + spice-cmdline.h \ + spice-cmdline.c \ + $(NULL) + +spicy_stats_LDADD = \ + $(top_builddir)/src/libspice-client-glib-2.0.la \ + $(NULL) + +spicy_stats_CPPFLAGS = \ + $(TOOLS_CPPFLAGS) \ + $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/src/spice-cmdline.c b/tools/spice-cmdline.c similarity index 100% rename from src/spice-cmdline.c rename to tools/spice-cmdline.c diff --git a/src/spice-cmdline.h b/tools/spice-cmdline.h similarity index 100% rename from src/spice-cmdline.h rename to tools/spice-cmdline.h diff --git a/src/spicy-connect.c b/tools/spicy-connect.c similarity index 100% rename from src/spicy-connect.c rename to tools/spicy-connect.c diff --git a/src/spicy-connect.h b/tools/spicy-connect.h similarity index 100% rename from src/spicy-connect.h rename to tools/spicy-connect.h diff --git a/src/spicy-screenshot.c b/tools/spicy-screenshot.c similarity index 100% rename from src/spicy-screenshot.c rename to tools/spicy-screenshot.c diff --git a/src/spicy-stats.c b/tools/spicy-stats.c similarity index 100% rename from src/spicy-stats.c rename to tools/spicy-stats.c diff --git a/src/spicy.c b/tools/spicy.c similarity index 100% rename from src/spicy.c rename to tools/spicy.c -- 2.9.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel