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