3 moduledir = $(libdir)/weston
13 DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
15 EXTRA_DIST = weston.ini.in wayland-scanner.mk
17 weston.ini : $(srcdir)/weston.ini.in
19 -e 's|@bindir[@]|$(bindir)|g' \
20 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
21 -e 's|@libexecdir[@]|$(libexecdir)|g' \
24 all-local : weston.ini validate-protocol-xml
27 -I$(top_builddir)/src \
28 -I$(top_srcdir)/shared \
29 -DDATADIR='"$(datadir)"' \
30 -DMODULEDIR='"$(moduledir)"' \
31 -DLIBEXECDIR='"$(libexecdir)"'
33 CLEANFILES = weston.ini $(BUILT_SOURCES)
35 bin_PROGRAMS += weston
37 weston_LDFLAGS = -export-dynamic
38 weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
39 weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
40 weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
41 $(DLOPEN_LIBS) -lm shared/libshared.la
53 src/screenshooter-protocol.c \
54 src/screenshooter-server-protocol.h \
56 src/text-cursor-position-protocol.c \
57 src/text-cursor-position-server-protocol.h \
61 src/text-server-protocol.h \
62 src/input-method-protocol.c \
63 src/input-method-server-protocol.h \
64 src/workspaces-protocol.c \
65 src/workspaces-server-protocol.h \
66 src/scaler-protocol.c \
67 src/scaler-server-protocol.h \
71 src/pixman-renderer.c \
72 src/pixman-renderer.h \
78 noinst_LTLIBRARIES += \
81 libsession_helper_la_SOURCES = \
85 libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
86 libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
90 libsession_helper_la_SOURCES += \
95 libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
96 libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
100 src/git-version.h : .FORCE
101 $(AM_V_GEN)(echo "#define BUILD_ID \"$(shell git --git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')\"" > $@-new; \
102 cmp -s $@ $@-new || cp $@-new $@; \
107 if BUILD_WESTON_LAUNCH
108 bin_PROGRAMS += weston-launch
109 weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
110 weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
111 weston_launch_CFLAGS= \
114 $(SYSTEMD_LOGIN_CFLAGS) \
116 weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
118 if ENABLE_SETUID_INSTALL
120 chown root $(DESTDIR)$(bindir)/weston-launch
121 chmod u+s $(DESTDIR)$(bindir)/weston-launch
124 endif # BUILD_WESTON_LAUNCH
126 pkgconfigdir = $(libdir)/pkgconfig
127 pkgconfig_DATA = src/weston.pc
129 westonincludedir = $(includedir)/weston
130 westoninclude_HEADERS = \
134 shared/config-parser.h \
138 module_LTLIBRARIES += gl-renderer.la
139 gl_renderer_la_LDFLAGS = -module -avoid-version
140 gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
141 gl_renderer_la_CFLAGS = \
142 $(COMPOSITOR_CFLAGS) \
145 gl_renderer_la_SOURCES = \
148 src/vertex-clipping.c \
149 src/vertex-clipping.h
152 if ENABLE_X11_COMPOSITOR
153 module_LTLIBRARIES += x11-backend.la
154 x11_backend_la_LDFLAGS = -module -avoid-version
155 x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
156 shared/libshared-cairo.la
157 x11_backend_la_CFLAGS = \
158 $(COMPOSITOR_CFLAGS) \
162 $(X11_COMPOSITOR_CFLAGS) \
164 x11_backend_la_SOURCES = src/compositor-x11.c
167 if ENABLE_DRM_COMPOSITOR
168 module_LTLIBRARIES += drm-backend.la
169 drm_backend_la_LDFLAGS = -module -avoid-version
170 drm_backend_la_LIBADD = \
172 $(DRM_COMPOSITOR_LIBS) \
173 shared/libshared.la -lrt \
175 drm_backend_la_CFLAGS = \
176 $(COMPOSITOR_CFLAGS) \
178 $(DRM_COMPOSITOR_CFLAGS) \
180 drm_backend_la_SOURCES = \
181 src/compositor-drm.c \
186 src/evdev-touchpad.c \
190 if ENABLE_VAAPI_RECORDER
191 drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
192 drm_backend_la_LIBADD += $(LIBVA_LIBS)
193 drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
197 if ENABLE_WAYLAND_COMPOSITOR
198 module_LTLIBRARIES += wayland-backend.la
199 wayland_backend_la_LDFLAGS = -module -avoid-version
200 wayland_backend_la_LIBADD = \
202 $(WAYLAND_COMPOSITOR_LIBS) \
203 shared/libshared-cairo.la
204 wayland_backend_la_CFLAGS = \
205 $(COMPOSITOR_CFLAGS) \
209 $(WAYLAND_COMPOSITOR_CFLAGS) \
211 wayland_backend_la_SOURCES = src/compositor-wayland.c
214 if ENABLE_RPI_COMPOSITOR
215 if INSTALL_RPI_COMPOSITOR
216 module_LTLIBRARIES += rpi-backend.la
218 noinst_LTLIBRARIES += rpi-backend.la
221 rpi_backend_la_LDFLAGS = -module -avoid-version
222 rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
223 $(RPI_COMPOSITOR_LIBS) \
224 $(RPI_BCM_HOST_LIBS) \
225 libsession-helper.la \
227 rpi_backend_la_CFLAGS = \
229 $(COMPOSITOR_CFLAGS) \
230 $(RPI_COMPOSITOR_CFLAGS) \
231 $(RPI_BCM_HOST_CFLAGS)
232 rpi_backend_la_SOURCES = \
233 src/compositor-rpi.c \
236 src/rpi-bcm-stubs.h \
244 rpi_backend_la_LIBADD += $(EGL_LIBS)
245 rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
250 if ENABLE_HEADLESS_COMPOSITOR
251 module_LTLIBRARIES += headless-backend.la
252 headless_backend_la_LDFLAGS = -module -avoid-version
253 headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
255 headless_backend_la_CFLAGS = \
256 $(COMPOSITOR_CFLAGS) \
258 headless_backend_la_SOURCES = src/compositor-headless.c
261 if ENABLE_FBDEV_COMPOSITOR
262 module_LTLIBRARIES += fbdev-backend.la
263 fbdev_backend_la_LDFLAGS = -module -avoid-version
264 fbdev_backend_la_LIBADD = \
266 $(FBDEV_COMPOSITOR_LIBS) \
267 libsession-helper.la \
269 fbdev_backend_la_CFLAGS = \
270 $(COMPOSITOR_CFLAGS) \
272 $(FBDEV_COMPOSITOR_CFLAGS) \
275 fbdev_backend_la_SOURCES = \
276 src/compositor-fbdev.c \
284 if ENABLE_RDP_COMPOSITOR
285 module_LTLIBRARIES += rdp-backend.la
286 rdp_backend_la_LDFLAGS = -module -avoid-version
287 rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
288 $(RDP_COMPOSITOR_LIBS) \
290 rdp_backend_la_CFLAGS = \
291 $(COMPOSITOR_CFLAGS) \
292 $(RDP_COMPOSITOR_CFLAGS) \
294 rdp_backend_la_SOURCES = src/compositor-rdp.c
298 module_LTLIBRARIES += cms-static.la
299 cms_static_la_LDFLAGS = -module -avoid-version
300 cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) shared/libshared.la
301 cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
302 cms_static_la_SOURCES = \
307 module_LTLIBRARIES += cms-colord.la
308 cms_colord_la_LDFLAGS = -module -avoid-version
309 cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
310 cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
311 cms_colord_la_SOURCES = \
318 noinst_PROGRAMS += spring-tool
319 spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
320 spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
321 spring_tool_SOURCES = \
329 src/screenshooter-server-protocol.h \
330 src/screenshooter-protocol.c \
331 src/text-cursor-position-server-protocol.h \
332 src/text-cursor-position-protocol.c \
333 src/text-protocol.c \
334 src/text-server-protocol.h \
335 src/input-method-protocol.c \
336 src/input-method-server-protocol.h \
337 src/workspaces-server-protocol.h \
338 src/workspaces-protocol.c \
339 src/scaler-server-protocol.h \
340 src/scaler-protocol.c \
343 westondatadir = $(datadir)/weston
344 dist_westondata_DATA = \
350 data/icon_window.png \
351 data/sign_close.png \
352 data/sign_maximize.png \
353 data/sign_minimize.png
357 bin_PROGRAMS += wcap-decode
359 wcap_decode_SOURCES = \
364 wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
365 wcap_decode_LDADD = $(WCAP_LIBS)
369 if ENABLE_DESKTOP_SHELL
371 module_LTLIBRARIES += desktop-shell.la
373 desktop_shell_la_CPPFLAGS = \
374 -I$(top_srcdir)/shared \
375 -I$(top_srcdir)/src \
376 -I$(top_builddir)/src \
377 -I$(top_builddir)/desktop-shell \
378 -DDATADIR='"$(datadir)"' \
379 -DMODULEDIR='"$(moduledir)"' \
380 -DLIBEXECDIR='"$(libexecdir)"' \
383 desktop_shell_la_LDFLAGS = -module -avoid-version
384 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) \
386 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
387 desktop_shell_la_SOURCES = \
388 desktop-shell/shell.h \
389 desktop-shell/shell.c \
390 desktop-shell/exposay.c \
391 desktop-shell/input-panel.c \
392 desktop-shell/desktop-shell-protocol.c \
393 desktop-shell/desktop-shell-server-protocol.h \
394 desktop-shell/xdg-shell-protocol.c \
395 desktop-shell/xdg-shell-server-protocol.h
398 desktop-shell/desktop-shell-protocol.c \
399 desktop-shell/desktop-shell-server-protocol.h \
400 desktop-shell/xdg-shell-protocol.c \
401 desktop-shell/xdg-shell-server-protocol.h
407 module_LTLIBRARIES += xwayland.la
409 xwayland_la_CPPFLAGS = \
410 -I$(top_srcdir)/shared \
411 -I$(top_srcdir)/src \
412 -I$(top_builddir)/src \
413 -I$(top_builddir)/xwayland \
414 -DDATADIR='"$(datadir)"' \
415 -DMODULEDIR='"$(moduledir)"' \
416 -DLIBEXECDIR='"$(libexecdir)"' \
417 -DXSERVER_PATH='"@XSERVER_PATH@"'
419 xwayland_la_LDFLAGS = -module -avoid-version
420 xwayland_la_LIBADD = \
422 $(top_builddir)/shared/libshared-cairo.la
423 xwayland_la_CFLAGS = \
425 $(COMPOSITOR_CFLAGS) \
428 xwayland_la_SOURCES = \
429 xwayland/xwayland.h \
430 xwayland/window-manager.c \
431 xwayland/selection.c \
433 xwayland/launcher.c \
434 xwayland/xserver-protocol.c \
435 xwayland/xserver-server-protocol.h \
440 xwayland/xserver-protocol.c \
441 xwayland/xserver-server-protocol.h
446 protocol/desktop-shell.xml \
447 protocol/screenshooter.xml \
448 protocol/xserver.xml \
450 protocol/input-method.xml \
451 protocol/workspaces.xml \
452 protocol/text-cursor-position.xml \
453 protocol/wayland-test.xml \
454 protocol/xdg-shell.xml \
458 .PHONY : validate-protocol-xml
460 .%.xml.valid : $(top_srcdir)/protocol/%.xml
461 $(AM_V_GEN)$(XMLLINT) --noout --dtdvalid $(dtddir)/wayland.dtd $^ > $@
463 validate-protocol-xml : $(protocol_sources:protocol/%.xml=.%.xml.valid)
465 CLEANFILES += $(protocol_sources:protocol/%.xml=.%.xml.valid)
466 EXTRA_DIST += $(protocol_sources)
471 man_MANS = weston.1 weston.ini.5
473 if ENABLE_DRM_COMPOSITOR
474 man_MANS += weston-drm.7
478 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
479 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
480 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
481 -e 's|__version__|$(PACKAGE_VERSION)|g'
483 SUFFIXES = .1 .5 .7 .man
485 %.1 %.5 %.7 : man/%.man
486 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
493 CLEANFILES += $(man_MANS)
496 wayland_protocoldir = $(top_srcdir)/protocol
497 include $(top_srcdir)/wayland-scanner.mk