compositor: send the output_created signal after inserting it in the list
[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 = $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
945
946 shared_tests =                                  \
947         config-parser.test                      \
948         vertex-clip.test
949
950 module_tests =                                  \
951         surface-test.la                         \
952         surface-global-test.la
953
954 weston_tests =                                  \
955         bad_buffer.weston                       \
956         keyboard.weston                         \
957         event.weston                            \
958         button.weston                           \
959         text.weston                             \
960         presentation.weston                     \
961         roles.weston                            \
962         subsurface.weston                       \
963         devices.weston
964
965 ivi_tests =
966
967 $(ivi_tests) : $(builddir)/tests/weston-ivi.ini
968
969 AM_TESTS_ENVIRONMENT = \
970         abs_builddir='$(abs_builddir)'; export abs_builddir;
971
972 TEST_EXTENSIONS = .la .weston
973 LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
974 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
975
976 clean-local:
977         -rm -rf logs
978
979 # To remove when automake 1.11 support is dropped
980 export abs_builddir
981
982 noinst_LTLIBRARIES +=                   \
983         weston-test.la                  \
984         $(module_tests)                 \
985         libtest-runner.la               \
986         libtest-client.la
987
988 noinst_PROGRAMS +=                      \
989         $(setbacklight)                 \
990         $(shared_tests)                 \
991         $(weston_tests)                 \
992         $(ivi_tests)                    \
993         matrix-test
994
995 test_module_ldflags = \
996         -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
997
998 surface_global_test_la_SOURCES = tests/surface-global-test.c
999 surface_global_test_la_LDFLAGS = $(test_module_ldflags)
1000 surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1001
1002 surface_test_la_SOURCES = tests/surface-test.c
1003 surface_test_la_LDFLAGS = $(test_module_ldflags)
1004 surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1005
1006 weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1007 weston_test_la_LDFLAGS = $(test_module_ldflags)
1008 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1009 weston_test_la_SOURCES = tests/weston-test.c
1010 nodist_weston_test_la_SOURCES =                 \
1011         protocol/weston-test-protocol.c \
1012         protocol/weston-test-server-protocol.h
1013
1014 if ENABLE_EGL
1015 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1016 weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1017 endif
1018
1019 libtest_runner_la_SOURCES =                     \
1020         tests/weston-test-runner.c              \
1021         tests/weston-test-runner.h
1022 libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1023
1024 config_parser_test_SOURCES = tests/config-parser-test.c
1025 config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
1026
1027 vertex_clip_test_SOURCES =                      \
1028         tests/vertex-clip-test.c                \
1029         src/vertex-clipping.c                   \
1030         src/vertex-clipping.h
1031 vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1032
1033 libtest_client_la_SOURCES =                     \
1034         tests/weston-test-client-helper.c       \
1035         tests/weston-test-client-helper.h
1036 nodist_libtest_client_la_SOURCES =              \
1037         protocol/weston-test-protocol.c \
1038         protocol/weston-test-client-protocol.h
1039 libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1040 libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
1041
1042 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
1043 bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1044 bad_buffer_weston_LDADD = libtest-client.la
1045
1046 keyboard_weston_SOURCES = tests/keyboard-test.c
1047 keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1048 keyboard_weston_LDADD = libtest-client.la
1049
1050 event_weston_SOURCES = tests/event-test.c
1051 event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1052 event_weston_LDADD = libtest-client.la
1053
1054 button_weston_SOURCES = tests/button-test.c
1055 button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1056 button_weston_LDADD = libtest-client.la
1057
1058 devices_weston_SOURCES = tests/devices-test.c
1059 devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1060 devices_weston_LDADD = libtest-client.la
1061
1062 text_weston_SOURCES = tests/text-test.c
1063 nodist_text_weston_SOURCES =                    \
1064         protocol/text-protocol.c                \
1065         protocol/text-client-protocol.h
1066 text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1067 text_weston_LDADD = libtest-client.la
1068
1069 subsurface_weston_SOURCES = tests/subsurface-test.c
1070 subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1071 subsurface_weston_LDADD = libtest-client.la
1072
1073 presentation_weston_SOURCES = tests/presentation-test.c
1074 nodist_presentation_weston_SOURCES =            \
1075         protocol/presentation_timing-protocol.c \
1076         protocol/presentation_timing-client-protocol.h
1077 presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1078 presentation_weston_LDADD = libtest-client.la
1079
1080 roles_weston_SOURCES = tests/roles-test.c
1081 roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1082 roles_weston_LDADD = libtest-client.la
1083
1084 if ENABLE_EGL
1085 weston_tests += buffer-count.weston
1086 buffer_count_weston_SOURCES = tests/buffer-count-test.c
1087 buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
1088 buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1089 endif
1090
1091 if ENABLE_XWAYLAND_TEST
1092 weston_tests += xwayland-test.weston
1093 xwayland_test_weston_SOURCES = tests/xwayland-test.c
1094 xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
1095 xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
1096 endif
1097
1098 matrix_test_SOURCES =                           \
1099         tests/matrix-test.c                     \
1100         shared/matrix.c                         \
1101         shared/matrix.h
1102 matrix_test_CPPFLAGS = -DUNIT_TEST
1103 matrix_test_LDADD = -lm -lrt
1104
1105 if ENABLE_IVI_SHELL
1106 module_tests +=                                 \
1107         ivi-layout-internal-test.la             \
1108         ivi-layout-test.la
1109
1110 ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1111 ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
1112 ivi_layout_internal_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1113 ivi_layout_internal_test_la_SOURCES =                   \
1114         tests/ivi_layout-internal-test.c
1115
1116 ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1117 ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
1118 ivi_layout_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1119 ivi_layout_test_la_SOURCES =                    \
1120         tests/ivi_layout-test-plugin.c          \
1121         tests/ivi-test.h
1122 nodist_ivi_layout_test_la_SOURCES =             \
1123         protocol/weston-test-protocol.c         \
1124         protocol/weston-test-server-protocol.h
1125
1126 ivi_tests +=                                    \
1127         ivi-shell-app.weston
1128
1129 ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1130 nodist_ivi_shell_app_weston_SOURCES =           \
1131         protocol/ivi-application-protocol.c     \
1132         protocol/ivi-application-client-protocol.h
1133 ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1134 ivi_shell_app_weston_LDADD = libtest-client.la
1135
1136 noinst_PROGRAMS += ivi-layout.ivi
1137
1138 ivi_layout_ivi_SOURCES =                        \
1139         tests/ivi_layout-test.c                 \
1140         tests/ivi-test.h
1141 nodist_ivi_layout_ivi_SOURCES =                 \
1142         protocol/ivi-application-protocol.c     \
1143         protocol/ivi-application-client-protocol.h
1144 ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1145 ivi_layout_ivi_LDADD = libtest-client.la
1146 endif
1147
1148 if BUILD_SETBACKLIGHT
1149 noinst_PROGRAMS += setbacklight
1150 setbacklight_SOURCES =                          \
1151         tests/setbacklight.c                    \
1152         src/libbacklight.c                      \
1153         src/libbacklight.h
1154 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1155 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1156 endif
1157
1158 EXTRA_DIST += tests/weston-tests-env
1159
1160 BUILT_SOURCES +=                                \
1161         protocol/weston-test-protocol.c \
1162         protocol/weston-test-server-protocol.h  \
1163         protocol/weston-test-client-protocol.h  \
1164         protocol/text-protocol.c                \
1165         protocol/text-client-protocol.h
1166
1167 EXTRA_DIST +=                                   \
1168         protocol/desktop-shell.xml              \
1169         protocol/screenshooter.xml              \
1170         protocol/text.xml                       \
1171         protocol/input-method.xml               \
1172         protocol/workspaces.xml                 \
1173         protocol/text-cursor-position.xml       \
1174         protocol/weston-test.xml                \
1175         protocol/xdg-shell.xml                  \
1176         protocol/fullscreen-shell.xml           \
1177         protocol/presentation_timing.xml        \
1178         protocol/scaler.xml                     \
1179         protocol/ivi-application.xml            \
1180         protocol/ivi-hmi-controller.xml
1181
1182 #
1183 # manual test modules in tests subdirectory
1184 #
1185
1186 noinst_LTLIBRARIES +=                           \
1187         surface-screenshot.la
1188
1189 surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1190 surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
1191 surface_screenshot_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1192 surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1193
1194
1195 #
1196 # Documentation
1197 #
1198
1199 man_MANS = weston.1 weston.ini.5
1200
1201 if ENABLE_DRM_COMPOSITOR
1202 man_MANS += weston-drm.7
1203 endif
1204
1205 MAN_SUBSTS =                                                            \
1206         -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g'     \
1207         -e 's|__weston_modules_dir__|$(pkglibdir)|g'                    \
1208         -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g'         \
1209         -e 's|__version__|$(PACKAGE_VERSION)|g'
1210
1211 SUFFIXES = .1 .5 .7 .man
1212
1213 %.1 %.5 %.7 : man/%.man
1214         $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1215
1216 EXTRA_DIST +=                                   \
1217         man/weston.man                          \
1218         man/weston-drm.man                      \
1219         man/weston.ini.man
1220
1221 CLEANFILES += $(man_MANS)
1222
1223
1224 protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1225         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1226
1227 protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1228         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1229
1230 protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1231         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@