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