spice/server/Makefile.am
Alon Levy 63bb37276e server: add websockets support via libwebsockets
New API: spice_server_set_ws_ports

This adds an optional dependency on libwebsockets. You need to get my
patched 0.0.3 version here:
 git://people.freedesktop.org/~alon/libwebsockets

There is no qemu patches yet, to test change in reds.c the default value
of spice_ws_port to 5959 (for the default of spice-html5).

For testing there is an online client at
 http://spice-space.org/spice-html5/spice.html

Known issues:
 1. The tester (server/tests/test_display_no_ssl) gets into dropping all
  data after a few seconds, I think it's an issue with the implemented
  watches, but haven't figured it out.

 2. libwebsocket's read interface is inverted to what our code expects,
 i.e. there is no libwebsocket_read, so there is an additional copy
 involved (see RedsWebSocket). This can be fixed.

 3. Listening on a separate port. Since the headers are different, we
 could listen on the same port (first three bytes RED/GET). I don't know
 if we want to?

Todos:
 1. SSL not implemented yet. Needs some thought as to how.

 2. Serve spice-html5 when accessed as a http server. Nice to have.
2012-10-25 12:33:02 +02:00

142 lines
2.9 KiB
Makefile

NULL =
SUBDIRS = . tests
AM_CPPFLAGS = \
-DRED_STATISTICS \
$(CELT051_CFLAGS) \
$(COMMON_CFLAGS) \
$(PIXMAN_CFLAGS) \
$(SASL_CFLAGS) \
$(SLIRP_CFLAGS) \
$(SMARTCARD_CFLAGS) \
$(SSL_CFLAGS) \
$(LIBWEBSOCKETS_CFLAGS) \
$(VISIBILITY_HIDDEN_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
lib_LTLIBRARIES = libspice-server.la
libspice_server_la_LDFLAGS = \
-version-info $(SPICE_LT_VERSION) \
-no-undefined \
$(NULL)
if HAVE_LD_VERSION_SCRIPT
libspice_server_la_LDFLAGS += \
-Wl,--version-script=$(top_srcdir)/server/spice-server.syms
endif
libspice_server_la_LIBADD = \
$(top_builddir)/spice-common/common/libspice-common.la \
$(top_builddir)/spice-common/common/libspice-common-server.la \
$(CELT051_LIBS) \
$(GL_LIBS) \
$(JPEG_LIBS) \
$(LIBRT) \
$(PIXMAN_LIBS) \
$(SASL_LIBS) \
$(SLIRP_LIBS) \
$(SSL_LIBS) \
$(Z_LIBS) \
$(LIBWEBSOCKETS_LIBS) \
$(NULL)
libspice_server_la_SOURCES = \
agent-msg-filter.c \
agent-msg-filter.h \
char_device.c \
char_device.h \
demarshallers.h \
glz_encoder.c \
glz_encoder.h \
glz_encoder_config.h \
glz_encoder_dictionary.c \
glz_encoder_dictionary.h \
glz_encoder_dictionary_protected.h \
inputs_channel.c \
inputs_channel.h \
jpeg_encoder.c \
jpeg_encoder.h \
main_channel.c \
main_channel.h \
mjpeg_encoder.c \
mjpeg_encoder.h \
red_bitmap_utils.h \
red_channel.c \
red_channel.h \
red_client_cache.h \
red_client_shared_cache.h \
red_common.h \
dispatcher.c \
dispatcher.h \
red_dispatcher.c \
red_dispatcher.h \
main_dispatcher.c \
main_dispatcher.h \
migration_protocol.h \
red_memslots.c \
red_memslots.h \
red_parse_qxl.c \
red_parse_qxl.h \
red_worker.c \
red_worker.h \
reds.c \
reds.h \
reds_sw_canvas.c \
reds_sw_canvas.h \
snd_worker.c \
snd_worker.h \
spice-experimental.h \
spice.h \
stat.h \
spicevmc.c \
zlib_encoder.c \
zlib_encoder.h \
$(NULL)
if SUPPORT_WEBSOCKETS
libspice_server_la_SOURCES += \
reds_websockets.c \
reds_websockets.h \
$(NULL)
endif
if SUPPORT_TUNNEL
libspice_server_la_SOURCES += \
red_tunnel_worker.c \
red_tunnel_worker.h \
$(NULL)
endif
if SUPPORT_GL
libspice_server_la_SOURCES += \
reds_gl_canvas.c \
reds_gl_canvas.h \
$(NULL)
endif
if SUPPORT_SMARTCARD
libspice_server_la_SOURCES += \
smartcard.c \
smartcard.h \
$(NULL)
endif
libspice_serverincludedir = $(includedir)/spice-server
libspice_serverinclude_HEADERS = \
spice.h \
spice-experimental.h \
$(NULL)
EXTRA_DIST = \
glz_encode_match_tmpl.c \
glz_encode_tmpl.c \
spice-server.syms \
$(NULL)
BUILT_SOURCES = $(spice_built_sources)
dist-hook:
if [ -e ./tests/test_spice_version.sh -a ! ./tests/test_spice_version.sh ] ; then exit 1; fi