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