summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-07-12 16:44:02 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2011-07-12 16:44:02 +0200
commitad9c3c2b1e8622a2e42713f9fd3dd35c69af25c4 (patch)
treed62f32b2162e0f994a0e03d5f7820686046eab63
parent876be9ad02cf8fddf17c1bb6ccae7cc86ec84b52 (diff)
adjust to common moving to a separate submodule
-rw-r--r--Makefile.am10
-rw-r--r--configure.ac10
-rw-r--r--server/Makefile.am65
-rw-r--r--server/demarshallers.h27
-rw-r--r--server/inputs_channel.c4
-rw-r--r--server/main_channel.c2
-rw-r--r--server/red_channel.h2
-rw-r--r--server/tests/Makefile.am18
8 files changed, 44 insertions, 94 deletions
diff --git a/Makefile.am b/Makefile.am
index 853ffea..42adfb3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,15 +1,7 @@
-SUBDIRS = common server python_modules
-
-if SUPPORT_CLIENT
-SUBDIRS += client
-endif
+SUBDIRS = $(spice_common_path) server
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = spice-server.pc
DISTCLEANFILES = \
spice-server.pc
-
-EXTRA_DIST = spice.proto spice1.proto spice_codegen.py
-
-DISTCHECK_CONFIGURE_FLAGS=--enable-opengl --enable-gui --enable-tunnel
diff --git a/configure.ac b/configure.ac
index c058edd..987c3a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -496,16 +496,16 @@ AC_SUBST([SPICEC_STATIC_LINKAGE_BSTATIC])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+AM_CONDITIONAL([SPICE_CLIENT_BUILD], [false])
+AM_CONDITIONAL([SPICE_SERVER_BUILD], [true])
+AC_SUBST([spice_common_path], [spice-common])
+
AC_OUTPUT([
Makefile
+spice-common/Makefile
spice-server.pc
-common/Makefile
-common/win/Makefile
-common/win/my_getopt-1.5/Makefile
-python_modules/Makefile
server/Makefile
server/tests/Makefile
-client/Makefile
])
dnl ==========================================================================
diff --git a/server/Makefile.am b/server/Makefile.am
index 601840a..f1df10c 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -3,33 +3,22 @@ SUBDIRS = . tests
NULL =
INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/common \
- -DRED_STATISTICS \
- $(Z_LIBS) \
- $(CELT051_CFLAGS) \
- $(PIXMAN_CFLAGS) \
- $(PROTOCOL_CFLAGS) \
- $(SASL_CFLAGS) \
- $(SLIRP_CFLAGS) \
- $(SMARTCARD_CFLAGS) \
- $(SSL_CFLAGS) \
- $(VISIBILITY_HIDDEN_CFLAGS) \
- $(WARN_CFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/$(spice_common_path) \
+ -I$(top_srcdir)/$(spice_common_path)/common \
+ -DRED_STATISTICS \
+ $(Z_LIBS) \
+ $(CELT051_CFLAGS) \
+ $(PIXMAN_CFLAGS) \
+ $(PROTOCOL_CFLAGS) \
+ $(SASL_CFLAGS) \
+ $(SLIRP_CFLAGS) \
+ $(SMARTCARD_CFLAGS) \
+ $(SSL_CFLAGS) \
+ $(VISIBILITY_HIDDEN_CFLAGS) \
+ $(WARN_CFLAGS) \
$(NULL)
-spice_built_sources = generated_marshallers.c generated_marshallers.h generated_demarshallers.c
-
-generated_demarshallers.c: $(top_srcdir)/spice.proto
- $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --server --include red_common.h $(top_srcdir)/spice.proto generated_demarshallers.c
-
-STRUCTS=-M String -M Rect -M Point -M DisplayBase -M Fill -M Opaque -M Copy -M Blend -M Blackness -M Whiteness -M Invers -M Rop3 -M Stroke -M Text -M Transparent -M AlphaBlend
-generated_marshallers.c: $(top_srcdir)/spice.proto
- $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --include red_common.h --generate-marshallers $(STRUCTS) --server $(top_srcdir)/spice.proto generated_marshallers.c
-
-generated_marshallers.h: $(top_srcdir)/spice.proto
- $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server -H $(top_srcdir)/spice.proto generated_marshallers.h
-
lib_LTLIBRARIES = libspice-server.la
libspice_server_la_LDFLAGS = \
@@ -37,26 +26,22 @@ libspice_server_la_LDFLAGS = \
-no-undefined \
$(NULL)
-libspice_server_la_LIBADD = \
- $(top_builddir)/common/libspice-common.la \
- $(CELT051_LIBS) \
- $(GL_LIBS) \
- $(JPEG_LIBS) \
- $(LIBRT) \
- $(PIXMAN_LIBS) \
- $(SASL_LIBS) \
- $(SLIRP_LIBS) \
- $(SSL_LIBS) \
+libspice_server_la_LIBADD = \
+ $(top_builddir)/$(spice_common_path)/libspice-common.la \
+ $(CELT051_LIBS) \
+ $(GL_LIBS) \
+ $(JPEG_LIBS) \
+ $(LIBRT) \
+ $(PIXMAN_LIBS) \
+ $(SASL_LIBS) \
+ $(SLIRP_LIBS) \
+ $(SSL_LIBS) \
$(NULL)
libspice_server_la_SOURCES = \
agent-msg-filter.c \
agent-msg-filter.h \
char_device.h \
- demarshallers.h \
- generated_demarshallers.c \
- generated_marshallers.c \
- generated_marshallers.h \
glz_encoder.c \
glz_encoder.h \
glz_encoder_config.h \
@@ -129,5 +114,3 @@ EXTRA_DIST = \
glz_encode_match_tmpl.c \
glz_encode_tmpl.c \
$(NULL)
-
-BUILT_SOURCES = $(spice_built_sources)
diff --git a/server/demarshallers.h b/server/demarshallers.h
deleted file mode 100644
index abe9dfa..0000000
--- a/server/demarshallers.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- Copyright (C) 2010 Red Hat, Inc.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-#ifndef _H_DEMARSHAL
-#define _H_DEMARSHAL
-
-typedef void (*message_destructor_t)(uint8_t *message);
-typedef uint8_t * (*spice_parse_channel_func_t)(uint8_t *message_start, uint8_t *message_end, uint16_t message_type, int minor,
- size_t *size_out, message_destructor_t *free_message);
-
-spice_parse_channel_func_t spice_get_client_channel_parser(uint32_t channel, unsigned int *max_message_type);
-
-#endif
-
diff --git a/server/inputs_channel.c b/server/inputs_channel.c
index 0cc53a2..934f49f 100644
--- a/server/inputs_channel.c
+++ b/server/inputs_channel.c
@@ -28,8 +28,8 @@
#include <spice/vd_agent.h>
#include "common/marshaller.h"
#include "common/messages.h"
-#include "server/demarshallers.h"
-#include "server/generated_marshallers.h"
+#include "common/demarshallers.h"
+#include "common/generated_marshallers.h"
#include "spice.h"
#include "red_common.h"
#include "reds.h"
diff --git a/server/main_channel.c b/server/main_channel.c
index 1a6a89c..5efef27 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -36,7 +36,7 @@
#include <ctype.h>
#include "server/red_common.h"
-#include "server/demarshallers.h"
+#include "common/demarshallers.h"
#include "common/ring.h"
#include "common/messages.h"
#include "reds.h"
diff --git a/server/red_channel.h b/server/red_channel.h
index 97da5a8..bbf3478 100644
--- a/server/red_channel.h
+++ b/server/red_channel.h
@@ -26,7 +26,7 @@
#include "reds.h"
#include "spice.h"
#include "ring.h"
-#include "server/demarshallers.h"
+#include "common/demarshallers.h"
#define MAX_SEND_BUFS 1000
#define MAX_SEND_VEC 100
diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index 8ec4094..f314253 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -1,15 +1,17 @@
NULL =
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/common \
- -I$(top_srcdir)/server \
- -I$(top_srcdir)/server/tests \
- $(PROTOCOL_CFLAGS) \
- $(SPICE_NONPKGCONFIG_CFLAGS) \
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/$(spice_common_path) \
+ -I$(top_srcdir)/$(spice_common_path)/common \
+ -I$(top_srcdir)/server \
+ -I$(top_srcdir)/server/tests \
+ $(PROTOCOL_CFLAGS) \
+ $(SPICE_NONPKGCONFIG_CFLAGS) \
$(NULL)
-AM_LDFLAGS = $(top_builddir)/server/libspice-server.la
+AM_LDFLAGS = $(top_builddir)/server/libspice-server.la \
+ $(top_builddir)/$(spice_common_path)/libspice-common.la
noinst_PROGRAMS = test_just_sockets_no_ssl test_empty_success test_fail_on_null_core_interface test_display_no_ssl test_display_streaming test_playback