4 moduledir = $(libdir)/weston
9 DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
11 EXTRA_DIST = weston.ini.in
13 weston.ini : $(srcdir)/weston.ini.in
15 -e 's|@bindir[@]|$(bindir)|g' \
16 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
17 -e 's|@libexecdir[@]|$(libexecdir)|g' \
20 all-local : weston.ini
22 AM_CFLAGS = $(GCC_CFLAGS)
26 -I$(top_builddir)/src \
27 -I$(top_builddir)/clients \
28 -I$(top_builddir)/tests \
29 -I$(top_srcdir)/shared \
30 -I$(top_builddir)/protocol \
31 -DDATADIR='"$(datadir)"' \
32 -DMODULEDIR='"$(moduledir)"' \
33 -DLIBEXECDIR='"$(libexecdir)"' \
34 -DBINDIR='"$(bindir)"'
36 CLEANFILES = weston.ini $(BUILT_SOURCES)
38 bin_PROGRAMS += weston
40 weston_LDFLAGS = -export-dynamic
41 weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
42 weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
43 weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
44 $(DLOPEN_LIBS) -lm libshared.la
60 src/pixman-renderer.c \
61 src/pixman-renderer.h \
67 nodist_weston_SOURCES = \
68 protocol/screenshooter-protocol.c \
69 protocol/screenshooter-server-protocol.h \
70 protocol/text-cursor-position-protocol.c \
71 protocol/text-cursor-position-server-protocol.h \
72 protocol/text-protocol.c \
73 protocol/text-server-protocol.h \
74 protocol/input-method-protocol.c \
75 protocol/input-method-server-protocol.h \
76 protocol/workspaces-protocol.c \
77 protocol/workspaces-server-protocol.h \
78 protocol/scaler-protocol.c \
79 protocol/scaler-server-protocol.h
81 BUILT_SOURCES += $(nodist_weston_SOURCES)
83 # Track this dependency explicitly instead of using BUILT_SOURCES. We
84 # add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
85 # in case we're building from tarballs.
87 src/compositor.c : $(top_builddir)/src/git-version.h
89 noinst_LTLIBRARIES += \
92 libsession_helper_la_SOURCES = \
96 libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
97 libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
100 if HAVE_SYSTEMD_LOGIN
101 libsession_helper_la_SOURCES += \
106 libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
107 libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
112 src/git-version.h : $(top_srcdir)/.git/logs/HEAD
113 $(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)')\"" > $@
116 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
122 if BUILD_WESTON_LAUNCH
123 bin_PROGRAMS += weston-launch
124 weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
125 weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
126 weston_launch_CFLAGS= \
129 $(SYSTEMD_LOGIN_CFLAGS) \
131 weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
133 if ENABLE_SETUID_INSTALL
135 chown root $(DESTDIR)$(bindir)/weston-launch
136 chmod u+s $(DESTDIR)$(bindir)/weston-launch
139 endif # BUILD_WESTON_LAUNCH
141 pkgconfigdir = $(libdir)/pkgconfig
142 pkgconfig_DATA = src/weston.pc
144 westonincludedir = $(includedir)/weston
145 westoninclude_HEADERS = \
149 shared/config-parser.h \
153 module_LTLIBRARIES += gl-renderer.la
154 gl_renderer_la_LDFLAGS = -module -avoid-version
155 gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
156 gl_renderer_la_CFLAGS = \
157 $(COMPOSITOR_CFLAGS) \
160 gl_renderer_la_SOURCES = \
163 src/vertex-clipping.c \
164 src/vertex-clipping.h
167 if ENABLE_X11_COMPOSITOR
168 module_LTLIBRARIES += x11-backend.la
169 x11_backend_la_LDFLAGS = -module -avoid-version
170 x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
172 x11_backend_la_CFLAGS = \
173 $(COMPOSITOR_CFLAGS) \
177 $(X11_COMPOSITOR_CFLAGS) \
179 x11_backend_la_SOURCES = src/compositor-x11.c
182 INPUT_BACKEND_SOURCES = src/udev-input.h
184 if ENABLE_LIBINPUT_BACKEND
185 INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
186 INPUT_BACKEND_SOURCES += \
187 src/libinput-seat.c \
188 src/libinput-seat.h \
189 src/libinput-device.c \
190 src/libinput-device.h
192 INPUT_BACKEND_SOURCES += \
202 if ENABLE_DRM_COMPOSITOR
203 module_LTLIBRARIES += drm-backend.la
204 drm_backend_la_LDFLAGS = -module -avoid-version
205 drm_backend_la_LIBADD = \
207 $(DRM_COMPOSITOR_LIBS) \
208 $(INPUT_BACKEND_LIBS) \
211 drm_backend_la_CFLAGS = \
212 $(COMPOSITOR_CFLAGS) \
214 $(DRM_COMPOSITOR_CFLAGS) \
216 drm_backend_la_SOURCES = \
217 src/compositor-drm.c \
218 $(INPUT_BACKEND_SOURCES) \
222 if ENABLE_VAAPI_RECORDER
223 drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
224 drm_backend_la_LIBADD += $(LIBVA_LIBS)
225 drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
229 if ENABLE_WAYLAND_COMPOSITOR
230 module_LTLIBRARIES += wayland-backend.la
231 wayland_backend_la_LDFLAGS = -module -avoid-version
232 wayland_backend_la_LIBADD = \
234 $(WAYLAND_COMPOSITOR_LIBS) \
236 wayland_backend_la_CFLAGS = \
237 $(COMPOSITOR_CFLAGS) \
241 $(WAYLAND_COMPOSITOR_CFLAGS) \
243 wayland_backend_la_SOURCES = src/compositor-wayland.c
244 nodist_wayland_backend_la_SOURCES = \
245 protocol/fullscreen-shell-protocol.c \
246 protocol/fullscreen-shell-client-protocol.h
249 if ENABLE_RPI_COMPOSITOR
250 if INSTALL_RPI_COMPOSITOR
251 module_LTLIBRARIES += rpi-backend.la
253 noinst_LTLIBRARIES += rpi-backend.la
256 rpi_backend_la_LDFLAGS = -module -avoid-version
257 rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
258 $(RPI_COMPOSITOR_LIBS) \
259 $(RPI_BCM_HOST_LIBS) \
260 $(INPUT_BACKEND_LIBS) \
261 libsession-helper.la \
263 rpi_backend_la_CFLAGS = \
265 $(COMPOSITOR_CFLAGS) \
266 $(RPI_COMPOSITOR_CFLAGS) \
267 $(RPI_BCM_HOST_CFLAGS)
268 rpi_backend_la_SOURCES = \
269 src/compositor-rpi.c \
272 src/rpi-bcm-stubs.h \
273 $(INPUT_BACKEND_SOURCES)
276 rpi_backend_la_LIBADD += $(EGL_LIBS)
277 rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
282 if ENABLE_HEADLESS_COMPOSITOR
283 module_LTLIBRARIES += headless-backend.la
284 headless_backend_la_LDFLAGS = -module -avoid-version
285 headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
286 headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
287 headless_backend_la_SOURCES = src/compositor-headless.c
290 if ENABLE_FBDEV_COMPOSITOR
291 module_LTLIBRARIES += fbdev-backend.la
292 fbdev_backend_la_LDFLAGS = -module -avoid-version
293 fbdev_backend_la_LIBADD = \
295 $(FBDEV_COMPOSITOR_LIBS) \
296 $(INPUT_BACKEND_LIBS) \
297 libsession-helper.la \
299 fbdev_backend_la_CFLAGS = \
300 $(COMPOSITOR_CFLAGS) \
302 $(FBDEV_COMPOSITOR_CFLAGS) \
305 fbdev_backend_la_SOURCES = \
306 src/compositor-fbdev.c \
307 $(INPUT_BACKEND_SOURCES)
310 if ENABLE_RDP_COMPOSITOR
311 module_LTLIBRARIES += rdp-backend.la
312 rdp_backend_la_LDFLAGS = -module -avoid-version
313 rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
314 $(RDP_COMPOSITOR_LIBS) \
316 rdp_backend_la_CFLAGS = \
317 $(COMPOSITOR_CFLAGS) \
318 $(RDP_COMPOSITOR_CFLAGS) \
320 rdp_backend_la_SOURCES = src/compositor-rdp.c
324 module_LTLIBRARIES += cms-static.la
325 cms_static_la_LDFLAGS = -module -avoid-version
326 cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
327 cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
328 cms_static_la_SOURCES = \
333 module_LTLIBRARIES += cms-colord.la
334 cms_colord_la_LDFLAGS = -module -avoid-version
335 cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
336 cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
337 cms_colord_la_SOURCES = \
344 noinst_PROGRAMS += spring-tool
345 spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
346 spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
347 spring_tool_SOURCES = \
356 bin_PROGRAMS += weston-terminal weston-info
358 libexec_PROGRAMS += \
359 weston-desktop-shell \
360 weston-screenshooter \
379 if INSTALL_DEMO_CLIENTS
380 bin_PROGRAMS += $(demo_clients)
382 noinst_PROGRAMS += $(demo_clients)
386 if BUILD_SIMPLE_CLIENTS
389 weston-simple-touch \
390 weston-multi-resource
392 weston_simple_shm_SOURCES = clients/simple-shm.c
393 nodist_weston_simple_shm_SOURCES = \
394 protocol/xdg-shell-protocol.c \
395 protocol/xdg-shell-client-protocol.h \
396 protocol/fullscreen-shell-protocol.c \
397 protocol/fullscreen-shell-client-protocol.h
398 weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
399 weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
401 weston_simple_touch_SOURCES = clients/simple-touch.c
402 weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
403 weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
405 weston_multi_resource_SOURCES = clients/multi-resource.c
406 weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
407 weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
410 if BUILD_SIMPLE_EGL_CLIENTS
411 demo_clients += weston-simple-egl
412 weston_simple_egl_SOURCES = clients/simple-egl.c
413 nodist_weston_simple_egl_SOURCES = \
414 protocol/xdg-shell-protocol.c \
415 protocol/xdg-shell-client-protocol.h
416 weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
417 weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
420 noinst_LTLIBRARIES += libtoytoolkit.la
422 libtoytoolkit_la_SOURCES = \
426 nodist_libtoytoolkit_la_SOURCES = \
427 protocol/text-cursor-position-protocol.c \
428 protocol/text-cursor-position-client-protocol.h \
429 protocol/scaler-protocol.c \
430 protocol/scaler-client-protocol.h \
431 protocol/workspaces-protocol.c \
432 protocol/workspaces-client-protocol.h \
433 protocol/xdg-shell-protocol.c \
434 protocol/xdg-shell-client-protocol.h
436 BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
439 libtoytoolkit_la_LIBADD = \
442 libshared-cairo.la -lrt -lm
443 libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
445 weston_flower_SOURCES = clients/flower.c
446 weston_flower_LDADD = libtoytoolkit.la
447 weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
449 weston_screenshooter_SOURCES = \
451 nodist_weston_screenshooter_SOURCES = \
452 protocol/screenshooter-protocol.c \
453 protocol/screenshooter-client-protocol.h
454 weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
455 weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
457 weston_terminal_SOURCES = clients/terminal.c
458 weston_terminal_LDADD = libtoytoolkit.la -lutil
459 weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
461 weston_image_SOURCES = clients/image.c
462 weston_image_LDADD = libtoytoolkit.la
463 weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
465 weston_cliptest_SOURCES = clients/cliptest.c
466 weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
467 weston_cliptest_LDADD = libtoytoolkit.la
469 weston_dnd_SOURCES = clients/dnd.c
470 weston_dnd_LDADD = libtoytoolkit.la
471 weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
473 weston_smoke_SOURCES = clients/smoke.c
474 weston_smoke_LDADD = libtoytoolkit.la
475 weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
477 weston_resizor_SOURCES = clients/resizor.c
478 weston_resizor_LDADD = libtoytoolkit.la
479 weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
481 weston_scaler_SOURCES = clients/scaler.c
482 weston_scaler_LDADD = libtoytoolkit.la
483 weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
486 demo_clients += weston-nested weston-nested-client
488 weston_nested_SOURCES = clients/nested.c
489 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
490 weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
492 weston_nested_client_SOURCES = clients/nested-client.c
493 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
494 weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
497 weston_eventdemo_SOURCES = clients/eventdemo.c
498 weston_eventdemo_LDADD = libtoytoolkit.la
499 weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
501 weston_clickdot_SOURCES = clients/clickdot.c
502 weston_clickdot_LDADD = libtoytoolkit.la
503 weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
505 weston_transformed_SOURCES = clients/transformed.c
506 weston_transformed_LDADD = libtoytoolkit.la
507 weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
509 weston_fullscreen_SOURCES = clients/fullscreen.c
510 nodist_weston_fullscreen_SOURCES = \
511 protocol/fullscreen-shell-protocol.c \
512 protocol/fullscreen-shell-client-protocol.h
513 weston_fullscreen_LDADD = libtoytoolkit.la
514 weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
516 weston_stacking_SOURCES = clients/stacking.c
517 weston_stacking_LDADD = libtoytoolkit.la
518 weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
520 weston_calibrator_SOURCES = clients/calibrator.c \
523 weston_calibrator_LDADD = libtoytoolkit.la
524 weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
526 if BUILD_SUBSURFACES_CLIENT
527 demo_clients += weston-subsurfaces
528 weston_subsurfaces_SOURCES = clients/subsurfaces.c
529 weston_subsurfaces_CFLAGS = \
531 $(SIMPLE_EGL_CLIENT_CFLAGS) \
533 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
537 demo_clients += weston-editor
538 weston_editor_SOURCES = clients/editor.c
539 nodist_weston_editor_SOURCES = \
540 protocol/text-protocol.c \
541 protocol/text-client-protocol.h
542 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
543 weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
546 weston_keyboard_SOURCES = clients/keyboard.c
547 nodist_weston_keyboard_SOURCES = \
548 protocol/desktop-shell-client-protocol.h \
549 protocol/desktop-shell-protocol.c \
550 protocol/input-method-protocol.c \
551 protocol/input-method-client-protocol.h
552 weston_keyboard_LDADD = libtoytoolkit.la
553 weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
555 weston_simple_im_SOURCES = clients/weston-simple-im.c
556 nodist_weston_simple_im_SOURCES = \
557 protocol/input-method-protocol.c \
558 protocol/input-method-client-protocol.h
559 weston_simple_im_LDADD = $(CLIENT_LIBS)
560 weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
562 weston_info_SOURCES = clients/weston-info.c
563 weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
564 weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
566 weston_desktop_shell_SOURCES = clients/desktop-shell.c
567 nodist_weston_desktop_shell_SOURCES = \
568 protocol/desktop-shell-client-protocol.h \
569 protocol/desktop-shell-protocol.c
570 weston_desktop_shell_LDADD = libtoytoolkit.la
571 weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
573 if BUILD_FULL_GL_CLIENTS
574 demo_clients += weston-gears
575 weston_gears_SOURCES = clients/gears.c
576 weston_gears_LDADD = libtoytoolkit.la
577 weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
580 libexec_PROGRAMS += weston-screensaver
581 weston_screensaver_SOURCES = \
582 clients/wscreensaver.c \
583 clients/wscreensaver.h \
584 clients/wscreensaver-glue.c \
585 clients/wscreensaver-glue.h \
588 nodist_weston_screensaver_SOURCES = \
589 protocol/desktop-shell-client-protocol.h \
590 protocol/desktop-shell-protocol.c
592 weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
593 weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
602 protocol/screenshooter-protocol.c \
603 protocol/screenshooter-client-protocol.h \
604 protocol/text-cursor-position-client-protocol.h \
605 protocol/text-cursor-position-protocol.c \
606 protocol/text-protocol.c \
607 protocol/text-client-protocol.h \
608 protocol/input-method-protocol.c \
609 protocol/input-method-client-protocol.h \
610 protocol/desktop-shell-client-protocol.h \
611 protocol/desktop-shell-protocol.c \
612 protocol/scaler-client-protocol.h \
613 protocol/scaler-protocol.c \
614 protocol/workspaces-client-protocol.h \
615 protocol/workspaces-protocol.c \
616 protocol/fullscreen-shell-protocol.c \
617 protocol/fullscreen-shell-client-protocol.h \
618 protocol/xdg-shell-protocol.c \
619 protocol/xdg-shell-client-protocol.h
622 westondatadir = $(datadir)/weston
623 dist_westondata_DATA = \
629 data/icon_window.png \
630 data/sign_close.png \
631 data/sign_maximize.png \
632 data/sign_minimize.png
636 bin_PROGRAMS += wcap-decode
638 wcap_decode_SOURCES = \
643 wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
644 wcap_decode_LDADD = $(WCAP_LIBS)
648 if ENABLE_DESKTOP_SHELL
650 module_LTLIBRARIES += desktop-shell.la
652 desktop_shell_la_CPPFLAGS = \
653 -I$(top_builddir)/protocol \
654 -I$(top_srcdir)/shared \
655 -I$(top_srcdir)/src \
656 -I$(top_builddir)/src \
657 -I$(top_builddir)/desktop-shell \
658 -DDATADIR='"$(datadir)"' \
659 -DMODULEDIR='"$(moduledir)"' \
660 -DLIBEXECDIR='"$(libexecdir)"' \
663 desktop_shell_la_LDFLAGS = -module -avoid-version
664 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
665 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
666 desktop_shell_la_SOURCES = \
667 desktop-shell/shell.h \
668 desktop-shell/shell.c \
669 desktop-shell/exposay.c \
670 desktop-shell/input-panel.c
671 nodist_desktop_shell_la_SOURCES = \
672 protocol/desktop-shell-protocol.c \
673 protocol/desktop-shell-server-protocol.h \
674 protocol/xdg-shell-protocol.c \
675 protocol/xdg-shell-server-protocol.h
677 BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
680 if ENABLE_FULLSCREEN_SHELL
682 module_LTLIBRARIES += fullscreen-shell.la
684 fullscreen_shell_la_CPPFLAGS = \
685 -I$(top_builddir)/protocol \
686 -I$(top_srcdir)/shared \
687 -I$(top_srcdir)/src \
688 -I$(top_builddir)/src \
691 fullscreen_shell_la_LDFLAGS = -module -avoid-version
692 fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
693 fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
694 fullscreen_shell_la_SOURCES = \
695 fullscreen-shell/fullscreen-shell.c
696 nodist_fullscreen_shell_la_SOURCES = \
697 protocol/fullscreen-shell-protocol.c \
698 protocol/fullscreen-shell-server-protocol.h
700 BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
705 module_LTLIBRARIES += xwayland.la
707 xwayland_la_CPPFLAGS = \
708 -I$(top_builddir)/protocol \
709 -I$(top_srcdir)/shared \
710 -I$(top_srcdir)/src \
711 -I$(top_builddir)/src \
712 -I$(top_builddir)/xwayland \
713 -DDATADIR='"$(datadir)"' \
714 -DMODULEDIR='"$(moduledir)"' \
715 -DLIBEXECDIR='"$(libexecdir)"' \
716 -DXSERVER_PATH='"@XSERVER_PATH@"'
718 xwayland_la_LDFLAGS = -module -avoid-version
719 xwayland_la_LIBADD = \
721 $(top_builddir)/libshared-cairo.la
722 xwayland_la_CFLAGS = \
724 $(COMPOSITOR_CFLAGS) \
727 xwayland_la_SOURCES = \
728 xwayland/xwayland.h \
729 xwayland/window-manager.c \
730 xwayland/selection.c \
732 xwayland/launcher.c \
735 nodist_xwayland_la_SOURCES = \
736 protocol/xserver-protocol.c \
737 protocol/xserver-server-protocol.h
739 BUILT_SOURCES += $(nodist_xwayland_la_SOURCES)
747 noinst_LTLIBRARIES += libshared.la libshared-cairo.la
749 libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
751 libshared_la_SOURCES = \
752 shared/config-parser.c \
753 shared/option-parser.c \
754 shared/config-parser.h \
755 shared/os-compatibility.c \
756 shared/os-compatibility.h
758 libshared_cairo_la_CFLAGS = \
759 -DDATADIR='"$(datadir)"' \
761 $(COMPOSITOR_CFLAGS) \
767 libshared_cairo_la_LIBADD = \
774 libshared_cairo_la_SOURCES = \
775 $(libshared_la_SOURCES) \
776 shared/image-loader.c \
777 shared/image-loader.h \
778 shared/cairo-util.c \
787 TESTS = $(shared_tests) $(module_tests) $(weston_tests)
795 surface-global-test.la
806 AM_TESTS_ENVIRONMENT = \
807 abs_builddir='$(abs_builddir)'; export abs_builddir;
809 TEST_EXTENSIONS = .la .weston
810 LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
811 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
816 # To remove when automake 1.11 support is dropped
819 noinst_LTLIBRARIES += \
831 test_module_ldflags = \
832 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
834 surface_global_test_la_SOURCES = tests/surface-global-test.c
835 surface_global_test_la_LDFLAGS = $(test_module_ldflags)
836 surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
838 surface_test_la_SOURCES = tests/surface-test.c
839 surface_test_la_LDFLAGS = $(test_module_ldflags)
840 surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
842 weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
843 weston_test_la_LDFLAGS = $(test_module_ldflags)
844 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
845 weston_test_la_SOURCES = tests/weston-test.c
846 nodist_weston_test_la_SOURCES = \
847 protocol/wayland-test-protocol.c \
848 protocol/wayland-test-server-protocol.h
851 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
852 weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
855 libtest_runner_la_SOURCES = \
856 tests/weston-test-runner.c \
857 tests/weston-test-runner.h
858 libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
860 config_parser_test_SOURCES = tests/config-parser-test.c
861 config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
863 vertex_clip_test_SOURCES = \
864 tests/vertex-clip-test.c \
865 src/vertex-clipping.c \
866 src/vertex-clipping.h
867 vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
869 libtest_client_la_SOURCES = \
870 tests/weston-test-client-helper.c \
871 tests/weston-test-client-helper.h
872 nodist_libtest_client_la_SOURCES = \
873 protocol/wayland-test-protocol.c \
874 protocol/wayland-test-client-protocol.h
875 libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
876 libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
878 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
879 bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
880 bad_buffer_weston_LDADD = libtest-client.la
882 keyboard_weston_SOURCES = tests/keyboard-test.c
883 keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
884 keyboard_weston_LDADD = libtest-client.la
886 event_weston_SOURCES = tests/event-test.c
887 event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
888 event_weston_LDADD = libtest-client.la
890 button_weston_SOURCES = tests/button-test.c
891 button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
892 button_weston_LDADD = libtest-client.la
894 text_weston_SOURCES = tests/text-test.c
895 nodist_text_weston_SOURCES = \
896 protocol/text-protocol.c \
897 protocol/text-client-protocol.h
898 text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
899 text_weston_LDADD = libtest-client.la
901 subsurface_weston_SOURCES = tests/subsurface-test.c
902 subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
903 subsurface_weston_LDADD = libtest-client.la
906 weston_tests += buffer-count.weston
907 buffer_count_weston_SOURCES = tests/buffer-count-test.c
908 buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
909 buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
912 if ENABLE_XWAYLAND_TEST
913 weston_tests += xwayland.weston
914 xwayland_weston_SOURCES = tests/xwayland-test.c
915 xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
916 xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
919 matrix_test_SOURCES = \
920 tests/matrix-test.c \
923 matrix_test_CPPFLAGS = -DUNIT_TEST
924 matrix_test_LDADD = -lm -lrt
926 if BUILD_SETBACKLIGHT
927 noinst_PROGRAMS += setbacklight
928 setbacklight_SOURCES = \
929 tests/setbacklight.c \
932 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
933 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
936 EXTRA_DIST += tests/weston-tests-env
939 protocol/wayland-test-protocol.c \
940 protocol/wayland-test-server-protocol.h \
941 protocol/wayland-test-client-protocol.h \
942 protocol/text-protocol.c \
943 protocol/text-client-protocol.h
946 protocol/desktop-shell.xml \
947 protocol/screenshooter.xml \
948 protocol/xserver.xml \
950 protocol/input-method.xml \
951 protocol/workspaces.xml \
952 protocol/text-cursor-position.xml \
953 protocol/wayland-test.xml \
954 protocol/xdg-shell.xml \
955 protocol/fullscreen-shell.xml \
958 man_MANS = weston.1 weston.ini.5
960 if ENABLE_DRM_COMPOSITOR
961 man_MANS += weston-drm.7
965 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
966 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
967 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
968 -e 's|__version__|$(PACKAGE_VERSION)|g'
970 SUFFIXES = .1 .5 .7 .man
972 %.1 %.5 %.7 : man/%.man
973 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
980 CLEANFILES += $(man_MANS)
983 protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
984 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
986 protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
987 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
989 protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
990 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@