4 moduledir = $(libdir)/weston
9 DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
11 EXTRA_DIST = weston.ini.in wayland-scanner.mk
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 validate-protocol-xml
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 -DDATADIR='"$(datadir)"' \
31 -DMODULEDIR='"$(moduledir)"' \
32 -DLIBEXECDIR='"$(libexecdir)"' \
33 -DBINDIR='"$(bindir)"'
35 CLEANFILES = weston.ini $(BUILT_SOURCES)
37 bin_PROGRAMS += weston
39 weston_LDFLAGS = -export-dynamic
40 weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
41 weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
42 weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
43 $(DLOPEN_LIBS) -lm libshared.la
55 src/screenshooter-protocol.c \
56 src/screenshooter-server-protocol.h \
58 src/text-cursor-position-protocol.c \
59 src/text-cursor-position-server-protocol.h \
63 src/text-server-protocol.h \
64 src/input-method-protocol.c \
65 src/input-method-server-protocol.h \
66 src/workspaces-protocol.c \
67 src/workspaces-server-protocol.h \
68 src/scaler-protocol.c \
69 src/scaler-server-protocol.h \
73 src/pixman-renderer.c \
74 src/pixman-renderer.h \
80 # Track this dependency explicitly instead of using BUILT_SOURCES. We
81 # add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
82 # in case we're building from tarballs.
84 src/compositor.c : $(top_builddir)/src/git-version.h
86 noinst_LTLIBRARIES += \
89 libsession_helper_la_SOURCES = \
93 libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
94 libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
98 libsession_helper_la_SOURCES += \
103 libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
104 libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
109 src/git-version.h : $(top_srcdir)/.git/logs/HEAD
110 $(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)')\"" > $@
115 if BUILD_WESTON_LAUNCH
116 bin_PROGRAMS += weston-launch
117 weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
118 weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
119 weston_launch_CFLAGS= \
122 $(SYSTEMD_LOGIN_CFLAGS) \
124 weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
126 if ENABLE_SETUID_INSTALL
128 chown root $(DESTDIR)$(bindir)/weston-launch
129 chmod u+s $(DESTDIR)$(bindir)/weston-launch
132 endif # BUILD_WESTON_LAUNCH
134 pkgconfigdir = $(libdir)/pkgconfig
135 pkgconfig_DATA = src/weston.pc
137 westonincludedir = $(includedir)/weston
138 westoninclude_HEADERS = \
142 shared/config-parser.h \
146 module_LTLIBRARIES += gl-renderer.la
147 gl_renderer_la_LDFLAGS = -module -avoid-version
148 gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
149 gl_renderer_la_CFLAGS = \
150 $(COMPOSITOR_CFLAGS) \
153 gl_renderer_la_SOURCES = \
156 src/vertex-clipping.c \
157 src/vertex-clipping.h
160 if ENABLE_X11_COMPOSITOR
161 module_LTLIBRARIES += x11-backend.la
162 x11_backend_la_LDFLAGS = -module -avoid-version
163 x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
165 x11_backend_la_CFLAGS = \
166 $(COMPOSITOR_CFLAGS) \
170 $(X11_COMPOSITOR_CFLAGS) \
172 x11_backend_la_SOURCES = src/compositor-x11.c
175 if ENABLE_DRM_COMPOSITOR
176 module_LTLIBRARIES += drm-backend.la
177 drm_backend_la_LDFLAGS = -module -avoid-version
178 drm_backend_la_LIBADD = \
180 $(DRM_COMPOSITOR_LIBS) \
183 drm_backend_la_CFLAGS = \
184 $(COMPOSITOR_CFLAGS) \
186 $(DRM_COMPOSITOR_CFLAGS) \
188 drm_backend_la_SOURCES = \
189 src/compositor-drm.c \
194 src/evdev-touchpad.c \
198 if ENABLE_VAAPI_RECORDER
199 drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
200 drm_backend_la_LIBADD += $(LIBVA_LIBS)
201 drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
205 if ENABLE_WAYLAND_COMPOSITOR
206 module_LTLIBRARIES += wayland-backend.la
207 wayland_backend_la_LDFLAGS = -module -avoid-version
208 wayland_backend_la_LIBADD = \
210 $(WAYLAND_COMPOSITOR_LIBS) \
212 wayland_backend_la_CFLAGS = \
213 $(COMPOSITOR_CFLAGS) \
217 $(WAYLAND_COMPOSITOR_CFLAGS) \
219 wayland_backend_la_SOURCES = src/compositor-wayland.c
222 if ENABLE_RPI_COMPOSITOR
223 if INSTALL_RPI_COMPOSITOR
224 module_LTLIBRARIES += rpi-backend.la
226 noinst_LTLIBRARIES += rpi-backend.la
229 rpi_backend_la_LDFLAGS = -module -avoid-version
230 rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
231 $(RPI_COMPOSITOR_LIBS) \
232 $(RPI_BCM_HOST_LIBS) \
233 libsession-helper.la \
235 rpi_backend_la_CFLAGS = \
237 $(COMPOSITOR_CFLAGS) \
238 $(RPI_COMPOSITOR_CFLAGS) \
239 $(RPI_BCM_HOST_CFLAGS)
240 rpi_backend_la_SOURCES = \
241 src/compositor-rpi.c \
244 src/rpi-bcm-stubs.h \
252 rpi_backend_la_LIBADD += $(EGL_LIBS)
253 rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
258 if ENABLE_HEADLESS_COMPOSITOR
259 module_LTLIBRARIES += headless-backend.la
260 headless_backend_la_LDFLAGS = -module -avoid-version
261 headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
263 headless_backend_la_CFLAGS = \
264 $(COMPOSITOR_CFLAGS) \
266 headless_backend_la_SOURCES = src/compositor-headless.c
269 if ENABLE_FBDEV_COMPOSITOR
270 module_LTLIBRARIES += fbdev-backend.la
271 fbdev_backend_la_LDFLAGS = -module -avoid-version
272 fbdev_backend_la_LIBADD = \
274 $(FBDEV_COMPOSITOR_LIBS) \
275 libsession-helper.la \
277 fbdev_backend_la_CFLAGS = \
278 $(COMPOSITOR_CFLAGS) \
280 $(FBDEV_COMPOSITOR_CFLAGS) \
283 fbdev_backend_la_SOURCES = \
284 src/compositor-fbdev.c \
292 if ENABLE_RDP_COMPOSITOR
293 module_LTLIBRARIES += rdp-backend.la
294 rdp_backend_la_LDFLAGS = -module -avoid-version
295 rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
296 $(RDP_COMPOSITOR_LIBS) \
298 rdp_backend_la_CFLAGS = \
299 $(COMPOSITOR_CFLAGS) \
300 $(RDP_COMPOSITOR_CFLAGS) \
302 rdp_backend_la_SOURCES = src/compositor-rdp.c
306 module_LTLIBRARIES += cms-static.la
307 cms_static_la_LDFLAGS = -module -avoid-version
308 cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
309 cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
310 cms_static_la_SOURCES = \
315 module_LTLIBRARIES += cms-colord.la
316 cms_colord_la_LDFLAGS = -module -avoid-version
317 cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
318 cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
319 cms_colord_la_SOURCES = \
326 noinst_PROGRAMS += spring-tool
327 spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
328 spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
329 spring_tool_SOURCES = \
337 src/screenshooter-server-protocol.h \
338 src/screenshooter-protocol.c \
339 src/text-cursor-position-server-protocol.h \
340 src/text-cursor-position-protocol.c \
341 src/text-protocol.c \
342 src/text-server-protocol.h \
343 src/input-method-protocol.c \
344 src/input-method-server-protocol.h \
345 src/workspaces-server-protocol.h \
346 src/workspaces-protocol.c \
347 src/scaler-server-protocol.h \
348 src/scaler-protocol.c
352 bin_PROGRAMS += weston-terminal weston-info
354 libexec_PROGRAMS += \
355 weston-desktop-shell \
356 weston-screenshooter \
375 if INSTALL_DEMO_CLIENTS
376 bin_PROGRAMS += $(demo_clients)
378 noinst_PROGRAMS += $(demo_clients)
382 if BUILD_SIMPLE_CLIENTS
385 weston-simple-touch \
386 weston-multi-resource
388 weston_simple_shm_SOURCES = \
389 clients/simple-shm.c \
390 shared/os-compatibility.c \
391 shared/os-compatibility.h
392 weston_simple_shm_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
393 weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS)
395 weston_simple_touch_SOURCES = \
396 clients/simple-touch.c \
397 shared/os-compatibility.c \
398 shared/os-compatibility.h
399 weston_simple_touch_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
400 weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS)
402 weston_multi_resource_SOURCES = \
403 clients/multi-resource.c \
404 shared/os-compatibility.c \
405 shared/os-compatibility.h
406 weston_multi_resource_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
407 weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) -lm
410 if BUILD_SIMPLE_EGL_CLIENTS
411 demo_clients += weston-simple-egl
412 weston_simple_egl_SOURCES = clients/simple-egl.c
413 weston_simple_egl_CPPFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS)
414 weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
417 noinst_LTLIBRARIES += libtoytoolkit.la
419 libtoytoolkit_la_SOURCES = \
422 clients/text-cursor-position-protocol.c \
423 clients/text-cursor-position-client-protocol.h \
424 clients/scaler-protocol.c \
425 clients/scaler-client-protocol.h \
426 clients/workspaces-protocol.c \
427 clients/workspaces-client-protocol.h
429 libtoytoolkit_la_LIBADD = \
432 libshared-cairo.la -lrt -lm
433 libtoytoolkit_la_CFLAGS = $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
435 weston_flower_SOURCES = clients/flower.c
436 weston_flower_LDADD = libtoytoolkit.la
437 weston_flower_CFLAGS = $(CLIENT_CFLAGS)
439 weston_screenshooter_SOURCES = \
440 clients/screenshot.c \
441 clients/screenshooter-protocol.c \
442 clients/screenshooter-client-protocol.h \
443 shared/os-compatibility.c \
444 shared/os-compatibility.h
445 weston_screenshooter_LDADD = $(CLIENT_LIBS)
446 weston_screenshooter_CFLAGS = $(CLIENT_CFLAGS)
448 weston_terminal_SOURCES = clients/terminal.c
449 weston_terminal_LDADD = libtoytoolkit.la -lutil
450 weston_terminal_CFLAGS = $(CLIENT_CFLAGS)
452 weston_image_SOURCES = clients/image.c
453 weston_image_LDADD = libtoytoolkit.la
454 weston_image_CFLAGS = $(CLIENT_CFLAGS)
456 weston_cliptest_SOURCES = clients/cliptest.c
457 weston_cliptest_CFLAGS = $(AM_CPPFLAGS) $(CLIENT_CFLAGS)
458 weston_cliptest_LDADD = libtoytoolkit.la
460 weston_dnd_SOURCES = clients/dnd.c
461 weston_dnd_LDADD = libtoytoolkit.la
462 weston_dnd_CFLAGS = $(CLIENT_CFLAGS)
464 weston_smoke_SOURCES = clients/smoke.c
465 weston_smoke_LDADD = libtoytoolkit.la
466 weston_smoke_CFLAGS = $(CLIENT_CFLAGS)
468 weston_resizor_SOURCES = clients/resizor.c
469 weston_resizor_LDADD = libtoytoolkit.la
470 weston_resizor_CFLAGS = $(CLIENT_CFLAGS)
472 weston_scaler_SOURCES = clients/scaler.c
473 weston_scaler_LDADD = libtoytoolkit.la
474 weston_scaler_CFLAGS = $(CLIENT_CFLAGS)
477 demo_clients += weston-nested weston-nested-client
479 weston_nested_SOURCES = clients/nested.c
480 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
481 weston_nested_CFLAGS = $(CLIENT_CFLAGS)
483 weston_nested_client_SOURCES = clients/nested-client.c
484 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
487 weston_eventdemo_SOURCES = clients/eventdemo.c
488 weston_eventdemo_LDADD = libtoytoolkit.la
489 weston_eventdemo_CFLAGS = $(CLIENT_CFLAGS)
491 weston_clickdot_SOURCES = clients/clickdot.c
492 weston_clickdot_LDADD = libtoytoolkit.la
493 weston_clickdot_CFLAGS = $(CLIENT_CFLAGS)
495 weston_transformed_SOURCES = clients/transformed.c
496 weston_transformed_LDADD = libtoytoolkit.la
497 weston_transformed_CFLAGS = $(CLIENT_CFLAGS)
499 weston_fullscreen_SOURCES = clients/fullscreen.c
500 weston_fullscreen_LDADD = libtoytoolkit.la
501 weston_fullscreen_CFLAGS = $(CLIENT_CFLAGS)
503 weston_stacking_SOURCES = clients/stacking.c
504 weston_stacking_LDADD = libtoytoolkit.la
505 weston_stacking_CFLAGS = $(CLIENT_CFLAGS)
507 weston_calibrator_SOURCES = clients/calibrator.c \
510 weston_calibrator_LDADD = libtoytoolkit.la
511 weston_calibrator_CFLAGS = $(CLIENT_CFLAGS)
513 if BUILD_SUBSURFACES_CLIENT
514 demo_clients += weston-subsurfaces
515 weston_subsurfaces_SOURCES = clients/subsurfaces.c
516 weston_subsurfaces_CFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS) $(CLIENT_CFLAGS)
517 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
521 demo_clients += weston-editor
522 weston_editor_SOURCES = \
524 clients/text-protocol.c \
525 clients/text-client-protocol.h
526 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
527 weston_editor_CFLAGS = $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
530 weston_keyboard_SOURCES = \
532 clients/desktop-shell-client-protocol.h \
533 clients/desktop-shell-protocol.c \
534 clients/input-method-protocol.c \
535 clients/input-method-client-protocol.h
536 weston_keyboard_LDADD = libtoytoolkit.la
537 weston_keyboard_CFLAGS = $(CLIENT_CFLAGS)
539 weston_simple_im_SOURCES = \
540 clients/weston-simple-im.c \
541 clients/input-method-protocol.c \
542 clients/input-method-client-protocol.h
543 weston_simple_im_LDADD = $(CLIENT_LIBS)
544 weston_simple_im_CFLAGS = $(CLIENT_CFLAGS)
546 weston_info_SOURCES = \
547 clients/weston-info.c \
548 shared/os-compatibility.c \
549 shared/os-compatibility.h
550 weston_info_LDADD = $(WESTON_INFO_LIBS)
552 weston_desktop_shell_SOURCES = \
553 clients/desktop-shell.c \
554 clients/desktop-shell-client-protocol.h \
555 clients/desktop-shell-protocol.c
556 weston_desktop_shell_LDADD = libtoytoolkit.la
557 weston_desktop_shell_CFLAGS = $(CLIENT_CFLAGS)
559 if BUILD_FULL_GL_CLIENTS
560 demo_clients += weston-gears
561 weston_gears_SOURCES = clients/gears.c
562 weston_gears_LDADD = libtoytoolkit.la
563 weston_gears_CFLAGS = $(CLIENT_CFLAGS)
566 libexec_PROGRAMS += weston-screensaver
567 weston_screensaver_SOURCES = \
568 clients/wscreensaver.c \
569 clients/wscreensaver.h \
570 clients/desktop-shell-client-protocol.h \
571 clients/desktop-shell-protocol.c \
572 clients/wscreensaver-glue.c \
573 clients/wscreensaver-glue.h \
576 weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
577 weston_screensaver_CFLAGS = $(GLU_CFLAGS) $(CLIENT_CFLAGS)
586 clients/screenshooter-client-protocol.h \
587 clients/screenshooter-protocol.c \
588 clients/text-cursor-position-client-protocol.h \
589 clients/text-cursor-position-protocol.c \
590 clients/text-protocol.c \
591 clients/text-client-protocol.h \
592 clients/input-method-protocol.c \
593 clients/input-method-client-protocol.h \
594 clients/desktop-shell-client-protocol.h \
595 clients/desktop-shell-protocol.c \
596 clients/scaler-client-protocol.h \
597 clients/scaler-protocol.c \
598 clients/workspaces-client-protocol.h \
599 clients/workspaces-protocol.c
602 westondatadir = $(datadir)/weston
603 dist_westondata_DATA = \
609 data/icon_window.png \
610 data/sign_close.png \
611 data/sign_maximize.png \
612 data/sign_minimize.png
616 bin_PROGRAMS += wcap-decode
618 wcap_decode_SOURCES = \
623 wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
624 wcap_decode_LDADD = $(WCAP_LIBS)
628 if ENABLE_DESKTOP_SHELL
630 module_LTLIBRARIES += desktop-shell.la
632 desktop_shell_la_CPPFLAGS = \
633 -I$(top_srcdir)/shared \
634 -I$(top_srcdir)/src \
635 -I$(top_builddir)/src \
636 -I$(top_builddir)/desktop-shell \
637 -DDATADIR='"$(datadir)"' \
638 -DMODULEDIR='"$(moduledir)"' \
639 -DLIBEXECDIR='"$(libexecdir)"' \
642 desktop_shell_la_LDFLAGS = -module -avoid-version
643 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) \
645 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
646 desktop_shell_la_SOURCES = \
647 desktop-shell/shell.h \
648 desktop-shell/shell.c \
649 desktop-shell/exposay.c \
650 desktop-shell/input-panel.c \
651 desktop-shell/desktop-shell-protocol.c \
652 desktop-shell/desktop-shell-server-protocol.h \
653 desktop-shell/xdg-shell-protocol.c \
654 desktop-shell/xdg-shell-server-protocol.h
657 desktop-shell/desktop-shell-protocol.c \
658 desktop-shell/desktop-shell-server-protocol.h \
659 desktop-shell/xdg-shell-protocol.c \
660 desktop-shell/xdg-shell-server-protocol.h
666 module_LTLIBRARIES += xwayland.la
668 xwayland_la_CPPFLAGS = \
669 -I$(top_srcdir)/shared \
670 -I$(top_srcdir)/src \
671 -I$(top_builddir)/src \
672 -I$(top_builddir)/xwayland \
673 -DDATADIR='"$(datadir)"' \
674 -DMODULEDIR='"$(moduledir)"' \
675 -DLIBEXECDIR='"$(libexecdir)"' \
676 -DXSERVER_PATH='"@XSERVER_PATH@"'
678 xwayland_la_LDFLAGS = -module -avoid-version
679 xwayland_la_LIBADD = \
681 $(top_builddir)/libshared-cairo.la
682 xwayland_la_CFLAGS = \
684 $(COMPOSITOR_CFLAGS) \
687 xwayland_la_SOURCES = \
688 xwayland/xwayland.h \
689 xwayland/window-manager.c \
690 xwayland/selection.c \
692 xwayland/launcher.c \
693 xwayland/xserver-protocol.c \
694 xwayland/xserver-server-protocol.h \
699 xwayland/xserver-protocol.c \
700 xwayland/xserver-server-protocol.h
708 noinst_LTLIBRARIES += libshared.la libshared-cairo.la
710 libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
712 libshared_la_SOURCES = \
713 shared/config-parser.c \
714 shared/option-parser.c \
715 shared/config-parser.h \
716 shared/os-compatibility.c \
717 shared/os-compatibility.h
719 libshared_cairo_la_CFLAGS = \
720 -DDATADIR='"$(datadir)"' \
722 $(COMPOSITOR_CFLAGS) \
728 libshared_cairo_la_LIBADD = \
735 libshared_cairo_la_SOURCES = \
736 $(libshared_la_SOURCES) \
737 shared/image-loader.c \
738 shared/image-loader.h \
739 shared/cairo-util.c \
748 TESTS = $(shared_tests) $(module_tests) $(weston_tests)
756 surface-global-test.la
767 AM_TESTS_ENVIRONMENT = \
768 abs_builddir='$(abs_builddir)'; export abs_builddir;
770 TEST_EXTENSIONS = .la .weston
771 LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
772 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
777 # To remove when automake 1.11 support is dropped
780 noinst_LTLIBRARIES += \
792 test_module_ldflags = \
793 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
795 surface_global_test_la_SOURCES = tests/surface-global-test.c
796 surface_global_test_la_LDFLAGS = $(test_module_ldflags)
797 surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
799 surface_test_la_SOURCES = tests/surface-test.c
800 surface_test_la_LDFLAGS = $(test_module_ldflags)
801 surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
803 weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
804 weston_test_la_LDFLAGS = $(test_module_ldflags)
805 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
806 weston_test_la_SOURCES = \
807 tests/weston-test.c \
808 tests/wayland-test-protocol.c \
809 tests/wayland-test-server-protocol.h
812 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
813 weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
816 libtest_runner_la_SOURCES = \
817 tests/weston-test-runner.c \
818 tests/weston-test-runner.h
819 libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
821 config_parser_test_SOURCES = tests/config-parser-test.c
822 config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
824 vertex_clip_test_SOURCES = \
825 tests/vertex-clip-test.c \
826 src/vertex-clipping.c \
827 src/vertex-clipping.h
828 vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
830 libtest_client_la_SOURCES = \
831 tests/weston-test-client-helper.c \
832 tests/weston-test-client-helper.h \
833 tests/wayland-test-protocol.c \
834 tests/wayland-test-client-protocol.h
835 libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
837 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
838 bad_buffer_weston_LDADD = libtest-client.la
840 keyboard_weston_SOURCES = tests/keyboard-test.c
841 keyboard_weston_LDADD = libtest-client.la
843 event_weston_SOURCES = tests/event-test.c
844 event_weston_LDADD = libtest-client.la
846 button_weston_SOURCES = tests/button-test.c
847 button_weston_LDADD = libtest-client.la
849 text_weston_SOURCES = tests/text-test.c tests/text-protocol.c
850 text_weston_LDADD = libtest-client.la
852 subsurface_weston_SOURCES = tests/subsurface-test.c
853 subsurface_weston_LDADD = libtest-client.la
856 weston_tests += buffer-count.weston
857 buffer_count_weston_SOURCES = tests/buffer-count-test.c
858 buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
859 buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
862 if ENABLE_XWAYLAND_TEST
863 weston_tests += xwayland.weston
864 xwayland_weston_SOURCES = tests/xwayland-test.c
865 xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
866 xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
869 matrix_test_SOURCES = \
870 tests/matrix-test.c \
873 matrix_test_CPPFLAGS = -DUNIT_TEST
874 matrix_test_LDADD = -lm -lrt
876 if BUILD_SETBACKLIGHT
877 noinst_PROGRAMS += setbacklight
878 setbacklight_SOURCES = \
879 tests/setbacklight.c \
882 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
883 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
886 EXTRA_DIST += tests/weston-tests-env
889 tests/wayland-test-protocol.c \
890 tests/wayland-test-server-protocol.h \
891 tests/wayland-test-client-protocol.h \
892 tests/text-protocol.c \
893 tests/text-client-protocol.h
896 protocol/desktop-shell.xml \
897 protocol/screenshooter.xml \
898 protocol/xserver.xml \
900 protocol/input-method.xml \
901 protocol/workspaces.xml \
902 protocol/text-cursor-position.xml \
903 protocol/wayland-test.xml \
904 protocol/xdg-shell.xml \
908 .PHONY : validate-protocol-xml
910 .%.xml.valid : $(top_srcdir)/protocol/%.xml
911 $(AM_V_GEN)$(XMLLINT) --noout --dtdvalid $(dtddir)/wayland.dtd $^ > $@
913 validate-protocol-xml : $(protocol_sources:protocol/%.xml=.%.xml.valid)
915 CLEANFILES += $(protocol_sources:protocol/%.xml=.%.xml.valid)
916 EXTRA_DIST += $(protocol_sources)
921 man_MANS = weston.1 weston.ini.5
923 if ENABLE_DRM_COMPOSITOR
924 man_MANS += weston-drm.7
928 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
929 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
930 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
931 -e 's|__version__|$(PACKAGE_VERSION)|g'
933 SUFFIXES = .1 .5 .7 .man
935 %.1 %.5 %.7 : man/%.man
936 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
943 CLEANFILES += $(man_MANS)
946 wayland_protocoldir = $(top_srcdir)/protocol
947 include $(top_srcdir)/wayland-scanner.mk