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