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
246 if ENABLE_RPI_COMPOSITOR
247 if INSTALL_RPI_COMPOSITOR
248 module_LTLIBRARIES += rpi-backend.la
250 noinst_LTLIBRARIES += rpi-backend.la
253 rpi_backend_la_LDFLAGS = -module -avoid-version
254 rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
255 $(RPI_COMPOSITOR_LIBS) \
256 $(RPI_BCM_HOST_LIBS) \
257 $(INPUT_BACKEND_LIBS) \
258 libsession-helper.la \
260 rpi_backend_la_CFLAGS = \
262 $(COMPOSITOR_CFLAGS) \
263 $(RPI_COMPOSITOR_CFLAGS) \
264 $(RPI_BCM_HOST_CFLAGS)
265 rpi_backend_la_SOURCES = \
266 src/compositor-rpi.c \
269 src/rpi-bcm-stubs.h \
270 $(INPUT_BACKEND_SOURCES)
273 rpi_backend_la_LIBADD += $(EGL_LIBS)
274 rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
279 if ENABLE_HEADLESS_COMPOSITOR
280 module_LTLIBRARIES += headless-backend.la
281 headless_backend_la_LDFLAGS = -module -avoid-version
282 headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
283 headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
284 headless_backend_la_SOURCES = src/compositor-headless.c
287 if ENABLE_FBDEV_COMPOSITOR
288 module_LTLIBRARIES += fbdev-backend.la
289 fbdev_backend_la_LDFLAGS = -module -avoid-version
290 fbdev_backend_la_LIBADD = \
292 $(FBDEV_COMPOSITOR_LIBS) \
293 $(INPUT_BACKEND_LIBS) \
294 libsession-helper.la \
296 fbdev_backend_la_CFLAGS = \
297 $(COMPOSITOR_CFLAGS) \
299 $(FBDEV_COMPOSITOR_CFLAGS) \
302 fbdev_backend_la_SOURCES = \
303 src/compositor-fbdev.c \
304 $(INPUT_BACKEND_SOURCES)
307 if ENABLE_RDP_COMPOSITOR
308 module_LTLIBRARIES += rdp-backend.la
309 rdp_backend_la_LDFLAGS = -module -avoid-version
310 rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
311 $(RDP_COMPOSITOR_LIBS) \
313 rdp_backend_la_CFLAGS = \
314 $(COMPOSITOR_CFLAGS) \
315 $(RDP_COMPOSITOR_CFLAGS) \
317 rdp_backend_la_SOURCES = src/compositor-rdp.c
321 module_LTLIBRARIES += cms-static.la
322 cms_static_la_LDFLAGS = -module -avoid-version
323 cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
324 cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
325 cms_static_la_SOURCES = \
330 module_LTLIBRARIES += cms-colord.la
331 cms_colord_la_LDFLAGS = -module -avoid-version
332 cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
333 cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
334 cms_colord_la_SOURCES = \
341 noinst_PROGRAMS += spring-tool
342 spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
343 spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
344 spring_tool_SOURCES = \
353 bin_PROGRAMS += weston-terminal weston-info
355 libexec_PROGRAMS += \
356 weston-desktop-shell \
357 weston-screenshooter \
376 if INSTALL_DEMO_CLIENTS
377 bin_PROGRAMS += $(demo_clients)
379 noinst_PROGRAMS += $(demo_clients)
383 if BUILD_SIMPLE_CLIENTS
386 weston-simple-touch \
387 weston-multi-resource
389 weston_simple_shm_SOURCES = clients/simple-shm.c
390 nodist_weston_simple_shm_SOURCES = \
391 protocol/xdg-shell-protocol.c \
392 protocol/xdg-shell-client-protocol.h
393 weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
394 weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
396 weston_simple_touch_SOURCES = clients/simple-touch.c
397 weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
398 weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
400 weston_multi_resource_SOURCES = clients/multi-resource.c
401 weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
402 weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
405 if BUILD_SIMPLE_EGL_CLIENTS
406 demo_clients += weston-simple-egl
407 weston_simple_egl_SOURCES = clients/simple-egl.c
408 nodist_weston_simple_egl_SOURCES = \
409 protocol/xdg-shell-protocol.c \
410 protocol/xdg-shell-client-protocol.h
411 weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
412 weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
415 noinst_LTLIBRARIES += libtoytoolkit.la
417 libtoytoolkit_la_SOURCES = \
421 nodist_libtoytoolkit_la_SOURCES = \
422 protocol/text-cursor-position-protocol.c \
423 protocol/text-cursor-position-client-protocol.h \
424 protocol/scaler-protocol.c \
425 protocol/scaler-client-protocol.h \
426 protocol/workspaces-protocol.c \
427 protocol/workspaces-client-protocol.h \
428 protocol/xdg-shell-protocol.c \
429 protocol/xdg-shell-client-protocol.h
431 BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
434 libtoytoolkit_la_LIBADD = \
437 libshared-cairo.la -lrt -lm
438 libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
440 weston_flower_SOURCES = clients/flower.c
441 weston_flower_LDADD = libtoytoolkit.la
442 weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
444 weston_screenshooter_SOURCES = \
446 nodist_weston_screenshooter_SOURCES = \
447 protocol/screenshooter-protocol.c \
448 protocol/screenshooter-client-protocol.h
449 weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
450 weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
452 weston_terminal_SOURCES = clients/terminal.c
453 weston_terminal_LDADD = libtoytoolkit.la -lutil
454 weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
456 weston_image_SOURCES = clients/image.c
457 weston_image_LDADD = libtoytoolkit.la
458 weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
460 weston_cliptest_SOURCES = clients/cliptest.c
461 weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
462 weston_cliptest_LDADD = libtoytoolkit.la
464 weston_dnd_SOURCES = clients/dnd.c
465 weston_dnd_LDADD = libtoytoolkit.la
466 weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
468 weston_smoke_SOURCES = clients/smoke.c
469 weston_smoke_LDADD = libtoytoolkit.la
470 weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
472 weston_resizor_SOURCES = clients/resizor.c
473 weston_resizor_LDADD = libtoytoolkit.la
474 weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
476 weston_scaler_SOURCES = clients/scaler.c
477 weston_scaler_LDADD = libtoytoolkit.la
478 weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
481 demo_clients += weston-nested weston-nested-client
483 weston_nested_SOURCES = clients/nested.c
484 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
485 weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
487 weston_nested_client_SOURCES = clients/nested-client.c
488 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
489 weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
492 weston_eventdemo_SOURCES = clients/eventdemo.c
493 weston_eventdemo_LDADD = libtoytoolkit.la
494 weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
496 weston_clickdot_SOURCES = clients/clickdot.c
497 weston_clickdot_LDADD = libtoytoolkit.la
498 weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
500 weston_transformed_SOURCES = clients/transformed.c
501 weston_transformed_LDADD = libtoytoolkit.la
502 weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
504 weston_fullscreen_SOURCES = clients/fullscreen.c
505 weston_fullscreen_LDADD = libtoytoolkit.la
506 weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
508 weston_stacking_SOURCES = clients/stacking.c
509 weston_stacking_LDADD = libtoytoolkit.la
510 weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
512 weston_calibrator_SOURCES = clients/calibrator.c \
515 weston_calibrator_LDADD = libtoytoolkit.la
516 weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
518 if BUILD_SUBSURFACES_CLIENT
519 demo_clients += weston-subsurfaces
520 weston_subsurfaces_SOURCES = clients/subsurfaces.c
521 weston_subsurfaces_CFLAGS = \
523 $(SIMPLE_EGL_CLIENT_CFLAGS) \
525 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
529 demo_clients += weston-editor
530 weston_editor_SOURCES = clients/editor.c
531 nodist_weston_editor_SOURCES = \
532 protocol/text-protocol.c \
533 protocol/text-client-protocol.h
534 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
535 weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
538 weston_keyboard_SOURCES = clients/keyboard.c
539 nodist_weston_keyboard_SOURCES = \
540 protocol/desktop-shell-client-protocol.h \
541 protocol/desktop-shell-protocol.c \
542 protocol/input-method-protocol.c \
543 protocol/input-method-client-protocol.h
544 weston_keyboard_LDADD = libtoytoolkit.la
545 weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
547 weston_simple_im_SOURCES = clients/weston-simple-im.c
548 nodist_weston_simple_im_SOURCES = \
549 protocol/input-method-protocol.c \
550 protocol/input-method-client-protocol.h
551 weston_simple_im_LDADD = $(CLIENT_LIBS)
552 weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
554 weston_info_SOURCES = clients/weston-info.c
555 weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
556 weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
558 weston_desktop_shell_SOURCES = clients/desktop-shell.c
559 nodist_weston_desktop_shell_SOURCES = \
560 protocol/desktop-shell-client-protocol.h \
561 protocol/desktop-shell-protocol.c
562 weston_desktop_shell_LDADD = libtoytoolkit.la
563 weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
565 if BUILD_FULL_GL_CLIENTS
566 demo_clients += weston-gears
567 weston_gears_SOURCES = clients/gears.c
568 weston_gears_LDADD = libtoytoolkit.la
569 weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
572 libexec_PROGRAMS += weston-screensaver
573 weston_screensaver_SOURCES = \
574 clients/wscreensaver.c \
575 clients/wscreensaver.h \
576 clients/wscreensaver-glue.c \
577 clients/wscreensaver-glue.h \
580 nodist_weston_screensaver_SOURCES = \
581 protocol/desktop-shell-client-protocol.h \
582 protocol/desktop-shell-protocol.c
584 weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
585 weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
594 protocol/screenshooter-protocol.c \
595 protocol/screenshooter-client-protocol.h \
596 protocol/text-cursor-position-client-protocol.h \
597 protocol/text-cursor-position-protocol.c \
598 protocol/text-protocol.c \
599 protocol/text-client-protocol.h \
600 protocol/input-method-protocol.c \
601 protocol/input-method-client-protocol.h \
602 protocol/desktop-shell-client-protocol.h \
603 protocol/desktop-shell-protocol.c \
604 protocol/scaler-client-protocol.h \
605 protocol/scaler-protocol.c \
606 protocol/workspaces-client-protocol.h \
607 protocol/workspaces-protocol.c \
608 protocol/xdg-shell-protocol.c \
609 protocol/xdg-shell-client-protocol.h
612 westondatadir = $(datadir)/weston
613 dist_westondata_DATA = \
619 data/icon_window.png \
620 data/sign_close.png \
621 data/sign_maximize.png \
622 data/sign_minimize.png
626 bin_PROGRAMS += wcap-decode
628 wcap_decode_SOURCES = \
633 wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
634 wcap_decode_LDADD = $(WCAP_LIBS)
638 if ENABLE_DESKTOP_SHELL
640 module_LTLIBRARIES += desktop-shell.la
642 desktop_shell_la_CPPFLAGS = \
643 -I$(top_builddir)/protocol \
644 -I$(top_srcdir)/shared \
645 -I$(top_srcdir)/src \
646 -I$(top_builddir)/src \
647 -I$(top_builddir)/desktop-shell \
648 -DDATADIR='"$(datadir)"' \
649 -DMODULEDIR='"$(moduledir)"' \
650 -DLIBEXECDIR='"$(libexecdir)"' \
653 desktop_shell_la_LDFLAGS = -module -avoid-version
654 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
655 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
656 desktop_shell_la_SOURCES = \
657 desktop-shell/shell.h \
658 desktop-shell/shell.c \
659 desktop-shell/exposay.c \
660 desktop-shell/input-panel.c
661 nodist_desktop_shell_la_SOURCES = \
662 protocol/desktop-shell-protocol.c \
663 protocol/desktop-shell-server-protocol.h \
664 protocol/xdg-shell-protocol.c \
665 protocol/xdg-shell-server-protocol.h
667 BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
670 if ENABLE_FULLSCREEN_SHELL
672 module_LTLIBRARIES += fullscreen-shell.la
674 fullscreen_shell_la_CPPFLAGS = \
675 -I$(top_builddir)/protocol \
676 -I$(top_srcdir)/shared \
677 -I$(top_srcdir)/src \
678 -I$(top_builddir)/src \
681 fullscreen_shell_la_LDFLAGS = -module -avoid-version
682 fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
683 fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
684 fullscreen_shell_la_SOURCES = \
685 fullscreen-shell/fullscreen-shell.c
686 nodist_fullscreen_shell_la_SOURCES = \
687 protocol/fullscreen-shell-protocol.c \
688 protocol/fullscreen-shell-server-protocol.h
690 BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
695 module_LTLIBRARIES += xwayland.la
697 xwayland_la_CPPFLAGS = \
698 -I$(top_builddir)/protocol \
699 -I$(top_srcdir)/shared \
700 -I$(top_srcdir)/src \
701 -I$(top_builddir)/src \
702 -I$(top_builddir)/xwayland \
703 -DDATADIR='"$(datadir)"' \
704 -DMODULEDIR='"$(moduledir)"' \
705 -DLIBEXECDIR='"$(libexecdir)"' \
706 -DXSERVER_PATH='"@XSERVER_PATH@"'
708 xwayland_la_LDFLAGS = -module -avoid-version
709 xwayland_la_LIBADD = \
711 $(top_builddir)/libshared-cairo.la
712 xwayland_la_CFLAGS = \
714 $(COMPOSITOR_CFLAGS) \
717 xwayland_la_SOURCES = \
718 xwayland/xwayland.h \
719 xwayland/window-manager.c \
720 xwayland/selection.c \
722 xwayland/launcher.c \
725 nodist_xwayland_la_SOURCES = \
726 protocol/xserver-protocol.c \
727 protocol/xserver-server-protocol.h
729 BUILT_SOURCES += $(nodist_xwayland_la_SOURCES)
737 noinst_LTLIBRARIES += libshared.la libshared-cairo.la
739 libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
741 libshared_la_SOURCES = \
742 shared/config-parser.c \
743 shared/option-parser.c \
744 shared/config-parser.h \
745 shared/os-compatibility.c \
746 shared/os-compatibility.h
748 libshared_cairo_la_CFLAGS = \
749 -DDATADIR='"$(datadir)"' \
751 $(COMPOSITOR_CFLAGS) \
757 libshared_cairo_la_LIBADD = \
764 libshared_cairo_la_SOURCES = \
765 $(libshared_la_SOURCES) \
766 shared/image-loader.c \
767 shared/image-loader.h \
768 shared/cairo-util.c \
777 TESTS = $(shared_tests) $(module_tests) $(weston_tests)
785 surface-global-test.la
796 AM_TESTS_ENVIRONMENT = \
797 abs_builddir='$(abs_builddir)'; export abs_builddir;
799 TEST_EXTENSIONS = .la .weston
800 LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
801 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
806 # To remove when automake 1.11 support is dropped
809 noinst_LTLIBRARIES += \
821 test_module_ldflags = \
822 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
824 surface_global_test_la_SOURCES = tests/surface-global-test.c
825 surface_global_test_la_LDFLAGS = $(test_module_ldflags)
826 surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
828 surface_test_la_SOURCES = tests/surface-test.c
829 surface_test_la_LDFLAGS = $(test_module_ldflags)
830 surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
832 weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
833 weston_test_la_LDFLAGS = $(test_module_ldflags)
834 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
835 weston_test_la_SOURCES = tests/weston-test.c
836 nodist_weston_test_la_SOURCES = \
837 protocol/wayland-test-protocol.c \
838 protocol/wayland-test-server-protocol.h
841 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
842 weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
845 libtest_runner_la_SOURCES = \
846 tests/weston-test-runner.c \
847 tests/weston-test-runner.h
848 libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
850 config_parser_test_SOURCES = tests/config-parser-test.c
851 config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
853 vertex_clip_test_SOURCES = \
854 tests/vertex-clip-test.c \
855 src/vertex-clipping.c \
856 src/vertex-clipping.h
857 vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
859 libtest_client_la_SOURCES = \
860 tests/weston-test-client-helper.c \
861 tests/weston-test-client-helper.h
862 nodist_libtest_client_la_SOURCES = \
863 protocol/wayland-test-protocol.c \
864 protocol/wayland-test-client-protocol.h
865 libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
866 libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
868 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
869 bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
870 bad_buffer_weston_LDADD = libtest-client.la
872 keyboard_weston_SOURCES = tests/keyboard-test.c
873 keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
874 keyboard_weston_LDADD = libtest-client.la
876 event_weston_SOURCES = tests/event-test.c
877 event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
878 event_weston_LDADD = libtest-client.la
880 button_weston_SOURCES = tests/button-test.c
881 button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
882 button_weston_LDADD = libtest-client.la
884 text_weston_SOURCES = tests/text-test.c
885 nodist_text_weston_SOURCES = \
886 protocol/text-protocol.c \
887 protocol/text-client-protocol.h
888 text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
889 text_weston_LDADD = libtest-client.la
891 subsurface_weston_SOURCES = tests/subsurface-test.c
892 subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
893 subsurface_weston_LDADD = libtest-client.la
896 weston_tests += buffer-count.weston
897 buffer_count_weston_SOURCES = tests/buffer-count-test.c
898 buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
899 buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
902 if ENABLE_XWAYLAND_TEST
903 weston_tests += xwayland.weston
904 xwayland_weston_SOURCES = tests/xwayland-test.c
905 xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
906 xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
909 matrix_test_SOURCES = \
910 tests/matrix-test.c \
913 matrix_test_CPPFLAGS = -DUNIT_TEST
914 matrix_test_LDADD = -lm -lrt
916 if BUILD_SETBACKLIGHT
917 noinst_PROGRAMS += setbacklight
918 setbacklight_SOURCES = \
919 tests/setbacklight.c \
922 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
923 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
926 EXTRA_DIST += tests/weston-tests-env
929 protocol/wayland-test-protocol.c \
930 protocol/wayland-test-server-protocol.h \
931 protocol/wayland-test-client-protocol.h \
932 protocol/text-protocol.c \
933 protocol/text-client-protocol.h
936 protocol/desktop-shell.xml \
937 protocol/screenshooter.xml \
938 protocol/xserver.xml \
940 protocol/input-method.xml \
941 protocol/workspaces.xml \
942 protocol/text-cursor-position.xml \
943 protocol/wayland-test.xml \
944 protocol/xdg-shell.xml \
945 protocol/fullscreen-shell.xml \
948 man_MANS = weston.1 weston.ini.5
950 if ENABLE_DRM_COMPOSITOR
951 man_MANS += weston-drm.7
955 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
956 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
957 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
958 -e 's|__version__|$(PACKAGE_VERSION)|g'
960 SUFFIXES = .1 .5 .7 .man
962 %.1 %.5 %.7 : man/%.man
963 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
970 CLEANFILES += $(man_MANS)
973 protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
974 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
976 protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
977 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
979 protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
980 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@