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