[Spice-devel] [spice-gtk v2] Move spicy tools to its own folder
Victor Toso
victortoso at redhat.com
Thu Jan 19 13:50:57 UTC 2017
From: Victor Toso <me at victortoso.com>
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;
Signed-off-by: Victor Toso <victortoso at redhat.com>
---
Makefile.am | 2 +-
configure.ac | 1 +
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, 70 insertions(+), 54 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..31d4707 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I m4
NULL =
-SUBDIRS = spice-common src man po doc data
+SUBDIRS = spice-common src man po doc data tools
if BUILD_TESTS
SUBDIRS += tests
diff --git a/configure.ac b/configure.ac
index f3e7f8d..4fd0bd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -590,6 +590,7 @@ po/Makefile.in
src/Makefile
src/spice-version.h
src/controller/Makefile
+tools/Makefile
doc/Makefile
doc/reference/Makefile
man/Makefile
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
More information about the Spice-devel
mailing list