internal-screenshot-test: Make distcheck pass
[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 noinst_LTLIBRARIES =
9 BUILT_SOURCES =
10
11 AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
12
13 EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
14
15 weston.ini : $(srcdir)/weston.ini.in
16         $(AM_V_GEN)$(SED) \
17                 -e 's|@bindir[@]|$(bindir)|g' \
18                 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
19                 -e 's|@libexecdir[@]|$(libexecdir)|g' \
20                 $< > $@
21
22 ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
23         $(AM_V_GEN)$(SED) \
24                 -e 's|@bindir[@]|$(bindir)|g' \
25                 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
26                 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
27                 -e 's|@libexecdir[@]|$(libexecdir)|g' \
28                 -e 's|@plugin_prefix[@]||g' \
29                 $< > $@
30
31 tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in
32         $(AM_V_GEN)$(SED) \
33                 -e 's|@bindir[@]|$(bindir)|g' \
34                 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
35                 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
36                 -e 's|@libexecdir[@]|$(libexecdir)|g' \
37                 -e 's|@plugin_prefix[@]|$(abs_top_builddir)/.libs/|g' \
38                 $< > $@
39
40 all-local : weston.ini ivi-shell/weston.ini
41
42 AM_CFLAGS = $(GCC_CFLAGS)
43
44 AM_CPPFLAGS =                                   \
45         -I$(top_srcdir)/src                     \
46         -I$(top_builddir)/src                   \
47         -I$(top_builddir)/clients               \
48         -I$(top_builddir)/tests                 \
49         -I$(top_srcdir)/shared                  \
50         -I$(top_builddir)/protocol              \
51         -DDATADIR='"$(datadir)"'                \
52         -DMODULEDIR='"$(moduledir)"'            \
53         -DLIBEXECDIR='"$(libexecdir)"'          \
54         -DBINDIR='"$(bindir)"'
55
56 CLEANFILES = weston.ini                         \
57         ivi-shell/weston.ini                    \
58         tests/weston-ivi.ini                    \
59         internal-screenshot-00.png              \
60         $(BUILT_SOURCES)
61
62 bin_PROGRAMS += weston
63
64 weston_LDFLAGS = -export-dynamic
65 weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
66 weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
67 weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
68         $(DLOPEN_LIBS) -lm libshared.la
69
70 weston_SOURCES =                                        \
71         src/git-version.h                               \
72         src/log.c                                       \
73         src/compositor.c                                \
74         src/compositor.h                                \
75         src/input.c                                     \
76         src/data-device.c                               \
77         src/screenshooter.c                             \
78         src/clipboard.c                                 \
79         src/zoom.c                                      \
80         src/text-backend.c                              \
81         src/bindings.c                                  \
82         src/animation.c                                 \
83         src/noop-renderer.c                             \
84         src/pixman-renderer.c                           \
85         src/pixman-renderer.h                           \
86         src/timeline.c                                  \
87         src/timeline.h                                  \
88         src/timeline-object.h                           \
89         shared/matrix.c                                 \
90         shared/matrix.h                                 \
91         shared/zalloc.h                                 \
92         shared/platform.h                               \
93         src/weston-egl-ext.h
94
95 nodist_weston_SOURCES =                                 \
96         protocol/screenshooter-protocol.c               \
97         protocol/screenshooter-server-protocol.h        \
98         protocol/text-cursor-position-protocol.c        \
99         protocol/text-cursor-position-server-protocol.h \
100         protocol/text-protocol.c                        \
101         protocol/text-server-protocol.h                 \
102         protocol/input-method-protocol.c                \
103         protocol/input-method-server-protocol.h         \
104         protocol/workspaces-protocol.c                  \
105         protocol/workspaces-server-protocol.h           \
106         protocol/presentation_timing-protocol.c         \
107         protocol/presentation_timing-server-protocol.h  \
108         protocol/scaler-protocol.c                      \
109         protocol/scaler-server-protocol.h
110
111 BUILT_SOURCES += $(nodist_weston_SOURCES)
112
113 # Track this dependency explicitly instead of using BUILT_SOURCES.  We
114 # add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
115 # in case we're building from tarballs.
116
117 src/compositor.c : $(top_builddir)/src/git-version.h
118
119 noinst_LTLIBRARIES +=                           \
120         libsession-helper.la
121
122 libsession_helper_la_SOURCES =                  \
123         src/weston-launch.h                     \
124         src/launcher-util.c                     \
125         src/launcher-util.h
126 libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
127 libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
128
129 if ENABLE_DBUS
130 if HAVE_SYSTEMD_LOGIN
131 libsession_helper_la_SOURCES +=                 \
132         src/dbus.h                              \
133         src/dbus.c                              \
134         src/logind-util.h                       \
135         src/logind-util.c
136 libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
137 libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
138 endif
139 endif
140
141 if HAVE_GIT_REPO
142 src/git-version.h : $(top_srcdir)/.git/logs/HEAD
143         $(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)')\"" > $@
144 else
145 src/git-version.h :
146         $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
147
148 endif
149
150 .FORCE :
151
152 if BUILD_WESTON_LAUNCH
153 bin_PROGRAMS += weston-launch
154 weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
155 weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
156 weston_launch_CFLAGS=                           \
157         $(GCC_CFLAGS)                           \
158         $(PAM_CFLAGS)                           \
159         $(SYSTEMD_LOGIN_CFLAGS)                 \
160         $(LIBDRM_CFLAGS)
161 weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
162
163 if ENABLE_SETUID_INSTALL
164 install-exec-hook:
165         can_suid_files=no; \
166         chown root $(DESTDIR)$(bindir)/weston-launch \
167                 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
168                 && can_suid_files=yes;\
169         if test $$can_suid_files = no; then \
170                 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
171                 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
172                 false; \
173         fi
174 endif
175
176 endif # BUILD_WESTON_LAUNCH
177
178 pkgconfigdir = $(libdir)/pkgconfig
179 pkgconfig_DATA = src/weston.pc
180
181 wayland_sessiondir = $(datadir)/wayland-sessions
182 wayland_session_DATA = src/weston.desktop
183 dist_wayland_session_DATA = $(wayland_session_DATA)
184
185 westonincludedir = $(includedir)/weston
186 westoninclude_HEADERS =                         \
187         src/version.h                           \
188         src/compositor.h                        \
189         src/timeline-object.h                   \
190         shared/matrix.h                         \
191         shared/config-parser.h                  \
192         shared/zalloc.h                         \
193         shared/platform.h
194
195 if ENABLE_EGL
196 module_LTLIBRARIES += gl-renderer.la
197 gl_renderer_la_LDFLAGS = -module -avoid-version
198 gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
199 gl_renderer_la_CFLAGS =                         \
200         $(COMPOSITOR_CFLAGS)                    \
201         $(EGL_CFLAGS)                           \
202         $(GCC_CFLAGS)
203 gl_renderer_la_SOURCES =                        \
204         src/gl-renderer.h                       \
205         src/gl-renderer.c                       \
206         src/vertex-clipping.c                   \
207         src/vertex-clipping.h
208 endif
209
210 if ENABLE_X11_COMPOSITOR
211 module_LTLIBRARIES += x11-backend.la
212 x11_backend_la_LDFLAGS = -module -avoid-version
213 x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
214         libshared-cairo.la
215 x11_backend_la_CFLAGS =                         \
216         $(COMPOSITOR_CFLAGS)                    \
217         $(EGL_CFLAGS)                           \
218         $(PIXMAN_CFLAGS)                        \
219         $(CAIRO_CFLAGS)                         \
220         $(X11_COMPOSITOR_CFLAGS)                \
221         $(GCC_CFLAGS)
222 x11_backend_la_SOURCES = src/compositor-x11.c
223 endif
224
225 INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
226 INPUT_BACKEND_SOURCES =                         \
227         src/libinput-seat.c                     \
228         src/libinput-seat.h                     \
229         src/libinput-device.c                   \
230         src/libinput-device.h
231
232 if ENABLE_DRM_COMPOSITOR
233 module_LTLIBRARIES += drm-backend.la
234 drm_backend_la_LDFLAGS = -module -avoid-version
235 drm_backend_la_LIBADD =                         \
236         $(COMPOSITOR_LIBS)                      \
237         $(DRM_COMPOSITOR_LIBS)                  \
238         $(INPUT_BACKEND_LIBS)                   \
239         libshared.la -lrt                       \
240         libsession-helper.la
241 drm_backend_la_CFLAGS =                         \
242         $(COMPOSITOR_CFLAGS)                    \
243         $(EGL_CFLAGS)                           \
244         $(DRM_COMPOSITOR_CFLAGS)                \
245         $(GCC_CFLAGS)
246 drm_backend_la_SOURCES =                        \
247         src/compositor-drm.c                    \
248         $(INPUT_BACKEND_SOURCES)                \
249         src/libbacklight.c                      \
250         src/libbacklight.h
251
252 if ENABLE_VAAPI_RECORDER
253 drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
254 drm_backend_la_LIBADD += $(LIBVA_LIBS)
255 drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
256 endif
257 endif
258
259 if ENABLE_WAYLAND_COMPOSITOR
260 module_LTLIBRARIES += wayland-backend.la
261 wayland_backend_la_LDFLAGS = -module -avoid-version
262 wayland_backend_la_LIBADD =                     \
263         $(COMPOSITOR_LIBS)                      \
264         $(WAYLAND_COMPOSITOR_LIBS)              \
265         libshared-cairo.la
266 wayland_backend_la_CFLAGS =                     \
267         $(COMPOSITOR_CFLAGS)                    \
268         $(EGL_CFLAGS)                           \
269         $(PIXMAN_CFLAGS)                        \
270         $(CAIRO_CFLAGS)                         \
271         $(WAYLAND_COMPOSITOR_CFLAGS)            \
272         $(GCC_CFLAGS)
273 wayland_backend_la_SOURCES = src/compositor-wayland.c
274 nodist_wayland_backend_la_SOURCES =                     \
275         protocol/fullscreen-shell-protocol.c            \
276         protocol/fullscreen-shell-client-protocol.h
277 endif
278
279 if ENABLE_RPI_COMPOSITOR
280 if INSTALL_RPI_COMPOSITOR
281 module_LTLIBRARIES += rpi-backend.la
282 else
283 noinst_LTLIBRARIES += rpi-backend.la
284 endif
285
286 rpi_backend_la_LDFLAGS = -module -avoid-version
287 rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS)      \
288         $(RPI_COMPOSITOR_LIBS)                  \
289         $(RPI_BCM_HOST_LIBS)                    \
290         $(INPUT_BACKEND_LIBS)                   \
291         libsession-helper.la                    \
292         libshared.la
293 rpi_backend_la_CFLAGS =                         \
294         $(GCC_CFLAGS)                           \
295         $(COMPOSITOR_CFLAGS)                    \
296         $(RPI_COMPOSITOR_CFLAGS)                \
297         $(RPI_BCM_HOST_CFLAGS)
298 rpi_backend_la_SOURCES =                        \
299         src/compositor-rpi.c                    \
300         src/rpi-renderer.c                      \
301         src/rpi-renderer.h                      \
302         src/rpi-bcm-stubs.h                     \
303         $(INPUT_BACKEND_SOURCES)
304
305 if ENABLE_EGL
306 rpi_backend_la_LIBADD += $(EGL_LIBS)
307 rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
308 endif
309
310 endif
311
312 if ENABLE_HEADLESS_COMPOSITOR
313 module_LTLIBRARIES += headless-backend.la
314 headless_backend_la_LDFLAGS = -module -avoid-version
315 headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
316 headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
317 headless_backend_la_SOURCES = src/compositor-headless.c
318 endif
319
320 if ENABLE_FBDEV_COMPOSITOR
321 module_LTLIBRARIES += fbdev-backend.la
322 fbdev_backend_la_LDFLAGS = -module -avoid-version
323 fbdev_backend_la_LIBADD =                       \
324         $(COMPOSITOR_LIBS)                      \
325         $(FBDEV_COMPOSITOR_LIBS)                \
326         $(INPUT_BACKEND_LIBS)                   \
327         libsession-helper.la                    \
328         libshared.la
329 fbdev_backend_la_CFLAGS =                       \
330         $(COMPOSITOR_CFLAGS)                    \
331         $(EGL_CFLAGS)                           \
332         $(FBDEV_COMPOSITOR_CFLAGS)              \
333         $(PIXMAN_CFLAGS)                        \
334         $(GCC_CFLAGS)
335 fbdev_backend_la_SOURCES =                      \
336         src/compositor-fbdev.c                  \
337         $(INPUT_BACKEND_SOURCES)
338 endif
339
340 if ENABLE_RDP_COMPOSITOR
341 module_LTLIBRARIES += rdp-backend.la
342 rdp_backend_la_LDFLAGS = -module -avoid-version
343 rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
344         $(RDP_COMPOSITOR_LIBS) \
345         libshared.la
346 rdp_backend_la_CFLAGS =                         \
347         $(COMPOSITOR_CFLAGS)                    \
348         $(RDP_COMPOSITOR_CFLAGS)                \
349         $(GCC_CFLAGS)
350 rdp_backend_la_SOURCES = src/compositor-rdp.c
351 endif
352
353 if HAVE_LCMS
354 module_LTLIBRARIES += cms-static.la
355 cms_static_la_LDFLAGS = -module -avoid-version
356 cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
357 cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
358 cms_static_la_SOURCES =                         \
359         src/cms-static.c                                \
360         src/cms-helper.c                                \
361         src/cms-helper.h
362 if ENABLE_COLORD
363 module_LTLIBRARIES += cms-colord.la
364 cms_colord_la_LDFLAGS = -module -avoid-version
365 cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
366 cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
367 cms_colord_la_SOURCES =                         \
368         src/cms-colord.c                        \
369         src/cms-helper.c                        \
370         src/cms-helper.h
371 endif
372 endif
373
374 noinst_PROGRAMS += spring-tool
375 spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
376 spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
377 spring_tool_SOURCES =                           \
378         src/spring-tool.c                       \
379         src/animation.c                         \
380         shared/matrix.c                         \
381         shared/matrix.h                         \
382         src/compositor.h
383
384 if BUILD_CLIENTS
385
386 bin_PROGRAMS += weston-terminal weston-info
387
388 libexec_PROGRAMS +=                             \
389         weston-desktop-shell                    \
390         weston-screenshooter                    \
391         weston-keyboard                         \
392         weston-simple-im
393
394 if ENABLE_IVI_SHELL
395 libexec_PROGRAMS +=                             \
396         weston-ivi-shell-user-interface
397 endif
398
399 demo_clients =                                  \
400         weston-flower                           \
401         weston-image                            \
402         weston-cliptest                         \
403         weston-dnd                              \
404         weston-smoke                            \
405         weston-resizor                          \
406         weston-eventdemo                        \
407         weston-clickdot                         \
408         weston-transformed                      \
409         weston-fullscreen                       \
410         weston-stacking                         \
411         weston-calibrator                       \
412         weston-scaler
413
414 if INSTALL_DEMO_CLIENTS
415 bin_PROGRAMS += $(demo_clients)
416 else
417 noinst_PROGRAMS += $(demo_clients)
418 endif
419
420
421 if BUILD_SIMPLE_CLIENTS
422 demo_clients +=                                 \
423         weston-simple-shm                       \
424         weston-simple-damage                    \
425         weston-simple-touch                     \
426         weston-presentation-shm                 \
427         weston-multi-resource
428
429 weston_simple_shm_SOURCES = clients/simple-shm.c
430 nodist_weston_simple_shm_SOURCES =              \
431         protocol/xdg-shell-protocol.c           \
432         protocol/xdg-shell-client-protocol.h    \
433         protocol/fullscreen-shell-protocol.c    \
434         protocol/fullscreen-shell-client-protocol.h     \
435         protocol/ivi-application-protocol.c             \
436         protocol/ivi-application-client-protocol.h
437 weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
438 weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
439
440 weston_simple_damage_SOURCES = clients/simple-damage.c
441 nodist_weston_simple_damage_SOURCES =           \
442         protocol/scaler-protocol.c              \
443         protocol/scaler-client-protocol.h       \
444         protocol/xdg-shell-protocol.c           \
445         protocol/xdg-shell-client-protocol.h    \
446         protocol/fullscreen-shell-protocol.c    \
447         protocol/fullscreen-shell-client-protocol.h
448 weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
449 weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
450
451 weston_simple_touch_SOURCES = clients/simple-touch.c
452 weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
453 weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
454
455 weston_presentation_shm_SOURCES = clients/presentation-shm.c
456 nodist_weston_presentation_shm_SOURCES =                \
457         protocol/presentation_timing-protocol.c         \
458         protocol/presentation_timing-client-protocol.h
459 weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
460 weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
461
462 weston_multi_resource_SOURCES = clients/multi-resource.c
463 weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
464 weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
465 endif
466
467 if BUILD_SIMPLE_EGL_CLIENTS
468 demo_clients += weston-simple-egl
469 weston_simple_egl_SOURCES = clients/simple-egl.c
470 nodist_weston_simple_egl_SOURCES =              \
471         protocol/xdg-shell-protocol.c           \
472         protocol/xdg-shell-client-protocol.h            \
473         protocol/ivi-application-protocol.c             \
474         protocol/ivi-application-client-protocol.h
475 weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
476 weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
477 endif
478
479 noinst_LTLIBRARIES += libtoytoolkit.la
480
481 libtoytoolkit_la_SOURCES =                              \
482         clients/window.c                                \
483         clients/window.h
484
485 nodist_libtoytoolkit_la_SOURCES =                       \
486         protocol/text-cursor-position-protocol.c        \
487         protocol/text-cursor-position-client-protocol.h \
488         protocol/scaler-protocol.c                      \
489         protocol/scaler-client-protocol.h               \
490         protocol/workspaces-protocol.c                  \
491         protocol/workspaces-client-protocol.h           \
492         protocol/presentation_timing-protocol.c         \
493         protocol/presentation_timing-client-protocol.h  \
494         protocol/xdg-shell-protocol.c                   \
495         protocol/xdg-shell-client-protocol.h            \
496         protocol/ivi-application-protocol.c             \
497         protocol/ivi-application-client-protocol.h
498
499 BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
500
501
502 libtoytoolkit_la_LIBADD =                       \
503         $(CLIENT_LIBS)                          \
504         $(CAIRO_EGL_LIBS)                       \
505         libshared-cairo.la -lrt -lm
506 libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
507
508 weston_flower_SOURCES = clients/flower.c
509 weston_flower_LDADD = libtoytoolkit.la
510 weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
511
512 weston_screenshooter_SOURCES =                          \
513         clients/screenshot.c
514 nodist_weston_screenshooter_SOURCES =                   \
515         protocol/screenshooter-protocol.c               \
516         protocol/screenshooter-client-protocol.h
517 weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
518 weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
519
520 weston_terminal_SOURCES = clients/terminal.c
521 weston_terminal_LDADD = libtoytoolkit.la -lutil
522 weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
523
524 weston_image_SOURCES = clients/image.c
525 weston_image_LDADD = libtoytoolkit.la
526 weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
527
528 weston_cliptest_SOURCES =                               \
529         clients/cliptest.c                              \
530         src/vertex-clipping.c                           \
531         src/vertex-clipping.h
532 weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
533 weston_cliptest_LDADD = libtoytoolkit.la
534
535 weston_dnd_SOURCES = clients/dnd.c
536 weston_dnd_LDADD = libtoytoolkit.la
537 weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
538
539 weston_smoke_SOURCES = clients/smoke.c
540 weston_smoke_LDADD = libtoytoolkit.la
541 weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
542
543 weston_resizor_SOURCES = clients/resizor.c
544 weston_resizor_LDADD = libtoytoolkit.la
545 weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
546
547 weston_scaler_SOURCES = clients/scaler.c
548 weston_scaler_LDADD = libtoytoolkit.la
549 weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
550
551 if HAVE_CAIRO_GLESV2
552 demo_clients += weston-nested weston-nested-client
553
554 weston_nested_SOURCES = clients/nested.c
555 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
556 weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
557
558 weston_nested_client_SOURCES = clients/nested-client.c
559 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
560 weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
561 endif
562
563 weston_eventdemo_SOURCES = clients/eventdemo.c
564 weston_eventdemo_LDADD = libtoytoolkit.la
565 weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
566
567 weston_clickdot_SOURCES = clients/clickdot.c
568 weston_clickdot_LDADD = libtoytoolkit.la
569 weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
570
571 weston_transformed_SOURCES = clients/transformed.c
572 weston_transformed_LDADD = libtoytoolkit.la
573 weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
574
575 weston_fullscreen_SOURCES = clients/fullscreen.c
576 nodist_weston_fullscreen_SOURCES =                      \
577         protocol/fullscreen-shell-protocol.c            \
578         protocol/fullscreen-shell-client-protocol.h
579 weston_fullscreen_LDADD = libtoytoolkit.la
580 weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
581
582 weston_stacking_SOURCES = clients/stacking.c
583 weston_stacking_LDADD = libtoytoolkit.la
584 weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
585
586 weston_calibrator_SOURCES = clients/calibrator.c        \
587         shared/matrix.c                                 \
588         shared/matrix.h
589 weston_calibrator_LDADD = libtoytoolkit.la
590 weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
591
592 if BUILD_SUBSURFACES_CLIENT
593 demo_clients += weston-subsurfaces
594 weston_subsurfaces_SOURCES = clients/subsurfaces.c
595 weston_subsurfaces_CFLAGS =                     \
596         $(AM_CFLAGS)                            \
597         $(SIMPLE_EGL_CLIENT_CFLAGS)             \
598         $(CLIENT_CFLAGS)
599 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
600 endif
601
602 if HAVE_PANGO
603 demo_clients += weston-editor
604 weston_editor_SOURCES = clients/editor.c
605 nodist_weston_editor_SOURCES =                  \
606         protocol/text-protocol.c                \
607         protocol/text-client-protocol.h
608 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
609 weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
610 endif
611
612 weston_keyboard_SOURCES = clients/keyboard.c
613 nodist_weston_keyboard_SOURCES =                        \
614         protocol/desktop-shell-client-protocol.h        \
615         protocol/desktop-shell-protocol.c               \
616         protocol/input-method-protocol.c                \
617         protocol/input-method-client-protocol.h
618 weston_keyboard_LDADD = libtoytoolkit.la
619 weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
620
621 weston_simple_im_SOURCES = clients/weston-simple-im.c
622 nodist_weston_simple_im_SOURCES =               \
623         protocol/input-method-protocol.c        \
624         protocol/input-method-client-protocol.h
625 weston_simple_im_LDADD = $(CLIENT_LIBS)
626 weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
627
628 weston_info_SOURCES = clients/weston-info.c
629 nodist_weston_info_SOURCES =                            \
630         protocol/presentation_timing-protocol.c         \
631         protocol/presentation_timing-client-protocol.h
632 weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
633 weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
634
635 weston_desktop_shell_SOURCES = clients/desktop-shell.c
636 nodist_weston_desktop_shell_SOURCES =                   \
637         protocol/desktop-shell-client-protocol.h        \
638         protocol/desktop-shell-protocol.c
639 weston_desktop_shell_LDADD = libtoytoolkit.la
640 weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
641
642 if ENABLE_IVI_SHELL
643 weston_ivi_shell_user_interface_SOURCES = clients/ivi-shell-user-interface.c
644 nodist_weston_ivi_shell_user_interface_SOURCES =                        \
645         protocol/ivi-hmi-controller-client-protocol.h                   \
646         protocol/ivi-hmi-controller-protocol.c                          \
647         protocol/ivi-application-client-protocol.h                      \
648         protocol/ivi-application-protocol.c
649 weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
650 weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
651 endif
652
653 if BUILD_FULL_GL_CLIENTS
654 demo_clients += weston-gears
655 weston_gears_SOURCES = clients/gears.c
656 weston_gears_LDADD = libtoytoolkit.la
657 weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
658
659 if HAVE_GLU
660 libexec_PROGRAMS += weston-screensaver
661 weston_screensaver_SOURCES =                            \
662         clients/wscreensaver.c                          \
663         clients/wscreensaver.h                          \
664         clients/wscreensaver-glue.c                     \
665         clients/wscreensaver-glue.h                     \
666         clients/glmatrix.c                              \
667         clients/matrix3.xpm
668 nodist_weston_screensaver_SOURCES =                     \
669         protocol/desktop-shell-client-protocol.h        \
670         protocol/desktop-shell-protocol.c
671
672 weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
673 weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
674
675 endif
676
677 endif
678
679 endif
680
681 BUILT_SOURCES +=                                        \
682         protocol/screenshooter-protocol.c               \
683         protocol/screenshooter-client-protocol.h        \
684         protocol/text-cursor-position-client-protocol.h \
685         protocol/text-cursor-position-protocol.c        \
686         protocol/text-protocol.c                        \
687         protocol/text-client-protocol.h                 \
688         protocol/input-method-protocol.c                \
689         protocol/input-method-client-protocol.h         \
690         protocol/desktop-shell-client-protocol.h        \
691         protocol/desktop-shell-protocol.c               \
692         protocol/scaler-client-protocol.h               \
693         protocol/scaler-protocol.c                      \
694         protocol/workspaces-client-protocol.h           \
695         protocol/workspaces-protocol.c                  \
696         protocol/fullscreen-shell-protocol.c            \
697         protocol/fullscreen-shell-client-protocol.h     \
698         protocol/xdg-shell-protocol.c                   \
699         protocol/xdg-shell-client-protocol.h            \
700         protocol/ivi-hmi-controller-protocol.c          \
701         protocol/ivi-hmi-controller-client-protocol.h   \
702         protocol/ivi-application-protocol.c             \
703         protocol/ivi-application-client-protocol.h
704
705 westondatadir = $(datadir)/weston
706 dist_westondata_DATA =                          \
707         data/wayland.svg                        \
708         data/wayland.png                        \
709         data/pattern.png                        \
710         data/terminal.png                       \
711         data/border.png                         \
712         data/icon_window.png                    \
713         data/sign_close.png                     \
714         data/sign_maximize.png                  \
715         data/sign_minimize.png
716
717 if ENABLE_IVI_SHELL
718 dist_westondata_DATA +=                         \
719         data/background.png                     \
720         data/tiling.png                         \
721         data/fullscreen.png                     \
722         data/panel.png                          \
723         data/random.png                         \
724         data/sidebyside.png                     \
725         data/home.png                           \
726         data/icon_ivi_clickdot.png              \
727         data/icon_ivi_flower.png                \
728         data/icon_ivi_simple-egl.png            \
729         data/icon_ivi_simple-shm.png            \
730         data/icon_ivi_smoke.png
731 endif
732
733
734 if BUILD_WCAP_TOOLS
735 bin_PROGRAMS += wcap-decode
736
737 wcap_decode_SOURCES =                           \
738         wcap/main.c                             \
739         wcap/wcap-decode.c                      \
740         wcap/wcap-decode.h
741
742 wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
743 wcap_decode_LDADD = $(WCAP_LIBS)
744 endif
745
746
747 if ENABLE_DESKTOP_SHELL
748
749 module_LTLIBRARIES += desktop-shell.la
750
751 desktop_shell_la_CPPFLAGS =                     \
752         -I$(top_builddir)/protocol              \
753         -I$(top_srcdir)/shared                  \
754         -I$(top_srcdir)/src                     \
755         -I$(top_builddir)/src                   \
756         -I$(top_builddir)/desktop-shell         \
757         -DDATADIR='"$(datadir)"'                \
758         -DMODULEDIR='"$(moduledir)"'            \
759         -DLIBEXECDIR='"$(libexecdir)"'          \
760         -DIN_WESTON
761
762 desktop_shell_la_LDFLAGS = -module -avoid-version
763 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
764 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
765 desktop_shell_la_SOURCES =                              \
766         desktop-shell/shell.h                           \
767         desktop-shell/shell.c                           \
768         desktop-shell/exposay.c                         \
769         desktop-shell/input-panel.c
770 nodist_desktop_shell_la_SOURCES =                       \
771         protocol/desktop-shell-protocol.c               \
772         protocol/desktop-shell-server-protocol.h        \
773         protocol/xdg-shell-protocol.c                   \
774         protocol/xdg-shell-server-protocol.h
775
776 BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
777 endif
778
779 if ENABLE_FULLSCREEN_SHELL
780
781 module_LTLIBRARIES += fullscreen-shell.la
782
783 fullscreen_shell_la_CPPFLAGS =                  \
784         -I$(top_builddir)/protocol              \
785         -I$(top_srcdir)/shared                  \
786         -I$(top_srcdir)/src                     \
787         -I$(top_builddir)/src                   \
788         -DIN_WESTON
789
790 fullscreen_shell_la_LDFLAGS = -module -avoid-version
791 fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
792 fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
793 fullscreen_shell_la_SOURCES =                   \
794         fullscreen-shell/fullscreen-shell.c
795 nodist_fullscreen_shell_la_SOURCES =                    \
796         protocol/fullscreen-shell-protocol.c            \
797         protocol/fullscreen-shell-server-protocol.h
798
799 BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
800 endif
801
802 if ENABLE_IVI_SHELL
803
804 module_LTLIBRARIES +=                           \
805         $(ivi_shell)                            \
806         $(hmi_controller)
807
808 ivi_shell = ivi-shell.la
809 ivi_shell_la_LDFLAGS = -module -avoid-version
810 ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
811 ivi_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
812 ivi_shell_la_SOURCES =                          \
813         ivi-shell/ivi-layout-export.h           \
814         ivi-shell/ivi-layout-private.h          \
815         ivi-shell/ivi-layout.c                  \
816         ivi-shell/ivi-layout-transition.c       \
817         ivi-shell/ivi-shell.h                   \
818         ivi-shell/ivi-shell.c                   \
819         ivi-shell/input-panel-ivi.c
820 nodist_ivi_shell_la_SOURCES =                   \
821         protocol/ivi-application-protocol.c             \
822         protocol/ivi-application-server-protocol.h
823
824 BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
825
826 hmi_controller = hmi-controller.la
827 hmi_controller_la_LDFLAGS = -module -avoid-version
828 hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
829 hmi_controller_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
830 hmi_controller_la_SOURCES =                             \
831         ivi-shell/ivi-layout-export.h                   \
832         ivi-shell/hmi-controller.c
833 nodist_hmi_controller_la_SOURCES =                      \
834         protocol/ivi-hmi-controller-protocol.c          \
835         protocol/ivi-hmi-controller-server-protocol.h
836
837 BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
838
839 endif
840
841
842 if ENABLE_SCREEN_SHARING
843
844 module_LTLIBRARIES += screen-share.la
845
846 screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
847 screen_share_la_LDFLAGS = -module -avoid-version
848 screen_share_la_LIBADD =                        \
849         $(COMPOSITOR_LIBS)                      \
850         $(SCREEN_SHARE_LIBS)                    \
851         libshared-cairo.la
852 screen_share_la_CFLAGS =                        \
853         $(COMPOSITOR_CFLAGS)                    \
854         $(SCREEN_SHARE_CFLAGS)                  \
855         $(GCC_CFLAGS)
856 screen_share_la_SOURCES =                       \
857         src/screen-share.c
858 nodist_screen_share_la_SOURCES =                        \
859         protocol/fullscreen-shell-protocol.c            \
860         protocol/fullscreen-shell-client-protocol.h
861
862 endif
863
864 if ENABLE_XWAYLAND
865
866 module_LTLIBRARIES += xwayland.la
867
868 xwayland_la_CPPFLAGS =                          \
869         -I$(top_builddir)/protocol              \
870         -I$(top_srcdir)/shared                  \
871         -I$(top_srcdir)/src                     \
872         -I$(top_builddir)/src                   \
873         -I$(top_builddir)/xwayland              \
874         -DDATADIR='"$(datadir)"'                \
875         -DMODULEDIR='"$(moduledir)"'            \
876         -DLIBEXECDIR='"$(libexecdir)"'          \
877         -DXSERVER_PATH='"@XSERVER_PATH@"'
878
879 xwayland_la_LDFLAGS = -module -avoid-version
880 xwayland_la_LIBADD =                    \
881         $(XWAYLAND_LIBS)                \
882         $(top_builddir)/libshared-cairo.la
883 xwayland_la_CFLAGS =                            \
884         $(GCC_CFLAGS)                           \
885         $(COMPOSITOR_CFLAGS)                    \
886         $(PIXMAN_CFLAGS)                        \
887         $(CAIRO_CFLAGS)
888 xwayland_la_SOURCES =                           \
889         xwayland/xwayland.h                     \
890         xwayland/window-manager.c               \
891         xwayland/selection.c                    \
892         xwayland/dnd.c                          \
893         xwayland/launcher.c                     \
894         xwayland/hash.c                         \
895         xwayland/hash.h
896 endif
897
898
899 #
900 # Shared utilities
901 #
902
903 noinst_LTLIBRARIES += libshared.la libshared-cairo.la
904
905 libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
906
907 libshared_la_SOURCES =                          \
908         shared/config-parser.c                  \
909         shared/option-parser.c                  \
910         shared/config-parser.h                  \
911         shared/file-util.c                      \
912         shared/file-util.h                      \
913         shared/os-compatibility.c               \
914         shared/os-compatibility.h
915
916 libshared_cairo_la_CFLAGS =                     \
917         -DDATADIR='"$(datadir)"'                \
918         $(GCC_CFLAGS)                           \
919         $(COMPOSITOR_CFLAGS)                    \
920         $(PIXMAN_CFLAGS)                        \
921         $(CAIRO_CFLAGS)                         \
922         $(PNG_CFLAGS)                           \
923         $(WEBP_CFLAGS)
924
925 libshared_cairo_la_LIBADD =                     \
926         $(PIXMAN_LIBS)                          \
927         $(CAIRO_LIBS)                           \
928         $(PNG_LIBS)                             \
929         $(WEBP_LIBS)                            \
930         $(JPEG_LIBS)
931
932 libshared_cairo_la_SOURCES =                    \
933         $(libshared_la_SOURCES)                 \
934         shared/image-loader.c                   \
935         shared/image-loader.h                   \
936         shared/cairo-util.c                     \
937         shared/frame.c                          \
938         shared/cairo-util.h
939
940
941 #
942 # tests subdirectory
943 #
944
945 TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
946
947 internal_tests =                                \
948         internal-screenshot.weston
949
950 shared_tests =                                  \
951         config-parser.test                      \
952         vertex-clip.test
953
954 module_tests =                                  \
955         surface-test.la                         \
956         surface-global-test.la
957
958 weston_tests =                                  \
959         bad_buffer.weston                       \
960         keyboard.weston                         \
961         event.weston                            \
962         button.weston                           \
963         text.weston                             \
964         presentation.weston                     \
965         roles.weston                            \
966         subsurface.weston                       \
967         devices.weston
968
969 ivi_tests =
970
971 $(ivi_tests) : $(builddir)/tests/weston-ivi.ini
972
973 AM_TESTS_ENVIRONMENT = \
974         abs_builddir='$(abs_builddir)'; export abs_builddir; \
975         abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
976
977 TEST_EXTENSIONS = .la .weston
978 LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
979 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
980
981 clean-local:
982         -rm -rf logs
983
984 # To remove when automake 1.11 support is dropped
985 export abs_builddir
986
987 noinst_LTLIBRARIES +=                   \
988         weston-test.la                  \
989         $(module_tests)                 \
990         libtest-runner.la               \
991         libtest-client.la
992
993 noinst_PROGRAMS +=                      \
994         $(setbacklight)                 \
995         $(internal_tests)               \
996         $(shared_tests)                 \
997         $(weston_tests)                 \
998         $(ivi_tests)                    \
999         matrix-test
1000
1001 test_module_ldflags = \
1002         -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1003
1004 surface_global_test_la_SOURCES = tests/surface-global-test.c
1005 surface_global_test_la_LDFLAGS = $(test_module_ldflags)
1006 surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1007
1008 surface_test_la_SOURCES = tests/surface-test.c
1009 surface_test_la_LDFLAGS = $(test_module_ldflags)
1010 surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1011
1012 weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1013 weston_test_la_LDFLAGS = $(test_module_ldflags)
1014 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1015 weston_test_la_SOURCES = tests/weston-test.c
1016 nodist_weston_test_la_SOURCES =                 \
1017         protocol/weston-test-protocol.c \
1018         protocol/weston-test-server-protocol.h
1019
1020 if ENABLE_EGL
1021 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1022 weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1023 endif
1024
1025 libtest_runner_la_SOURCES =                     \
1026         tests/weston-test-runner.c              \
1027         tests/weston-test-runner.h
1028 libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1029
1030 config_parser_test_SOURCES = tests/config-parser-test.c
1031 config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
1032
1033 vertex_clip_test_SOURCES =                      \
1034         tests/vertex-clip-test.c                \
1035         src/vertex-clipping.c                   \
1036         src/vertex-clipping.h
1037 vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1038
1039 libtest_client_la_SOURCES =                     \
1040         tests/weston-test-client-helper.c       \
1041         tests/weston-test-client-helper.h
1042 nodist_libtest_client_la_SOURCES =              \
1043         protocol/weston-test-protocol.c \
1044         protocol/weston-test-client-protocol.h
1045 libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1046 libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
1047
1048
1049 #
1050 # Internal tests - tests functionality of the testsuite itself
1051 #
1052
1053 internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1054 internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1055 internal_screenshot_weston_LDADD = libtest-client.la  $(CAIRO_LIBS)
1056
1057
1058 #
1059 # Weston Tests
1060 #
1061
1062 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
1063 bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1064 bad_buffer_weston_LDADD = libtest-client.la
1065
1066 keyboard_weston_SOURCES = tests/keyboard-test.c
1067 keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1068 keyboard_weston_LDADD = libtest-client.la
1069
1070 event_weston_SOURCES = tests/event-test.c
1071 event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1072 event_weston_LDADD = libtest-client.la
1073
1074 button_weston_SOURCES = tests/button-test.c
1075 button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1076 button_weston_LDADD = libtest-client.la
1077
1078 devices_weston_SOURCES = tests/devices-test.c
1079 devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1080 devices_weston_LDADD = libtest-client.la
1081
1082 text_weston_SOURCES = tests/text-test.c
1083 nodist_text_weston_SOURCES =                    \
1084         protocol/text-protocol.c                \
1085         protocol/text-client-protocol.h
1086 text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1087 text_weston_LDADD = libtest-client.la
1088
1089 subsurface_weston_SOURCES = tests/subsurface-test.c
1090 subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1091 subsurface_weston_LDADD = libtest-client.la
1092
1093 presentation_weston_SOURCES = tests/presentation-test.c
1094 nodist_presentation_weston_SOURCES =            \
1095         protocol/presentation_timing-protocol.c \
1096         protocol/presentation_timing-client-protocol.h
1097 presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1098 presentation_weston_LDADD = libtest-client.la
1099
1100 roles_weston_SOURCES = tests/roles-test.c
1101 roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1102 roles_weston_LDADD = libtest-client.la
1103
1104 if ENABLE_EGL
1105 weston_tests += buffer-count.weston
1106 buffer_count_weston_SOURCES = tests/buffer-count-test.c
1107 buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
1108 buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1109 endif
1110
1111 if ENABLE_XWAYLAND_TEST
1112 weston_tests += xwayland-test.weston
1113 xwayland_test_weston_SOURCES = tests/xwayland-test.c
1114 xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
1115 xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
1116 endif
1117
1118 matrix_test_SOURCES =                           \
1119         tests/matrix-test.c                     \
1120         shared/matrix.c                         \
1121         shared/matrix.h
1122 matrix_test_CPPFLAGS = -DUNIT_TEST
1123 matrix_test_LDADD = -lm -lrt
1124
1125 if ENABLE_IVI_SHELL
1126 module_tests +=                                 \
1127         ivi-layout-internal-test.la             \
1128         ivi-layout-test.la
1129
1130 ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1131 ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
1132 ivi_layout_internal_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1133 ivi_layout_internal_test_la_SOURCES =                   \
1134         tests/ivi_layout-internal-test.c
1135
1136 ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1137 ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
1138 ivi_layout_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1139 ivi_layout_test_la_SOURCES =                    \
1140         tests/ivi_layout-test-plugin.c          \
1141         tests/ivi-test.h
1142 nodist_ivi_layout_test_la_SOURCES =             \
1143         protocol/weston-test-protocol.c         \
1144         protocol/weston-test-server-protocol.h
1145
1146 ivi_tests +=                                    \
1147         ivi-shell-app.weston
1148
1149 ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1150 nodist_ivi_shell_app_weston_SOURCES =           \
1151         protocol/ivi-application-protocol.c     \
1152         protocol/ivi-application-client-protocol.h
1153 ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1154 ivi_shell_app_weston_LDADD = libtest-client.la
1155
1156 noinst_PROGRAMS += ivi-layout.ivi
1157
1158 ivi_layout_ivi_SOURCES =                        \
1159         tests/ivi_layout-test.c                 \
1160         tests/ivi-test.h
1161 nodist_ivi_layout_ivi_SOURCES =                 \
1162         protocol/ivi-application-protocol.c     \
1163         protocol/ivi-application-client-protocol.h
1164 ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1165 ivi_layout_ivi_LDADD = libtest-client.la
1166 endif
1167
1168 if BUILD_SETBACKLIGHT
1169 noinst_PROGRAMS += setbacklight
1170 setbacklight_SOURCES =                          \
1171         tests/setbacklight.c                    \
1172         src/libbacklight.c                      \
1173         src/libbacklight.h
1174 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1175 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1176 endif
1177
1178 EXTRA_DIST +=                                                   \
1179         tests/weston-tests-env                                  \
1180         tests/internal-screenshot.ini                           \
1181         tests/reference/internal-screenshot-bad-00.png          \
1182         tests/reference/internal-screenshot-good-00.png
1183
1184 BUILT_SOURCES +=                                \
1185         protocol/weston-test-protocol.c \
1186         protocol/weston-test-server-protocol.h  \
1187         protocol/weston-test-client-protocol.h  \
1188         protocol/text-protocol.c                \
1189         protocol/text-client-protocol.h
1190
1191 EXTRA_DIST +=                                   \
1192         protocol/desktop-shell.xml              \
1193         protocol/screenshooter.xml              \
1194         protocol/text.xml                       \
1195         protocol/input-method.xml               \
1196         protocol/workspaces.xml                 \
1197         protocol/text-cursor-position.xml       \
1198         protocol/weston-test.xml                \
1199         protocol/xdg-shell.xml                  \
1200         protocol/fullscreen-shell.xml           \
1201         protocol/presentation_timing.xml        \
1202         protocol/scaler.xml                     \
1203         protocol/ivi-application.xml            \
1204         protocol/ivi-hmi-controller.xml
1205
1206 #
1207 # manual test modules in tests subdirectory
1208 #
1209
1210 noinst_LTLIBRARIES +=                           \
1211         surface-screenshot.la
1212
1213 surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1214 surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
1215 surface_screenshot_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1216 surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1217
1218
1219 #
1220 # Documentation
1221 #
1222
1223 man_MANS = weston.1 weston.ini.5
1224
1225 if ENABLE_DRM_COMPOSITOR
1226 man_MANS += weston-drm.7
1227 endif
1228
1229 MAN_SUBSTS =                                                            \
1230         -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g'     \
1231         -e 's|__weston_modules_dir__|$(pkglibdir)|g'                    \
1232         -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g'         \
1233         -e 's|__version__|$(PACKAGE_VERSION)|g'
1234
1235 SUFFIXES = .1 .5 .7 .man
1236
1237 %.1 %.5 %.7 : man/%.man
1238         $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1239
1240 EXTRA_DIST +=                                   \
1241         man/weston.man                          \
1242         man/weston-drm.man                      \
1243         man/weston.ini.man
1244
1245 CLEANFILES += $(man_MANS)
1246
1247
1248 protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1249         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1250
1251 protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1252         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1253
1254 protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1255         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@