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