2010-10-12 17:24:20 -04:00
|
|
|
lib_LTLIBRARIES = libwayland-server.la libwayland-client.la
|
|
|
|
|
noinst_LTLIBRARIES = libwayland-util.la
|
|
|
|
|
|
|
|
|
|
include_HEADERS = \
|
|
|
|
|
wayland-util.h \
|
|
|
|
|
wayland-server-protocol.h \
|
|
|
|
|
wayland-server.h \
|
|
|
|
|
wayland-client-protocol.h \
|
2011-02-04 11:22:35 +01:00
|
|
|
wayland-client.h \
|
2012-04-11 16:59:05 +01:00
|
|
|
wayland-egl.h \
|
|
|
|
|
wayland-version.h
|
2010-10-12 17:24:20 -04:00
|
|
|
|
|
|
|
|
libwayland_util_la_SOURCES = \
|
|
|
|
|
connection.c \
|
|
|
|
|
wayland-util.c \
|
|
|
|
|
wayland-util.h \
|
2012-03-21 11:11:26 +02:00
|
|
|
wayland-os.c \
|
|
|
|
|
wayland-os.h \
|
2011-12-27 13:53:59 -05:00
|
|
|
wayland-private.h
|
2010-10-12 17:24:20 -04:00
|
|
|
|
2012-05-08 17:17:25 +01:00
|
|
|
libwayland_server_la_LIBADD = $(FFI_LIBS) libwayland-util.la -lrt -lm
|
Remove input structs
Looking at the functionality in the server library, it's clear (in
hindsight) that there are two different "things" in there: 1) The IPC
API, that is, everything that concerns wl_display, wl_client,
wl_resource and 2) and half-hearted attempt at sharing input code and
focus logic that leaves a lot of problematic structs in the API
surface, only to share less than 1000 lines of code.
We can just move those input structs and helper functions into weston
and cut libwayland-server down to just the core server side IPC API.
In the short term, compositors can copy those structs and functions
into their source, but longer term, they're probably better off
reimplementing those objects and logic their native framework
(QObject, GObject etc).
2013-04-18 15:07:23 -04:00
|
|
|
libwayland_server_la_LDFLAGS = -version-info 1:0:1
|
2010-10-12 17:24:20 -04:00
|
|
|
libwayland_server_la_SOURCES = \
|
|
|
|
|
wayland-protocol.c \
|
|
|
|
|
wayland-server.c \
|
2011-03-08 11:32:24 +01:00
|
|
|
wayland-shm.c \
|
2010-10-12 17:24:20 -04:00
|
|
|
event-loop.c
|
|
|
|
|
|
2012-05-08 17:17:25 +01:00
|
|
|
libwayland_client_la_LIBADD = $(FFI_LIBS) libwayland-util.la -lrt -lm
|
client: Introduce functions to allocate and marshal proxies atomically
The server requires clients to only allocate one ID ahead of the previously
highest ID in order to keep the ID range tight. Failure to do so will
make the server close the client connection. However, the way we allocate
new IDs is racy. The generated code looks like:
new_proxy = wl_proxy_create(...);
wl_proxy_marshal(proxy, ... new_proxy, ...);
If two threads do this at the same time, there's a chance that thread A
will allocate a proxy, then get pre-empted by thread B which then allocates
a proxy and then passes it to wl_proxy_marshal(). The ID for thread As
proxy will be one higher that the currently highest ID, but the ID for
thread Bs proxy will be two higher. But since thread B prempted thread A
before it could send its new ID, B will send its new ID first, the server
will see the ID from thread Bs proxy first, and will reject it.
We fix this by introducing wl_proxy_marshal_constructor(). This
function is identical to wl_proxy_marshal(), except that it will
allocate a wl_proxy for NEW_ID arguments and send it, all under the
display mutex. By introducing a new function, we maintain backwards
compatibility with older code from the generator, and make sure that
the new generated code has an explicit dependency on a new enough
libwayland-client.so.
A virtual Wayland merit badge goes to Kalle Vahlman, who tracked this
down and analyzed the issue.
Reported-by: Kalle Vahlman <kalle.vahlman@movial.com>
2013-11-14 21:29:06 -08:00
|
|
|
libwayland_client_la_LDFLAGS = -version-info 2:0:2
|
2010-10-12 17:24:20 -04:00
|
|
|
libwayland_client_la_SOURCES = \
|
|
|
|
|
wayland-protocol.c \
|
|
|
|
|
wayland-client.c
|
|
|
|
|
|
2011-01-01 10:55:45 -05:00
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
|
|
|
pkgconfig_DATA = wayland-client.pc wayland-server.pc
|
|
|
|
|
|
2011-01-24 16:27:27 +00:00
|
|
|
AM_CPPFLAGS = $(FFI_CFLAGS)
|
2013-11-23 12:24:26 -08:00
|
|
|
AM_CFLAGS = $(GCC_CFLAGS) -pthread
|
2010-10-12 17:24:20 -04:00
|
|
|
|
2011-02-14 22:17:41 -05:00
|
|
|
protocoldir = $(top_srcdir)/protocol
|
2011-05-06 06:13:36 +00:00
|
|
|
|
|
|
|
|
if ENABLE_SCANNER
|
2011-08-12 15:09:00 -04:00
|
|
|
wayland_scanner = $(top_builddir)/src/wayland-scanner
|
2011-05-06 06:13:36 +00:00
|
|
|
else
|
|
|
|
|
wayland_scanner = wayland-scanner
|
|
|
|
|
endif
|
|
|
|
|
|
2011-08-12 15:09:00 -04:00
|
|
|
include $(top_srcdir)/src/scanner.mk
|
2010-10-12 17:24:20 -04:00
|
|
|
|
2011-05-06 06:13:36 +00:00
|
|
|
if ENABLE_SCANNER
|
2011-02-14 22:17:41 -05:00
|
|
|
bin_PROGRAMS = wayland-scanner
|
2010-10-12 17:24:20 -04:00
|
|
|
|
2011-02-14 22:17:41 -05:00
|
|
|
wayland_scanner_SOURCES = \
|
2010-10-12 17:24:20 -04:00
|
|
|
scanner.c
|
|
|
|
|
|
2011-02-14 22:17:41 -05:00
|
|
|
wayland_scanner_LDADD = $(EXPAT_LIBS) libwayland-util.la
|
2010-10-12 17:24:20 -04:00
|
|
|
|
2011-02-14 22:17:41 -05:00
|
|
|
$(BUILT_SOURCES) : wayland-scanner
|
2013-07-02 18:38:15 +09:00
|
|
|
|
|
|
|
|
scannerpkgconfigdir = $(datadir)/pkgconfig
|
|
|
|
|
scannerpkgconfig_DATA = wayland-scanner.pc
|
2011-05-06 06:13:36 +00:00
|
|
|
endif
|
2010-10-12 17:24:20 -04:00
|
|
|
|
|
|
|
|
BUILT_SOURCES = \
|
|
|
|
|
wayland-server-protocol.h \
|
|
|
|
|
wayland-client-protocol.h \
|
|
|
|
|
wayland-protocol.c
|
|
|
|
|
|
|
|
|
|
CLEANFILES = $(BUILT_SOURCES)
|
2012-04-11 16:59:05 +01:00
|
|
|
DISTCLEANFILES = wayland-version.h
|
|
|
|
|
EXTRA_DIST = wayland-version.h.in
|