input: move touchpoint counting up
[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_ETNAVIV_LIBS)   \
633         $(LIBDRM_PLATFORM_INTEL_LIBS)     \
634         libshared.la
635 endif
636
637 if BUILD_SIMPLE_DMABUF_V4L_CLIENT
638 demo_clients += weston-simple-dmabuf-v4l
639 weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
640 nodist_weston_simple_dmabuf_v4l_SOURCES =               \
641         protocol/xdg-shell-unstable-v6-protocol.c               \
642         protocol/xdg-shell-unstable-v6-client-protocol.h        \
643         protocol/fullscreen-shell-unstable-v1-protocol.c        \
644         protocol/fullscreen-shell-unstable-v1-client-protocol.h \
645         protocol/linux-dmabuf-unstable-v1-protocol.c \
646         protocol/linux-dmabuf-unstable-v1-client-protocol.h
647 weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
648 weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
649 endif
650
651 noinst_LTLIBRARIES += libtoytoolkit.la
652
653 libtoytoolkit_la_SOURCES =                              \
654         clients/window.c                                \
655         clients/window.h                                \
656         shared/helpers.h
657
658 nodist_libtoytoolkit_la_SOURCES =                       \
659         protocol/text-cursor-position-protocol.c        \
660         protocol/text-cursor-position-client-protocol.h \
661         protocol/viewporter-protocol.c                  \
662         protocol/viewporter-client-protocol.h           \
663         protocol/xdg-shell-unstable-v6-protocol.c                       \
664         protocol/xdg-shell-unstable-v6-client-protocol.h                \
665         protocol/ivi-application-protocol.c             \
666         protocol/ivi-application-client-protocol.h      \
667         protocol/pointer-constraints-unstable-v1-protocol.c             \
668         protocol/pointer-constraints-unstable-v1-client-protocol.h      \
669         protocol/relative-pointer-unstable-v1-protocol.c                \
670         protocol/relative-pointer-unstable-v1-client-protocol.h
671
672 BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
673
674
675 libtoytoolkit_la_LIBADD =                       \
676         $(CLIENT_LIBS)                          \
677         $(CAIRO_EGL_LIBS)                       \
678         libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
679 libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
680
681 weston_flower_SOURCES = clients/flower.c
682 weston_flower_LDADD = libtoytoolkit.la
683 weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
684
685 weston_screenshooter_SOURCES =                          \
686         clients/screenshot.c
687 nodist_weston_screenshooter_SOURCES =                   \
688         protocol/weston-screenshooter-protocol.c        \
689         protocol/weston-screenshooter-client-protocol.h
690 weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
691 weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
692
693 weston_terminal_SOURCES =                               \
694         clients/terminal.c                              \
695         shared/helpers.h
696 weston_terminal_LDADD = libtoytoolkit.la -lutil
697 weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
698
699 weston_image_SOURCES = clients/image.c
700 weston_image_LDADD = libtoytoolkit.la
701 weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
702
703 weston_cliptest_SOURCES =                               \
704         clients/cliptest.c                              \
705         libweston/vertex-clipping.c                     \
706         libweston/vertex-clipping.h
707 weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
708 weston_cliptest_LDADD = libtoytoolkit.la
709
710 weston_dnd_SOURCES =                                    \
711         clients/dnd.c                                   \
712         shared/helpers.h
713 weston_dnd_LDADD = libtoytoolkit.la
714 weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
715
716 weston_smoke_SOURCES = clients/smoke.c
717 weston_smoke_LDADD = libtoytoolkit.la
718 weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
719
720 weston_resizor_SOURCES = clients/resizor.c
721 weston_resizor_LDADD = libtoytoolkit.la
722 weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
723
724 weston_scaler_SOURCES = clients/scaler.c
725 weston_scaler_LDADD = libtoytoolkit.la
726 weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
727
728 if HAVE_CAIRO_GLESV2
729 demo_clients += weston-nested weston-nested-client
730
731 weston_nested_SOURCES =                                 \
732         clients/nested.c                                \
733         shared/helpers.h
734 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
735 weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
736
737 weston_nested_client_SOURCES = clients/nested-client.c
738 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
739 weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
740 endif
741
742 weston_eventdemo_SOURCES =                              \
743         clients/eventdemo.c                             \
744         shared/helpers.h
745 weston_eventdemo_LDADD = libtoytoolkit.la
746 weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
747
748 weston_clickdot_SOURCES =                               \
749         clients/clickdot.c                              \
750         shared/helpers.h
751 weston_clickdot_LDADD = libtoytoolkit.la
752 weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
753
754 weston_confine_SOURCES =                                \
755         clients/confine.c                               \
756         shared/helpers.h
757 weston_confine_LDADD = libtoytoolkit.la
758 weston_confine_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
759
760 weston_transformed_SOURCES = clients/transformed.c
761 weston_transformed_LDADD = libtoytoolkit.la
762 weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
763
764 weston_fullscreen_SOURCES = clients/fullscreen.c
765 nodist_weston_fullscreen_SOURCES =                      \
766         protocol/fullscreen-shell-unstable-v1-protocol.c                \
767         protocol/fullscreen-shell-unstable-v1-client-protocol.h
768 weston_fullscreen_LDADD = libtoytoolkit.la
769 weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
770
771 weston_stacking_SOURCES =                               \
772         clients/stacking.c                              \
773         shared/helpers.h
774 weston_stacking_LDADD = libtoytoolkit.la
775 weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
776
777 weston_calibrator_SOURCES =                             \
778         clients/calibrator.c                            \
779         shared/helpers.h                                \
780         shared/matrix.c                                 \
781         shared/matrix.h
782 weston_calibrator_LDADD = libtoytoolkit.la
783 weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
784
785 if BUILD_SUBSURFACES_CLIENT
786 demo_clients += weston-subsurfaces
787 weston_subsurfaces_SOURCES =                    \
788         clients/subsurfaces.c                   \
789         shared/helpers.h
790 weston_subsurfaces_CFLAGS =                     \
791         $(AM_CFLAGS)                            \
792         $(SIMPLE_EGL_CLIENT_CFLAGS)             \
793         $(CLIENT_CFLAGS)
794 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
795 endif
796
797 if HAVE_PANGO
798 demo_clients += weston-editor
799 weston_editor_SOURCES =                         \
800         clients/editor.c                        \
801         shared/helpers.h
802 nodist_weston_editor_SOURCES =                  \
803         protocol/text-input-unstable-v1-protocol.c              \
804         protocol/text-input-unstable-v1-client-protocol.h
805 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
806 weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
807 endif
808
809 weston_keyboard_SOURCES = clients/keyboard.c
810 nodist_weston_keyboard_SOURCES =                                \
811         protocol/weston-desktop-shell-client-protocol.h         \
812         protocol/weston-desktop-shell-protocol.c                \
813         protocol/input-method-unstable-v1-protocol.c            \
814         protocol/input-method-unstable-v1-client-protocol.h
815 weston_keyboard_LDADD = libtoytoolkit.la
816 weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
817
818 weston_simple_im_SOURCES = clients/simple-im.c
819 nodist_weston_simple_im_SOURCES =               \
820         protocol/input-method-unstable-v1-protocol.c            \
821         protocol/input-method-unstable-v1-client-protocol.h
822 weston_simple_im_LDADD = $(CLIENT_LIBS)
823 weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
824
825 weston_info_SOURCES =                                   \
826         clients/weston-info.c                           \
827         shared/helpers.h
828 nodist_weston_info_SOURCES =                                    \
829         protocol/presentation-time-protocol.c                   \
830         protocol/presentation-time-client-protocol.h            \
831         protocol/linux-dmabuf-unstable-v1-protocol.c            \
832         protocol/linux-dmabuf-unstable-v1-client-protocol.h     \
833         protocol/tablet-unstable-v2-protocol.c                  \
834         protocol/tablet-unstable-v2-client-protocol.h
835 weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
836 weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
837
838 weston_desktop_shell_SOURCES =                          \
839         clients/desktop-shell.c                         \
840         shared/helpers.h
841 nodist_weston_desktop_shell_SOURCES =                   \
842         protocol/weston-desktop-shell-client-protocol.h \
843         protocol/weston-desktop-shell-protocol.c
844 weston_desktop_shell_LDADD = libtoytoolkit.la
845 weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
846
847 if ENABLE_IVI_SHELL
848 weston_ivi_shell_user_interface_SOURCES =                               \
849         clients/ivi-shell-user-interface.c                              \
850         shared/helpers.h
851 nodist_weston_ivi_shell_user_interface_SOURCES =                        \
852         protocol/ivi-hmi-controller-client-protocol.h                   \
853         protocol/ivi-hmi-controller-protocol.c                          \
854         protocol/ivi-application-client-protocol.h                      \
855         protocol/ivi-application-protocol.c
856 weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
857 weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
858 endif
859
860 if BUILD_FULL_GL_CLIENTS
861 demo_clients += weston-gears
862 weston_gears_SOURCES = clients/gears.c
863 weston_gears_LDADD = libtoytoolkit.la
864 weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
865 endif
866
867 endif
868
869 BUILT_SOURCES +=                                        \
870         protocol/weston-screenshooter-protocol.c                        \
871         protocol/weston-screenshooter-client-protocol.h                 \
872         protocol/text-cursor-position-client-protocol.h \
873         protocol/text-cursor-position-protocol.c        \
874         protocol/text-input-unstable-v1-protocol.c                      \
875         protocol/text-input-unstable-v1-client-protocol.h               \
876         protocol/input-method-unstable-v1-protocol.c                    \
877         protocol/input-method-unstable-v1-client-protocol.h             \
878         protocol/weston-desktop-shell-client-protocol.h                 \
879         protocol/weston-desktop-shell-protocol.c                        \
880         protocol/viewporter-client-protocol.h           \
881         protocol/viewporter-protocol.c                  \
882         protocol/presentation-time-protocol.c                           \
883         protocol/presentation-time-client-protocol.h                    \
884         protocol/fullscreen-shell-unstable-v1-protocol.c                \
885         protocol/fullscreen-shell-unstable-v1-client-protocol.h \
886         protocol/xdg-shell-unstable-v6-protocol.c                       \
887         protocol/xdg-shell-unstable-v6-client-protocol.h                \
888         protocol/ivi-hmi-controller-protocol.c          \
889         protocol/ivi-hmi-controller-client-protocol.h   \
890         protocol/ivi-application-protocol.c             \
891         protocol/ivi-application-client-protocol.h      \
892         protocol/linux-dmabuf-unstable-v1-protocol.c    \
893         protocol/linux-dmabuf-unstable-v1-client-protocol.h             \
894         protocol/tablet-unstable-v2-protocol.c          \
895         protocol/tablet-unstable-v2-client-protocol.h                   \
896         protocol/input-timestamps-unstable-v1-protocol.c                \
897         protocol/input-timestamps-unstable-v1-client-protocol.h
898
899 westondatadir = $(datadir)/weston
900 dist_westondata_DATA =                          \
901         data/wayland.svg                        \
902         data/wayland.png                        \
903         data/pattern.png                        \
904         data/terminal.png                       \
905         data/border.png                         \
906         data/icon_editor.png                    \
907         data/icon_flower.png                    \
908         data/icon_terminal.png                  \
909         data/icon_window.png                    \
910         data/sign_close.png                     \
911         data/sign_maximize.png                  \
912         data/sign_minimize.png
913
914 if ENABLE_IVI_SHELL
915 dist_westondata_DATA +=                         \
916         data/background.png                     \
917         data/tiling.png                         \
918         data/fullscreen.png                     \
919         data/panel.png                          \
920         data/random.png                         \
921         data/sidebyside.png                     \
922         data/home.png                           \
923         data/icon_ivi_clickdot.png              \
924         data/icon_ivi_flower.png                \
925         data/icon_ivi_simple-egl.png            \
926         data/icon_ivi_simple-shm.png            \
927         data/icon_ivi_smoke.png
928 endif
929
930
931 if BUILD_WCAP_TOOLS
932 bin_PROGRAMS += wcap-decode
933
934 wcap_decode_SOURCES =                           \
935         wcap/main.c                             \
936         wcap/wcap-decode.c                      \
937         wcap/wcap-decode.h
938
939 wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
940 wcap_decode_LDADD = $(WCAP_LIBS)
941 endif
942
943
944 if ENABLE_DESKTOP_SHELL
945
946 module_LTLIBRARIES += desktop-shell.la
947
948 desktop_shell_la_CPPFLAGS =                     \
949         -I$(top_builddir)/protocol              \
950         -I$(top_srcdir)/shared                  \
951         -I$(top_builddir)/libweston             \
952         -I$(top_srcdir)/libweston               \
953         -I$(top_builddir)/desktop-shell         \
954         -DMODULEDIR='"$(moduledir)"'            \
955         -DLIBEXECDIR='"$(libexecdir)"'          \
956         -DIN_WESTON
957
958 desktop_shell_la_LDFLAGS = -module -avoid-version
959 desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
960 desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
961 desktop_shell_la_SOURCES =                              \
962         desktop-shell/shell.h                           \
963         desktop-shell/shell.c                           \
964         desktop-shell/exposay.c                         \
965         desktop-shell/input-panel.c                     \
966         shared/helpers.h
967 nodist_desktop_shell_la_SOURCES =                       \
968         protocol/weston-desktop-shell-protocol.c        \
969         protocol/weston-desktop-shell-server-protocol.h
970
971 BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
972 endif
973
974 if ENABLE_FULLSCREEN_SHELL
975
976 module_LTLIBRARIES += fullscreen-shell.la
977
978 fullscreen_shell_la_CPPFLAGS =                  \
979         -I$(top_builddir)/protocol              \
980         -I$(top_srcdir)/shared                  \
981         -I$(top_builddir)/libweston             \
982         -I$(top_srcdir)/libweston               \
983         -DIN_WESTON
984
985 fullscreen_shell_la_LDFLAGS = -module -avoid-version
986 fullscreen_shell_la_LIBADD =                    \
987         libweston-@LIBWESTON_MAJOR@.la          \
988         $(COMPOSITOR_LIBS)
989 fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
990 fullscreen_shell_la_SOURCES =                   \
991         fullscreen-shell/fullscreen-shell.c     \
992         shared/helpers.h
993 nodist_fullscreen_shell_la_SOURCES =                    \
994         protocol/fullscreen-shell-unstable-v1-protocol.c                \
995         protocol/fullscreen-shell-unstable-v1-server-protocol.h
996
997 BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
998 endif
999
1000 if ENABLE_IVI_SHELL
1001
1002 module_LTLIBRARIES +=                           \
1003         $(ivi_shell)                            \
1004         $(hmi_controller)
1005
1006 ivi_shell = ivi-shell.la
1007 ivi_shell_la_LDFLAGS = -module -avoid-version
1008 ivi_shell_la_LIBADD =                           \
1009         libshared.la                            \
1010         libweston-@LIBWESTON_MAJOR@.la          \
1011         $(COMPOSITOR_LIBS)
1012 ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1013 ivi_shell_la_SOURCES =                          \
1014         ivi-shell/ivi-layout-export.h           \
1015         ivi-shell/ivi-layout-private.h          \
1016         ivi-shell/ivi-layout-shell.h            \
1017         ivi-shell/ivi-layout.c                  \
1018         ivi-shell/ivi-layout-transition.c       \
1019         ivi-shell/ivi-shell.h                   \
1020         ivi-shell/ivi-shell.c                   \
1021         ivi-shell/input-panel-ivi.c             \
1022         shared/helpers.h
1023 nodist_ivi_shell_la_SOURCES =                   \
1024         protocol/ivi-application-protocol.c             \
1025         protocol/ivi-application-server-protocol.h
1026
1027 BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
1028
1029 hmi_controller = hmi-controller.la
1030 hmi_controller_la_LDFLAGS = -module -avoid-version
1031 hmi_controller_la_LIBADD =                      \
1032         libshared.la                            \
1033         libweston-@LIBWESTON_MAJOR@.la          \
1034         $(COMPOSITOR_LIBS)
1035 hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1036 hmi_controller_la_SOURCES =                             \
1037         ivi-shell/ivi-layout-export.h                   \
1038         ivi-shell/hmi-controller.c                      \
1039         shared/helpers.h
1040 nodist_hmi_controller_la_SOURCES =                      \
1041         protocol/ivi-hmi-controller-protocol.c          \
1042         protocol/ivi-hmi-controller-server-protocol.h
1043
1044 BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
1045
1046 endif
1047
1048
1049 if ENABLE_SCREEN_SHARING
1050
1051 module_LTLIBRARIES += screen-share.la
1052
1053 screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
1054 screen_share_la_LDFLAGS = -module -avoid-version
1055 screen_share_la_LIBADD =                        \
1056         libshared-cairo.la                      \
1057         libweston-@LIBWESTON_MAJOR@.la          \
1058         $(COMPOSITOR_LIBS)                      \
1059         $(SCREEN_SHARE_LIBS)
1060 screen_share_la_CFLAGS =                        \
1061         $(COMPOSITOR_CFLAGS)                    \
1062         $(SCREEN_SHARE_CFLAGS)                  \
1063         $(AM_CFLAGS)
1064 screen_share_la_SOURCES =                       \
1065         compositor/screen-share.c               \
1066         shared/helpers.h
1067 nodist_screen_share_la_SOURCES =                        \
1068         protocol/fullscreen-shell-unstable-v1-protocol.c                \
1069         protocol/fullscreen-shell-unstable-v1-client-protocol.h
1070
1071 endif
1072
1073 if ENABLE_XWAYLAND
1074
1075 libweston_module_LTLIBRARIES += xwayland.la
1076
1077 xwayland_la_CPPFLAGS =                          \
1078         -I$(top_builddir)/protocol              \
1079         -I$(top_srcdir)/shared                  \
1080         -I$(top_builddir)/libweston             \
1081         -I$(top_srcdir)/libweston               \
1082         -I$(top_builddir)/xwayland              \
1083         -DMODULEDIR='"$(moduledir)"'            \
1084         -DLIBEXECDIR='"$(libexecdir)"'
1085
1086 xwayland_la_LDFLAGS = -module -avoid-version
1087 xwayland_la_LIBADD =                            \
1088         libshared-cairo.la                      \
1089         libweston-@LIBWESTON_MAJOR@.la          \
1090         $(XWAYLAND_LIBS)
1091 xwayland_la_CFLAGS =                            \
1092         $(AM_CFLAGS)                            \
1093         $(COMPOSITOR_CFLAGS)                    \
1094         $(PIXMAN_CFLAGS)                        \
1095         $(CAIRO_CFLAGS)
1096 xwayland_la_SOURCES =                           \
1097         xwayland/xwayland.h                     \
1098         xwayland/xwayland-internal-interface.h  \
1099         xwayland/window-manager.c               \
1100         xwayland/selection.c                    \
1101         xwayland/dnd.c                          \
1102         xwayland/launcher.c                     \
1103         xwayland/hash.c                         \
1104         xwayland/hash.h                         \
1105         shared/helpers.h
1106
1107 libwestoninclude_HEADERS += xwayland/xwayland-api.h
1108
1109 endif
1110
1111
1112 #
1113 # Shared utilities
1114 #
1115
1116 noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1117         libzunitc.la libzunitcmain.la
1118
1119 libshared_la_CPPFLAGS = \
1120         -DDATADIR='"$(datadir)"' \
1121         $(AM_CPPFLAGS)
1122
1123 libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1124
1125 libshared_la_SOURCES =                          \
1126         shared/config-parser.c                  \
1127         shared/option-parser.c                  \
1128         shared/config-parser.h                  \
1129         shared/file-util.c                      \
1130         shared/file-util.h                      \
1131         shared/helpers.h                        \
1132         shared/os-compatibility.c               \
1133         shared/os-compatibility.h               \
1134         shared/xalloc.c                 \
1135         shared/xalloc.h
1136
1137 libshared_cairo_la_CPPFLAGS = $(libshared_la_CPPFLAGS)
1138
1139 libshared_cairo_la_CFLAGS =                     \
1140         $(AM_CFLAGS)                            \
1141         $(COMPOSITOR_CFLAGS)                    \
1142         $(PIXMAN_CFLAGS)                        \
1143         $(CAIRO_CFLAGS)                         \
1144         $(PANGO_CFLAGS)                         \
1145         $(PNG_CFLAGS)                           \
1146         $(WEBP_CFLAGS)
1147
1148 libshared_cairo_la_LIBADD =                     \
1149         $(PIXMAN_LIBS)                          \
1150         $(CAIRO_LIBS)                           \
1151         $(PANGO_LIBS)                           \
1152         $(PNG_LIBS)                             \
1153         $(WEBP_LIBS)                            \
1154         $(JPEG_LIBS)
1155
1156 libshared_cairo_la_SOURCES =                    \
1157         $(libshared_la_SOURCES)                 \
1158         shared/helpers.h                        \
1159         shared/image-loader.c                   \
1160         shared/image-loader.h                   \
1161         shared/cairo-util.c                     \
1162         shared/frame.c                          \
1163         shared/cairo-util.h
1164
1165 libzunitc_la_SOURCES = \
1166         tools/zunitc/inc/zunitc/zunitc.h        \
1167         tools/zunitc/inc/zunitc/zunitc_impl.h   \
1168         tools/zunitc/src/zuc_base_logger.c      \
1169         tools/zunitc/src/zuc_base_logger.h      \
1170         tools/zunitc/src/zuc_collector.c        \
1171         tools/zunitc/src/zuc_collector.h        \
1172         tools/zunitc/src/zuc_context.h          \
1173         tools/zunitc/src/zuc_event.h            \
1174         tools/zunitc/src/zuc_event_listener.h   \
1175         tools/zunitc/src/zuc_junit_reporter.c   \
1176         tools/zunitc/src/zuc_junit_reporter.h   \
1177         tools/zunitc/src/zuc_types.h            \
1178         tools/zunitc/src/zunitc_impl.c          \
1179         shared/helpers.h
1180
1181 libzunitc_la_CFLAGS = \
1182         $(AM_CFLAGS)                            \
1183         -I$(top_srcdir)/tools/zunitc/inc
1184
1185 libzunitc_la_LIBADD = \
1186         libshared.la \
1187         $(CLOCK_GETTIME_LIBS)
1188
1189 if ENABLE_JUNIT_XML
1190 libzunitc_la_CFLAGS += \
1191         $(LIBXML2_CFLAGS)
1192 libzunitc_la_LIBADD += \
1193         $(LIBXML2_LIBS)
1194 endif
1195
1196 libzunitcmain_la_SOURCES = \
1197         tools/zunitc/src/main.c
1198
1199 libzunitcmain_la_CFLAGS = \
1200         $(AM_CFLAGS)                            \
1201         -I$(top_srcdir)/tools/zunitc/inc
1202
1203 libzunitcmain_la_LIBADD =       \
1204         libzunitc.la            \
1205         libshared.la
1206
1207 #
1208 # tests subdirectory
1209 #
1210
1211 TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1212
1213 internal_tests =                                \
1214         internal-screenshot.weston
1215
1216 shared_tests =                                  \
1217         config-parser.test                      \
1218         timespec.test                           \
1219         string.test                                     \
1220         vertex-clip.test                        \
1221         zuctest
1222
1223 module_tests =                                  \
1224         plugin-registry-test.la                 \
1225         surface-test.la                         \
1226         surface-global-test.la
1227
1228 weston_tests =                                  \
1229         bad_buffer.weston                       \
1230         keyboard.weston                         \
1231         event.weston                            \
1232         pointer.weston                          \
1233         text.weston                             \
1234         presentation.weston                     \
1235         viewporter.weston                       \
1236         roles.weston                            \
1237         subsurface.weston                       \
1238         subsurface-shot.weston                  \
1239         devices.weston                          \
1240         touch.weston
1241
1242 AM_TESTS_ENVIRONMENT = \
1243         abs_builddir='$(abs_builddir)'; export abs_builddir; \
1244         abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
1245
1246 TEST_EXTENSIONS = .la .weston
1247 LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1248 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1249
1250 clean-local:
1251         -rm -rf logs
1252         -rm -rf $(DOCDIRS)
1253
1254 # To remove when automake 1.11 support is dropped
1255 export abs_builddir
1256
1257 noinst_LTLIBRARIES +=                   \
1258         weston-test.la                  \
1259         weston-test-desktop-shell.la    \
1260         $(module_tests)                 \
1261         libtest-runner.la               \
1262         libtest-client.la
1263
1264 noinst_PROGRAMS +=                      \
1265         $(setbacklight)                 \
1266         $(internal_tests)               \
1267         $(shared_tests)                 \
1268         $(weston_tests)                 \
1269         $(ivi_tests)                    \
1270         matrix-test
1271
1272 test_module_ldflags = -module -avoid-version -rpath $(libdir)
1273 test_module_libadd =                    \
1274         libweston-@LIBWESTON_MAJOR@.la  \
1275         $(COMPOSITOR_LIBS)
1276
1277 plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
1278 plugin_registry_test_la_LIBADD = $(test_module_libadd)
1279 plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1280 plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1281
1282 surface_global_test_la_SOURCES = tests/surface-global-test.c
1283 surface_global_test_la_LIBADD = $(test_module_libadd)
1284 surface_global_test_la_LDFLAGS = $(test_module_ldflags)
1285 surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1286
1287 surface_test_la_SOURCES = tests/surface-test.c
1288 surface_test_la_LIBADD = $(test_module_libadd)
1289 surface_test_la_LDFLAGS = $(test_module_ldflags)
1290 surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1291
1292 weston_test_la_LIBADD = libshared.la $(test_module_libadd)
1293 weston_test_la_LDFLAGS = $(test_module_ldflags)
1294 weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1295 weston_test_la_SOURCES =                        \
1296         tests/weston-test.c                     \
1297         shared/helpers.h
1298 nodist_weston_test_la_SOURCES =                 \
1299         protocol/weston-test-protocol.c \
1300         protocol/weston-test-server-protocol.h
1301
1302 weston_test_desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
1303 weston_test_desktop_shell_la_LDFLAGS = $(test_module_ldflags)
1304 weston_test_desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1305 weston_test_desktop_shell_la_SOURCES =                  \
1306         tests/weston-test-desktop-shell.c               \
1307         shared/helpers.h
1308
1309 if ENABLE_EGL
1310 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1311 weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1312 endif
1313
1314 libtest_runner_la_SOURCES =                     \
1315         tests/weston-test-runner.c              \
1316         tests/weston-test-runner.h
1317 libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1318
1319 config_parser_test_SOURCES = tests/config-parser-test.c
1320 config_parser_test_LDADD =      \
1321         libshared.la            \
1322         $(COMPOSITOR_LIBS)      \
1323         libzunitc.la            \
1324         libzunitcmain.la
1325 config_parser_test_CFLAGS =                     \
1326         $(AM_CFLAGS)                            \
1327         -I$(top_srcdir)/tools/zunitc/inc
1328
1329 timespec_test_SOURCES = tests/timespec-test.c
1330 timespec_test_LDADD =   \
1331         libshared.la            \
1332         libzunitc.la            \
1333         libzunitcmain.la
1334 timespec_test_CFLAGS =                  \
1335         $(AM_CFLAGS)                            \
1336         -I$(top_srcdir)/tools/zunitc/inc
1337
1338 string_test_SOURCES = \
1339         tests/string-test.c \
1340         shared/string-helpers.h
1341 string_test_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1342 string_test_LDADD =     libtest-client.la
1343
1344 vertex_clip_test_SOURCES =                      \
1345         tests/vertex-clip-test.c                \
1346         shared/helpers.h                        \
1347         libweston/vertex-clipping.c             \
1348         libweston/vertex-clipping.h
1349 vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
1350
1351 libtest_client_la_SOURCES =                     \
1352         tests/weston-test-client-helper.c       \
1353         tests/weston-test-client-helper.h       \
1354         tests/input-timestamps-helper.c         \
1355         tests/input-timestamps-helper.h
1356 nodist_libtest_client_la_SOURCES =                              \
1357         protocol/weston-test-protocol.c                         \
1358         protocol/weston-test-client-protocol.h                  \
1359         protocol/input-timestamps-unstable-v1-protocol.c        \
1360         protocol/input-timestamps-unstable-v1-client-protocol.h
1361 libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1362 libtest_client_la_LIBADD = libshared.la libtest-runner.la $(TEST_CLIENT_LIBS) $(CAIRO_LIBS)
1363
1364
1365 #
1366 # Internal tests - tests functionality of the testsuite itself
1367 #
1368
1369 internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1370 internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1371 internal_screenshot_weston_LDADD = libtest-client.la
1372
1373
1374 #
1375 # Weston Tests
1376 #
1377
1378 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
1379 bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1380 bad_buffer_weston_LDADD = libtest-client.la
1381
1382 keyboard_weston_SOURCES = tests/keyboard-test.c
1383 keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1384 keyboard_weston_LDADD = libtest-client.la
1385
1386 event_weston_SOURCES = tests/event-test.c
1387 event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1388 event_weston_LDADD = libtest-client.la
1389
1390 pointer_weston_SOURCES = tests/pointer-test.c
1391 pointer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1392 pointer_weston_LDADD = libtest-client.la
1393
1394 devices_weston_SOURCES = tests/devices-test.c
1395 devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1396 devices_weston_LDADD = libtest-client.la
1397
1398 text_weston_SOURCES = tests/text-test.c
1399 nodist_text_weston_SOURCES =                    \
1400         protocol/text-input-unstable-v1-protocol.c              \
1401         protocol/text-input-unstable-v1-client-protocol.h
1402 text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1403 text_weston_LDADD = libtest-client.la
1404
1405 subsurface_weston_SOURCES = tests/subsurface-test.c
1406 subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1407 subsurface_weston_LDADD = libtest-client.la
1408
1409 subsurface_shot_weston_SOURCES = tests/subsurface-shot-test.c
1410 subsurface_shot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1411 subsurface_shot_weston_LDADD = libtest-client.la
1412
1413 presentation_weston_SOURCES =                   \
1414         tests/presentation-test.c               \
1415         shared/helpers.h
1416 nodist_presentation_weston_SOURCES =            \
1417         protocol/presentation-time-protocol.c   \
1418         protocol/presentation-time-client-protocol.h
1419 presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1420 presentation_weston_LDADD = libtest-client.la
1421
1422 roles_weston_SOURCES = tests/roles-test.c
1423 roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1424 roles_weston_LDADD = libtest-client.la
1425
1426 viewporter_weston_SOURCES =                     \
1427         tests/viewporter-test.c         \
1428         shared/helpers.h
1429 nodist_viewporter_weston_SOURCES =              \
1430         protocol/viewporter-protocol.c  \
1431         protocol/viewporter-client-protocol.h
1432 viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1433 viewporter_weston_LDADD = libtest-client.la
1434
1435 touch_weston_SOURCES = tests/touch-test.c
1436 touch_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1437 touch_weston_LDADD = libtest-client.la
1438
1439 if ENABLE_XWAYLAND_TEST
1440 weston_tests += xwayland-test.weston
1441 xwayland_test_weston_SOURCES = tests/xwayland-test.c
1442 xwayland_test_weston_CFLAGS = \
1443         $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS) -DXSERVER_PATH='"@XSERVER_PATH@"'
1444 xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
1445 endif
1446
1447 matrix_test_SOURCES =                           \
1448         tests/matrix-test.c                     \
1449         shared/matrix.c                         \
1450         shared/matrix.h
1451 matrix_test_CPPFLAGS = -DUNIT_TEST
1452 matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
1453
1454 if ENABLE_IVI_SHELL
1455 module_tests +=                                 \
1456         ivi-layout-internal-test.la             \
1457         ivi-layout-test.la
1458
1459 ivi_layout_internal_test_la_LIBADD = $(test_module_libadd)
1460 ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
1461 ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1462 ivi_layout_internal_test_la_SOURCES =                   \
1463         tests/ivi_layout-internal-test.c
1464
1465 ivi_layout_test_la_LIBADD = $(test_module_libadd)
1466 ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
1467 ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1468 ivi_layout_test_la_SOURCES =                    \
1469         tests/ivi_layout-test-plugin.c          \
1470         tests/ivi-test.h                        \
1471         shared/helpers.h
1472 nodist_ivi_layout_test_la_SOURCES =             \
1473         protocol/weston-test-protocol.c         \
1474         protocol/weston-test-server-protocol.h
1475
1476 ivi_tests =                                     \
1477         ivi-shell-app.weston
1478
1479 ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1480 nodist_ivi_shell_app_weston_SOURCES =           \
1481         protocol/ivi-application-protocol.c     \
1482         protocol/ivi-application-client-protocol.h
1483 ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1484 ivi_shell_app_weston_LDADD = libtest-client.la
1485
1486 noinst_PROGRAMS += ivi-layout.ivi
1487
1488 ivi_layout_ivi_SOURCES =                        \
1489         tests/ivi_layout-test.c                 \
1490         tests/ivi-test.h                        \
1491         shared/helpers.h
1492 nodist_ivi_layout_ivi_SOURCES =                 \
1493         protocol/ivi-application-protocol.c     \
1494         protocol/ivi-application-client-protocol.h
1495 ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1496 ivi_layout_ivi_LDADD = libtest-client.la
1497 endif
1498
1499 if BUILD_SETBACKLIGHT
1500 noinst_PROGRAMS += setbacklight
1501 setbacklight_SOURCES =                          \
1502         tests/setbacklight.c                    \
1503         libweston/libbacklight.c                \
1504         libweston/libbacklight.h
1505 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1506 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1507 endif
1508
1509 all-local: zuctest$(EXEEXT)
1510
1511 noinst_PROGRAMS += zuctest$(EXEEXT)
1512
1513 zuctest_LDADD =                 \
1514         libzunitc.la            \
1515         libzunitcmain.la
1516
1517 zuctest_CFLAGS =                                \
1518         $(AM_CFLAGS)                            \
1519         -I$(top_srcdir)/tools/zunitc/inc
1520
1521 zuctest_SOURCES =                               \
1522         tools/zunitc/test/fixtures_test.c       \
1523         tools/zunitc/test/zunitc_test.c
1524
1525 EXTRA_DIST +=                                                   \
1526         tests/internal-screenshot.ini                           \
1527         tests/reference/internal-screenshot-bad-00.png          \
1528         tests/reference/internal-screenshot-good-00.png         \
1529         tests/reference/subsurface_z_order-00.png               \
1530         tests/reference/subsurface_z_order-01.png               \
1531         tests/reference/subsurface_z_order-02.png               \
1532         tests/reference/subsurface_z_order-03.png               \
1533         tests/reference/subsurface_z_order-04.png               \
1534         tests/weston-tests-env
1535
1536 BUILT_SOURCES +=                                \
1537         protocol/weston-test-protocol.c \
1538         protocol/weston-test-server-protocol.h  \
1539         protocol/weston-test-client-protocol.h  \
1540         protocol/text-input-unstable-v1-protocol.c              \
1541         protocol/text-input-unstable-v1-client-protocol.h
1542
1543 EXTRA_DIST +=                                   \
1544         protocol/weston-desktop-shell.xml       \
1545         protocol/weston-screenshooter.xml       \
1546         protocol/text-cursor-position.xml       \
1547         protocol/weston-test.xml                \
1548         protocol/ivi-application.xml            \
1549         protocol/ivi-hmi-controller.xml
1550
1551 #
1552 # manual test modules in tests subdirectory
1553 #
1554
1555 noinst_LTLIBRARIES +=                           \
1556         surface-screenshot.la
1557
1558 surface_screenshot_la_LIBADD = libshared.la $(test_module_libadd)
1559 surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
1560 surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1561 surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1562
1563
1564 #
1565 # Documentation
1566 #
1567
1568 man_MANS = weston.1 weston.ini.5
1569
1570 if ENABLE_DRM_COMPOSITOR
1571 man_MANS += weston-drm.7
1572 endif
1573
1574 if ENABLE_RDP_COMPOSITOR
1575 man_MANS += weston-rdp.7
1576 endif
1577
1578 MAN_SUBSTS =                                                            \
1579         -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g'     \
1580         -e 's|__weston_modules_dir__|$(pkglibdir)|g'                    \
1581         -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g'         \
1582         -e 's|__version__|$(PACKAGE_VERSION)|g'
1583
1584 SUFFIXES = .1 .5 .7 .man
1585
1586 %.1 %.5 %.7 : man/%.man
1587         $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1588
1589 EXTRA_DIST +=                                   \
1590         man/weston.man                          \
1591         man/weston-drm.man                      \
1592         man/weston-rdp.man                      \
1593         man/weston.ini.man
1594
1595 CLEANFILES += $(man_MANS)
1596
1597 if ENABLE_DEVDOCS
1598 DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1599
1600 docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1601         cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1602
1603 docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1604         cd doc/doxygen && $(DOXYGEN) tools.doxygen
1605 endif
1606
1607 DOCDIRS =               \
1608         docs/developer  \
1609         docs/tools
1610
1611 $(DOCDIRS):
1612         $(MKDIR_P) $@
1613
1614 .PHONY: doc $(DOXYGEN_INDICES)
1615
1616 doc: $(DOXYGEN_INDICES)
1617
1618 .SECONDEXPANSION:
1619
1620 define protostability
1621 $(if $(findstring unstable,$1),unstable,stable)
1622 endef
1623
1624 define protoname
1625 $(shell echo $1 | $(SED) 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1626 endef
1627
1628 protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
1629         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1630
1631 protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
1632         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1633
1634 protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
1635         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1636
1637 protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1638         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1639
1640 protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1641         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1642
1643 protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1644         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@