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