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