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