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