weston/Makefile
Kristian Høgsberg fbdbbdc153 Finally implement the commit/ack/frame protocol and improve repaint loop.
This implements the commit/ack/frame protocol that let clients batch up
a series of requests and then commit them atomically using the commit request.
The commit requests generats two following events: the acknowledge event,
which lets the client know that the server has received the request and
which frame the rendering has been scheduled for.  At this point the client
can start rendering the next frame or free up temporary buffers.  Then when
the compositor finally makes the newly composited frame visible on screen
the server sends a frame event, which contains the number of the frame that
was presented and the time when it happened.

The window and flower clients have been updated to use these two events in
their main loops and everything now updates per frame.  The EGL compositor
repaint loop has been tweaked to delay the compositing of the screen to
10ms after last swapbuffer completed so as to allow processing as many
requests as possible before blocking on the next vertical retrace.
2008-11-28 17:06:10 -05:00

72 lines
2.2 KiB
Makefile

CFLAGS = -Wall -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden
PKG_CONFIG_PATH ?= $(HOME)/install/lib/pkgconfig
EAGLE_CFLAGS = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags eagle)
EAGLE_LDLIBS = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs eagle)
clients = flower pointer background window screenshot
compositors = egl-compositor.so glx-compositor.so
all : wayland libwayland.so $(compositors) $(clients)
wayland_objs = \
wayland.o \
event-loop.o \
connection.o \
wayland-util.o
wayland : CFLAGS += $(shell pkg-config --cflags libffi)
wayland : LDLIBS += $(shell pkg-config --libs libffi) -ldl -rdynamic
wayland : $(wayland_objs)
gcc -o $@ $(LDLIBS) $(wayland_objs)
libwayland_objs = wayland-client.o connection.o wayland-util.o
libwayland.so : $(libwayland_objs)
$(compositors) $(clients) : CFLAGS += $(shell pkg-config --cflags libdrm)
egl_compositor_objs = egl-compositor.o evdev.o cairo-util.o
egl-compositor.so : CFLAGS += $(EAGLE_CFLAGS) $(shell pkg-config --cflags libpng cairo gdk-pixbuf-2.0)
egl-compositor.so : LDLIBS += $(EAGLE_LDLIBS) $(shell pkg-config --libs libpng cairo gdk-pixbuf-2.0) -rdynamic -lrt
egl-compositor.so : $(egl_compositor_objs)
glx_compositor_objs = glx-compositor.o
glx-compositor.so : LDLIBS += -lGL
glx-compositor.so : $(glx_compositor_objs)
libwayland.so $(compositors) :
gcc -o $@ $^ $(LDLIBS) -shared
flower_objs = flower.o wayland-glib.o cairo-util.o
pointer_objs = pointer.o wayland-glib.o cairo-util.o
background_objs = background.o wayland-glib.o
window_objs = window.o gears.o wayland-glib.o cairo-util.o
screenshot_objs = screenshot.o wayland-glib.o
$(clients) : CFLAGS += $(shell pkg-config --cflags cairo glib-2.0)
$(clients) : LDLIBS += $(shell pkg-config --libs cairo glib-2.0) -lrt
background : CFLAGS += $(shell pkg-config --cflags gdk-pixbuf-2.0)
background : LDLIBS += $(shell pkg-config --libs gdk-pixbuf-2.0)
window : CFLAGS += $(EAGLE_CFLAGS)
window : LDLIBS += $(EAGLE_LDLIBS)
define client_template
$(1): $$($(1)_objs) libwayland.so
endef
$(foreach c,$(clients),$(eval $(call client_template,$(c))))
$(clients) :
gcc -o $@ -L. -lwayland $(LDLIBS) $^
clean :
rm -f $(clients) wayland *.o *.so