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