blob: 20925cfdfc558d957aa44cb6da67f518ffa8ae23 [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
Kristian Høgsberg08229422014-02-01 00:33:04 -080011EXTRA_DIST = weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000012
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øgsbergcd312752014-02-01 00:38:15 -080020all-local : weston.ini
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 \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010030 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080031 -DDATADIR='"$(datadir)"' \
32 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080033 -DLIBEXECDIR='"$(libexecdir)"' \
34 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080035
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) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080044 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080045
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 \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010056 protocol/screenshooter-protocol.c \
57 protocol/screenshooter-server-protocol.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080058 src/clipboard.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010059 protocol/text-cursor-position-protocol.c \
60 protocol/text-cursor-position-server-protocol.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080061 src/zoom.c \
62 src/text-backend.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010063 protocol/text-protocol.c \
64 protocol/text-server-protocol.h \
65 protocol/input-method-protocol.c \
66 protocol/input-method-server-protocol.h \
67 protocol/workspaces-protocol.c \
68 protocol/workspaces-server-protocol.h \
69 protocol/scaler-protocol.c \
70 protocol/scaler-server-protocol.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080071 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
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -080081# Track this dependency explicitly instead of using BUILT_SOURCES. We
82# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
83# in case we're building from tarballs.
84
85src/compositor.c : $(top_builddir)/src/git-version.h
86
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080087noinst_LTLIBRARIES += \
88 libsession-helper.la
89
90libsession_helper_la_SOURCES = \
91 src/weston-launch.h \
92 src/launcher-util.c \
93 src/launcher-util.h
94libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
95libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
96
97if ENABLE_DBUS
98if HAVE_SYSTEMD_LOGIN
99libsession_helper_la_SOURCES += \
100 src/dbus.h \
101 src/dbus.c \
102 src/logind-util.h \
103 src/logind-util.c
104libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
105libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
106endif
107endif
108
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800109if HAVE_GIT_REPO
110src/git-version.h : $(top_srcdir)/.git/logs/HEAD
111 $(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)')\"" > $@
112endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800113
114.FORCE :
115
116if BUILD_WESTON_LAUNCH
117bin_PROGRAMS += weston-launch
118weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
119weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
120weston_launch_CFLAGS= \
121 $(GCC_CFLAGS) \
122 $(PAM_CFLAGS) \
123 $(SYSTEMD_LOGIN_CFLAGS) \
124 $(LIBDRM_CFLAGS)
125weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
126
127if ENABLE_SETUID_INSTALL
128install-exec-hook:
129 chown root $(DESTDIR)$(bindir)/weston-launch
130 chmod u+s $(DESTDIR)$(bindir)/weston-launch
131endif
132
133endif # BUILD_WESTON_LAUNCH
134
135pkgconfigdir = $(libdir)/pkgconfig
136pkgconfig_DATA = src/weston.pc
137
138westonincludedir = $(includedir)/weston
139westoninclude_HEADERS = \
140 src/version.h \
141 src/compositor.h \
142 shared/matrix.h \
143 shared/config-parser.h \
144 shared/zalloc.h
145
146if ENABLE_EGL
147module_LTLIBRARIES += gl-renderer.la
148gl_renderer_la_LDFLAGS = -module -avoid-version
149gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
150gl_renderer_la_CFLAGS = \
151 $(COMPOSITOR_CFLAGS) \
152 $(EGL_CFLAGS) \
153 $(GCC_CFLAGS)
154gl_renderer_la_SOURCES = \
155 src/gl-renderer.h \
156 src/gl-renderer.c \
157 src/vertex-clipping.c \
158 src/vertex-clipping.h
159endif
160
161if ENABLE_X11_COMPOSITOR
162module_LTLIBRARIES += x11-backend.la
163x11_backend_la_LDFLAGS = -module -avoid-version
164x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800165 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800166x11_backend_la_CFLAGS = \
167 $(COMPOSITOR_CFLAGS) \
168 $(EGL_CFLAGS) \
169 $(PIXMAN_CFLAGS) \
170 $(CAIRO_CFLAGS) \
171 $(X11_COMPOSITOR_CFLAGS) \
172 $(GCC_CFLAGS)
173x11_backend_la_SOURCES = src/compositor-x11.c
174endif
175
176if ENABLE_DRM_COMPOSITOR
177module_LTLIBRARIES += drm-backend.la
178drm_backend_la_LDFLAGS = -module -avoid-version
179drm_backend_la_LIBADD = \
180 $(COMPOSITOR_LIBS) \
181 $(DRM_COMPOSITOR_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100182 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800183 libsession-helper.la
184drm_backend_la_CFLAGS = \
185 $(COMPOSITOR_CFLAGS) \
186 $(EGL_CFLAGS) \
187 $(DRM_COMPOSITOR_CFLAGS) \
188 $(GCC_CFLAGS)
189drm_backend_la_SOURCES = \
190 src/compositor-drm.c \
191 src/udev-seat.c \
192 src/udev-seat.h \
193 src/evdev.c \
194 src/evdev.h \
195 src/evdev-touchpad.c \
196 src/libbacklight.c \
197 src/libbacklight.h
198
199if ENABLE_VAAPI_RECORDER
200drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
201drm_backend_la_LIBADD += $(LIBVA_LIBS)
202drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
203endif
204endif
205
206if ENABLE_WAYLAND_COMPOSITOR
207module_LTLIBRARIES += wayland-backend.la
208wayland_backend_la_LDFLAGS = -module -avoid-version
209wayland_backend_la_LIBADD = \
210 $(COMPOSITOR_LIBS) \
211 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800212 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800213wayland_backend_la_CFLAGS = \
214 $(COMPOSITOR_CFLAGS) \
215 $(EGL_CFLAGS) \
216 $(PIXMAN_CFLAGS) \
217 $(CAIRO_CFLAGS) \
218 $(WAYLAND_COMPOSITOR_CFLAGS) \
219 $(GCC_CFLAGS)
220wayland_backend_la_SOURCES = src/compositor-wayland.c
221endif
222
223if ENABLE_RPI_COMPOSITOR
224if INSTALL_RPI_COMPOSITOR
225module_LTLIBRARIES += rpi-backend.la
226else
227noinst_LTLIBRARIES += rpi-backend.la
228endif
229
230rpi_backend_la_LDFLAGS = -module -avoid-version
231rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
232 $(RPI_COMPOSITOR_LIBS) \
233 $(RPI_BCM_HOST_LIBS) \
234 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800235 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800236rpi_backend_la_CFLAGS = \
237 $(GCC_CFLAGS) \
238 $(COMPOSITOR_CFLAGS) \
239 $(RPI_COMPOSITOR_CFLAGS) \
240 $(RPI_BCM_HOST_CFLAGS)
241rpi_backend_la_SOURCES = \
242 src/compositor-rpi.c \
243 src/rpi-renderer.c \
244 src/rpi-renderer.h \
245 src/rpi-bcm-stubs.h \
246 src/udev-seat.c \
247 src/udev-seat.h \
248 src/evdev.c \
249 src/evdev.h \
250 src/evdev-touchpad.c
251
252if ENABLE_EGL
253rpi_backend_la_LIBADD += $(EGL_LIBS)
254rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
255endif
256
257endif
258
259if ENABLE_HEADLESS_COMPOSITOR
260module_LTLIBRARIES += headless-backend.la
261headless_backend_la_LDFLAGS = -module -avoid-version
262headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800263 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800264headless_backend_la_CFLAGS = \
265 $(COMPOSITOR_CFLAGS) \
266 $(GCC_CFLAGS)
267headless_backend_la_SOURCES = src/compositor-headless.c
268endif
269
270if ENABLE_FBDEV_COMPOSITOR
271module_LTLIBRARIES += fbdev-backend.la
272fbdev_backend_la_LDFLAGS = -module -avoid-version
273fbdev_backend_la_LIBADD = \
274 $(COMPOSITOR_LIBS) \
275 $(FBDEV_COMPOSITOR_LIBS) \
276 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800277 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800278fbdev_backend_la_CFLAGS = \
279 $(COMPOSITOR_CFLAGS) \
280 $(EGL_CFLAGS) \
281 $(FBDEV_COMPOSITOR_CFLAGS) \
282 $(PIXMAN_CFLAGS) \
283 $(GCC_CFLAGS)
284fbdev_backend_la_SOURCES = \
285 src/compositor-fbdev.c \
286 src/udev-seat.c \
287 src/udev-seat.h \
288 src/evdev.c \
289 src/evdev.h \
290 src/evdev-touchpad.c
291endif
292
293if ENABLE_RDP_COMPOSITOR
294module_LTLIBRARIES += rdp-backend.la
295rdp_backend_la_LDFLAGS = -module -avoid-version
296rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
297 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800298 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800299rdp_backend_la_CFLAGS = \
300 $(COMPOSITOR_CFLAGS) \
301 $(RDP_COMPOSITOR_CFLAGS) \
302 $(GCC_CFLAGS)
303rdp_backend_la_SOURCES = src/compositor-rdp.c
304endif
305
306if HAVE_LCMS
307module_LTLIBRARIES += cms-static.la
308cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800309cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800310cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
311cms_static_la_SOURCES = \
312 src/cms-static.c \
313 src/cms-helper.c \
314 src/cms-helper.h
315if ENABLE_COLORD
316module_LTLIBRARIES += cms-colord.la
317cms_colord_la_LDFLAGS = -module -avoid-version
318cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
319cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
320cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100321 src/cms-colord.c \
322 src/cms-helper.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800323 src/cms-helper.h
324endif
325endif
326
327noinst_PROGRAMS += spring-tool
328spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
329spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
330spring_tool_SOURCES = \
331 src/spring-tool.c \
332 src/animation.c \
333 shared/matrix.c \
334 shared/matrix.h \
335 src/compositor.h
336
337BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100338 protocol/screenshooter-server-protocol.h \
339 protocol/screenshooter-protocol.c \
340 protocol/text-cursor-position-server-protocol.h \
341 protocol/text-cursor-position-protocol.c \
342 protocol/text-protocol.c \
343 protocol/text-server-protocol.h \
344 protocol/input-method-protocol.c \
345 protocol/input-method-server-protocol.h \
346 protocol/workspaces-server-protocol.h \
347 protocol/workspaces-protocol.c \
348 protocol/scaler-server-protocol.h \
349 protocol/scaler-protocol.c
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800350
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800351if BUILD_CLIENTS
352
353bin_PROGRAMS += weston-terminal weston-info
354
355libexec_PROGRAMS += \
356 weston-desktop-shell \
357 weston-screenshooter \
358 weston-keyboard \
359 weston-simple-im
360
361demo_clients = \
362 weston-flower \
363 weston-image \
364 weston-cliptest \
365 weston-dnd \
366 weston-smoke \
367 weston-resizor \
368 weston-eventdemo \
369 weston-clickdot \
370 weston-transformed \
371 weston-fullscreen \
372 weston-stacking \
373 weston-calibrator \
374 weston-scaler
375
376if INSTALL_DEMO_CLIENTS
377bin_PROGRAMS += $(demo_clients)
378else
379noinst_PROGRAMS += $(demo_clients)
380endif
381
382
383if BUILD_SIMPLE_CLIENTS
384demo_clients += \
385 weston-simple-shm \
386 weston-simple-touch \
387 weston-multi-resource
388
389weston_simple_shm_SOURCES = \
390 clients/simple-shm.c \
391 shared/os-compatibility.c \
392 shared/os-compatibility.h
393weston_simple_shm_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
394weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS)
395
396weston_simple_touch_SOURCES = \
397 clients/simple-touch.c \
398 shared/os-compatibility.c \
399 shared/os-compatibility.h
400weston_simple_touch_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
401weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS)
402
403weston_multi_resource_SOURCES = \
404 clients/multi-resource.c \
405 shared/os-compatibility.c \
406 shared/os-compatibility.h
407weston_multi_resource_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
408weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) -lm
409endif
410
411if BUILD_SIMPLE_EGL_CLIENTS
412demo_clients += weston-simple-egl
413weston_simple_egl_SOURCES = clients/simple-egl.c
414weston_simple_egl_CPPFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS)
415weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
416endif
417
418noinst_LTLIBRARIES += libtoytoolkit.la
419
420libtoytoolkit_la_SOURCES = \
421 clients/window.c \
422 clients/window.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100423 protocol/text-cursor-position-protocol.c \
424 protocol/text-cursor-position-client-protocol.h \
425 protocol/scaler-protocol.c \
426 protocol/scaler-client-protocol.h \
427 protocol/workspaces-protocol.c \
428 protocol/workspaces-client-protocol.h \
429 protocol/xdg-shell-protocol.c \
430 protocol/xdg-shell-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500431
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800432
433libtoytoolkit_la_LIBADD = \
434 $(CLIENT_LIBS) \
435 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800436 libshared-cairo.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800437libtoytoolkit_la_CFLAGS = $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
438
439weston_flower_SOURCES = clients/flower.c
440weston_flower_LDADD = libtoytoolkit.la
441weston_flower_CFLAGS = $(CLIENT_CFLAGS)
442
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100443weston_screenshooter_SOURCES = \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800444 clients/screenshot.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100445 protocol/screenshooter-protocol.c \
446 protocol/screenshooter-client-protocol.h \
447 shared/os-compatibility.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800448 shared/os-compatibility.h
449weston_screenshooter_LDADD = $(CLIENT_LIBS)
450weston_screenshooter_CFLAGS = $(CLIENT_CFLAGS)
451
452weston_terminal_SOURCES = clients/terminal.c
453weston_terminal_LDADD = libtoytoolkit.la -lutil
454weston_terminal_CFLAGS = $(CLIENT_CFLAGS)
455
456weston_image_SOURCES = clients/image.c
457weston_image_LDADD = libtoytoolkit.la
458weston_image_CFLAGS = $(CLIENT_CFLAGS)
459
460weston_cliptest_SOURCES = clients/cliptest.c
461weston_cliptest_CFLAGS = $(AM_CPPFLAGS) $(CLIENT_CFLAGS)
462weston_cliptest_LDADD = libtoytoolkit.la
463
464weston_dnd_SOURCES = clients/dnd.c
465weston_dnd_LDADD = libtoytoolkit.la
466weston_dnd_CFLAGS = $(CLIENT_CFLAGS)
467
468weston_smoke_SOURCES = clients/smoke.c
469weston_smoke_LDADD = libtoytoolkit.la
470weston_smoke_CFLAGS = $(CLIENT_CFLAGS)
471
472weston_resizor_SOURCES = clients/resizor.c
473weston_resizor_LDADD = libtoytoolkit.la
474weston_resizor_CFLAGS = $(CLIENT_CFLAGS)
475
476weston_scaler_SOURCES = clients/scaler.c
477weston_scaler_LDADD = libtoytoolkit.la
478weston_scaler_CFLAGS = $(CLIENT_CFLAGS)
479
480if HAVE_CAIRO_GLESV2
481demo_clients += weston-nested weston-nested-client
482
483weston_nested_SOURCES = clients/nested.c
484weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
485weston_nested_CFLAGS = $(CLIENT_CFLAGS)
486
487weston_nested_client_SOURCES = clients/nested-client.c
488weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
489endif
490
491weston_eventdemo_SOURCES = clients/eventdemo.c
492weston_eventdemo_LDADD = libtoytoolkit.la
493weston_eventdemo_CFLAGS = $(CLIENT_CFLAGS)
494
495weston_clickdot_SOURCES = clients/clickdot.c
496weston_clickdot_LDADD = libtoytoolkit.la
497weston_clickdot_CFLAGS = $(CLIENT_CFLAGS)
498
499weston_transformed_SOURCES = clients/transformed.c
500weston_transformed_LDADD = libtoytoolkit.la
501weston_transformed_CFLAGS = $(CLIENT_CFLAGS)
502
503weston_fullscreen_SOURCES = clients/fullscreen.c
504weston_fullscreen_LDADD = libtoytoolkit.la
505weston_fullscreen_CFLAGS = $(CLIENT_CFLAGS)
506
507weston_stacking_SOURCES = clients/stacking.c
508weston_stacking_LDADD = libtoytoolkit.la
509weston_stacking_CFLAGS = $(CLIENT_CFLAGS)
510
511weston_calibrator_SOURCES = clients/calibrator.c \
512 shared/matrix.c \
513 shared/matrix.h
514weston_calibrator_LDADD = libtoytoolkit.la
515weston_calibrator_CFLAGS = $(CLIENT_CFLAGS)
516
517if BUILD_SUBSURFACES_CLIENT
518demo_clients += weston-subsurfaces
519weston_subsurfaces_SOURCES = clients/subsurfaces.c
520weston_subsurfaces_CFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS) $(CLIENT_CFLAGS)
521weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
522endif
523
524if HAVE_PANGO
525demo_clients += weston-editor
526weston_editor_SOURCES = \
527 clients/editor.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100528 protocol/text-protocol.c \
529 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800530weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
531weston_editor_CFLAGS = $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
532endif
533
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100534weston_keyboard_SOURCES = \
535 clients/keyboard.c \
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
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800540weston_keyboard_LDADD = libtoytoolkit.la
541weston_keyboard_CFLAGS = $(CLIENT_CFLAGS)
542
543weston_simple_im_SOURCES = \
544 clients/weston-simple-im.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100545 protocol/input-method-protocol.c \
546 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800547weston_simple_im_LDADD = $(CLIENT_LIBS)
548weston_simple_im_CFLAGS = $(CLIENT_CFLAGS)
549
550weston_info_SOURCES = \
551 clients/weston-info.c \
552 shared/os-compatibility.c \
553 shared/os-compatibility.h
554weston_info_LDADD = $(WESTON_INFO_LIBS)
555
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100556weston_desktop_shell_SOURCES = \
557 clients/desktop-shell.c \
558 protocol/desktop-shell-client-protocol.h \
559 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800560weston_desktop_shell_LDADD = libtoytoolkit.la
561weston_desktop_shell_CFLAGS = $(CLIENT_CFLAGS)
562
563if BUILD_FULL_GL_CLIENTS
564demo_clients += weston-gears
565weston_gears_SOURCES = clients/gears.c
566weston_gears_LDADD = libtoytoolkit.la
567weston_gears_CFLAGS = $(CLIENT_CFLAGS)
568
569if HAVE_GLU
570libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100571weston_screensaver_SOURCES = \
572 clients/wscreensaver.c \
573 clients/wscreensaver.h \
574 protocol/desktop-shell-client-protocol.h \
575 protocol/desktop-shell-protocol.c \
576 clients/wscreensaver-glue.c \
577 clients/wscreensaver-glue.h \
578 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800579 clients/matrix3.xpm
580weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
581weston_screensaver_CFLAGS = $(GLU_CFLAGS) $(CLIENT_CFLAGS)
582
583endif
584
585endif
586
587endif
588
589BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100590 protocol/screenshooter-client-protocol.h \
591 protocol/screenshooter-protocol.c \
592 protocol/text-cursor-position-client-protocol.h \
593 protocol/text-cursor-position-protocol.c \
594 protocol/text-protocol.c \
595 protocol/text-client-protocol.h \
596 protocol/input-method-protocol.c \
597 protocol/input-method-client-protocol.h \
598 protocol/desktop-shell-client-protocol.h \
599 protocol/desktop-shell-protocol.c \
600 protocol/scaler-client-protocol.h \
601 protocol/scaler-protocol.c \
602 protocol/workspaces-client-protocol.h \
603 protocol/workspaces-protocol.c \
604 protocol/xdg-shell-protocol.c \
605 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800606
607
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800608westondatadir = $(datadir)/weston
609dist_westondata_DATA = \
610 data/wayland.svg \
611 data/wayland.png \
612 data/pattern.png \
613 data/terminal.png \
614 data/border.png \
615 data/icon_window.png \
616 data/sign_close.png \
617 data/sign_maximize.png \
618 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800619
620
621if BUILD_WCAP_TOOLS
622bin_PROGRAMS += wcap-decode
623
624wcap_decode_SOURCES = \
625 wcap/main.c \
626 wcap/wcap-decode.c \
627 wcap/wcap-decode.h
628
629wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
630wcap_decode_LDADD = $(WCAP_LIBS)
631endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800632
633
634if ENABLE_DESKTOP_SHELL
635
636module_LTLIBRARIES += desktop-shell.la
637
638desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100639 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800640 -I$(top_srcdir)/shared \
641 -I$(top_srcdir)/src \
642 -I$(top_builddir)/src \
643 -I$(top_builddir)/desktop-shell \
644 -DDATADIR='"$(datadir)"' \
645 -DMODULEDIR='"$(moduledir)"' \
646 -DLIBEXECDIR='"$(libexecdir)"' \
647 -DIN_WESTON
648
649desktop_shell_la_LDFLAGS = -module -avoid-version
650desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800651 libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800652desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
653desktop_shell_la_SOURCES = \
654 desktop-shell/shell.h \
655 desktop-shell/shell.c \
656 desktop-shell/exposay.c \
657 desktop-shell/input-panel.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100658 protocol/desktop-shell-protocol.c \
659 protocol/desktop-shell-server-protocol.h \
660 protocol/xdg-shell-protocol.c \
661 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800662
663BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100664 protocol/desktop-shell-protocol.c \
665 protocol/desktop-shell-server-protocol.h \
666 protocol/xdg-shell-protocol.c \
667 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800668endif
669
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800670
671if ENABLE_XWAYLAND
672
673module_LTLIBRARIES += xwayland.la
674
675xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100676 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800677 -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
686xwayland_la_LDFLAGS = -module -avoid-version
687xwayland_la_LIBADD = \
688 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800689 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800690xwayland_la_CFLAGS = \
691 $(GCC_CFLAGS) \
692 $(COMPOSITOR_CFLAGS) \
693 $(PIXMAN_CFLAGS) \
694 $(CAIRO_CFLAGS)
695xwayland_la_SOURCES = \
696 xwayland/xwayland.h \
697 xwayland/window-manager.c \
698 xwayland/selection.c \
699 xwayland/dnd.c \
700 xwayland/launcher.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100701 protocol/xserver-protocol.c \
702 protocol/xserver-server-protocol.h \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800703 xwayland/hash.c \
704 xwayland/hash.h
705
706BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100707 protocol/xserver-protocol.c \
708 protocol/xserver-server-protocol.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800709endif
710
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800711
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800712#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800713# Shared utilities
714#
715
716noinst_LTLIBRARIES += libshared.la libshared-cairo.la
717
718libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
719
720libshared_la_SOURCES = \
721 shared/config-parser.c \
722 shared/option-parser.c \
723 shared/config-parser.h \
724 shared/os-compatibility.c \
725 shared/os-compatibility.h
726
727libshared_cairo_la_CFLAGS = \
728 -DDATADIR='"$(datadir)"' \
729 $(GCC_CFLAGS) \
730 $(COMPOSITOR_CFLAGS) \
731 $(PIXMAN_CFLAGS) \
732 $(CAIRO_CFLAGS) \
733 $(PNG_CFLAGS) \
734 $(WEBP_CFLAGS)
735
736libshared_cairo_la_LIBADD = \
737 $(PIXMAN_LIBS) \
738 $(CAIRO_LIBS) \
739 $(PNG_LIBS) \
740 $(WEBP_LIBS) \
741 $(JPEG_LIBS)
742
743libshared_cairo_la_SOURCES = \
744 $(libshared_la_SOURCES) \
745 shared/image-loader.c \
746 shared/image-loader.h \
747 shared/cairo-util.c \
748 shared/frame.c \
749 shared/cairo-util.h
750
751
752#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800753# tests subdirectory
754#
755
756TESTS = $(shared_tests) $(module_tests) $(weston_tests)
757
758shared_tests = \
759 config-parser.test \
760 vertex-clip.test
761
762module_tests = \
763 surface-test.la \
764 surface-global-test.la
765
766weston_tests = \
767 bad_buffer.weston \
768 keyboard.weston \
769 event.weston \
770 button.weston \
771 text.weston \
772 subsurface.weston
773
774
775AM_TESTS_ENVIRONMENT = \
776 abs_builddir='$(abs_builddir)'; export abs_builddir;
777
778TEST_EXTENSIONS = .la .weston
779LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
780WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
781
782clean-local:
783 -rm -rf tests/logs
784
785# To remove when automake 1.11 support is dropped
786export abs_builddir
787
788noinst_LTLIBRARIES += \
789 weston-test.la \
790 $(module_tests) \
791 libtest-runner.la \
792 libtest-client.la
793
794noinst_PROGRAMS += \
795 $(setbacklight) \
796 $(shared_tests) \
797 $(weston_tests) \
798 matrix-test
799
800test_module_ldflags = \
801 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
802
803surface_global_test_la_SOURCES = tests/surface-global-test.c
804surface_global_test_la_LDFLAGS = $(test_module_ldflags)
805surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
806
807surface_test_la_SOURCES = tests/surface-test.c
808surface_test_la_LDFLAGS = $(test_module_ldflags)
809surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
810
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800811weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800812weston_test_la_LDFLAGS = $(test_module_ldflags)
813weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
814weston_test_la_SOURCES = \
815 tests/weston-test.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100816 protocol/wayland-test-protocol.c \
817 protocol/wayland-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800818
819if ENABLE_EGL
820weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
821weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
822endif
823
824libtest_runner_la_SOURCES = \
825 tests/weston-test-runner.c \
826 tests/weston-test-runner.h
827libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
828
829config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800830config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800831
832vertex_clip_test_SOURCES = \
833 tests/vertex-clip-test.c \
834 src/vertex-clipping.c \
835 src/vertex-clipping.h
836vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
837
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100838libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800839 tests/weston-test-client-helper.c \
840 tests/weston-test-client-helper.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100841 protocol/wayland-test-protocol.c \
842 protocol/wayland-test-client-protocol.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800843libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800844
845bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
846bad_buffer_weston_LDADD = libtest-client.la
847
848keyboard_weston_SOURCES = tests/keyboard-test.c
849keyboard_weston_LDADD = libtest-client.la
850
851event_weston_SOURCES = tests/event-test.c
852event_weston_LDADD = libtest-client.la
853
854button_weston_SOURCES = tests/button-test.c
855button_weston_LDADD = libtest-client.la
856
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100857text_weston_SOURCES = tests/text-test.c protocol/text-protocol.c
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800858text_weston_LDADD = libtest-client.la
859
860subsurface_weston_SOURCES = tests/subsurface-test.c
861subsurface_weston_LDADD = libtest-client.la
862
863if ENABLE_EGL
864weston_tests += buffer-count.weston
865buffer_count_weston_SOURCES = tests/buffer-count-test.c
866buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
867buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
868endif
869
870if ENABLE_XWAYLAND_TEST
871weston_tests += xwayland.weston
872xwayland_weston_SOURCES = tests/xwayland-test.c
873xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
874xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
875endif
876
877matrix_test_SOURCES = \
878 tests/matrix-test.c \
879 shared/matrix.c \
880 shared/matrix.h
881matrix_test_CPPFLAGS = -DUNIT_TEST
882matrix_test_LDADD = -lm -lrt
883
884if BUILD_SETBACKLIGHT
885noinst_PROGRAMS += setbacklight
886setbacklight_SOURCES = \
887 tests/setbacklight.c \
888 src/libbacklight.c \
889 src/libbacklight.h
890setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
891setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
892endif
893
894EXTRA_DIST += tests/weston-tests-env
895
896BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100897 protocol/wayland-test-protocol.c \
898 protocol/wayland-test-server-protocol.h \
899 protocol/wayland-test-client-protocol.h \
900 protocol/text-protocol.c \
901 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800902
Kristian Høgsbergcd312752014-02-01 00:38:15 -0800903EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800904 protocol/desktop-shell.xml \
905 protocol/screenshooter.xml \
906 protocol/xserver.xml \
907 protocol/text.xml \
908 protocol/input-method.xml \
909 protocol/workspaces.xml \
910 protocol/text-cursor-position.xml \
911 protocol/wayland-test.xml \
912 protocol/xdg-shell.xml \
913 protocol/scaler.xml
914
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800915man_MANS = weston.1 weston.ini.5
916
917if ENABLE_DRM_COMPOSITOR
918man_MANS += weston-drm.7
919endif
920
921MAN_SUBSTS = \
922 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
923 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
924 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
925 -e 's|__version__|$(PACKAGE_VERSION)|g'
926
927SUFFIXES = .1 .5 .7 .man
928
929%.1 %.5 %.7 : man/%.man
930 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
931
932EXTRA_DIST += \
933 man/weston.man \
934 man/weston-drm.man \
935 man/weston.ini.man
936
937CLEANFILES += $(man_MANS)
938
939
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100940protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
941 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -0800942
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100943protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
944 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -0800945
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100946protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
947 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@