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