mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2026-02-05 23:00:47 +00:00
Windows namedpipes behave a bit differently from Unix socket, and may return incomplete read/write. By using 2 read/write() helpers, try to complete the operation before returning. Since the IO operation may be splitted over several call, we make sure the buffer pointer is on the heap. We use exception for EOF or BROKEN_PIPE condition, which also simplifies the code. To really work with namedpipe, the giowin32streams need to be fixed as well to handle concurrent read & write properly, see for details: https://bugzilla.gnome.org/show_bug.cgi?id=679288
97 lines
2.3 KiB
Makefile
97 lines
2.3 KiB
Makefile
NULL =
|
|
|
|
AM_CPPFLAGS = \
|
|
-DG_LOG_DOMAIN=\"GSpiceController\" \
|
|
$(GIO_CFLAGS) \
|
|
$(COMMON_CFLAGS) \
|
|
$(NULL)
|
|
|
|
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
|
AM_LDFLAGS = \
|
|
-no-undefined \
|
|
$(GIO_LIBS) \
|
|
$(NULL)
|
|
|
|
AM_VALAFLAGS = \
|
|
--pkg gio-2.0 \
|
|
--pkg spice-protocol --vapidir=$(top_srcdir)/data \
|
|
--pkg custom --vapidir=$(srcdir) \
|
|
-C \
|
|
$(NULL)
|
|
|
|
lib_LTLIBRARIES = libspice-controller.la
|
|
noinst_PROGRAMS = test-controller spice-controller-dump
|
|
|
|
libspice_controller_la_VALASOURCES = \
|
|
menu.vala \
|
|
controller.vala \
|
|
foreign-menu.vala \
|
|
util.vala \
|
|
$(NULL)
|
|
|
|
libspice_controller_la_BUILT_SOURCES = \
|
|
$(libspice_controller_la_VALASOURCES:.vala=.c) \
|
|
spice-controller.h \
|
|
$(NULL)
|
|
|
|
BUILT_SOURCES = \
|
|
$(libspice_controller_la_BUILT_SOURCES) \
|
|
controller.vala.stamp \
|
|
$(NULL)
|
|
|
|
libspice_controller_la_SOURCES = \
|
|
$(libspice_controller_la_BUILT_SOURCES) \
|
|
custom.h \
|
|
spice-controller-listener.c \
|
|
spice-controller-listener.h \
|
|
spice-foreign-menu-listener.c \
|
|
spice-foreign-menu-listener.h \
|
|
$(NULL)
|
|
|
|
if OS_WIN32
|
|
libspice_controller_la_SOURCES += \
|
|
namedpipe.c \
|
|
namedpipe.h \
|
|
namedpipeconnection.c \
|
|
namedpipeconnection.h \
|
|
namedpipelistener.c \
|
|
namedpipelistener.h \
|
|
$(NULL)
|
|
endif
|
|
libspice_controller_la_LDFLAGS = \
|
|
$(AM_LDFLAGS) \
|
|
-version-info 0:0:0 \
|
|
$(NULL)
|
|
|
|
libspice_controllerincludedir = $(includedir)/spice-controller
|
|
libspice_controllerinclude_HEADERS = \
|
|
spice-controller.h
|
|
|
|
test_controller_SOURCES = test.c
|
|
test_controller_LDADD = libspice-controller.la
|
|
|
|
spice_controller_dump_SOURCES = dump.c
|
|
spice_controller_dump_LDADD = libspice-controller.la
|
|
|
|
controller.vala.stamp: $(libspice_controller_la_VALASOURCES) custom.vapi
|
|
@if test -z "$(VALAC)"; then \
|
|
echo "" ; \
|
|
echo " *** Error: missing valac!" ; \
|
|
echo " *** You must run autogen.sh or configure --enable-vala" ; \
|
|
echo "" ; \
|
|
exit 1 ; \
|
|
fi
|
|
$(VALA_V)$(VALAC) $(VALAFLAGS) $(AM_VALAFLAGS) $(libspice_controller_la_VALASOURCES) -H spice-controller.h
|
|
@touch $@
|
|
|
|
$(libspice_controller_la_BUILT_SOURCES): controller.vala.stamp
|
|
|
|
EXTRA_DIST = \
|
|
$(libspice_controller_la_VALASOURCES) \
|
|
controller.vala.stamp \
|
|
custom.vapi \
|
|
gio-windows-2.0.vapi \
|
|
$(NULL)
|
|
|
|
-include $(top_srcdir)/git.mk
|