1 ACLOCAL_AMFLAGS = -I m4
6 moduledir = $(libdir)/weston
11 AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
13 EXTRA_DIST = weston.ini.in
15 weston.ini : $(srcdir)/weston.ini.in
17 -e 's|@bindir[@]|$(bindir)|g' \
18 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
19 -e 's|@libexecdir[@]|$(libexecdir)|g' \
22 all-local : weston.ini
24 AM_CFLAGS = $(GCC_CFLAGS)
28 -I$(top_builddir)/src \
29 -I$(top_builddir)/clients \
30 -I$(top_builddir)/tests \
31 -I$(top_srcdir)/shared \
32 -I$(top_builddir)/protocol \
33 -DDATADIR='"$(datadir)"' \
34 -DMODULEDIR='"$(moduledir)"' \
35 -DLIBEXECDIR='"$(libexecdir)"' \
36 -DBINDIR='"$(bindir)"'
38 CLEANFILES = weston.ini $(BUILT_SOURCES)
40 bin_PROGRAMS += weston
42 weston_LDFLAGS = -export-dynamic
43 weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
44 weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
45 weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
46 $(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)')\"" > $@
118 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
124 if BUILD_WESTON_LAUNCH
125 bin_PROGRAMS += weston-launch
126 weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
127 weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
128 weston_launch_CFLAGS= \
131 $(SYSTEMD_LOGIN_CFLAGS) \
133 weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
135 if ENABLE_SETUID_INSTALL
137 chown root $(DESTDIR)$(bindir)/weston-launch
138 chmod u+s $(DESTDIR)$(bindir)/weston-launch
141 endif # BUILD_WESTON_LAUNCH
143 pkgconfigdir = $(libdir)/pkgconfig
144 pkgconfig_DATA = src/weston.pc
146 westonincludedir = $(includedir)/weston
147 westoninclude_HEADERS = \
151 shared/config-parser.h \
155 module_LTLIBRARIES += gl-renderer.la
156 gl_renderer_la_LDFLAGS = -module -avoid-version
157 gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
158 gl_renderer_la_CFLAGS = \
159 $(COMPOSITOR_CFLAGS) \
162 gl_renderer_la_SOURCES = \
165 src/vertex-clipping.c \
166 src/vertex-clipping.h
169 if ENABLE_X11_COMPOSITOR
170 module_LTLIBRARIES += x11-backend.la
171 x11_backend_la_LDFLAGS = -module -avoid-version
172 x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
174 x11_backend_la_CFLAGS = \
175 $(COMPOSITOR_CFLAGS) \
179 $(X11_COMPOSITOR_CFLAGS) \
181 x11_backend_la_SOURCES = src/compositor-x11.c
184 INPUT_BACKEND_SOURCES = src/udev-input.h
186 if ENABLE_LIBINPUT_BACKEND
187 INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
188 INPUT_BACKEND_SOURCES += \
189 src/libinput-seat.c \
190 src/libinput-seat.h \
191 src/libinput-device.c \
192 src/libinput-device.h
194 INPUT_BACKEND_SOURCES += \
204 if ENABLE_DRM_COMPOSITOR
205 module_LTLIBRARIES += drm-backend.la
206 drm_backend_la_LDFLAGS = -module -avoid-version
207 drm_backend_la_LIBADD = \
209 $(DRM_COMPOSITOR_LIBS) \
210 $(INPUT_BACKEND_LIBS) \
213 drm_backend_la_CFLAGS = \
214 $(COMPOSITOR_CFLAGS) \
216 $(DRM_COMPOSITOR_CFLAGS) \
218 drm_backend_la_SOURCES = \
219 src/compositor-drm.c \
220 $(INPUT_BACKEND_SOURCES) \
224 if ENABLE_VAAPI_RECORDER
225 drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
226 drm_backend_la_LIBADD += $(LIBVA_LIBS)
227 drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
231 if ENABLE_WAYLAND_COMPOSITOR
232 module_LTLIBRARIES += wayland-backend.la
233 wayland_backend_la_LDFLAGS = -module -avoid-version
234 wayland_backend_la_LIBADD = \
236 $(WAYLAND_COMPOSITOR_LIBS) \
238 wayland_backend_la_CFLAGS = \
239 $(COMPOSITOR_CFLAGS) \
243 $(WAYLAND_COMPOSITOR_CFLAGS) \
245 wayland_backend_la_SOURCES = src/compositor-wayland.c
246 nodist_wayland_backend_la_SOURCES = \
247 protocol/fullscreen-shell-protocol.c \
248 protocol/fullscreen-shell-client-protocol.h
251 if ENABLE_RPI_COMPOSITOR
252 if INSTALL_RPI_COMPOSITOR
253 module_LTLIBRARIES += rpi-backend.la
255 noinst_LTLIBRARIES += rpi-backend.la
258 rpi_backend_la_LDFLAGS = -module -avoid-version
259 rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
260 $(RPI_COMPOSITOR_LIBS) \
261 $(RPI_BCM_HOST_LIBS) \
262 $(INPUT_BACKEND_LIBS) \
263 libsession-helper.la \
265 rpi_backend_la_CFLAGS = \
267 $(COMPOSITOR_CFLAGS) \
268 $(RPI_COMPOSITOR_CFLAGS) \
269 $(RPI_BCM_HOST_CFLAGS)
270 rpi_backend_la_SOURCES = \
271 src/compositor-rpi.c \
274 src/rpi-bcm-stubs.h \
275 $(INPUT_BACKEND_SOURCES)
278 rpi_backend_la_LIBADD += $(EGL_LIBS)
279 rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
284 if ENABLE_HEADLESS_COMPOSITOR
285 module_LTLIBRARIES += headless-backend.la
286 headless_backend_la_LDFLAGS = -module -avoid-version
287 headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
288 headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
289 headless_backend_la_SOURCES = src/compositor-headless.c
292 if ENABLE_FBDEV_COMPOSITOR
293 module_LTLIBRARIES += fbdev-backend.la
294 fbdev_backend_la_LDFLAGS = -module -avoid-version
295 fbdev_backend_la_LIBADD = \
297 $(FBDEV_COMPOSITOR_LIBS) \
298 $(INPUT_BACKEND_LIBS) \
299 libsession-helper.la \
301 fbdev_backend_la_CFLAGS = \
302 $(COMPOSITOR_CFLAGS) \
304 $(FBDEV_COMPOSITOR_CFLAGS) \
307 fbdev_backend_la_SOURCES = \
308 src/compositor-fbdev.c \
309 $(INPUT_BACKEND_SOURCES)
312 if ENABLE_RDP_COMPOSITOR
313 module_LTLIBRARIES += rdp-backend.la
314 rdp_backend_la_LDFLAGS = -module -avoid-version
315 rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
316 $(RDP_COMPOSITOR_LIBS) \
318 rdp_backend_la_CFLAGS = \
319 $(COMPOSITOR_CFLAGS) \
320 $(RDP_COMPOSITOR_CFLAGS) \
322 rdp_backend_la_SOURCES = src/compositor-rdp.c
326 module_LTLIBRARIES += cms-static.la
327 cms_static_la_LDFLAGS = -module -avoid-version
328 cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
329 cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
330 cms_static_la_SOURCES = \
335 module_LTLIBRARIES += cms-colord.la
336 cms_colord_la_LDFLAGS = -module -avoid-version
337 cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
338 cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
339 cms_colord_la_SOURCES = \
346 noinst_PROGRAMS += spring-tool
347 spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
348 spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
349 spring_tool_SOURCES = \
358 bin_PROGRAMS += weston-terminal weston-info
360 libexec_PROGRAMS += \
361 weston-desktop-shell \
362 weston-screenshooter \
381 if INSTALL_DEMO_CLIENTS
382 bin_PROGRAMS += $(demo_clients)
384 noinst_PROGRAMS += $(demo_clients)
388 if BUILD_SIMPLE_CLIENTS
391 weston-simple-damage \
392 weston-simple-touch \
393 weston-multi-resource
395 weston_simple_shm_SOURCES = clients/simple-shm.c
396 nodist_weston_simple_shm_SOURCES = \
397 protocol/xdg-shell-protocol.c \
398 protocol/xdg-shell-client-protocol.h \
399 protocol/fullscreen-shell-protocol.c \
400 protocol/fullscreen-shell-client-protocol.h
401 weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
402 weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
404 weston_simple_damage_SOURCES = clients/simple-damage.c
405 nodist_weston_simple_damage_SOURCES = \
406 protocol/scaler-protocol.c \
407 protocol/scaler-client-protocol.h \
408 protocol/xdg-shell-protocol.c \
409 protocol/xdg-shell-client-protocol.h \
410 protocol/fullscreen-shell-protocol.c \
411 protocol/fullscreen-shell-client-protocol.h
412 weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
413 weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
415 weston_simple_touch_SOURCES = clients/simple-touch.c
416 weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
417 weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
419 weston_multi_resource_SOURCES = clients/multi-resource.c
420 weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
421 weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
424 if BUILD_SIMPLE_EGL_CLIENTS
425 demo_clients += weston-simple-egl
426 weston_simple_egl_SOURCES = clients/simple-egl.c
427 nodist_weston_simple_egl_SOURCES = \
428 protocol/xdg-shell-protocol.c \
429 protocol/xdg-shell-client-protocol.h
430 weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
431 weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
434 noinst_LTLIBRARIES += libtoytoolkit.la
436 libtoytoolkit_la_SOURCES = \
440 nodist_libtoytoolkit_la_SOURCES = \
441 protocol/text-cursor-position-protocol.c \
442 protocol/text-cursor-position-client-protocol.h \
443 protocol/scaler-protocol.c \
444 protocol/scaler-client-protocol.h \
445 protocol/workspaces-protocol.c \
446 protocol/workspaces-client-protocol.h \
447 protocol/xdg-shell-protocol.c \
448 protocol/xdg-shell-client-protocol.h
450 BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
453 libtoytoolkit_la_LIBADD = \
456 libshared-cairo.la -lrt -lm
457 libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
459 weston_flower_SOURCES = clients/flower.c
460 weston_flower_LDADD = libtoytoolkit.la
461 weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
463 weston_screenshooter_SOURCES = \
465 nodist_weston_screenshooter_SOURCES = \
466 protocol/screenshooter-protocol.c \
467 protocol/screenshooter-client-protocol.h
468 weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
469 weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
471 weston_terminal_SOURCES = clients/terminal.c
472 weston_terminal_LDADD = libtoytoolkit.la -lutil
473 weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
475 weston_image_SOURCES = clients/image.c
476 weston_image_LDADD = libtoytoolkit.la
477 weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
479 weston_cliptest_SOURCES = \
481 src/vertex-clipping.c \
482 src/vertex-clipping.h
483 weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
484 weston_cliptest_LDADD = libtoytoolkit.la
486 weston_dnd_SOURCES = clients/dnd.c
487 weston_dnd_LDADD = libtoytoolkit.la
488 weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
490 weston_smoke_SOURCES = clients/smoke.c
491 weston_smoke_LDADD = libtoytoolkit.la
492 weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
494 weston_resizor_SOURCES = clients/resizor.c
495 weston_resizor_LDADD = libtoytoolkit.la
496 weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
498 weston_scaler_SOURCES = clients/scaler.c
499 weston_scaler_LDADD = libtoytoolkit.la
500 weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
503 demo_clients += weston-nested weston-nested-client
505 weston_nested_SOURCES = clients/nested.c
506 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
507 weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
509 weston_nested_client_SOURCES = clients/nested-client.c
510 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
511 weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
514 weston_eventdemo_SOURCES = clients/eventdemo.c
515 weston_eventdemo_LDADD = libtoytoolkit.la
516 weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
518 weston_clickdot_SOURCES = clients/clickdot.c
519 weston_clickdot_LDADD = libtoytoolkit.la
520 weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
522 weston_transformed_SOURCES = clients/transformed.c
523 weston_transformed_LDADD = libtoytoolkit.la
524 weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
526 weston_fullscreen_SOURCES = clients/fullscreen.c
527 nodist_weston_fullscreen_SOURCES = \
528 protocol/fullscreen-shell-protocol.c \
529 protocol/fullscreen-shell-client-protocol.h
530 weston_fullscreen_LDADD = libtoytoolkit.la
531 weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
533 weston_stacking_SOURCES = clients/stacking.c
534 weston_stacking_LDADD = libtoytoolkit.la
535 weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
537 weston_calibrator_SOURCES = clients/calibrator.c \
540 weston_calibrator_LDADD = libtoytoolkit.la
541 weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
543 if BUILD_SUBSURFACES_CLIENT
544 demo_clients += weston-subsurfaces
545 weston_subsurfaces_SOURCES = clients/subsurfaces.c
546 weston_subsurfaces_CFLAGS = \
548 $(SIMPLE_EGL_CLIENT_CFLAGS) \
550 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
554 demo_clients += weston-editor
555 weston_editor_SOURCES = clients/editor.c
556 nodist_weston_editor_SOURCES = \
557 protocol/text-protocol.c \
558 protocol/text-client-protocol.h
559 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
560 weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
563 weston_keyboard_SOURCES = clients/keyboard.c
564 nodist_weston_keyboard_SOURCES = \
565 protocol/desktop-shell-client-protocol.h \
566 protocol/desktop-shell-protocol.c \
567 protocol/input-method-protocol.c \
568 protocol/input-method-client-protocol.h
569 weston_keyboard_LDADD = libtoytoolkit.la
570 weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
572 weston_simple_im_SOURCES = clients/weston-simple-im.c
573 nodist_weston_simple_im_SOURCES = \
574 protocol/input-method-protocol.c \
575 protocol/input-method-client-protocol.h
576 weston_simple_im_LDADD = $(CLIENT_LIBS)
577 weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
579 weston_info_SOURCES = clients/weston-info.c
580 weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
581 weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
583 weston_desktop_shell_SOURCES = clients/desktop-shell.c
584 nodist_weston_desktop_shell_SOURCES = \
585 protocol/desktop-shell-client-protocol.h \
586 protocol/desktop-shell-protocol.c
587 weston_desktop_shell_LDADD = libtoytoolkit.la
588 weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
590 if BUILD_FULL_GL_CLIENTS
591 demo_clients += weston-gears
592 weston_gears_SOURCES = clients/gears.c
593 weston_gears_LDADD = libtoytoolkit.la
594 weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
597 libexec_PROGRAMS += weston-screensaver
598 weston_screensaver_SOURCES = \
599 clients/wscreensaver.c \
600 clients/wscreensaver.h \
601 clients/wscreensaver-glue.c \
602 clients/wscreensaver-glue.h \
605 nodist_weston_screensaver_SOURCES = \
606 protocol/desktop-shell-client-protocol.h \
607 protocol/desktop-shell-protocol.c
609 weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
610 weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
619 protocol/screenshooter-protocol.c \
620 protocol/screenshooter-client-protocol.h \
621 protocol/text-cursor-position-client-protocol.h \
622 protocol/text-cursor-position-protocol.c \
623 protocol/text-protocol.c \
624 protocol/text-client-protocol.h \
625 protocol/input-method-protocol.c \
626 protocol/input-method-client-protocol.h \
627 protocol/desktop-shell-client-protocol.h \
628 protocol/desktop-shell-protocol.c \
629 protocol/scaler-client-protocol.h \
630 protocol/scaler-protocol.c \
631 protocol/workspaces-client-protocol.h \
632 protocol/workspaces-protocol.c \
633 protocol/fullscreen-shell-protocol.c \
634 protocol/fullscreen-shell-client-protocol.h \
635 protocol/xdg-shell-protocol.c \
636 protocol/xdg-shell-client-protocol.h
639 westondatadir = $(datadir)/weston
640 dist_westondata_DATA = \
646 data/icon_window.png \
647 data/sign_close.png \
648 data/sign_maximize.png \
649 data/sign_minimize.png
653 bin_PROGRAMS += wcap-decode
655 wcap_decode_SOURCES = \
660 wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
661 wcap_decode_LDADD = $(WCAP_LIBS)
665 if ENABLE_DESKTOP_SHELL
667 module_LTLIBRARIES += desktop-shell.la
669 desktop_shell_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)/desktop-shell \
675 -DDATADIR='"$(datadir)"' \
676 -DMODULEDIR='"$(moduledir)"' \
677 -DLIBEXECDIR='"$(libexecdir)"' \
680 desktop_shell_la_LDFLAGS = -module -avoid-version
681 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
682 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
683 desktop_shell_la_SOURCES = \
684 desktop-shell/shell.h \
685 desktop-shell/shell.c \
686 desktop-shell/exposay.c \
687 desktop-shell/input-panel.c
688 nodist_desktop_shell_la_SOURCES = \
689 protocol/desktop-shell-protocol.c \
690 protocol/desktop-shell-server-protocol.h \
691 protocol/xdg-shell-protocol.c \
692 protocol/xdg-shell-server-protocol.h
694 BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
697 if ENABLE_FULLSCREEN_SHELL
699 module_LTLIBRARIES += fullscreen-shell.la
701 fullscreen_shell_la_CPPFLAGS = \
702 -I$(top_builddir)/protocol \
703 -I$(top_srcdir)/shared \
704 -I$(top_srcdir)/src \
705 -I$(top_builddir)/src \
708 fullscreen_shell_la_LDFLAGS = -module -avoid-version
709 fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
710 fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
711 fullscreen_shell_la_SOURCES = \
712 fullscreen-shell/fullscreen-shell.c
713 nodist_fullscreen_shell_la_SOURCES = \
714 protocol/fullscreen-shell-protocol.c \
715 protocol/fullscreen-shell-server-protocol.h
717 BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
720 if ENABLE_SCREEN_SHARING
722 module_LTLIBRARIES += screen-share.la
724 screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
725 screen_share_la_LDFLAGS = -module -avoid-version
726 screen_share_la_LIBADD = \
728 $(SCREEN_SHARE_LIBS) \
730 screen_share_la_CFLAGS = \
731 $(COMPOSITOR_CFLAGS) \
732 $(SCREEN_SHARE_CFLAGS) \
734 screen_share_la_SOURCES = \
736 nodist_screen_share_la_SOURCES = \
737 protocol/fullscreen-shell-protocol.c \
738 protocol/fullscreen-shell-client-protocol.h
744 module_LTLIBRARIES += xwayland.la
746 xwayland_la_CPPFLAGS = \
747 -I$(top_builddir)/protocol \
748 -I$(top_srcdir)/shared \
749 -I$(top_srcdir)/src \
750 -I$(top_builddir)/src \
751 -I$(top_builddir)/xwayland \
752 -DDATADIR='"$(datadir)"' \
753 -DMODULEDIR='"$(moduledir)"' \
754 -DLIBEXECDIR='"$(libexecdir)"' \
755 -DXSERVER_PATH='"@XSERVER_PATH@"'
757 xwayland_la_LDFLAGS = -module -avoid-version
758 xwayland_la_LIBADD = \
760 $(top_builddir)/libshared-cairo.la
761 xwayland_la_CFLAGS = \
763 $(COMPOSITOR_CFLAGS) \
766 xwayland_la_SOURCES = \
767 xwayland/xwayland.h \
768 xwayland/window-manager.c \
769 xwayland/selection.c \
771 xwayland/launcher.c \
781 noinst_LTLIBRARIES += libshared.la libshared-cairo.la
783 libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
785 libshared_la_SOURCES = \
786 shared/config-parser.c \
787 shared/option-parser.c \
788 shared/config-parser.h \
789 shared/os-compatibility.c \
790 shared/os-compatibility.h
792 libshared_cairo_la_CFLAGS = \
793 -DDATADIR='"$(datadir)"' \
795 $(COMPOSITOR_CFLAGS) \
801 libshared_cairo_la_LIBADD = \
808 libshared_cairo_la_SOURCES = \
809 $(libshared_la_SOURCES) \
810 shared/image-loader.c \
811 shared/image-loader.h \
812 shared/cairo-util.c \
821 TESTS = $(shared_tests) $(module_tests) $(weston_tests)
829 surface-global-test.la
840 AM_TESTS_ENVIRONMENT = \
841 abs_builddir='$(abs_builddir)'; export abs_builddir;
843 TEST_EXTENSIONS = .la .weston
844 LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
845 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
850 # To remove when automake 1.11 support is dropped
853 noinst_LTLIBRARIES += \
865 test_module_ldflags = \
866 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
868 surface_global_test_la_SOURCES = tests/surface-global-test.c
869 surface_global_test_la_LDFLAGS = $(test_module_ldflags)
870 surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
872 surface_test_la_SOURCES = tests/surface-test.c
873 surface_test_la_LDFLAGS = $(test_module_ldflags)
874 surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
876 weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
877 weston_test_la_LDFLAGS = $(test_module_ldflags)
878 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
879 weston_test_la_SOURCES = tests/weston-test.c
880 nodist_weston_test_la_SOURCES = \
881 protocol/wayland-test-protocol.c \
882 protocol/wayland-test-server-protocol.h
885 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
886 weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
889 libtest_runner_la_SOURCES = \
890 tests/weston-test-runner.c \
891 tests/weston-test-runner.h
892 libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
894 config_parser_test_SOURCES = tests/config-parser-test.c
895 config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
897 vertex_clip_test_SOURCES = \
898 tests/vertex-clip-test.c \
899 src/vertex-clipping.c \
900 src/vertex-clipping.h
901 vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
903 libtest_client_la_SOURCES = \
904 tests/weston-test-client-helper.c \
905 tests/weston-test-client-helper.h
906 nodist_libtest_client_la_SOURCES = \
907 protocol/wayland-test-protocol.c \
908 protocol/wayland-test-client-protocol.h
909 libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
910 libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
912 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
913 bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
914 bad_buffer_weston_LDADD = libtest-client.la
916 keyboard_weston_SOURCES = tests/keyboard-test.c
917 keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
918 keyboard_weston_LDADD = libtest-client.la
920 event_weston_SOURCES = tests/event-test.c
921 event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
922 event_weston_LDADD = libtest-client.la
924 button_weston_SOURCES = tests/button-test.c
925 button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
926 button_weston_LDADD = libtest-client.la
928 text_weston_SOURCES = tests/text-test.c
929 nodist_text_weston_SOURCES = \
930 protocol/text-protocol.c \
931 protocol/text-client-protocol.h
932 text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
933 text_weston_LDADD = libtest-client.la
935 subsurface_weston_SOURCES = tests/subsurface-test.c
936 subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
937 subsurface_weston_LDADD = libtest-client.la
940 weston_tests += buffer-count.weston
941 buffer_count_weston_SOURCES = tests/buffer-count-test.c
942 buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
943 buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
946 if ENABLE_XWAYLAND_TEST
947 weston_tests += xwayland-test.weston
948 xwayland_test_weston_SOURCES = tests/xwayland-test.c
949 xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
950 xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
953 matrix_test_SOURCES = \
954 tests/matrix-test.c \
957 matrix_test_CPPFLAGS = -DUNIT_TEST
958 matrix_test_LDADD = -lm -lrt
960 if BUILD_SETBACKLIGHT
961 noinst_PROGRAMS += setbacklight
962 setbacklight_SOURCES = \
963 tests/setbacklight.c \
966 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
967 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
970 EXTRA_DIST += tests/weston-tests-env
973 protocol/wayland-test-protocol.c \
974 protocol/wayland-test-server-protocol.h \
975 protocol/wayland-test-client-protocol.h \
976 protocol/text-protocol.c \
977 protocol/text-client-protocol.h
980 protocol/desktop-shell.xml \
981 protocol/screenshooter.xml \
983 protocol/input-method.xml \
984 protocol/workspaces.xml \
985 protocol/text-cursor-position.xml \
986 protocol/wayland-test.xml \
987 protocol/xdg-shell.xml \
988 protocol/fullscreen-shell.xml \
991 man_MANS = weston.1 weston.ini.5
993 if ENABLE_DRM_COMPOSITOR
994 man_MANS += weston-drm.7
998 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
999 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1000 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1001 -e 's|__version__|$(PACKAGE_VERSION)|g'
1003 SUFFIXES = .1 .5 .7 .man
1005 %.1 %.5 %.7 : man/%.man
1006 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1010 man/weston-drm.man \
1013 CLEANFILES += $(man_MANS)
1016 protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1017 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1019 protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1020 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1022 protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1023 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@