main: add setting for DRM/pixman shadow framebuffer
[platform/upstream/weston.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 bin_PROGRAMS =
4 noinst_PROGRAMS =
5 libexec_PROGRAMS =
6 moduledir = $(libdir)/weston
7 module_LTLIBRARIES =
8 libweston_moduledir = $(libdir)/libweston-$(LIBWESTON_MAJOR)
9 libweston_module_LTLIBRARIES =
10 noinst_LTLIBRARIES =
11 BUILT_SOURCES =
12
13 AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
14
15 EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
16
17 weston.ini : $(srcdir)/weston.ini.in
18         $(AM_V_GEN)$(SED) \
19                 -e 's|@bindir[@]|$(bindir)|g' \
20                 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
21                 -e 's|@libexecdir[@]|$(libexecdir)|g' \
22                 $< > $@
23
24 ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
25         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
26                 -e 's|@bindir[@]|$(bindir)|g' \
27                 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
28                 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
29                 -e 's|@libexecdir[@]|$(libexecdir)|g' \
30                 -e 's|@plugin_prefix[@]||g' \
31                 $< > $@
32
33 all-local : weston.ini ivi-shell/weston.ini
34
35 AM_CFLAGS = $(GCC_CFLAGS)
36
37 AM_CPPFLAGS =                                   \
38         -I$(top_builddir)/libweston             \
39         -I$(top_srcdir)/libweston               \
40         -I$(top_builddir)/clients               \
41         -I$(top_builddir)/tests                 \
42         -I$(top_srcdir)/shared                  \
43         -I$(top_builddir)/protocol              \
44         -DLIBWESTON_MODULEDIR='"$(libweston_moduledir)"' \
45         -DLIBEXECDIR='"$(libexecdir)"'          \
46         -DBINDIR='"$(bindir)"'
47
48 CLEANFILES = weston.ini                         \
49         ivi-shell/weston.ini                    \
50         internal-screenshot-00.png              \
51         $(BUILT_SOURCES)
52
53 # Libtool race fix
54 # libweston-desktop depends on libweston, and desktop-shell depends on both.
55 # This leads to a libtool race at installation, because libtool re-links
56 # everything.
57 # If you add more fixes, you may need a workaround to keep automake generated
58 # targets. See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328
59 install-libweston_moduleLTLIBRARIES install-moduleLTLIBRARIES: install-libLTLIBRARIES
60
61 lib_LTLIBRARIES = libweston-@LIBWESTON_MAJOR@.la
62 libweston_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
63 libweston_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) \
64         $(COMPOSITOR_CFLAGS) $(EGL_CFLAGS) $(LIBDRM_CFLAGS)
65 libweston_@LIBWESTON_MAJOR@_la_LIBADD = $(COMPOSITOR_LIBS) \
66         $(DL_LIBS) -lm $(CLOCK_GETTIME_LIBS) \
67         $(LIBINPUT_BACKEND_LIBS) libshared.la
68 libweston_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
69
70 libweston_@LIBWESTON_MAJOR@_la_SOURCES =                        \
71         libweston/git-version.h                         \
72         libweston/log.c                                 \
73         libweston/compositor.c                          \
74         libweston/compositor.h                          \
75         libweston/compositor-drm.h                      \
76         libweston/compositor-fbdev.h                    \
77         libweston/compositor-headless.h                 \
78         libweston/compositor-rdp.h                      \
79         libweston/compositor-wayland.h                  \
80         libweston/compositor-x11.h                      \
81         libweston/input.c                               \
82         libweston/data-device.c                         \
83         libweston/screenshooter.c                       \
84         libweston/clipboard.c                           \
85         libweston/zoom.c                                \
86         libweston/bindings.c                            \
87         libweston/animation.c                           \
88         libweston/noop-renderer.c                       \
89         libweston/pixman-renderer.c                     \
90         libweston/pixman-renderer.h                     \
91         libweston/plugin-registry.c                             \
92         libweston/plugin-registry.h                             \
93         libweston/timeline.c                            \
94         libweston/timeline.h                            \
95         libweston/timeline-object.h                     \
96         libweston/linux-dmabuf.c                        \
97         libweston/linux-dmabuf.h                        \
98         libweston/pixel-formats.c                       \
99         libweston/pixel-formats.h                       \
100         shared/helpers.h                                \
101         shared/matrix.c                                 \
102         shared/matrix.h                                 \
103         shared/timespec-util.h                          \
104         shared/zalloc.h                                 \
105         shared/platform.h                               \
106         shared/weston-egl-ext.h
107
108 lib_LTLIBRARIES += libweston-desktop-@LIBWESTON_MAJOR@.la
109 libweston_desktop_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
110 libweston_desktop_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
111 libweston_desktop_@LIBWESTON_MAJOR@_la_LIBADD =         \
112         libweston-@LIBWESTON_MAJOR@.la                  \
113         $(COMPOSITOR_LIBS)
114 libweston_desktop_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
115
116 libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES =        \
117         libweston-desktop/client.c                      \
118         libweston-desktop/internal.h                    \
119         libweston-desktop/libweston-desktop.c           \
120         libweston-desktop/libweston-desktop.h           \
121         libweston-desktop/seat.c                        \
122         libweston-desktop/surface.c                     \
123         libweston-desktop/wl-shell.c                    \
124         libweston-desktop/xdg-shell-v6.c                \
125         libweston-desktop/xwayland.c
126
127 nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES =         \
128         protocol/xdg-shell-unstable-v6-protocol.c               \
129         protocol/xdg-shell-unstable-v6-server-protocol.h
130
131 BUILT_SOURCES += $(nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES)
132
133 libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v6.lo: protocol/xdg-shell-unstable-v6-server-protocol.h
134
135 if SYSTEMD_NOTIFY_SUPPORT
136 module_LTLIBRARIES += systemd-notify.la
137 systemd_notify_la_LDFLAGS = -module -avoid-version
138 systemd_notify_la_LIBADD = libweston-@LIBWESTON_MAJOR@.la $(SYSTEMD_DAEMON_LIBS)
139 systemd_notify_la_CFLAGS =                      \
140         $(COMPOSITOR_CFLAGS)                    \
141         $(SYSTEMD_DAEMON_CFLAGS)                \
142         $(PIXMAN_CFLAGS)                        \
143         $(AM_CFLAGS)
144 systemd_notify_la_SOURCES =                     \
145         compositor/systemd-notify.c             \
146         shared/helpers.h                        \
147         shared/zalloc.h                         \
148         libweston/compositor.h
149 endif
150
151 nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES =                         \
152         protocol/weston-screenshooter-protocol.c                        \
153         protocol/weston-screenshooter-server-protocol.h                 \
154         protocol/text-cursor-position-protocol.c        \
155         protocol/text-cursor-position-server-protocol.h \
156         protocol/text-input-unstable-v1-protocol.c                      \
157         protocol/text-input-unstable-v1-server-protocol.h               \
158         protocol/input-method-unstable-v1-protocol.c                    \
159         protocol/input-method-unstable-v1-server-protocol.h             \
160         protocol/presentation-time-protocol.c           \
161         protocol/presentation-time-server-protocol.h    \
162         protocol/viewporter-protocol.c                  \
163         protocol/viewporter-server-protocol.h           \
164         protocol/linux-dmabuf-unstable-v1-protocol.c    \
165         protocol/linux-dmabuf-unstable-v1-server-protocol.h             \
166         protocol/relative-pointer-unstable-v1-protocol.c                \
167         protocol/relative-pointer-unstable-v1-server-protocol.h         \
168         protocol/pointer-constraints-unstable-v1-protocol.c             \
169         protocol/pointer-constraints-unstable-v1-server-protocol.h      \
170         protocol/input-timestamps-unstable-v1-protocol.c                \
171         protocol/input-timestamps-unstable-v1-server-protocol.h
172
173 BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES)
174
175 bin_PROGRAMS += weston
176
177 weston_LDFLAGS = -export-dynamic
178 weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON            \
179                                  -DMODULEDIR='"$(moduledir)"' \
180                                  -DXSERVER_PATH='"@XSERVER_PATH@"'
181 weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBINPUT_BACKEND_CFLAGS)
182 weston_LDADD = libshared.la libweston-@LIBWESTON_MAJOR@.la \
183         $(COMPOSITOR_LIBS) \
184         $(DL_LIBS) $(LIBINPUT_BACKEND_LIBS) \
185         $(CLOCK_GETRES_LIBS) \
186         -lm
187
188 weston_SOURCES =                                        \
189         compositor/main.c                               \
190         compositor/weston-screenshooter.c               \
191         compositor/text-backend.c                       \
192         compositor/xwayland.c
193
194 # Track this dependency explicitly instead of using BUILT_SOURCES.  We
195 # add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
196 # in case we're building from tarballs.
197
198 compositor/main.c : $(top_builddir)/libweston/git-version.h
199 libweston/compositor.c : $(top_builddir)/libweston/git-version.h
200
201 noinst_LTLIBRARIES +=                           \
202         libsession-helper.la
203
204 libsession_helper_la_SOURCES =                  \
205         libweston/launcher-util.c               \
206         libweston/launcher-util.h               \
207         libweston/launcher-impl.h               \
208         libweston/weston-launch.h               \
209         libweston/launcher-weston-launch.c      \
210         libweston/launcher-direct.c
211 libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
212 libsession_helper_la_LIBADD = libweston-@LIBWESTON_MAJOR@.la
213
214 if ENABLE_DRM_COMPOSITOR
215 libsession_helper_la_LIBADD += $(LIBDRM_LIBS)
216 endif
217
218 if ENABLE_DBUS
219 if HAVE_SYSTEMD_LOGIN
220 libsession_helper_la_SOURCES +=                 \
221         libweston/dbus.h                        \
222         libweston/dbus.c                        \
223         libweston/launcher-logind.c
224 libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
225 libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
226 endif
227 endif
228
229 if HAVE_GIT_REPO
230 libweston/git-version.h : $(top_srcdir)/.git/logs/HEAD
231         $(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)')\"" > $@
232 else
233 libweston/git-version.h :
234         $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
235
236 endif
237
238 .FORCE :
239
240 if BUILD_WESTON_LAUNCH
241 bin_PROGRAMS += weston-launch
242 weston_launch_SOURCES = libweston/weston-launch.c libweston/weston-launch.h
243 weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
244 weston_launch_CFLAGS=                           \
245         $(AM_CFLAGS)                            \
246         $(PAM_CFLAGS)                           \
247         $(SYSTEMD_LOGIN_CFLAGS)                 \
248         $(LIBDRM_CFLAGS)
249 weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS)
250
251 if ENABLE_DRM_COMPOSITOR
252 weston_launch_LDADD += $(LIBDRM_LIBS)
253 endif
254
255 if ENABLE_SETUID_INSTALL
256 install-exec-hook:
257         can_suid_files=no; \
258         chown root $(DESTDIR)$(bindir)/weston-launch \
259                 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
260                 && can_suid_files=yes;\
261         if test $$can_suid_files = no; then \
262                 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
263                 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
264                 false; \
265         fi
266 endif
267
268 endif # BUILD_WESTON_LAUNCH
269
270 pkgconfigdir = $(libdir)/pkgconfig
271 pkgconfig_DATA = \
272         libweston/libweston-${LIBWESTON_MAJOR}.pc \
273         libweston-desktop/libweston-desktop-${LIBWESTON_MAJOR}.pc \
274         compositor/weston.pc
275
276 wayland_sessiondir = $(datadir)/wayland-sessions
277 dist_wayland_session_DATA = compositor/weston.desktop
278
279 libwestonincludedir = $(includedir)/libweston-${LIBWESTON_MAJOR}
280 libwestoninclude_HEADERS =                      \
281         libweston/version.h                     \
282         libweston/compositor.h                  \
283         libweston/compositor-drm.h              \
284         libweston/compositor-fbdev.h            \
285         libweston/compositor-headless.h         \
286         libweston/compositor-rdp.h              \
287         libweston/compositor-wayland.h          \
288         libweston/compositor-x11.h              \
289         libweston/windowed-output-api.h         \
290         libweston/plugin-registry.h             \
291         libweston/timeline-object.h             \
292         shared/matrix.h                         \
293         shared/config-parser.h                  \
294         shared/zalloc.h
295
296 libwestoninclude_HEADERS +=                     \
297         libweston-desktop/libweston-desktop.h
298
299 westonincludedir = $(includedir)/weston
300 westoninclude_HEADERS = compositor/weston.h
301
302 if ENABLE_IVI_SHELL
303 westoninclude_HEADERS +=                                \
304         ivi-shell/ivi-layout-export.h
305 endif
306
307 if ENABLE_EGL
308 libweston_module_LTLIBRARIES += gl-renderer.la
309 gl_renderer_la_LDFLAGS = -module -avoid-version
310 gl_renderer_la_LIBADD =                         \
311         libweston-@LIBWESTON_MAJOR@.la          \
312         $(EGL_LIBS)                             \
313         $(COMPOSITOR_LIBS)
314 gl_renderer_la_CFLAGS =                         \
315         $(COMPOSITOR_CFLAGS)                    \
316         $(EGL_CFLAGS)                           \
317         $(LIBDRM_CFLAGS)                        \
318         $(AM_CFLAGS)
319 gl_renderer_la_SOURCES =                        \
320         libweston/gl-renderer.h                 \
321         libweston/gl-renderer.c                 \
322         libweston/vertex-clipping.c             \
323         libweston/vertex-clipping.h             \
324         libweston/weston-sync-file.h            \
325         shared/helpers.h
326 endif
327
328 if ENABLE_X11_COMPOSITOR
329 libweston_module_LTLIBRARIES += x11-backend.la
330 x11_backend_la_LDFLAGS = -module -avoid-version
331 x11_backend_la_LIBADD =                         \
332         libshared-cairo.la                      \
333         libweston-@LIBWESTON_MAJOR@.la          \
334         $(X11_COMPOSITOR_LIBS)                  \
335         $(COMPOSITOR_LIBS)
336 x11_backend_la_CFLAGS =                         \
337         $(AM_CFLAGS)                            \
338         $(COMPOSITOR_CFLAGS)                    \
339         $(EGL_CFLAGS)                           \
340         $(PIXMAN_CFLAGS)                        \
341         $(CAIRO_CFLAGS)                         \
342         $(X11_COMPOSITOR_CFLAGS)
343 x11_backend_la_SOURCES =                        \
344         libweston/compositor-x11.c              \
345         libweston/compositor-x11.h              \
346         shared/helpers.h
347 endif
348
349 INPUT_BACKEND_CFLAGS = $(LIBINPUT_BACKEND_CFLAGS)
350 INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
351 INPUT_BACKEND_SOURCES =                         \
352         libweston/libinput-seat.c               \
353         libweston/libinput-seat.h               \
354         libweston/libinput-device.c             \
355         libweston/libinput-device.h             \
356         shared/helpers.h
357
358 if ENABLE_DRM_COMPOSITOR
359 libweston_module_LTLIBRARIES += drm-backend.la
360 drm_backend_la_LDFLAGS = -module -avoid-version
361 drm_backend_la_LIBADD =                         \
362         libsession-helper.la                    \
363         libweston-@LIBWESTON_MAJOR@.la          \
364         $(COMPOSITOR_LIBS)                      \
365         $(DRM_COMPOSITOR_LIBS)                  \
366         $(INPUT_BACKEND_LIBS)                   \
367         libshared.la                            \
368         $(CLOCK_GETTIME_LIBS)
369 drm_backend_la_CFLAGS =                         \
370         $(COMPOSITOR_CFLAGS)                    \
371         $(EGL_CFLAGS)                           \
372         $(DRM_COMPOSITOR_CFLAGS)                \
373         $(INPUT_BACKEND_CFLAGS)                 \
374         $(AM_CFLAGS)
375 drm_backend_la_SOURCES =                        \
376         libweston/compositor-drm.c              \
377         libweston/compositor-drm.h              \
378         $(INPUT_BACKEND_SOURCES)                \
379         shared/helpers.h                        \
380         shared/timespec-util.h                  \
381         libweston/libbacklight.c                \
382         libweston/libbacklight.h
383
384 if ENABLE_VAAPI_RECORDER
385 drm_backend_la_SOURCES += libweston/vaapi-recorder.c libweston/vaapi-recorder.h
386 drm_backend_la_LIBADD += $(LIBVA_LIBS)
387 drm_backend_la_LDFLAGS += -pthread
388 drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
389 endif
390 endif
391
392 if ENABLE_WAYLAND_COMPOSITOR
393 libweston_module_LTLIBRARIES += wayland-backend.la
394 wayland_backend_la_LDFLAGS = -module -avoid-version
395 wayland_backend_la_LIBADD =                     \
396         libshared-cairo.la                      \
397         libweston-@LIBWESTON_MAJOR@.la          \
398         $(COMPOSITOR_LIBS)                      \
399         $(WAYLAND_COMPOSITOR_EGL_LIBS)          \
400         $(WAYLAND_COMPOSITOR_LIBS)
401 wayland_backend_la_CFLAGS =                     \
402         $(COMPOSITOR_CFLAGS)                    \
403         $(EGL_CFLAGS)                           \
404         $(PIXMAN_CFLAGS)                        \
405         $(CAIRO_CFLAGS)                         \
406         $(WAYLAND_COMPOSITOR_CFLAGS)            \
407         $(AM_CFLAGS)
408 wayland_backend_la_SOURCES =                                    \
409         libweston/compositor-wayland.c                          \
410         libweston/compositor-wayland.h                          \
411         shared/helpers.h
412 nodist_wayland_backend_la_SOURCES =                             \
413         protocol/fullscreen-shell-unstable-v1-protocol.c        \
414         protocol/fullscreen-shell-unstable-v1-client-protocol.h \
415         protocol/xdg-shell-unstable-v6-protocol.c               \
416         protocol/xdg-shell-unstable-v6-client-protocol.h
417 endif
418
419 if ENABLE_HEADLESS_COMPOSITOR
420 libweston_module_LTLIBRARIES += headless-backend.la
421 headless_backend_la_LDFLAGS = -module -avoid-version
422 headless_backend_la_LIBADD =                    \
423         libshared.la                            \
424         libweston-@LIBWESTON_MAJOR@.la          \
425         $(COMPOSITOR_LIBS)
426 headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
427 headless_backend_la_SOURCES =                   \
428         libweston/compositor-headless.c         \
429         libweston/compositor-headless.h         \
430         shared/helpers.h
431 endif
432
433 if ENABLE_FBDEV_COMPOSITOR
434 libweston_module_LTLIBRARIES += fbdev-backend.la
435 fbdev_backend_la_LDFLAGS = -module -avoid-version
436 fbdev_backend_la_LIBADD =                       \
437         libshared.la                            \
438         libsession-helper.la                    \
439         libweston-@LIBWESTON_MAJOR@.la          \
440         $(COMPOSITOR_LIBS)                      \
441         $(FBDEV_COMPOSITOR_LIBS)                \
442         $(INPUT_BACKEND_LIBS)
443 fbdev_backend_la_CFLAGS =                       \
444         $(COMPOSITOR_CFLAGS)                    \
445         $(EGL_CFLAGS)                           \
446         $(FBDEV_COMPOSITOR_CFLAGS)              \
447         $(PIXMAN_CFLAGS)                        \
448         $(INPUT_BACKEND_CFLAGS)                 \
449         $(AM_CFLAGS)
450 fbdev_backend_la_SOURCES =                      \
451         libweston/compositor-fbdev.c            \
452         libweston/compositor-fbdev.h            \
453         shared/helpers.h                        \
454         $(INPUT_BACKEND_SOURCES)
455 endif
456
457 if ENABLE_RDP_COMPOSITOR
458 libweston_module_LTLIBRARIES += rdp-backend.la
459 rdp_backend_la_LDFLAGS = -module -avoid-version
460 rdp_backend_la_LIBADD =                         \
461         libshared.la                            \
462         libweston-@LIBWESTON_MAJOR@.la          \
463         $(COMPOSITOR_LIBS)              \
464         $(RDP_COMPOSITOR_LIBS)
465 rdp_backend_la_CFLAGS =                         \
466         $(COMPOSITOR_CFLAGS)                    \
467         $(RDP_COMPOSITOR_CFLAGS)                \
468         $(AM_CFLAGS)
469 rdp_backend_la_SOURCES =                        \
470         libweston/compositor-rdp.c              \
471         libweston/compositor-rdp.h              \
472         shared/helpers.h
473 endif
474
475 if HAVE_LCMS
476 module_LTLIBRARIES += cms-static.la
477 cms_static_la_LDFLAGS = -module -avoid-version
478 cms_static_la_LIBADD =                          \
479         libshared.la                            \
480         libweston-@LIBWESTON_MAJOR@.la          \
481         $(LCMS_LIBS)                            \
482         $(COMPOSITOR_LIBS)
483 cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
484 cms_static_la_SOURCES =                         \
485         compositor/cms-static.c                 \
486         compositor/cms-helper.c                 \
487         compositor/cms-helper.h                 \
488         shared/helpers.h
489 if ENABLE_COLORD
490 module_LTLIBRARIES += cms-colord.la
491 cms_colord_la_LDFLAGS = -module -avoid-version
492 cms_colord_la_LIBADD =                          \
493         libshared.la                            \
494         libweston-@LIBWESTON_MAJOR@.la          \
495         $(COLORD_LIBS)                          \
496         $(LCMS_LIBS)                            \
497         $(COMPOSITOR_LIBS)
498 cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
499 cms_colord_la_SOURCES =                         \
500         compositor/cms-colord.c                 \
501         compositor/cms-helper.c                 \
502         compositor/cms-helper.h                 \
503         shared/helpers.h
504 endif
505 endif
506
507 noinst_PROGRAMS += spring-tool
508 spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
509 spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
510 spring_tool_SOURCES =                           \
511         libweston/spring-tool.c                 \
512         libweston/animation.c                   \
513         shared/matrix.c                         \
514         shared/matrix.h                         \
515         libweston/compositor.h
516
517 if BUILD_CLIENTS
518
519 bin_PROGRAMS += weston-terminal weston-info
520
521 libexec_PROGRAMS +=                             \
522         weston-desktop-shell                    \
523         weston-screenshooter                    \
524         weston-keyboard                         \
525         weston-simple-im
526
527 if ENABLE_IVI_SHELL
528 libexec_PROGRAMS +=                             \
529         weston-ivi-shell-user-interface
530 endif
531
532 demo_clients =                                  \
533         weston-flower                           \
534         weston-image                            \
535         weston-cliptest                         \
536         weston-dnd                              \
537         weston-smoke                            \
538         weston-resizor                          \
539         weston-eventdemo                        \
540         weston-clickdot                         \
541         weston-confine                          \
542         weston-transformed                      \
543         weston-fullscreen                       \
544         weston-stacking                         \
545         weston-calibrator                       \
546         weston-scaler
547
548 if INSTALL_DEMO_CLIENTS
549 bin_PROGRAMS += $(demo_clients)
550 else
551 noinst_PROGRAMS += $(demo_clients)
552 endif
553
554
555 if BUILD_SIMPLE_CLIENTS
556 demo_clients +=                                 \
557         weston-simple-shm                       \
558         weston-simple-damage                    \
559         weston-simple-touch                     \
560         weston-presentation-shm                 \
561         weston-multi-resource
562
563 weston_simple_shm_SOURCES = clients/simple-shm.c
564 nodist_weston_simple_shm_SOURCES =              \
565         protocol/xdg-shell-unstable-v6-protocol.c               \
566         protocol/xdg-shell-unstable-v6-client-protocol.h        \
567         protocol/fullscreen-shell-unstable-v1-protocol.c        \
568         protocol/fullscreen-shell-unstable-v1-client-protocol.h \
569         protocol/ivi-application-protocol.c             \
570         protocol/ivi-application-client-protocol.h
571 weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
572 weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
573
574 weston_simple_damage_SOURCES = clients/simple-damage.c
575 nodist_weston_simple_damage_SOURCES =           \
576         protocol/viewporter-protocol.c          \
577         protocol/viewporter-client-protocol.h   \
578         protocol/xdg-shell-unstable-v6-protocol.c               \
579         protocol/xdg-shell-unstable-v6-client-protocol.h        \
580         protocol/fullscreen-shell-unstable-v1-protocol.c        \
581         protocol/fullscreen-shell-unstable-v1-client-protocol.h
582 weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
583 weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
584
585 weston_simple_touch_SOURCES =                   \
586         clients/simple-touch.c                  \
587         shared/helpers.h
588 weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
589 weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
590
591 weston_presentation_shm_SOURCES =                       \
592         clients/presentation-shm.c                      \
593         shared/helpers.h
594 nodist_weston_presentation_shm_SOURCES =                \
595         protocol/presentation-time-protocol.c           \
596         protocol/presentation-time-client-protocol.h
597 weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
598 weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
599
600 weston_multi_resource_SOURCES = clients/multi-resource.c
601 weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
602 weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
603 endif
604
605 if BUILD_SIMPLE_EGL_CLIENTS
606 demo_clients += weston-simple-egl
607 weston_simple_egl_SOURCES = clients/simple-egl.c
608 nodist_weston_simple_egl_SOURCES =              \
609         protocol/xdg-shell-unstable-v6-protocol.c               \
610         protocol/xdg-shell-unstable-v6-client-protocol.h        \
611         protocol/ivi-application-protocol.c             \
612         protocol/ivi-application-client-protocol.h
613 weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
614 weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
615 endif
616
617 if BUILD_SIMPLE_DMABUF_DRM_CLIENT
618 demo_clients += weston-simple-dmabuf-drm
619 weston_simple_dmabuf_drm_SOURCES =                      \
620         clients/simple-dmabuf-drm.c                     \
621         clients/simple-dmabuf-drm-data.h
622 nodist_weston_simple_dmabuf_drm_SOURCES =               \
623         protocol/xdg-shell-unstable-v6-protocol.c               \
624         protocol/xdg-shell-unstable-v6-client-protocol.h        \
625         protocol/fullscreen-shell-unstable-v1-protocol.c        \
626         protocol/fullscreen-shell-unstable-v1-client-protocol.h \
627         protocol/linux-dmabuf-unstable-v1-protocol.c \
628         protocol/linux-dmabuf-unstable-v1-client-protocol.h
629 weston_simple_dmabuf_drm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_DRM_CLIENT_CFLAGS)
630 weston_simple_dmabuf_drm_LDADD = $(SIMPLE_DMABUF_DRM_CLIENT_LIBS) \
631         $(LIBDRM_PLATFORM_FREEDRENO_LIBS) \
632         $(LIBDRM_PLATFORM_INTEL_LIBS)     \
633         libshared.la
634 endif
635
636 if BUILD_SIMPLE_DMABUF_V4L_CLIENT
637 demo_clients += weston-simple-dmabuf-v4l
638 weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
639 nodist_weston_simple_dmabuf_v4l_SOURCES =               \
640         protocol/xdg-shell-unstable-v6-protocol.c               \
641         protocol/xdg-shell-unstable-v6-client-protocol.h        \
642         protocol/fullscreen-shell-unstable-v1-protocol.c        \
643         protocol/fullscreen-shell-unstable-v1-client-protocol.h \
644         protocol/linux-dmabuf-unstable-v1-protocol.c \
645         protocol/linux-dmabuf-unstable-v1-client-protocol.h
646 weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
647 weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
648 endif
649
650 noinst_LTLIBRARIES += libtoytoolkit.la
651
652 libtoytoolkit_la_SOURCES =                              \
653         clients/window.c                                \
654         clients/window.h                                \
655         shared/helpers.h
656
657 nodist_libtoytoolkit_la_SOURCES =                       \
658         protocol/text-cursor-position-protocol.c        \
659         protocol/text-cursor-position-client-protocol.h \
660         protocol/viewporter-protocol.c                  \
661         protocol/viewporter-client-protocol.h           \
662         protocol/xdg-shell-unstable-v6-protocol.c                       \
663         protocol/xdg-shell-unstable-v6-client-protocol.h                \
664         protocol/ivi-application-protocol.c             \
665         protocol/ivi-application-client-protocol.h      \
666         protocol/pointer-constraints-unstable-v1-protocol.c             \
667         protocol/pointer-constraints-unstable-v1-client-protocol.h      \
668         protocol/relative-pointer-unstable-v1-protocol.c                \
669         protocol/relative-pointer-unstable-v1-client-protocol.h
670
671 BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
672
673
674 libtoytoolkit_la_LIBADD =                       \
675         $(CLIENT_LIBS)                          \
676         $(CAIRO_EGL_LIBS)                       \
677         libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
678 libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
679
680 weston_flower_SOURCES = clients/flower.c
681 weston_flower_LDADD = libtoytoolkit.la
682 weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
683
684 weston_screenshooter_SOURCES =                          \
685         clients/screenshot.c
686 nodist_weston_screenshooter_SOURCES =                   \
687         protocol/weston-screenshooter-protocol.c        \
688         protocol/weston-screenshooter-client-protocol.h
689 weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
690 weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
691
692 weston_terminal_SOURCES =                               \
693         clients/terminal.c                              \
694         shared/helpers.h
695 weston_terminal_LDADD = libtoytoolkit.la -lutil
696 weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
697
698 weston_image_SOURCES = clients/image.c
699 weston_image_LDADD = libtoytoolkit.la
700 weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
701
702 weston_cliptest_SOURCES =                               \
703         clients/cliptest.c                              \
704         libweston/vertex-clipping.c                     \
705         libweston/vertex-clipping.h
706 weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
707 weston_cliptest_LDADD = libtoytoolkit.la
708
709 weston_dnd_SOURCES =                                    \
710         clients/dnd.c                                   \
711         shared/helpers.h
712 weston_dnd_LDADD = libtoytoolkit.la
713 weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
714
715 weston_smoke_SOURCES = clients/smoke.c
716 weston_smoke_LDADD = libtoytoolkit.la
717 weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
718
719 weston_resizor_SOURCES = clients/resizor.c
720 weston_resizor_LDADD = libtoytoolkit.la
721 weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
722
723 weston_scaler_SOURCES = clients/scaler.c
724 weston_scaler_LDADD = libtoytoolkit.la
725 weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
726
727 if HAVE_CAIRO_GLESV2
728 demo_clients += weston-nested weston-nested-client
729
730 weston_nested_SOURCES =                                 \
731         clients/nested.c                                \
732         shared/helpers.h
733 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
734 weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
735
736 weston_nested_client_SOURCES = clients/nested-client.c
737 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
738 weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
739 endif
740
741 weston_eventdemo_SOURCES =                              \
742         clients/eventdemo.c                             \
743         shared/helpers.h
744 weston_eventdemo_LDADD = libtoytoolkit.la
745 weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
746
747 weston_clickdot_SOURCES =                               \
748         clients/clickdot.c                              \
749         shared/helpers.h
750 weston_clickdot_LDADD = libtoytoolkit.la
751 weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
752
753 weston_confine_SOURCES =                                \
754         clients/confine.c                               \
755         shared/helpers.h
756 weston_confine_LDADD = libtoytoolkit.la
757 weston_confine_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
758
759 weston_transformed_SOURCES = clients/transformed.c
760 weston_transformed_LDADD = libtoytoolkit.la
761 weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
762
763 weston_fullscreen_SOURCES = clients/fullscreen.c
764 nodist_weston_fullscreen_SOURCES =                      \
765         protocol/fullscreen-shell-unstable-v1-protocol.c                \
766         protocol/fullscreen-shell-unstable-v1-client-protocol.h
767 weston_fullscreen_LDADD = libtoytoolkit.la
768 weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
769
770 weston_stacking_SOURCES =                               \
771         clients/stacking.c                              \
772         shared/helpers.h
773 weston_stacking_LDADD = libtoytoolkit.la
774 weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
775
776 weston_calibrator_SOURCES =                             \
777         clients/calibrator.c                            \
778         shared/helpers.h                                \
779         shared/matrix.c                                 \
780         shared/matrix.h
781 weston_calibrator_LDADD = libtoytoolkit.la
782 weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
783
784 if BUILD_SUBSURFACES_CLIENT
785 demo_clients += weston-subsurfaces
786 weston_subsurfaces_SOURCES =                    \
787         clients/subsurfaces.c                   \
788         shared/helpers.h
789 weston_subsurfaces_CFLAGS =                     \
790         $(AM_CFLAGS)                            \
791         $(SIMPLE_EGL_CLIENT_CFLAGS)             \
792         $(CLIENT_CFLAGS)
793 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
794 endif
795
796 if HAVE_PANGO
797 demo_clients += weston-editor
798 weston_editor_SOURCES =                         \
799         clients/editor.c                        \
800         shared/helpers.h
801 nodist_weston_editor_SOURCES =                  \
802         protocol/text-input-unstable-v1-protocol.c              \
803         protocol/text-input-unstable-v1-client-protocol.h
804 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
805 weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
806 endif
807
808 weston_keyboard_SOURCES = clients/keyboard.c
809 nodist_weston_keyboard_SOURCES =                                \
810         protocol/weston-desktop-shell-client-protocol.h         \
811         protocol/weston-desktop-shell-protocol.c                \
812         protocol/input-method-unstable-v1-protocol.c            \
813         protocol/input-method-unstable-v1-client-protocol.h
814 weston_keyboard_LDADD = libtoytoolkit.la
815 weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
816
817 weston_simple_im_SOURCES = clients/simple-im.c
818 nodist_weston_simple_im_SOURCES =               \
819         protocol/input-method-unstable-v1-protocol.c            \
820         protocol/input-method-unstable-v1-client-protocol.h
821 weston_simple_im_LDADD = $(CLIENT_LIBS)
822 weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
823
824 weston_info_SOURCES =                                   \
825         clients/weston-info.c                           \
826         shared/helpers.h
827 nodist_weston_info_SOURCES =                            \
828         protocol/presentation-time-protocol.c           \
829         protocol/presentation-time-client-protocol.h    \
830         protocol/linux-dmabuf-unstable-v1-protocol.c    \
831         protocol/linux-dmabuf-unstable-v1-client-protocol.h
832 weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
833 weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
834
835 weston_desktop_shell_SOURCES =                          \
836         clients/desktop-shell.c                         \
837         shared/helpers.h
838 nodist_weston_desktop_shell_SOURCES =                   \
839         protocol/weston-desktop-shell-client-protocol.h \
840         protocol/weston-desktop-shell-protocol.c
841 weston_desktop_shell_LDADD = libtoytoolkit.la
842 weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
843
844 if ENABLE_IVI_SHELL
845 weston_ivi_shell_user_interface_SOURCES =                               \
846         clients/ivi-shell-user-interface.c                              \
847         shared/helpers.h
848 nodist_weston_ivi_shell_user_interface_SOURCES =                        \
849         protocol/ivi-hmi-controller-client-protocol.h                   \
850         protocol/ivi-hmi-controller-protocol.c                          \
851         protocol/ivi-application-client-protocol.h                      \
852         protocol/ivi-application-protocol.c
853 weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
854 weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
855 endif
856
857 if BUILD_FULL_GL_CLIENTS
858 demo_clients += weston-gears
859 weston_gears_SOURCES = clients/gears.c
860 weston_gears_LDADD = libtoytoolkit.la
861 weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
862 endif
863
864 endif
865
866 BUILT_SOURCES +=                                        \
867         protocol/weston-screenshooter-protocol.c                        \
868         protocol/weston-screenshooter-client-protocol.h                 \
869         protocol/text-cursor-position-client-protocol.h \
870         protocol/text-cursor-position-protocol.c        \
871         protocol/text-input-unstable-v1-protocol.c                      \
872         protocol/text-input-unstable-v1-client-protocol.h               \
873         protocol/input-method-unstable-v1-protocol.c                    \
874         protocol/input-method-unstable-v1-client-protocol.h             \
875         protocol/weston-desktop-shell-client-protocol.h                 \
876         protocol/weston-desktop-shell-protocol.c                        \
877         protocol/viewporter-client-protocol.h           \
878         protocol/viewporter-protocol.c                  \
879         protocol/presentation-time-protocol.c                           \
880         protocol/presentation-time-client-protocol.h                    \
881         protocol/fullscreen-shell-unstable-v1-protocol.c                \
882         protocol/fullscreen-shell-unstable-v1-client-protocol.h \
883         protocol/xdg-shell-unstable-v6-protocol.c                       \
884         protocol/xdg-shell-unstable-v6-client-protocol.h                \
885         protocol/ivi-hmi-controller-protocol.c          \
886         protocol/ivi-hmi-controller-client-protocol.h   \
887         protocol/ivi-application-protocol.c             \
888         protocol/ivi-application-client-protocol.h      \
889         protocol/linux-dmabuf-unstable-v1-protocol.c    \
890         protocol/linux-dmabuf-unstable-v1-client-protocol.h             \
891         protocol/input-timestamps-unstable-v1-protocol.c                \
892         protocol/input-timestamps-unstable-v1-client-protocol.h
893
894 westondatadir = $(datadir)/weston
895 dist_westondata_DATA =                          \
896         data/wayland.svg                        \
897         data/wayland.png                        \
898         data/pattern.png                        \
899         data/terminal.png                       \
900         data/border.png                         \
901         data/icon_editor.png                    \
902         data/icon_flower.png                    \
903         data/icon_terminal.png                  \
904         data/icon_window.png                    \
905         data/sign_close.png                     \
906         data/sign_maximize.png                  \
907         data/sign_minimize.png
908
909 if ENABLE_IVI_SHELL
910 dist_westondata_DATA +=                         \
911         data/background.png                     \
912         data/tiling.png                         \
913         data/fullscreen.png                     \
914         data/panel.png                          \
915         data/random.png                         \
916         data/sidebyside.png                     \
917         data/home.png                           \
918         data/icon_ivi_clickdot.png              \
919         data/icon_ivi_flower.png                \
920         data/icon_ivi_simple-egl.png            \
921         data/icon_ivi_simple-shm.png            \
922         data/icon_ivi_smoke.png
923 endif
924
925
926 if BUILD_WCAP_TOOLS
927 bin_PROGRAMS += wcap-decode
928
929 wcap_decode_SOURCES =                           \
930         wcap/main.c                             \
931         wcap/wcap-decode.c                      \
932         wcap/wcap-decode.h
933
934 wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
935 wcap_decode_LDADD = $(WCAP_LIBS)
936 endif
937
938
939 if ENABLE_DESKTOP_SHELL
940
941 module_LTLIBRARIES += desktop-shell.la
942
943 desktop_shell_la_CPPFLAGS =                     \
944         -I$(top_builddir)/protocol              \
945         -I$(top_srcdir)/shared                  \
946         -I$(top_builddir)/libweston             \
947         -I$(top_srcdir)/libweston               \
948         -I$(top_builddir)/desktop-shell         \
949         -DMODULEDIR='"$(moduledir)"'            \
950         -DLIBEXECDIR='"$(libexecdir)"'          \
951         -DIN_WESTON
952
953 desktop_shell_la_LDFLAGS = -module -avoid-version
954 desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
955 desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
956 desktop_shell_la_SOURCES =                              \
957         desktop-shell/shell.h                           \
958         desktop-shell/shell.c                           \
959         desktop-shell/exposay.c                         \
960         desktop-shell/input-panel.c                     \
961         shared/helpers.h
962 nodist_desktop_shell_la_SOURCES =                       \
963         protocol/weston-desktop-shell-protocol.c        \
964         protocol/weston-desktop-shell-server-protocol.h
965
966 BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
967 endif
968
969 if ENABLE_FULLSCREEN_SHELL
970
971 module_LTLIBRARIES += fullscreen-shell.la
972
973 fullscreen_shell_la_CPPFLAGS =                  \
974         -I$(top_builddir)/protocol              \
975         -I$(top_srcdir)/shared                  \
976         -I$(top_builddir)/libweston             \
977         -I$(top_srcdir)/libweston               \
978         -DIN_WESTON
979
980 fullscreen_shell_la_LDFLAGS = -module -avoid-version
981 fullscreen_shell_la_LIBADD =                    \
982         libweston-@LIBWESTON_MAJOR@.la          \
983         $(COMPOSITOR_LIBS)
984 fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
985 fullscreen_shell_la_SOURCES =                   \
986         fullscreen-shell/fullscreen-shell.c     \
987         shared/helpers.h
988 nodist_fullscreen_shell_la_SOURCES =                    \
989         protocol/fullscreen-shell-unstable-v1-protocol.c                \
990         protocol/fullscreen-shell-unstable-v1-server-protocol.h
991
992 BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
993 endif
994
995 if ENABLE_IVI_SHELL
996
997 module_LTLIBRARIES +=                           \
998         $(ivi_shell)                            \
999         $(hmi_controller)
1000
1001 ivi_shell = ivi-shell.la
1002 ivi_shell_la_LDFLAGS = -module -avoid-version
1003 ivi_shell_la_LIBADD =                           \
1004         libshared.la                            \
1005         libweston-@LIBWESTON_MAJOR@.la          \
1006         $(COMPOSITOR_LIBS)
1007 ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1008 ivi_shell_la_SOURCES =                          \
1009         ivi-shell/ivi-layout-export.h           \
1010         ivi-shell/ivi-layout-private.h          \
1011         ivi-shell/ivi-layout-shell.h            \
1012         ivi-shell/ivi-layout.c                  \
1013         ivi-shell/ivi-layout-transition.c       \
1014         ivi-shell/ivi-shell.h                   \
1015         ivi-shell/ivi-shell.c                   \
1016         ivi-shell/input-panel-ivi.c             \
1017         shared/helpers.h
1018 nodist_ivi_shell_la_SOURCES =                   \
1019         protocol/ivi-application-protocol.c             \
1020         protocol/ivi-application-server-protocol.h
1021
1022 BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
1023
1024 hmi_controller = hmi-controller.la
1025 hmi_controller_la_LDFLAGS = -module -avoid-version
1026 hmi_controller_la_LIBADD =                      \
1027         libshared.la                            \
1028         libweston-@LIBWESTON_MAJOR@.la          \
1029         $(COMPOSITOR_LIBS)
1030 hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1031 hmi_controller_la_SOURCES =                             \
1032         ivi-shell/ivi-layout-export.h                   \
1033         ivi-shell/hmi-controller.c                      \
1034         shared/helpers.h
1035 nodist_hmi_controller_la_SOURCES =                      \
1036         protocol/ivi-hmi-controller-protocol.c          \
1037         protocol/ivi-hmi-controller-server-protocol.h
1038
1039 BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
1040
1041 endif
1042
1043
1044 if ENABLE_SCREEN_SHARING
1045
1046 module_LTLIBRARIES += screen-share.la
1047
1048 screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
1049 screen_share_la_LDFLAGS = -module -avoid-version
1050 screen_share_la_LIBADD =                        \
1051         libshared-cairo.la                      \
1052         libweston-@LIBWESTON_MAJOR@.la          \
1053         $(COMPOSITOR_LIBS)                      \
1054         $(SCREEN_SHARE_LIBS)
1055 screen_share_la_CFLAGS =                        \
1056         $(COMPOSITOR_CFLAGS)                    \
1057         $(SCREEN_SHARE_CFLAGS)                  \
1058         $(AM_CFLAGS)
1059 screen_share_la_SOURCES =                       \
1060         compositor/screen-share.c               \
1061         shared/helpers.h
1062 nodist_screen_share_la_SOURCES =                        \
1063         protocol/fullscreen-shell-unstable-v1-protocol.c                \
1064         protocol/fullscreen-shell-unstable-v1-client-protocol.h
1065
1066 endif
1067
1068 if ENABLE_XWAYLAND
1069
1070 libweston_module_LTLIBRARIES += xwayland.la
1071
1072 xwayland_la_CPPFLAGS =                          \
1073         -I$(top_builddir)/protocol              \
1074         -I$(top_srcdir)/shared                  \
1075         -I$(top_builddir)/libweston             \
1076         -I$(top_srcdir)/libweston               \
1077         -I$(top_builddir)/xwayland              \
1078         -DMODULEDIR='"$(moduledir)"'            \
1079         -DLIBEXECDIR='"$(libexecdir)"'
1080
1081 xwayland_la_LDFLAGS = -module -avoid-version
1082 xwayland_la_LIBADD =                            \
1083         libshared-cairo.la                      \
1084         libweston-@LIBWESTON_MAJOR@.la          \
1085         $(XWAYLAND_LIBS)
1086 xwayland_la_CFLAGS =                            \
1087         $(AM_CFLAGS)                            \
1088         $(COMPOSITOR_CFLAGS)                    \
1089         $(PIXMAN_CFLAGS)                        \
1090         $(CAIRO_CFLAGS)
1091 xwayland_la_SOURCES =                           \
1092         xwayland/xwayland.h                     \
1093         xwayland/xwayland-internal-interface.h  \
1094         xwayland/window-manager.c               \
1095         xwayland/selection.c                    \
1096         xwayland/dnd.c                          \
1097         xwayland/launcher.c                     \
1098         xwayland/hash.c                         \
1099         xwayland/hash.h                         \
1100         shared/helpers.h
1101
1102 libwestoninclude_HEADERS += xwayland/xwayland-api.h
1103
1104 endif
1105
1106
1107 #
1108 # Shared utilities
1109 #
1110
1111 noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1112         libzunitc.la libzunitcmain.la
1113
1114 libshared_la_CPPFLAGS = \
1115         -DDATADIR='"$(datadir)"' \
1116         $(AM_CPPFLAGS)
1117
1118 libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1119
1120 libshared_la_SOURCES =                          \
1121         shared/config-parser.c                  \
1122         shared/option-parser.c                  \
1123         shared/config-parser.h                  \
1124         shared/file-util.c                      \
1125         shared/file-util.h                      \
1126         shared/helpers.h                        \
1127         shared/os-compatibility.c               \
1128         shared/os-compatibility.h               \
1129         shared/xalloc.c                 \
1130         shared/xalloc.h
1131
1132 libshared_cairo_la_CPPFLAGS = $(libshared_la_CPPFLAGS)
1133
1134 libshared_cairo_la_CFLAGS =                     \
1135         $(AM_CFLAGS)                            \
1136         $(COMPOSITOR_CFLAGS)                    \
1137         $(PIXMAN_CFLAGS)                        \
1138         $(CAIRO_CFLAGS)                         \
1139         $(PANGO_CFLAGS)                         \
1140         $(PNG_CFLAGS)                           \
1141         $(WEBP_CFLAGS)
1142
1143 libshared_cairo_la_LIBADD =                     \
1144         $(PIXMAN_LIBS)                          \
1145         $(CAIRO_LIBS)                           \
1146         $(PANGO_LIBS)                           \
1147         $(PNG_LIBS)                             \
1148         $(WEBP_LIBS)                            \
1149         $(JPEG_LIBS)
1150
1151 libshared_cairo_la_SOURCES =                    \
1152         $(libshared_la_SOURCES)                 \
1153         shared/helpers.h                        \
1154         shared/image-loader.c                   \
1155         shared/image-loader.h                   \
1156         shared/cairo-util.c                     \
1157         shared/frame.c                          \
1158         shared/cairo-util.h
1159
1160 libzunitc_la_SOURCES = \
1161         tools/zunitc/inc/zunitc/zunitc.h        \
1162         tools/zunitc/inc/zunitc/zunitc_impl.h   \
1163         tools/zunitc/src/zuc_base_logger.c      \
1164         tools/zunitc/src/zuc_base_logger.h      \
1165         tools/zunitc/src/zuc_collector.c        \
1166         tools/zunitc/src/zuc_collector.h        \
1167         tools/zunitc/src/zuc_context.h          \
1168         tools/zunitc/src/zuc_event.h            \
1169         tools/zunitc/src/zuc_event_listener.h   \
1170         tools/zunitc/src/zuc_junit_reporter.c   \
1171         tools/zunitc/src/zuc_junit_reporter.h   \
1172         tools/zunitc/src/zuc_types.h            \
1173         tools/zunitc/src/zunitc_impl.c          \
1174         shared/helpers.h
1175
1176 libzunitc_la_CFLAGS = \
1177         $(AM_CFLAGS)                            \
1178         -I$(top_srcdir)/tools/zunitc/inc
1179
1180 libzunitc_la_LIBADD = \
1181         libshared.la \
1182         $(CLOCK_GETTIME_LIBS)
1183
1184 if ENABLE_JUNIT_XML
1185 libzunitc_la_CFLAGS += \
1186         $(LIBXML2_CFLAGS)
1187 libzunitc_la_LIBADD += \
1188         $(LIBXML2_LIBS)
1189 endif
1190
1191 libzunitcmain_la_SOURCES = \
1192         tools/zunitc/src/main.c
1193
1194 libzunitcmain_la_CFLAGS = \
1195         $(AM_CFLAGS)                            \
1196         -I$(top_srcdir)/tools/zunitc/inc
1197
1198 libzunitcmain_la_LIBADD =       \
1199         libzunitc.la            \
1200         libshared.la
1201
1202 #
1203 # tests subdirectory
1204 #
1205
1206 TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1207
1208 internal_tests =                                \
1209         internal-screenshot.weston
1210
1211 shared_tests =                                  \
1212         config-parser.test                      \
1213         timespec.test                           \
1214         string.test                                     \
1215         vertex-clip.test                        \
1216         zuctest
1217
1218 module_tests =                                  \
1219         plugin-registry-test.la                 \
1220         surface-test.la                         \
1221         surface-global-test.la
1222
1223 weston_tests =                                  \
1224         bad_buffer.weston                       \
1225         keyboard.weston                         \
1226         event.weston                            \
1227         pointer.weston                          \
1228         text.weston                             \
1229         presentation.weston                     \
1230         viewporter.weston                       \
1231         roles.weston                            \
1232         subsurface.weston                       \
1233         subsurface-shot.weston                  \
1234         devices.weston                          \
1235         touch.weston
1236
1237 AM_TESTS_ENVIRONMENT = \
1238         abs_builddir='$(abs_builddir)'; export abs_builddir; \
1239         abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
1240
1241 TEST_EXTENSIONS = .la .weston
1242 LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1243 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1244
1245 clean-local:
1246         -rm -rf logs
1247         -rm -rf $(DOCDIRS)
1248
1249 # To remove when automake 1.11 support is dropped
1250 export abs_builddir
1251
1252 noinst_LTLIBRARIES +=                   \
1253         weston-test.la                  \
1254         weston-test-desktop-shell.la    \
1255         $(module_tests)                 \
1256         libtest-runner.la               \
1257         libtest-client.la
1258
1259 noinst_PROGRAMS +=                      \
1260         $(setbacklight)                 \
1261         $(internal_tests)               \
1262         $(shared_tests)                 \
1263         $(weston_tests)                 \
1264         $(ivi_tests)                    \
1265         matrix-test
1266
1267 test_module_ldflags = -module -avoid-version -rpath $(libdir)
1268 test_module_libadd =                    \
1269         libweston-@LIBWESTON_MAJOR@.la  \
1270         $(COMPOSITOR_LIBS)
1271
1272 plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
1273 plugin_registry_test_la_LIBADD = $(test_module_libadd)
1274 plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1275 plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1276
1277 surface_global_test_la_SOURCES = tests/surface-global-test.c
1278 surface_global_test_la_LIBADD = $(test_module_libadd)
1279 surface_global_test_la_LDFLAGS = $(test_module_ldflags)
1280 surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1281
1282 surface_test_la_SOURCES = tests/surface-test.c
1283 surface_test_la_LIBADD = $(test_module_libadd)
1284 surface_test_la_LDFLAGS = $(test_module_ldflags)
1285 surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1286
1287 weston_test_la_LIBADD = libshared.la $(test_module_libadd)
1288 weston_test_la_LDFLAGS = $(test_module_ldflags)
1289 weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1290 weston_test_la_SOURCES =                        \
1291         tests/weston-test.c                     \
1292         shared/helpers.h
1293 nodist_weston_test_la_SOURCES =                 \
1294         protocol/weston-test-protocol.c \
1295         protocol/weston-test-server-protocol.h
1296
1297 weston_test_desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
1298 weston_test_desktop_shell_la_LDFLAGS = $(test_module_ldflags)
1299 weston_test_desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1300 weston_test_desktop_shell_la_SOURCES =                  \
1301         tests/weston-test-desktop-shell.c               \
1302         shared/helpers.h
1303
1304 if ENABLE_EGL
1305 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1306 weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1307 endif
1308
1309 libtest_runner_la_SOURCES =                     \
1310         tests/weston-test-runner.c              \
1311         tests/weston-test-runner.h
1312 libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1313
1314 config_parser_test_SOURCES = tests/config-parser-test.c
1315 config_parser_test_LDADD =      \
1316         libshared.la            \
1317         $(COMPOSITOR_LIBS)      \
1318         libzunitc.la            \
1319         libzunitcmain.la
1320 config_parser_test_CFLAGS =                     \
1321         $(AM_CFLAGS)                            \
1322         -I$(top_srcdir)/tools/zunitc/inc
1323
1324 timespec_test_SOURCES = tests/timespec-test.c
1325 timespec_test_LDADD =   \
1326         libshared.la            \
1327         libzunitc.la            \
1328         libzunitcmain.la
1329 timespec_test_CFLAGS =                  \
1330         $(AM_CFLAGS)                            \
1331         -I$(top_srcdir)/tools/zunitc/inc
1332
1333 string_test_SOURCES = \
1334         tests/string-test.c \
1335         shared/string-helpers.h
1336 string_test_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1337 string_test_LDADD =     libtest-client.la
1338
1339 vertex_clip_test_SOURCES =                      \
1340         tests/vertex-clip-test.c                \
1341         shared/helpers.h                        \
1342         libweston/vertex-clipping.c             \
1343         libweston/vertex-clipping.h
1344 vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
1345
1346 libtest_client_la_SOURCES =                     \
1347         tests/weston-test-client-helper.c       \
1348         tests/weston-test-client-helper.h       \
1349         tests/input-timestamps-helper.c         \
1350         tests/input-timestamps-helper.h
1351 nodist_libtest_client_la_SOURCES =                              \
1352         protocol/weston-test-protocol.c                         \
1353         protocol/weston-test-client-protocol.h                  \
1354         protocol/input-timestamps-unstable-v1-protocol.c        \
1355         protocol/input-timestamps-unstable-v1-client-protocol.h
1356 libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1357 libtest_client_la_LIBADD = libshared.la libtest-runner.la $(TEST_CLIENT_LIBS) $(CAIRO_LIBS)
1358
1359
1360 #
1361 # Internal tests - tests functionality of the testsuite itself
1362 #
1363
1364 internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1365 internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1366 internal_screenshot_weston_LDADD = libtest-client.la
1367
1368
1369 #
1370 # Weston Tests
1371 #
1372
1373 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
1374 bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1375 bad_buffer_weston_LDADD = libtest-client.la
1376
1377 keyboard_weston_SOURCES = tests/keyboard-test.c
1378 keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1379 keyboard_weston_LDADD = libtest-client.la
1380
1381 event_weston_SOURCES = tests/event-test.c
1382 event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1383 event_weston_LDADD = libtest-client.la
1384
1385 pointer_weston_SOURCES = tests/pointer-test.c
1386 pointer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1387 pointer_weston_LDADD = libtest-client.la
1388
1389 devices_weston_SOURCES = tests/devices-test.c
1390 devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1391 devices_weston_LDADD = libtest-client.la
1392
1393 text_weston_SOURCES = tests/text-test.c
1394 nodist_text_weston_SOURCES =                    \
1395         protocol/text-input-unstable-v1-protocol.c              \
1396         protocol/text-input-unstable-v1-client-protocol.h
1397 text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1398 text_weston_LDADD = libtest-client.la
1399
1400 subsurface_weston_SOURCES = tests/subsurface-test.c
1401 subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1402 subsurface_weston_LDADD = libtest-client.la
1403
1404 subsurface_shot_weston_SOURCES = tests/subsurface-shot-test.c
1405 subsurface_shot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1406 subsurface_shot_weston_LDADD = libtest-client.la
1407
1408 presentation_weston_SOURCES =                   \
1409         tests/presentation-test.c               \
1410         shared/helpers.h
1411 nodist_presentation_weston_SOURCES =            \
1412         protocol/presentation-time-protocol.c   \
1413         protocol/presentation-time-client-protocol.h
1414 presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1415 presentation_weston_LDADD = libtest-client.la
1416
1417 roles_weston_SOURCES = tests/roles-test.c
1418 roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1419 roles_weston_LDADD = libtest-client.la
1420
1421 viewporter_weston_SOURCES =                     \
1422         tests/viewporter-test.c         \
1423         shared/helpers.h
1424 nodist_viewporter_weston_SOURCES =              \
1425         protocol/viewporter-protocol.c  \
1426         protocol/viewporter-client-protocol.h
1427 viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1428 viewporter_weston_LDADD = libtest-client.la
1429
1430 touch_weston_SOURCES = tests/touch-test.c
1431 touch_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1432 touch_weston_LDADD = libtest-client.la
1433
1434 if ENABLE_XWAYLAND_TEST
1435 weston_tests += xwayland-test.weston
1436 xwayland_test_weston_SOURCES = tests/xwayland-test.c
1437 xwayland_test_weston_CFLAGS = \
1438         $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS) -DXSERVER_PATH='"@XSERVER_PATH@"'
1439 xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
1440 endif
1441
1442 matrix_test_SOURCES =                           \
1443         tests/matrix-test.c                     \
1444         shared/matrix.c                         \
1445         shared/matrix.h
1446 matrix_test_CPPFLAGS = -DUNIT_TEST
1447 matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
1448
1449 if ENABLE_IVI_SHELL
1450 module_tests +=                                 \
1451         ivi-layout-internal-test.la             \
1452         ivi-layout-test.la
1453
1454 ivi_layout_internal_test_la_LIBADD = $(test_module_libadd)
1455 ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
1456 ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1457 ivi_layout_internal_test_la_SOURCES =                   \
1458         tests/ivi_layout-internal-test.c
1459
1460 ivi_layout_test_la_LIBADD = $(test_module_libadd)
1461 ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
1462 ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1463 ivi_layout_test_la_SOURCES =                    \
1464         tests/ivi_layout-test-plugin.c          \
1465         tests/ivi-test.h                        \
1466         shared/helpers.h
1467 nodist_ivi_layout_test_la_SOURCES =             \
1468         protocol/weston-test-protocol.c         \
1469         protocol/weston-test-server-protocol.h
1470
1471 ivi_tests =                                     \
1472         ivi-shell-app.weston
1473
1474 ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1475 nodist_ivi_shell_app_weston_SOURCES =           \
1476         protocol/ivi-application-protocol.c     \
1477         protocol/ivi-application-client-protocol.h
1478 ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1479 ivi_shell_app_weston_LDADD = libtest-client.la
1480
1481 noinst_PROGRAMS += ivi-layout.ivi
1482
1483 ivi_layout_ivi_SOURCES =                        \
1484         tests/ivi_layout-test.c                 \
1485         tests/ivi-test.h                        \
1486         shared/helpers.h
1487 nodist_ivi_layout_ivi_SOURCES =                 \
1488         protocol/ivi-application-protocol.c     \
1489         protocol/ivi-application-client-protocol.h
1490 ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1491 ivi_layout_ivi_LDADD = libtest-client.la
1492 endif
1493
1494 if BUILD_SETBACKLIGHT
1495 noinst_PROGRAMS += setbacklight
1496 setbacklight_SOURCES =                          \
1497         tests/setbacklight.c                    \
1498         libweston/libbacklight.c                \
1499         libweston/libbacklight.h
1500 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1501 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1502 endif
1503
1504 all-local: zuctest$(EXEEXT)
1505
1506 noinst_PROGRAMS += zuctest$(EXEEXT)
1507
1508 zuctest_LDADD =                 \
1509         libzunitc.la            \
1510         libzunitcmain.la
1511
1512 zuctest_CFLAGS =                                \
1513         $(AM_CFLAGS)                            \
1514         -I$(top_srcdir)/tools/zunitc/inc
1515
1516 zuctest_SOURCES =                               \
1517         tools/zunitc/test/fixtures_test.c       \
1518         tools/zunitc/test/zunitc_test.c
1519
1520 EXTRA_DIST +=                                                   \
1521         tests/internal-screenshot.ini                           \
1522         tests/reference/internal-screenshot-bad-00.png          \
1523         tests/reference/internal-screenshot-good-00.png         \
1524         tests/reference/subsurface_z_order-00.png               \
1525         tests/reference/subsurface_z_order-01.png               \
1526         tests/reference/subsurface_z_order-02.png               \
1527         tests/reference/subsurface_z_order-03.png               \
1528         tests/reference/subsurface_z_order-04.png               \
1529         tests/weston-tests-env
1530
1531 BUILT_SOURCES +=                                \
1532         protocol/weston-test-protocol.c \
1533         protocol/weston-test-server-protocol.h  \
1534         protocol/weston-test-client-protocol.h  \
1535         protocol/text-input-unstable-v1-protocol.c              \
1536         protocol/text-input-unstable-v1-client-protocol.h
1537
1538 EXTRA_DIST +=                                   \
1539         protocol/weston-desktop-shell.xml       \
1540         protocol/weston-screenshooter.xml       \
1541         protocol/text-cursor-position.xml       \
1542         protocol/weston-test.xml                \
1543         protocol/ivi-application.xml            \
1544         protocol/ivi-hmi-controller.xml
1545
1546 #
1547 # manual test modules in tests subdirectory
1548 #
1549
1550 noinst_LTLIBRARIES +=                           \
1551         surface-screenshot.la
1552
1553 surface_screenshot_la_LIBADD = libshared.la $(test_module_libadd)
1554 surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
1555 surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1556 surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1557
1558
1559 #
1560 # Documentation
1561 #
1562
1563 man_MANS = weston.1 weston.ini.5
1564
1565 if ENABLE_DRM_COMPOSITOR
1566 man_MANS += weston-drm.7
1567 endif
1568
1569 if ENABLE_RDP_COMPOSITOR
1570 man_MANS += weston-rdp.7
1571 endif
1572
1573 MAN_SUBSTS =                                                            \
1574         -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g'     \
1575         -e 's|__weston_modules_dir__|$(pkglibdir)|g'                    \
1576         -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g'         \
1577         -e 's|__version__|$(PACKAGE_VERSION)|g'
1578
1579 SUFFIXES = .1 .5 .7 .man
1580
1581 %.1 %.5 %.7 : man/%.man
1582         $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1583
1584 EXTRA_DIST +=                                   \
1585         man/weston.man                          \
1586         man/weston-drm.man                      \
1587         man/weston-rdp.man                      \
1588         man/weston.ini.man
1589
1590 CLEANFILES += $(man_MANS)
1591
1592 if ENABLE_DEVDOCS
1593 DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1594
1595 docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1596         cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1597
1598 docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1599         cd doc/doxygen && $(DOXYGEN) tools.doxygen
1600 endif
1601
1602 DOCDIRS =               \
1603         docs/developer  \
1604         docs/tools
1605
1606 $(DOCDIRS):
1607         $(MKDIR_P) $@
1608
1609 .PHONY: doc $(DOXYGEN_INDICES)
1610
1611 doc: $(DOXYGEN_INDICES)
1612
1613 .SECONDEXPANSION:
1614
1615 define protostability
1616 $(if $(findstring unstable,$1),unstable,stable)
1617 endef
1618
1619 define protoname
1620 $(shell echo $1 | $(SED) 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1621 endef
1622
1623 protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
1624         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1625
1626 protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
1627         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1628
1629 protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
1630         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1631
1632 protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1633         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1634
1635 protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1636         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1637
1638 protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1639         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@