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
62 src/pixman-renderer.c \
63 src/pixman-renderer.h \
69 nodist_weston_SOURCES = \
70 protocol/screenshooter-protocol.c \
71 protocol/screenshooter-server-protocol.h \
72 protocol/text-cursor-position-protocol.c \
73 protocol/text-cursor-position-server-protocol.h \
74 protocol/text-protocol.c \
75 protocol/text-server-protocol.h \
76 protocol/input-method-protocol.c \
77 protocol/input-method-server-protocol.h \
78 protocol/workspaces-protocol.c \
79 protocol/workspaces-server-protocol.h \
80 protocol/scaler-protocol.c \
81 protocol/scaler-server-protocol.h
83 BUILT_SOURCES += $(nodist_weston_SOURCES)
85 # Track this dependency explicitly instead of using BUILT_SOURCES. We
86 # add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
87 # in case we're building from tarballs.
89 src/compositor.c : $(top_builddir)/src/git-version.h
91 noinst_LTLIBRARIES += \
94 libsession_helper_la_SOURCES = \
98 libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
99 libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
102 if HAVE_SYSTEMD_LOGIN
103 libsession_helper_la_SOURCES += \
108 libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
109 libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
114 src/git-version.h : $(top_srcdir)/.git/logs/HEAD
115 $(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)')\"" > $@
120 if BUILD_WESTON_LAUNCH
121 bin_PROGRAMS += weston-launch
122 weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
123 weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
124 weston_launch_CFLAGS= \
127 $(SYSTEMD_LOGIN_CFLAGS) \
129 weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
131 if ENABLE_SETUID_INSTALL
133 chown root $(DESTDIR)$(bindir)/weston-launch
134 chmod u+s $(DESTDIR)$(bindir)/weston-launch
137 endif # BUILD_WESTON_LAUNCH
139 pkgconfigdir = $(libdir)/pkgconfig
140 pkgconfig_DATA = src/weston.pc
142 westonincludedir = $(includedir)/weston
143 westoninclude_HEADERS = \
147 shared/config-parser.h \
151 module_LTLIBRARIES += gl-renderer.la
152 gl_renderer_la_LDFLAGS = -module -avoid-version
153 gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
154 gl_renderer_la_CFLAGS = \
155 $(COMPOSITOR_CFLAGS) \
158 gl_renderer_la_SOURCES = \
161 src/vertex-clipping.c \
162 src/vertex-clipping.h
165 if ENABLE_X11_COMPOSITOR
166 module_LTLIBRARIES += x11-backend.la
167 x11_backend_la_LDFLAGS = -module -avoid-version
168 x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
170 x11_backend_la_CFLAGS = \
171 $(COMPOSITOR_CFLAGS) \
175 $(X11_COMPOSITOR_CFLAGS) \
177 x11_backend_la_SOURCES = src/compositor-x11.c
180 if ENABLE_DRM_COMPOSITOR
181 module_LTLIBRARIES += drm-backend.la
182 drm_backend_la_LDFLAGS = -module -avoid-version
183 drm_backend_la_LIBADD = \
185 $(DRM_COMPOSITOR_LIBS) \
188 drm_backend_la_CFLAGS = \
189 $(COMPOSITOR_CFLAGS) \
191 $(DRM_COMPOSITOR_CFLAGS) \
193 drm_backend_la_SOURCES = \
194 src/compositor-drm.c \
199 src/evdev-touchpad.c \
203 if ENABLE_VAAPI_RECORDER
204 drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
205 drm_backend_la_LIBADD += $(LIBVA_LIBS)
206 drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
210 if ENABLE_WAYLAND_COMPOSITOR
211 module_LTLIBRARIES += wayland-backend.la
212 wayland_backend_la_LDFLAGS = -module -avoid-version
213 wayland_backend_la_LIBADD = \
215 $(WAYLAND_COMPOSITOR_LIBS) \
217 wayland_backend_la_CFLAGS = \
218 $(COMPOSITOR_CFLAGS) \
222 $(WAYLAND_COMPOSITOR_CFLAGS) \
224 wayland_backend_la_SOURCES = src/compositor-wayland.c
227 if ENABLE_RPI_COMPOSITOR
228 if INSTALL_RPI_COMPOSITOR
229 module_LTLIBRARIES += rpi-backend.la
231 noinst_LTLIBRARIES += rpi-backend.la
234 rpi_backend_la_LDFLAGS = -module -avoid-version
235 rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
236 $(RPI_COMPOSITOR_LIBS) \
237 $(RPI_BCM_HOST_LIBS) \
238 libsession-helper.la \
240 rpi_backend_la_CFLAGS = \
242 $(COMPOSITOR_CFLAGS) \
243 $(RPI_COMPOSITOR_CFLAGS) \
244 $(RPI_BCM_HOST_CFLAGS)
245 rpi_backend_la_SOURCES = \
246 src/compositor-rpi.c \
249 src/rpi-bcm-stubs.h \
257 rpi_backend_la_LIBADD += $(EGL_LIBS)
258 rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
263 if ENABLE_HEADLESS_COMPOSITOR
264 module_LTLIBRARIES += headless-backend.la
265 headless_backend_la_LDFLAGS = -module -avoid-version
266 headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
268 headless_backend_la_CFLAGS = \
269 $(COMPOSITOR_CFLAGS) \
271 headless_backend_la_SOURCES = src/compositor-headless.c
274 if ENABLE_FBDEV_COMPOSITOR
275 module_LTLIBRARIES += fbdev-backend.la
276 fbdev_backend_la_LDFLAGS = -module -avoid-version
277 fbdev_backend_la_LIBADD = \
279 $(FBDEV_COMPOSITOR_LIBS) \
280 libsession-helper.la \
282 fbdev_backend_la_CFLAGS = \
283 $(COMPOSITOR_CFLAGS) \
285 $(FBDEV_COMPOSITOR_CFLAGS) \
288 fbdev_backend_la_SOURCES = \
289 src/compositor-fbdev.c \
297 if ENABLE_RDP_COMPOSITOR
298 module_LTLIBRARIES += rdp-backend.la
299 rdp_backend_la_LDFLAGS = -module -avoid-version
300 rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
301 $(RDP_COMPOSITOR_LIBS) \
303 rdp_backend_la_CFLAGS = \
304 $(COMPOSITOR_CFLAGS) \
305 $(RDP_COMPOSITOR_CFLAGS) \
307 rdp_backend_la_SOURCES = src/compositor-rdp.c
311 module_LTLIBRARIES += cms-static.la
312 cms_static_la_LDFLAGS = -module -avoid-version
313 cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
314 cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
315 cms_static_la_SOURCES = \
320 module_LTLIBRARIES += cms-colord.la
321 cms_colord_la_LDFLAGS = -module -avoid-version
322 cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
323 cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
324 cms_colord_la_SOURCES = \
331 noinst_PROGRAMS += spring-tool
332 spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
333 spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
334 spring_tool_SOURCES = \
343 bin_PROGRAMS += weston-terminal weston-info
345 libexec_PROGRAMS += \
346 weston-desktop-shell \
347 weston-screenshooter \
366 if INSTALL_DEMO_CLIENTS
367 bin_PROGRAMS += $(demo_clients)
369 noinst_PROGRAMS += $(demo_clients)
373 if BUILD_SIMPLE_CLIENTS
376 weston-simple-touch \
377 weston-multi-resource
379 weston_simple_shm_SOURCES = \
380 clients/simple-shm.c \
381 shared/os-compatibility.c \
382 shared/os-compatibility.h
383 weston_simple_shm_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
384 weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS)
386 weston_simple_touch_SOURCES = \
387 clients/simple-touch.c \
388 shared/os-compatibility.c \
389 shared/os-compatibility.h
390 weston_simple_touch_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
391 weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS)
393 weston_multi_resource_SOURCES = \
394 clients/multi-resource.c \
395 shared/os-compatibility.c \
396 shared/os-compatibility.h
397 weston_multi_resource_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
398 weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) -lm
401 if BUILD_SIMPLE_EGL_CLIENTS
402 demo_clients += weston-simple-egl
403 weston_simple_egl_SOURCES = clients/simple-egl.c
404 weston_simple_egl_CPPFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS)
405 weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
408 noinst_LTLIBRARIES += libtoytoolkit.la
410 libtoytoolkit_la_SOURCES = \
414 nodist_libtoytoolkit_la_SOURCES = \
415 protocol/text-cursor-position-protocol.c \
416 protocol/text-cursor-position-client-protocol.h \
417 protocol/scaler-protocol.c \
418 protocol/scaler-client-protocol.h \
419 protocol/workspaces-protocol.c \
420 protocol/workspaces-client-protocol.h \
421 protocol/xdg-shell-protocol.c \
422 protocol/xdg-shell-client-protocol.h
424 BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
427 libtoytoolkit_la_LIBADD = \
430 libshared-cairo.la -lrt -lm
431 libtoytoolkit_la_CFLAGS = $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
433 weston_flower_SOURCES = clients/flower.c
434 weston_flower_LDADD = libtoytoolkit.la
435 weston_flower_CFLAGS = $(CLIENT_CFLAGS)
437 weston_screenshooter_SOURCES = \
438 clients/screenshot.c \
439 shared/os-compatibility.c \
440 shared/os-compatibility.h
441 nodist_weston_screenshooter_SOURCES = \
442 protocol/screenshooter-protocol.c \
443 protocol/screenshooter-client-protocol.h
444 weston_screenshooter_LDADD = $(CLIENT_LIBS)
445 weston_screenshooter_CFLAGS = $(CLIENT_CFLAGS)
447 weston_terminal_SOURCES = clients/terminal.c
448 weston_terminal_LDADD = libtoytoolkit.la -lutil
449 weston_terminal_CFLAGS = $(CLIENT_CFLAGS)
451 weston_image_SOURCES = clients/image.c
452 weston_image_LDADD = libtoytoolkit.la
453 weston_image_CFLAGS = $(CLIENT_CFLAGS)
455 weston_cliptest_SOURCES = clients/cliptest.c
456 weston_cliptest_CFLAGS = $(AM_CPPFLAGS) $(CLIENT_CFLAGS)
457 weston_cliptest_LDADD = libtoytoolkit.la
459 weston_dnd_SOURCES = clients/dnd.c
460 weston_dnd_LDADD = libtoytoolkit.la
461 weston_dnd_CFLAGS = $(CLIENT_CFLAGS)
463 weston_smoke_SOURCES = clients/smoke.c
464 weston_smoke_LDADD = libtoytoolkit.la
465 weston_smoke_CFLAGS = $(CLIENT_CFLAGS)
467 weston_resizor_SOURCES = clients/resizor.c
468 weston_resizor_LDADD = libtoytoolkit.la
469 weston_resizor_CFLAGS = $(CLIENT_CFLAGS)
471 weston_scaler_SOURCES = clients/scaler.c
472 weston_scaler_LDADD = libtoytoolkit.la
473 weston_scaler_CFLAGS = $(CLIENT_CFLAGS)
476 demo_clients += weston-nested weston-nested-client
478 weston_nested_SOURCES = clients/nested.c
479 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
480 weston_nested_CFLAGS = $(CLIENT_CFLAGS)
482 weston_nested_client_SOURCES = clients/nested-client.c
483 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
486 weston_eventdemo_SOURCES = clients/eventdemo.c
487 weston_eventdemo_LDADD = libtoytoolkit.la
488 weston_eventdemo_CFLAGS = $(CLIENT_CFLAGS)
490 weston_clickdot_SOURCES = clients/clickdot.c
491 weston_clickdot_LDADD = libtoytoolkit.la
492 weston_clickdot_CFLAGS = $(CLIENT_CFLAGS)
494 weston_transformed_SOURCES = clients/transformed.c
495 weston_transformed_LDADD = libtoytoolkit.la
496 weston_transformed_CFLAGS = $(CLIENT_CFLAGS)
498 weston_fullscreen_SOURCES = clients/fullscreen.c
499 weston_fullscreen_LDADD = libtoytoolkit.la
500 weston_fullscreen_CFLAGS = $(CLIENT_CFLAGS)
502 weston_stacking_SOURCES = clients/stacking.c
503 weston_stacking_LDADD = libtoytoolkit.la
504 weston_stacking_CFLAGS = $(CLIENT_CFLAGS)
506 weston_calibrator_SOURCES = clients/calibrator.c \
509 weston_calibrator_LDADD = libtoytoolkit.la
510 weston_calibrator_CFLAGS = $(CLIENT_CFLAGS)
512 if BUILD_SUBSURFACES_CLIENT
513 demo_clients += weston-subsurfaces
514 weston_subsurfaces_SOURCES = clients/subsurfaces.c
515 weston_subsurfaces_CFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS) $(CLIENT_CFLAGS)
516 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
520 demo_clients += weston-editor
521 weston_editor_SOURCES = clients/editor.c
522 nodist_weston_editor_SOURCES = \
523 protocol/text-protocol.c \
524 protocol/text-client-protocol.h
525 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
526 weston_editor_CFLAGS = $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
529 weston_keyboard_SOURCES = clients/keyboard.c
530 nodist_weston_keyboard_SOURCES = \
531 protocol/desktop-shell-client-protocol.h \
532 protocol/desktop-shell-protocol.c \
533 protocol/input-method-protocol.c \
534 protocol/input-method-client-protocol.h
535 weston_keyboard_LDADD = libtoytoolkit.la
536 weston_keyboard_CFLAGS = $(CLIENT_CFLAGS)
538 weston_simple_im_SOURCES = clients/weston-simple-im.c
539 nodist_weston_simple_im_SOURCES = \
540 protocol/input-method-protocol.c \
541 protocol/input-method-client-protocol.h
542 weston_simple_im_LDADD = $(CLIENT_LIBS)
543 weston_simple_im_CFLAGS = $(CLIENT_CFLAGS)
545 weston_info_SOURCES = \
546 clients/weston-info.c \
547 shared/os-compatibility.c \
548 shared/os-compatibility.h
549 weston_info_LDADD = $(WESTON_INFO_LIBS)
551 weston_desktop_shell_SOURCES = clients/desktop-shell.c
552 nodist_weston_desktop_shell_SOURCES = \
553 protocol/desktop-shell-client-protocol.h \
554 protocol/desktop-shell-protocol.c
555 weston_desktop_shell_LDADD = libtoytoolkit.la
556 weston_desktop_shell_CFLAGS = $(CLIENT_CFLAGS)
558 if BUILD_FULL_GL_CLIENTS
559 demo_clients += weston-gears
560 weston_gears_SOURCES = clients/gears.c
561 weston_gears_LDADD = libtoytoolkit.la
562 weston_gears_CFLAGS = $(CLIENT_CFLAGS)
565 libexec_PROGRAMS += weston-screensaver
566 weston_screensaver_SOURCES = \
567 clients/wscreensaver.c \
568 clients/wscreensaver.h \
569 clients/wscreensaver-glue.c \
570 clients/wscreensaver-glue.h \
573 nodist_weston_screensaver_SOURCES = \
574 protocol/desktop-shell-client-protocol.h \
575 protocol/desktop-shell-protocol.c
577 weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
578 weston_screensaver_CFLAGS = $(GLU_CFLAGS) $(CLIENT_CFLAGS)
587 protocol/screenshooter-protocol.c \
588 protocol/screenshooter-client-protocol.h \
589 protocol/text-cursor-position-client-protocol.h \
590 protocol/text-cursor-position-protocol.c \
591 protocol/text-protocol.c \
592 protocol/text-client-protocol.h \
593 protocol/input-method-protocol.c \
594 protocol/input-method-client-protocol.h \
595 protocol/desktop-shell-client-protocol.h \
596 protocol/desktop-shell-protocol.c \
597 protocol/scaler-client-protocol.h \
598 protocol/scaler-protocol.c \
599 protocol/workspaces-client-protocol.h \
600 protocol/workspaces-protocol.c \
601 protocol/xdg-shell-protocol.c \
602 protocol/xdg-shell-client-protocol.h
605 westondatadir = $(datadir)/weston
606 dist_westondata_DATA = \
612 data/icon_window.png \
613 data/sign_close.png \
614 data/sign_maximize.png \
615 data/sign_minimize.png
619 bin_PROGRAMS += wcap-decode
621 wcap_decode_SOURCES = \
626 wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
627 wcap_decode_LDADD = $(WCAP_LIBS)
631 if ENABLE_DESKTOP_SHELL
633 module_LTLIBRARIES += desktop-shell.la
635 desktop_shell_la_CPPFLAGS = \
636 -I$(top_builddir)/protocol \
637 -I$(top_srcdir)/shared \
638 -I$(top_srcdir)/src \
639 -I$(top_builddir)/src \
640 -I$(top_builddir)/desktop-shell \
641 -DDATADIR='"$(datadir)"' \
642 -DMODULEDIR='"$(moduledir)"' \
643 -DLIBEXECDIR='"$(libexecdir)"' \
646 desktop_shell_la_LDFLAGS = -module -avoid-version
647 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) \
649 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
650 desktop_shell_la_SOURCES = \
651 desktop-shell/shell.h \
652 desktop-shell/shell.c \
653 desktop-shell/exposay.c \
654 desktop-shell/input-panel.c
655 nodist_desktop_shell_la_SOURCES = \
656 protocol/desktop-shell-protocol.c \
657 protocol/desktop-shell-server-protocol.h \
658 protocol/xdg-shell-protocol.c \
659 protocol/xdg-shell-server-protocol.h
661 BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
667 module_LTLIBRARIES += xwayland.la
669 xwayland_la_CPPFLAGS = \
670 -I$(top_builddir)/protocol \
671 -I$(top_srcdir)/shared \
672 -I$(top_srcdir)/src \
673 -I$(top_builddir)/src \
674 -I$(top_builddir)/xwayland \
675 -DDATADIR='"$(datadir)"' \
676 -DMODULEDIR='"$(moduledir)"' \
677 -DLIBEXECDIR='"$(libexecdir)"' \
678 -DXSERVER_PATH='"@XSERVER_PATH@"'
680 xwayland_la_LDFLAGS = -module -avoid-version
681 xwayland_la_LIBADD = \
683 $(top_builddir)/libshared-cairo.la
684 xwayland_la_CFLAGS = \
686 $(COMPOSITOR_CFLAGS) \
689 xwayland_la_SOURCES = \
690 xwayland/xwayland.h \
691 xwayland/window-manager.c \
692 xwayland/selection.c \
694 xwayland/launcher.c \
697 nodist_xwayland_la_SOURCES = \
698 protocol/xserver-protocol.c \
699 protocol/xserver-server-protocol.h
701 BUILT_SOURCES += $(nodist_xwayland_la_SOURCES)
709 noinst_LTLIBRARIES += libshared.la libshared-cairo.la
711 libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
713 libshared_la_SOURCES = \
714 shared/config-parser.c \
715 shared/option-parser.c \
716 shared/config-parser.h \
717 shared/os-compatibility.c \
718 shared/os-compatibility.h
720 libshared_cairo_la_CFLAGS = \
721 -DDATADIR='"$(datadir)"' \
723 $(COMPOSITOR_CFLAGS) \
729 libshared_cairo_la_LIBADD = \
736 libshared_cairo_la_SOURCES = \
737 $(libshared_la_SOURCES) \
738 shared/image-loader.c \
739 shared/image-loader.h \
740 shared/cairo-util.c \
749 TESTS = $(shared_tests) $(module_tests) $(weston_tests)
757 surface-global-test.la
768 AM_TESTS_ENVIRONMENT = \
769 abs_builddir='$(abs_builddir)'; export abs_builddir;
771 TEST_EXTENSIONS = .la .weston
772 LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
773 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
778 # To remove when automake 1.11 support is dropped
781 noinst_LTLIBRARIES += \
793 test_module_ldflags = \
794 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
796 surface_global_test_la_SOURCES = tests/surface-global-test.c
797 surface_global_test_la_LDFLAGS = $(test_module_ldflags)
798 surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
800 surface_test_la_SOURCES = tests/surface-test.c
801 surface_test_la_LDFLAGS = $(test_module_ldflags)
802 surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
804 weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
805 weston_test_la_LDFLAGS = $(test_module_ldflags)
806 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
807 weston_test_la_SOURCES = tests/weston-test.c
808 nodist_weston_test_la_SOURCES = \
809 protocol/wayland-test-protocol.c \
810 protocol/wayland-test-server-protocol.h
813 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
814 weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
817 libtest_runner_la_SOURCES = \
818 tests/weston-test-runner.c \
819 tests/weston-test-runner.h
820 libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
822 config_parser_test_SOURCES = tests/config-parser-test.c
823 config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
825 vertex_clip_test_SOURCES = \
826 tests/vertex-clip-test.c \
827 src/vertex-clipping.c \
828 src/vertex-clipping.h
829 vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
831 libtest_client_la_SOURCES = \
832 tests/weston-test-client-helper.c \
833 tests/weston-test-client-helper.h
834 nodist_libtest_client_la_SOURCES = \
835 protocol/wayland-test-protocol.c \
836 protocol/wayland-test-client-protocol.h
837 libtest_client_la_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS)
838 libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
840 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
841 bad_buffer_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS)
842 bad_buffer_weston_LDADD = libtest-client.la
844 keyboard_weston_SOURCES = tests/keyboard-test.c
845 keyboard_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS)
846 keyboard_weston_LDADD = libtest-client.la
848 event_weston_SOURCES = tests/event-test.c
849 event_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS)
850 event_weston_LDADD = libtest-client.la
852 button_weston_SOURCES = tests/button-test.c
853 button_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS)
854 button_weston_LDADD = libtest-client.la
856 text_weston_SOURCES = tests/text-test.c
857 nodist_text_weston_SOURCES = \
858 protocol/text-protocol.c \
859 protocol/text-client-protocol.h
860 text_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS)
861 text_weston_LDADD = libtest-client.la
863 subsurface_weston_SOURCES = tests/subsurface-test.c
864 subsurface_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS)
865 subsurface_weston_LDADD = libtest-client.la
868 weston_tests += buffer-count.weston
869 buffer_count_weston_SOURCES = tests/buffer-count-test.c
870 buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
871 buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
874 if ENABLE_XWAYLAND_TEST
875 weston_tests += xwayland.weston
876 xwayland_weston_SOURCES = tests/xwayland-test.c
877 xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
878 xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
881 matrix_test_SOURCES = \
882 tests/matrix-test.c \
885 matrix_test_CPPFLAGS = -DUNIT_TEST
886 matrix_test_LDADD = -lm -lrt
888 if BUILD_SETBACKLIGHT
889 noinst_PROGRAMS += setbacklight
890 setbacklight_SOURCES = \
891 tests/setbacklight.c \
894 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
895 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
898 EXTRA_DIST += tests/weston-tests-env
901 protocol/wayland-test-protocol.c \
902 protocol/wayland-test-server-protocol.h \
903 protocol/wayland-test-client-protocol.h \
904 protocol/text-protocol.c \
905 protocol/text-client-protocol.h
908 protocol/desktop-shell.xml \
909 protocol/screenshooter.xml \
910 protocol/xserver.xml \
912 protocol/input-method.xml \
913 protocol/workspaces.xml \
914 protocol/text-cursor-position.xml \
915 protocol/wayland-test.xml \
916 protocol/xdg-shell.xml \
919 man_MANS = weston.1 weston.ini.5
921 if ENABLE_DRM_COMPOSITOR
922 man_MANS += weston-drm.7
926 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
927 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
928 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
929 -e 's|__version__|$(PACKAGE_VERSION)|g'
931 SUFFIXES = .1 .5 .7 .man
933 %.1 %.5 %.7 : man/%.man
934 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
941 CLEANFILES += $(man_MANS)
944 protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
945 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
947 protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
948 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
950 protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
951 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@