blob: 6c5fd8596a85cbac06643f371e326d99c8f4101c [file] [log] [blame]
Kristian Høgsberge895f142014-01-27 21:46:30 -08001bin_PROGRAMS =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08002noinst_PROGRAMS =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08003moduledir = $(libdir)/weston
4module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08005noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08006BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -08007
Kristian Høgsberg2ba10df2013-12-03 16:38:15 -08008SUBDIRS = \
9 shared \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080010 clients
Kristian Høgsberg61cfa662012-05-26 13:19:22 -040011
Kristian Høgsberg850f24c2012-02-09 09:20:44 -050012DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050013
Neil Robertse3de16e2013-11-22 16:46:00 +000014EXTRA_DIST = weston.ini.in wayland-scanner.mk
15
16weston.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
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -080023all-local : weston.ini validate-protocol-xml
Kristian Høgsberg98463742013-12-16 23:12:46 -080024
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080025AM_CFLAGS = $(GCC_CFLAGS)
26
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080027AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080028 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080029 -I$(top_builddir)/src \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080030 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080031 -I$(top_srcdir)/shared \
32 -DDATADIR='"$(datadir)"' \
33 -DMODULEDIR='"$(moduledir)"' \
34 -DLIBEXECDIR='"$(libexecdir)"'
35
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080036CLEANFILES = weston.ini $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080037
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080038bin_PROGRAMS += weston
39
40weston_LDFLAGS = -export-dynamic
41weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
42weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
43weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
44 $(DLOPEN_LIBS) -lm shared/libshared.la
45
46weston_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/screenshooter-protocol.c \
57 src/screenshooter-server-protocol.h \
58 src/clipboard.c \
59 src/text-cursor-position-protocol.c \
60 src/text-cursor-position-server-protocol.h \
61 src/zoom.c \
62 src/text-backend.c \
63 src/text-protocol.c \
64 src/text-server-protocol.h \
65 src/input-method-protocol.c \
66 src/input-method-server-protocol.h \
67 src/workspaces-protocol.c \
68 src/workspaces-server-protocol.h \
69 src/scaler-protocol.c \
70 src/scaler-server-protocol.h \
71 src/bindings.c \
72 src/animation.c \
73 src/noop-renderer.c \
74 src/pixman-renderer.c \
75 src/pixman-renderer.h \
76 shared/matrix.c \
77 shared/matrix.h \
78 shared/zalloc.h \
79 src/weston-egl-ext.h
80
81noinst_LTLIBRARIES += \
82 libsession-helper.la
83
84libsession_helper_la_SOURCES = \
85 src/weston-launch.h \
86 src/launcher-util.c \
87 src/launcher-util.h
88libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
89libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
90
91if ENABLE_DBUS
92if HAVE_SYSTEMD_LOGIN
93libsession_helper_la_SOURCES += \
94 src/dbus.h \
95 src/dbus.c \
96 src/logind-util.h \
97 src/logind-util.c
98libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
99libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
100endif
101endif
102
103src/git-version.h : .FORCE
104 $(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)')\"" > $@-new; \
105 cmp -s $@ $@-new || cp $@-new $@; \
106 rm $@-new)
107
108.FORCE :
109
110if BUILD_WESTON_LAUNCH
111bin_PROGRAMS += weston-launch
112weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
113weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
114weston_launch_CFLAGS= \
115 $(GCC_CFLAGS) \
116 $(PAM_CFLAGS) \
117 $(SYSTEMD_LOGIN_CFLAGS) \
118 $(LIBDRM_CFLAGS)
119weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
120
121if ENABLE_SETUID_INSTALL
122install-exec-hook:
123 chown root $(DESTDIR)$(bindir)/weston-launch
124 chmod u+s $(DESTDIR)$(bindir)/weston-launch
125endif
126
127endif # BUILD_WESTON_LAUNCH
128
129pkgconfigdir = $(libdir)/pkgconfig
130pkgconfig_DATA = src/weston.pc
131
132westonincludedir = $(includedir)/weston
133westoninclude_HEADERS = \
134 src/version.h \
135 src/compositor.h \
136 shared/matrix.h \
137 shared/config-parser.h \
138 shared/zalloc.h
139
140if ENABLE_EGL
141module_LTLIBRARIES += gl-renderer.la
142gl_renderer_la_LDFLAGS = -module -avoid-version
143gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
144gl_renderer_la_CFLAGS = \
145 $(COMPOSITOR_CFLAGS) \
146 $(EGL_CFLAGS) \
147 $(GCC_CFLAGS)
148gl_renderer_la_SOURCES = \
149 src/gl-renderer.h \
150 src/gl-renderer.c \
151 src/vertex-clipping.c \
152 src/vertex-clipping.h
153endif
154
155if ENABLE_X11_COMPOSITOR
156module_LTLIBRARIES += x11-backend.la
157x11_backend_la_LDFLAGS = -module -avoid-version
158x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
159 shared/libshared-cairo.la
160x11_backend_la_CFLAGS = \
161 $(COMPOSITOR_CFLAGS) \
162 $(EGL_CFLAGS) \
163 $(PIXMAN_CFLAGS) \
164 $(CAIRO_CFLAGS) \
165 $(X11_COMPOSITOR_CFLAGS) \
166 $(GCC_CFLAGS)
167x11_backend_la_SOURCES = src/compositor-x11.c
168endif
169
170if ENABLE_DRM_COMPOSITOR
171module_LTLIBRARIES += drm-backend.la
172drm_backend_la_LDFLAGS = -module -avoid-version
173drm_backend_la_LIBADD = \
174 $(COMPOSITOR_LIBS) \
175 $(DRM_COMPOSITOR_LIBS) \
176 shared/libshared.la -lrt \
177 libsession-helper.la
178drm_backend_la_CFLAGS = \
179 $(COMPOSITOR_CFLAGS) \
180 $(EGL_CFLAGS) \
181 $(DRM_COMPOSITOR_CFLAGS) \
182 $(GCC_CFLAGS)
183drm_backend_la_SOURCES = \
184 src/compositor-drm.c \
185 src/udev-seat.c \
186 src/udev-seat.h \
187 src/evdev.c \
188 src/evdev.h \
189 src/evdev-touchpad.c \
190 src/libbacklight.c \
191 src/libbacklight.h
192
193if ENABLE_VAAPI_RECORDER
194drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
195drm_backend_la_LIBADD += $(LIBVA_LIBS)
196drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
197endif
198endif
199
200if ENABLE_WAYLAND_COMPOSITOR
201module_LTLIBRARIES += wayland-backend.la
202wayland_backend_la_LDFLAGS = -module -avoid-version
203wayland_backend_la_LIBADD = \
204 $(COMPOSITOR_LIBS) \
205 $(WAYLAND_COMPOSITOR_LIBS) \
206 shared/libshared-cairo.la
207wayland_backend_la_CFLAGS = \
208 $(COMPOSITOR_CFLAGS) \
209 $(EGL_CFLAGS) \
210 $(PIXMAN_CFLAGS) \
211 $(CAIRO_CFLAGS) \
212 $(WAYLAND_COMPOSITOR_CFLAGS) \
213 $(GCC_CFLAGS)
214wayland_backend_la_SOURCES = src/compositor-wayland.c
215endif
216
217if ENABLE_RPI_COMPOSITOR
218if INSTALL_RPI_COMPOSITOR
219module_LTLIBRARIES += rpi-backend.la
220else
221noinst_LTLIBRARIES += rpi-backend.la
222endif
223
224rpi_backend_la_LDFLAGS = -module -avoid-version
225rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
226 $(RPI_COMPOSITOR_LIBS) \
227 $(RPI_BCM_HOST_LIBS) \
228 libsession-helper.la \
229 shared/libshared.la
230rpi_backend_la_CFLAGS = \
231 $(GCC_CFLAGS) \
232 $(COMPOSITOR_CFLAGS) \
233 $(RPI_COMPOSITOR_CFLAGS) \
234 $(RPI_BCM_HOST_CFLAGS)
235rpi_backend_la_SOURCES = \
236 src/compositor-rpi.c \
237 src/rpi-renderer.c \
238 src/rpi-renderer.h \
239 src/rpi-bcm-stubs.h \
240 src/udev-seat.c \
241 src/udev-seat.h \
242 src/evdev.c \
243 src/evdev.h \
244 src/evdev-touchpad.c
245
246if ENABLE_EGL
247rpi_backend_la_LIBADD += $(EGL_LIBS)
248rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
249endif
250
251endif
252
253if ENABLE_HEADLESS_COMPOSITOR
254module_LTLIBRARIES += headless-backend.la
255headless_backend_la_LDFLAGS = -module -avoid-version
256headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
257 shared/libshared.la
258headless_backend_la_CFLAGS = \
259 $(COMPOSITOR_CFLAGS) \
260 $(GCC_CFLAGS)
261headless_backend_la_SOURCES = src/compositor-headless.c
262endif
263
264if ENABLE_FBDEV_COMPOSITOR
265module_LTLIBRARIES += fbdev-backend.la
266fbdev_backend_la_LDFLAGS = -module -avoid-version
267fbdev_backend_la_LIBADD = \
268 $(COMPOSITOR_LIBS) \
269 $(FBDEV_COMPOSITOR_LIBS) \
270 libsession-helper.la \
271 shared/libshared.la
272fbdev_backend_la_CFLAGS = \
273 $(COMPOSITOR_CFLAGS) \
274 $(EGL_CFLAGS) \
275 $(FBDEV_COMPOSITOR_CFLAGS) \
276 $(PIXMAN_CFLAGS) \
277 $(GCC_CFLAGS)
278fbdev_backend_la_SOURCES = \
279 src/compositor-fbdev.c \
280 src/udev-seat.c \
281 src/udev-seat.h \
282 src/evdev.c \
283 src/evdev.h \
284 src/evdev-touchpad.c
285endif
286
287if ENABLE_RDP_COMPOSITOR
288module_LTLIBRARIES += rdp-backend.la
289rdp_backend_la_LDFLAGS = -module -avoid-version
290rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
291 $(RDP_COMPOSITOR_LIBS) \
292 shared/libshared.la
293rdp_backend_la_CFLAGS = \
294 $(COMPOSITOR_CFLAGS) \
295 $(RDP_COMPOSITOR_CFLAGS) \
296 $(GCC_CFLAGS)
297rdp_backend_la_SOURCES = src/compositor-rdp.c
298endif
299
300if HAVE_LCMS
301module_LTLIBRARIES += cms-static.la
302cms_static_la_LDFLAGS = -module -avoid-version
303cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) shared/libshared.la
304cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
305cms_static_la_SOURCES = \
306 src/cms-static.c \
307 src/cms-helper.c \
308 src/cms-helper.h
309if ENABLE_COLORD
310module_LTLIBRARIES += cms-colord.la
311cms_colord_la_LDFLAGS = -module -avoid-version
312cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
313cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
314cms_colord_la_SOURCES = \
315 src/cms-colord.c \
316 src/cms-helper.c \
317 src/cms-helper.h
318endif
319endif
320
321noinst_PROGRAMS += spring-tool
322spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
323spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
324spring_tool_SOURCES = \
325 src/spring-tool.c \
326 src/animation.c \
327 shared/matrix.c \
328 shared/matrix.h \
329 src/compositor.h
330
331BUILT_SOURCES += \
332 src/screenshooter-server-protocol.h \
333 src/screenshooter-protocol.c \
334 src/text-cursor-position-server-protocol.h \
335 src/text-cursor-position-protocol.c \
336 src/text-protocol.c \
337 src/text-server-protocol.h \
338 src/input-method-protocol.c \
339 src/input-method-server-protocol.h \
340 src/workspaces-server-protocol.h \
341 src/workspaces-protocol.c \
342 src/scaler-server-protocol.h \
343 src/scaler-protocol.c \
344 src/git-version.h
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800345
346westondatadir = $(datadir)/weston
347dist_westondata_DATA = \
348 data/wayland.svg \
349 data/wayland.png \
350 data/pattern.png \
351 data/terminal.png \
352 data/border.png \
353 data/icon_window.png \
354 data/sign_close.png \
355 data/sign_maximize.png \
356 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800357
358
359if BUILD_WCAP_TOOLS
360bin_PROGRAMS += wcap-decode
361
362wcap_decode_SOURCES = \
363 wcap/main.c \
364 wcap/wcap-decode.c \
365 wcap/wcap-decode.h
366
367wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
368wcap_decode_LDADD = $(WCAP_LIBS)
369endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800370
371
372if ENABLE_DESKTOP_SHELL
373
374module_LTLIBRARIES += desktop-shell.la
375
376desktop_shell_la_CPPFLAGS = \
377 -I$(top_srcdir)/shared \
378 -I$(top_srcdir)/src \
379 -I$(top_builddir)/src \
380 -I$(top_builddir)/desktop-shell \
381 -DDATADIR='"$(datadir)"' \
382 -DMODULEDIR='"$(moduledir)"' \
383 -DLIBEXECDIR='"$(libexecdir)"' \
384 -DIN_WESTON
385
386desktop_shell_la_LDFLAGS = -module -avoid-version
387desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) \
388 shared/libshared.la
389desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
390desktop_shell_la_SOURCES = \
391 desktop-shell/shell.h \
392 desktop-shell/shell.c \
393 desktop-shell/exposay.c \
394 desktop-shell/input-panel.c \
395 desktop-shell/desktop-shell-protocol.c \
396 desktop-shell/desktop-shell-server-protocol.h \
397 desktop-shell/xdg-shell-protocol.c \
398 desktop-shell/xdg-shell-server-protocol.h
399
400BUILT_SOURCES += \
401 desktop-shell/desktop-shell-protocol.c \
402 desktop-shell/desktop-shell-server-protocol.h \
403 desktop-shell/xdg-shell-protocol.c \
404 desktop-shell/xdg-shell-server-protocol.h
405endif
406
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800407
408if ENABLE_XWAYLAND
409
410module_LTLIBRARIES += xwayland.la
411
412xwayland_la_CPPFLAGS = \
413 -I$(top_srcdir)/shared \
414 -I$(top_srcdir)/src \
415 -I$(top_builddir)/src \
416 -I$(top_builddir)/xwayland \
417 -DDATADIR='"$(datadir)"' \
418 -DMODULEDIR='"$(moduledir)"' \
419 -DLIBEXECDIR='"$(libexecdir)"' \
420 -DXSERVER_PATH='"@XSERVER_PATH@"'
421
422xwayland_la_LDFLAGS = -module -avoid-version
423xwayland_la_LIBADD = \
424 $(XWAYLAND_LIBS) \
425 $(top_builddir)/shared/libshared-cairo.la
426xwayland_la_CFLAGS = \
427 $(GCC_CFLAGS) \
428 $(COMPOSITOR_CFLAGS) \
429 $(PIXMAN_CFLAGS) \
430 $(CAIRO_CFLAGS)
431xwayland_la_SOURCES = \
432 xwayland/xwayland.h \
433 xwayland/window-manager.c \
434 xwayland/selection.c \
435 xwayland/dnd.c \
436 xwayland/launcher.c \
437 xwayland/xserver-protocol.c \
438 xwayland/xserver-server-protocol.h \
439 xwayland/hash.c \
440 xwayland/hash.h
441
442BUILT_SOURCES += \
443 xwayland/xserver-protocol.c \
444 xwayland/xserver-server-protocol.h
445endif
446
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800447
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800448#
449# tests subdirectory
450#
451
452TESTS = $(shared_tests) $(module_tests) $(weston_tests)
453
454shared_tests = \
455 config-parser.test \
456 vertex-clip.test
457
458module_tests = \
459 surface-test.la \
460 surface-global-test.la
461
462weston_tests = \
463 bad_buffer.weston \
464 keyboard.weston \
465 event.weston \
466 button.weston \
467 text.weston \
468 subsurface.weston
469
470
471AM_TESTS_ENVIRONMENT = \
472 abs_builddir='$(abs_builddir)'; export abs_builddir;
473
474TEST_EXTENSIONS = .la .weston
475LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
476WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
477
478clean-local:
479 -rm -rf tests/logs
480
481# To remove when automake 1.11 support is dropped
482export abs_builddir
483
484noinst_LTLIBRARIES += \
485 weston-test.la \
486 $(module_tests) \
487 libtest-runner.la \
488 libtest-client.la
489
490noinst_PROGRAMS += \
491 $(setbacklight) \
492 $(shared_tests) \
493 $(weston_tests) \
494 matrix-test
495
496test_module_ldflags = \
497 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
498
499surface_global_test_la_SOURCES = tests/surface-global-test.c
500surface_global_test_la_LDFLAGS = $(test_module_ldflags)
501surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
502
503surface_test_la_SOURCES = tests/surface-test.c
504surface_test_la_LDFLAGS = $(test_module_ldflags)
505surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
506
507weston_test_la_LIBADD = $(COMPOSITOR_LIBS) shared/libshared.la
508weston_test_la_LDFLAGS = $(test_module_ldflags)
509weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
510weston_test_la_SOURCES = \
511 tests/weston-test.c \
512 tests/wayland-test-protocol.c \
513 tests/wayland-test-server-protocol.h
514
515if ENABLE_EGL
516weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
517weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
518endif
519
520libtest_runner_la_SOURCES = \
521 tests/weston-test-runner.c \
522 tests/weston-test-runner.h
523libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
524
525config_parser_test_SOURCES = tests/config-parser-test.c
526config_parser_test_LDADD = shared/libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
527
528vertex_clip_test_SOURCES = \
529 tests/vertex-clip-test.c \
530 src/vertex-clipping.c \
531 src/vertex-clipping.h
532vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
533
534libtest_client_la_SOURCES = \
535 tests/weston-test-client-helper.c \
536 tests/weston-test-client-helper.h \
537 tests/wayland-test-protocol.c \
538 tests/wayland-test-client-protocol.h
539libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) shared/libshared.la libtest-runner.la
540
541bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
542bad_buffer_weston_LDADD = libtest-client.la
543
544keyboard_weston_SOURCES = tests/keyboard-test.c
545keyboard_weston_LDADD = libtest-client.la
546
547event_weston_SOURCES = tests/event-test.c
548event_weston_LDADD = libtest-client.la
549
550button_weston_SOURCES = tests/button-test.c
551button_weston_LDADD = libtest-client.la
552
553text_weston_SOURCES = tests/text-test.c tests/text-protocol.c
554text_weston_LDADD = libtest-client.la
555
556subsurface_weston_SOURCES = tests/subsurface-test.c
557subsurface_weston_LDADD = libtest-client.la
558
559if ENABLE_EGL
560weston_tests += buffer-count.weston
561buffer_count_weston_SOURCES = tests/buffer-count-test.c
562buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
563buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
564endif
565
566if ENABLE_XWAYLAND_TEST
567weston_tests += xwayland.weston
568xwayland_weston_SOURCES = tests/xwayland-test.c
569xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
570xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
571endif
572
573matrix_test_SOURCES = \
574 tests/matrix-test.c \
575 shared/matrix.c \
576 shared/matrix.h
577matrix_test_CPPFLAGS = -DUNIT_TEST
578matrix_test_LDADD = -lm -lrt
579
580if BUILD_SETBACKLIGHT
581noinst_PROGRAMS += setbacklight
582setbacklight_SOURCES = \
583 tests/setbacklight.c \
584 src/libbacklight.c \
585 src/libbacklight.h
586setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
587setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
588endif
589
590EXTRA_DIST += tests/weston-tests-env
591
592BUILT_SOURCES += \
593 tests/wayland-test-protocol.c \
594 tests/wayland-test-server-protocol.h \
595 tests/wayland-test-client-protocol.h \
596 tests/text-protocol.c \
597 tests/text-client-protocol.h
598
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800599protocol_sources = \
600 protocol/desktop-shell.xml \
601 protocol/screenshooter.xml \
602 protocol/xserver.xml \
603 protocol/text.xml \
604 protocol/input-method.xml \
605 protocol/workspaces.xml \
606 protocol/text-cursor-position.xml \
607 protocol/wayland-test.xml \
608 protocol/xdg-shell.xml \
609 protocol/scaler.xml
610
611if HAVE_XMLLINT
612.PHONY : validate-protocol-xml
613
614.%.xml.valid : $(top_srcdir)/protocol/%.xml
615 $(AM_V_GEN)$(XMLLINT) --noout --dtdvalid $(dtddir)/wayland.dtd $^ > $@
616
617validate-protocol-xml : $(protocol_sources:protocol/%.xml=.%.xml.valid)
618
619CLEANFILES += $(protocol_sources:protocol/%.xml=.%.xml.valid)
620EXTRA_DIST += $(protocol_sources)
621
622endif
623
624
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800625man_MANS = weston.1 weston.ini.5
626
627if ENABLE_DRM_COMPOSITOR
628man_MANS += weston-drm.7
629endif
630
631MAN_SUBSTS = \
632 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
633 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
634 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
635 -e 's|__version__|$(PACKAGE_VERSION)|g'
636
637SUFFIXES = .1 .5 .7 .man
638
639%.1 %.5 %.7 : man/%.man
640 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
641
642EXTRA_DIST += \
643 man/weston.man \
644 man/weston-drm.man \
645 man/weston.ini.man
646
647CLEANFILES += $(man_MANS)
648
649
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800650wayland_protocoldir = $(top_srcdir)/protocol
651include $(top_srcdir)/wayland-scanner.mk