5cd8b7807e5fccd71873d2cf912545abc2b5994f
[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         protocol/ivi-application-protocol.c             \
415         protocol/ivi-application-client-protocol.h
416 weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
417 weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
418
419 weston_simple_damage_SOURCES = clients/simple-damage.c
420 nodist_weston_simple_damage_SOURCES =           \
421         protocol/scaler-protocol.c              \
422         protocol/scaler-client-protocol.h       \
423         protocol/xdg-shell-protocol.c           \
424         protocol/xdg-shell-client-protocol.h    \
425         protocol/fullscreen-shell-protocol.c    \
426         protocol/fullscreen-shell-client-protocol.h
427 weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
428 weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
429
430 weston_simple_touch_SOURCES = clients/simple-touch.c
431 weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
432 weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
433
434 weston_multi_resource_SOURCES = clients/multi-resource.c
435 weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
436 weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
437 endif
438
439 if BUILD_SIMPLE_EGL_CLIENTS
440 demo_clients += weston-simple-egl
441 weston_simple_egl_SOURCES = clients/simple-egl.c
442 nodist_weston_simple_egl_SOURCES =              \
443         protocol/xdg-shell-protocol.c           \
444         protocol/xdg-shell-client-protocol.h            \
445         protocol/ivi-application-protocol.c             \
446         protocol/ivi-application-client-protocol.h
447 weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
448 weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
449 endif
450
451 noinst_LTLIBRARIES += libtoytoolkit.la
452
453 libtoytoolkit_la_SOURCES =                              \
454         clients/window.c                                \
455         clients/window.h
456
457 nodist_libtoytoolkit_la_SOURCES =                       \
458         protocol/text-cursor-position-protocol.c        \
459         protocol/text-cursor-position-client-protocol.h \
460         protocol/scaler-protocol.c                      \
461         protocol/scaler-client-protocol.h               \
462         protocol/workspaces-protocol.c                  \
463         protocol/workspaces-client-protocol.h           \
464         protocol/xdg-shell-protocol.c                   \
465         protocol/xdg-shell-client-protocol.h            \
466         protocol/ivi-application-protocol.c             \
467         protocol/ivi-application-client-protocol.h
468
469 BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
470
471
472 libtoytoolkit_la_LIBADD =                       \
473         $(CLIENT_LIBS)                          \
474         $(CAIRO_EGL_LIBS)                       \
475         libshared-cairo.la -lrt -lm
476 libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
477
478 weston_flower_SOURCES = clients/flower.c
479 weston_flower_LDADD = libtoytoolkit.la
480 weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
481
482 weston_screenshooter_SOURCES =                          \
483         clients/screenshot.c
484 nodist_weston_screenshooter_SOURCES =                   \
485         protocol/screenshooter-protocol.c               \
486         protocol/screenshooter-client-protocol.h
487 weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
488 weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
489
490 weston_terminal_SOURCES = clients/terminal.c
491 weston_terminal_LDADD = libtoytoolkit.la -lutil
492 weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
493
494 weston_image_SOURCES = clients/image.c
495 weston_image_LDADD = libtoytoolkit.la
496 weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
497
498 weston_cliptest_SOURCES =                               \
499         clients/cliptest.c                              \
500         src/vertex-clipping.c                           \
501         src/vertex-clipping.h
502 weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
503 weston_cliptest_LDADD = libtoytoolkit.la
504
505 weston_dnd_SOURCES = clients/dnd.c
506 weston_dnd_LDADD = libtoytoolkit.la
507 weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
508
509 weston_smoke_SOURCES = clients/smoke.c
510 weston_smoke_LDADD = libtoytoolkit.la
511 weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
512
513 weston_resizor_SOURCES = clients/resizor.c
514 weston_resizor_LDADD = libtoytoolkit.la
515 weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
516
517 weston_scaler_SOURCES = clients/scaler.c
518 weston_scaler_LDADD = libtoytoolkit.la
519 weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
520
521 if HAVE_CAIRO_GLESV2
522 demo_clients += weston-nested weston-nested-client
523
524 weston_nested_SOURCES = clients/nested.c
525 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
526 weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
527
528 weston_nested_client_SOURCES = clients/nested-client.c
529 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
530 weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
531 endif
532
533 weston_eventdemo_SOURCES = clients/eventdemo.c
534 weston_eventdemo_LDADD = libtoytoolkit.la
535 weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
536
537 weston_clickdot_SOURCES = clients/clickdot.c
538 weston_clickdot_LDADD = libtoytoolkit.la
539 weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
540
541 weston_transformed_SOURCES = clients/transformed.c
542 weston_transformed_LDADD = libtoytoolkit.la
543 weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
544
545 weston_fullscreen_SOURCES = clients/fullscreen.c
546 nodist_weston_fullscreen_SOURCES =                      \
547         protocol/fullscreen-shell-protocol.c            \
548         protocol/fullscreen-shell-client-protocol.h
549 weston_fullscreen_LDADD = libtoytoolkit.la
550 weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
551
552 weston_stacking_SOURCES = clients/stacking.c
553 weston_stacking_LDADD = libtoytoolkit.la
554 weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
555
556 weston_calibrator_SOURCES = clients/calibrator.c        \
557         shared/matrix.c                                 \
558         shared/matrix.h
559 weston_calibrator_LDADD = libtoytoolkit.la
560 weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
561
562 if BUILD_SUBSURFACES_CLIENT
563 demo_clients += weston-subsurfaces
564 weston_subsurfaces_SOURCES = clients/subsurfaces.c
565 weston_subsurfaces_CFLAGS =                     \
566         $(AM_CFLAGS)                            \
567         $(SIMPLE_EGL_CLIENT_CFLAGS)             \
568         $(CLIENT_CFLAGS)
569 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
570 endif
571
572 if HAVE_PANGO
573 demo_clients += weston-editor
574 weston_editor_SOURCES = clients/editor.c
575 nodist_weston_editor_SOURCES =                  \
576         protocol/text-protocol.c                \
577         protocol/text-client-protocol.h
578 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
579 weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
580 endif
581
582 weston_keyboard_SOURCES = clients/keyboard.c
583 nodist_weston_keyboard_SOURCES =                        \
584         protocol/desktop-shell-client-protocol.h        \
585         protocol/desktop-shell-protocol.c               \
586         protocol/input-method-protocol.c                \
587         protocol/input-method-client-protocol.h
588 weston_keyboard_LDADD = libtoytoolkit.la
589 weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
590
591 weston_simple_im_SOURCES = clients/weston-simple-im.c
592 nodist_weston_simple_im_SOURCES =               \
593         protocol/input-method-protocol.c        \
594         protocol/input-method-client-protocol.h
595 weston_simple_im_LDADD = $(CLIENT_LIBS)
596 weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
597
598 weston_info_SOURCES = clients/weston-info.c
599 weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
600 weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
601
602 weston_desktop_shell_SOURCES = clients/desktop-shell.c
603 nodist_weston_desktop_shell_SOURCES =                   \
604         protocol/desktop-shell-client-protocol.h        \
605         protocol/desktop-shell-protocol.c
606 weston_desktop_shell_LDADD = libtoytoolkit.la
607 weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
608
609 if ENABLE_IVI_SHELL
610 weston_ivi_shell_user_interface_SOURCES = clients/ivi-shell-user-interface.c
611 nodist_weston_ivi_shell_user_interface_SOURCES =                        \
612         protocol/ivi-hmi-controller-client-protocol.h                   \
613         protocol/ivi-hmi-controller-protocol.c                          \
614         protocol/ivi-application-client-protocol.h                      \
615         protocol/ivi-application-protocol.c
616 weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
617 weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
618 endif
619
620 if BUILD_FULL_GL_CLIENTS
621 demo_clients += weston-gears
622 weston_gears_SOURCES = clients/gears.c
623 weston_gears_LDADD = libtoytoolkit.la
624 weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
625
626 if HAVE_GLU
627 libexec_PROGRAMS += weston-screensaver
628 weston_screensaver_SOURCES =                            \
629         clients/wscreensaver.c                          \
630         clients/wscreensaver.h                          \
631         clients/wscreensaver-glue.c                     \
632         clients/wscreensaver-glue.h                     \
633         clients/glmatrix.c                              \
634         clients/matrix3.xpm
635 nodist_weston_screensaver_SOURCES =                     \
636         protocol/desktop-shell-client-protocol.h        \
637         protocol/desktop-shell-protocol.c
638
639 weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
640 weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
641
642 endif
643
644 endif
645
646 endif
647
648 BUILT_SOURCES +=                                        \
649         protocol/screenshooter-protocol.c               \
650         protocol/screenshooter-client-protocol.h        \
651         protocol/text-cursor-position-client-protocol.h \
652         protocol/text-cursor-position-protocol.c        \
653         protocol/text-protocol.c                        \
654         protocol/text-client-protocol.h                 \
655         protocol/input-method-protocol.c                \
656         protocol/input-method-client-protocol.h         \
657         protocol/desktop-shell-client-protocol.h        \
658         protocol/desktop-shell-protocol.c               \
659         protocol/scaler-client-protocol.h               \
660         protocol/scaler-protocol.c                      \
661         protocol/workspaces-client-protocol.h           \
662         protocol/workspaces-protocol.c                  \
663         protocol/fullscreen-shell-protocol.c            \
664         protocol/fullscreen-shell-client-protocol.h     \
665         protocol/xdg-shell-protocol.c                   \
666         protocol/xdg-shell-client-protocol.h            \
667         protocol/ivi-hmi-controller-protocol.c          \
668         protocol/ivi-hmi-controller-client-protocol.h   \
669         protocol/ivi-application-protocol.c             \
670         protocol/ivi-application-client-protocol.h
671
672 westondatadir = $(datadir)/weston
673 dist_westondata_DATA =                          \
674         data/wayland.svg                        \
675         data/wayland.png                        \
676         data/pattern.png                        \
677         data/terminal.png                       \
678         data/border.png                         \
679         data/icon_window.png                    \
680         data/sign_close.png                     \
681         data/sign_maximize.png                  \
682         data/sign_minimize.png                  \
683         data/background.png                     \
684         data/tiling.png                         \
685         data/fullscreen.png                     \
686         data/panel.png                          \
687         data/random.png                         \
688         data/sidebyside.png                     \
689         data/home.png                           \
690         data/icon_ivi_clickdot.png              \
691         data/icon_ivi_flower.png                \
692         data/icon_ivi_simple-egl.png            \
693         data/icon_ivi_simple-shm.png            \
694         data/icon_ivi_smoke.png
695
696
697 if BUILD_WCAP_TOOLS
698 bin_PROGRAMS += wcap-decode
699
700 wcap_decode_SOURCES =                           \
701         wcap/main.c                             \
702         wcap/wcap-decode.c                      \
703         wcap/wcap-decode.h
704
705 wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
706 wcap_decode_LDADD = $(WCAP_LIBS)
707 endif
708
709
710 if ENABLE_DESKTOP_SHELL
711
712 module_LTLIBRARIES += desktop-shell.la
713
714 desktop_shell_la_CPPFLAGS =                     \
715         -I$(top_builddir)/protocol              \
716         -I$(top_srcdir)/shared                  \
717         -I$(top_srcdir)/src                     \
718         -I$(top_builddir)/src                   \
719         -I$(top_builddir)/desktop-shell         \
720         -DDATADIR='"$(datadir)"'                \
721         -DMODULEDIR='"$(moduledir)"'            \
722         -DLIBEXECDIR='"$(libexecdir)"'          \
723         -DIN_WESTON
724
725 desktop_shell_la_LDFLAGS = -module -avoid-version
726 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
727 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
728 desktop_shell_la_SOURCES =                              \
729         desktop-shell/shell.h                           \
730         desktop-shell/shell.c                           \
731         desktop-shell/exposay.c                         \
732         desktop-shell/input-panel.c
733 nodist_desktop_shell_la_SOURCES =                       \
734         protocol/desktop-shell-protocol.c               \
735         protocol/desktop-shell-server-protocol.h        \
736         protocol/xdg-shell-protocol.c                   \
737         protocol/xdg-shell-server-protocol.h
738
739 BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
740 endif
741
742 if ENABLE_FULLSCREEN_SHELL
743
744 module_LTLIBRARIES += fullscreen-shell.la
745
746 fullscreen_shell_la_CPPFLAGS =                  \
747         -I$(top_builddir)/protocol              \
748         -I$(top_srcdir)/shared                  \
749         -I$(top_srcdir)/src                     \
750         -I$(top_builddir)/src                   \
751         -DIN_WESTON
752
753 fullscreen_shell_la_LDFLAGS = -module -avoid-version
754 fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
755 fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
756 fullscreen_shell_la_SOURCES =                   \
757         fullscreen-shell/fullscreen-shell.c
758 nodist_fullscreen_shell_la_SOURCES =                    \
759         protocol/fullscreen-shell-protocol.c            \
760         protocol/fullscreen-shell-server-protocol.h
761
762 BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
763 endif
764
765 if ENABLE_IVI_SHELL
766
767 module_LTLIBRARIES +=                           \
768         $(ivi_layout)                           \
769         $(ivi_shell)                            \
770         $(hmi_controller)
771
772 ivi_layout = ivi-layout.la
773 ivi_layout_la_LDFLAGS = -module -avoid-version
774 ivi_layout_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
775 ivi_layout_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
776 ivi_layout_la_SOURCES =                         \
777         ivi-shell/ivi-layout-export.h           \
778         ivi-shell/ivi-layout-private.h          \
779         ivi-shell/ivi-layout.c                  \
780         ivi-shell/ivi-layout-transition.c
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-shell.h                   \
788         ivi-shell/ivi-shell.c                   \
789         ivi-shell/ivi-layout-private.h          \
790         ivi-shell/input-panel-ivi.c
791 nodist_ivi_shell_la_SOURCES =                   \
792         protocol/ivi-application-protocol.c             \
793         protocol/ivi-application-server-protocol.h
794
795 BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
796
797 hmi_controller = hmi-controller.la
798 hmi_controller_la_LDFLAGS = -module -avoid-version
799 hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
800 hmi_controller_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
801 hmi_controller_la_SOURCES =                             \
802         ivi-shell/ivi-layout-export.h                   \
803         ivi-shell/hmi-controller.c
804 nodist_hmi_controller_la_SOURCES =                      \
805         protocol/ivi-hmi-controller-protocol.c          \
806         protocol/ivi-hmi-controller-server-protocol.h
807
808 BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
809
810 endif
811
812
813 if ENABLE_SCREEN_SHARING
814
815 module_LTLIBRARIES += screen-share.la
816
817 screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
818 screen_share_la_LDFLAGS = -module -avoid-version
819 screen_share_la_LIBADD =                        \
820         $(COMPOSITOR_LIBS)                      \
821         $(SCREEN_SHARE_LIBS)                    \
822         libshared-cairo.la
823 screen_share_la_CFLAGS =                        \
824         $(COMPOSITOR_CFLAGS)                    \
825         $(SCREEN_SHARE_CFLAGS)                  \
826         $(GCC_CFLAGS)
827 screen_share_la_SOURCES =                       \
828         src/screen-share.c
829 nodist_screen_share_la_SOURCES =                        \
830         protocol/fullscreen-shell-protocol.c            \
831         protocol/fullscreen-shell-client-protocol.h
832
833 endif
834
835 if ENABLE_XWAYLAND
836
837 module_LTLIBRARIES += xwayland.la
838
839 xwayland_la_CPPFLAGS =                          \
840         -I$(top_builddir)/protocol              \
841         -I$(top_srcdir)/shared                  \
842         -I$(top_srcdir)/src                     \
843         -I$(top_builddir)/src                   \
844         -I$(top_builddir)/xwayland              \
845         -DDATADIR='"$(datadir)"'                \
846         -DMODULEDIR='"$(moduledir)"'            \
847         -DLIBEXECDIR='"$(libexecdir)"'          \
848         -DXSERVER_PATH='"@XSERVER_PATH@"'
849
850 xwayland_la_LDFLAGS = -module -avoid-version
851 xwayland_la_LIBADD =                    \
852         $(XWAYLAND_LIBS)                \
853         $(top_builddir)/libshared-cairo.la
854 xwayland_la_CFLAGS =                            \
855         $(GCC_CFLAGS)                           \
856         $(COMPOSITOR_CFLAGS)                    \
857         $(PIXMAN_CFLAGS)                        \
858         $(CAIRO_CFLAGS)
859 xwayland_la_SOURCES =                           \
860         xwayland/xwayland.h                     \
861         xwayland/window-manager.c               \
862         xwayland/selection.c                    \
863         xwayland/dnd.c                          \
864         xwayland/launcher.c                     \
865         xwayland/hash.c                         \
866         xwayland/hash.h
867 endif
868
869
870 #
871 # Shared utilities
872 #
873
874 noinst_LTLIBRARIES += libshared.la libshared-cairo.la
875
876 libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
877
878 libshared_la_SOURCES =                          \
879         shared/config-parser.c                  \
880         shared/option-parser.c                  \
881         shared/config-parser.h                  \
882         shared/str-util.c                       \
883         shared/str-util.h                       \
884         shared/os-compatibility.c               \
885         shared/os-compatibility.h
886
887 libshared_cairo_la_CFLAGS =                     \
888         -DDATADIR='"$(datadir)"'                \
889         $(GCC_CFLAGS)                           \
890         $(COMPOSITOR_CFLAGS)                    \
891         $(PIXMAN_CFLAGS)                        \
892         $(CAIRO_CFLAGS)                         \
893         $(PNG_CFLAGS)                           \
894         $(WEBP_CFLAGS)
895
896 libshared_cairo_la_LIBADD =                     \
897         $(PIXMAN_LIBS)                          \
898         $(CAIRO_LIBS)                           \
899         $(PNG_LIBS)                             \
900         $(WEBP_LIBS)                            \
901         $(JPEG_LIBS)
902
903 libshared_cairo_la_SOURCES =                    \
904         $(libshared_la_SOURCES)                 \
905         shared/image-loader.c                   \
906         shared/image-loader.h                   \
907         shared/cairo-util.c                     \
908         shared/frame.c                          \
909         shared/cairo-util.h
910
911
912 #
913 # tests subdirectory
914 #
915
916 TESTS = $(shared_tests) $(module_tests) $(weston_tests)
917
918 shared_tests =                                  \
919         config-parser.test                      \
920         strutil.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         subsurface.weston
934
935
936 AM_TESTS_ENVIRONMENT = \
937         abs_builddir='$(abs_builddir)'; export abs_builddir;
938
939 TEST_EXTENSIONS = .la .weston
940 LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
941 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
942
943 clean-local:
944         -rm -rf logs
945
946 # To remove when automake 1.11 support is dropped
947 export abs_builddir
948
949 noinst_LTLIBRARIES +=                   \
950         weston-test.la                  \
951         $(module_tests)                 \
952         libtest-runner.la               \
953         libtest-client.la
954
955 noinst_PROGRAMS +=                      \
956         $(setbacklight)                 \
957         $(shared_tests)                 \
958         $(weston_tests)                 \
959         matrix-test
960
961 test_module_ldflags = \
962         -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
963
964 surface_global_test_la_SOURCES = tests/surface-global-test.c
965 surface_global_test_la_LDFLAGS = $(test_module_ldflags)
966 surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
967
968 surface_test_la_SOURCES = tests/surface-test.c
969 surface_test_la_LDFLAGS = $(test_module_ldflags)
970 surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
971
972 weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
973 weston_test_la_LDFLAGS = $(test_module_ldflags)
974 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
975 weston_test_la_SOURCES = tests/weston-test.c
976 nodist_weston_test_la_SOURCES =                 \
977         protocol/wayland-test-protocol.c        \
978         protocol/wayland-test-server-protocol.h
979
980 if ENABLE_EGL
981 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
982 weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
983 endif
984
985 libtest_runner_la_SOURCES =                     \
986         tests/weston-test-runner.c              \
987         tests/weston-test-runner.h
988 libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
989
990 config_parser_test_SOURCES = tests/config-parser-test.c
991 config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
992
993 strutil_test_SOURCES = tests/strutil-test.c
994 strutil_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
995
996 vertex_clip_test_SOURCES =                      \
997         tests/vertex-clip-test.c                \
998         src/vertex-clipping.c                   \
999         src/vertex-clipping.h
1000 vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1001
1002 libtest_client_la_SOURCES =                     \
1003         tests/weston-test-client-helper.c       \
1004         tests/weston-test-client-helper.h
1005 nodist_libtest_client_la_SOURCES =              \
1006         protocol/wayland-test-protocol.c        \
1007         protocol/wayland-test-client-protocol.h
1008 libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1009 libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
1010
1011 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
1012 bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1013 bad_buffer_weston_LDADD = libtest-client.la
1014
1015 keyboard_weston_SOURCES = tests/keyboard-test.c
1016 keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1017 keyboard_weston_LDADD = libtest-client.la
1018
1019 event_weston_SOURCES = tests/event-test.c
1020 event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1021 event_weston_LDADD = libtest-client.la
1022
1023 button_weston_SOURCES = tests/button-test.c
1024 button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1025 button_weston_LDADD = libtest-client.la
1026
1027 text_weston_SOURCES = tests/text-test.c
1028 nodist_text_weston_SOURCES =                    \
1029         protocol/text-protocol.c                \
1030         protocol/text-client-protocol.h
1031 text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1032 text_weston_LDADD = libtest-client.la
1033
1034 subsurface_weston_SOURCES = tests/subsurface-test.c
1035 subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1036 subsurface_weston_LDADD = libtest-client.la
1037
1038 if ENABLE_EGL
1039 weston_tests += buffer-count.weston
1040 buffer_count_weston_SOURCES = tests/buffer-count-test.c
1041 buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
1042 buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1043 endif
1044
1045 if ENABLE_XWAYLAND_TEST
1046 weston_tests += xwayland-test.weston
1047 xwayland_test_weston_SOURCES = tests/xwayland-test.c
1048 xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
1049 xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
1050 endif
1051
1052 matrix_test_SOURCES =                           \
1053         tests/matrix-test.c                     \
1054         shared/matrix.c                         \
1055         shared/matrix.h
1056 matrix_test_CPPFLAGS = -DUNIT_TEST
1057 matrix_test_LDADD = -lm -lrt
1058
1059 if BUILD_SETBACKLIGHT
1060 noinst_PROGRAMS += setbacklight
1061 setbacklight_SOURCES =                  \
1062         tests/setbacklight.c            \
1063         shared/str-util.c               \
1064         shared/str-util.h               \
1065         src/libbacklight.c              \
1066         src/libbacklight.h
1067 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1068 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1069 endif
1070
1071 EXTRA_DIST += tests/weston-tests-env
1072
1073 BUILT_SOURCES +=                                \
1074         protocol/wayland-test-protocol.c        \
1075         protocol/wayland-test-server-protocol.h \
1076         protocol/wayland-test-client-protocol.h \
1077         protocol/text-protocol.c                \
1078         protocol/text-client-protocol.h
1079
1080 EXTRA_DIST +=                                   \
1081         protocol/desktop-shell.xml              \
1082         protocol/screenshooter.xml              \
1083         protocol/text.xml                       \
1084         protocol/input-method.xml               \
1085         protocol/workspaces.xml                 \
1086         protocol/text-cursor-position.xml       \
1087         protocol/wayland-test.xml               \
1088         protocol/xdg-shell.xml                  \
1089         protocol/fullscreen-shell.xml           \
1090         protocol/scaler.xml                     \
1091         protocol/ivi-application.xml            \
1092         protocol/ivi-hmi-controller.xml
1093
1094 man_MANS = weston.1 weston.ini.5
1095
1096 if ENABLE_DRM_COMPOSITOR
1097 man_MANS += weston-drm.7
1098 endif
1099
1100 MAN_SUBSTS =                                                            \
1101         -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g'     \
1102         -e 's|__weston_modules_dir__|$(pkglibdir)|g'                    \
1103         -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g'         \
1104         -e 's|__version__|$(PACKAGE_VERSION)|g'
1105
1106 SUFFIXES = .1 .5 .7 .man
1107
1108 %.1 %.5 %.7 : man/%.man
1109         $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1110
1111 EXTRA_DIST +=                                   \
1112         man/weston.man                          \
1113         man/weston-drm.man                      \
1114         man/weston.ini.man
1115
1116 CLEANFILES += $(man_MANS)
1117
1118
1119 protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1120         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1121
1122 protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1123         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1124
1125 protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1126         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@