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