blob: 60321643518a2e909f4c4dd8b95b967ebf62e080 [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 \
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 \
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500427 clients/workspaces-client-protocol.h \
428 clients/xdg-shell-protocol.c \
429 clients/xdg-shell-client-protocol.h
430
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800431
432libtoytoolkit_la_LIBADD = \
433 $(CLIENT_LIBS) \
434 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800435 libshared-cairo.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800436libtoytoolkit_la_CFLAGS = $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
437
438weston_flower_SOURCES = clients/flower.c
439weston_flower_LDADD = libtoytoolkit.la
440weston_flower_CFLAGS = $(CLIENT_CFLAGS)
441
442weston_screenshooter_SOURCES = \
443 clients/screenshot.c \
444 clients/screenshooter-protocol.c \
445 clients/screenshooter-client-protocol.h \
446 shared/os-compatibility.c \
447 shared/os-compatibility.h
448weston_screenshooter_LDADD = $(CLIENT_LIBS)
449weston_screenshooter_CFLAGS = $(CLIENT_CFLAGS)
450
451weston_terminal_SOURCES = clients/terminal.c
452weston_terminal_LDADD = libtoytoolkit.la -lutil
453weston_terminal_CFLAGS = $(CLIENT_CFLAGS)
454
455weston_image_SOURCES = clients/image.c
456weston_image_LDADD = libtoytoolkit.la
457weston_image_CFLAGS = $(CLIENT_CFLAGS)
458
459weston_cliptest_SOURCES = clients/cliptest.c
460weston_cliptest_CFLAGS = $(AM_CPPFLAGS) $(CLIENT_CFLAGS)
461weston_cliptest_LDADD = libtoytoolkit.la
462
463weston_dnd_SOURCES = clients/dnd.c
464weston_dnd_LDADD = libtoytoolkit.la
465weston_dnd_CFLAGS = $(CLIENT_CFLAGS)
466
467weston_smoke_SOURCES = clients/smoke.c
468weston_smoke_LDADD = libtoytoolkit.la
469weston_smoke_CFLAGS = $(CLIENT_CFLAGS)
470
471weston_resizor_SOURCES = clients/resizor.c
472weston_resizor_LDADD = libtoytoolkit.la
473weston_resizor_CFLAGS = $(CLIENT_CFLAGS)
474
475weston_scaler_SOURCES = clients/scaler.c
476weston_scaler_LDADD = libtoytoolkit.la
477weston_scaler_CFLAGS = $(CLIENT_CFLAGS)
478
479if HAVE_CAIRO_GLESV2
480demo_clients += weston-nested weston-nested-client
481
482weston_nested_SOURCES = clients/nested.c
483weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
484weston_nested_CFLAGS = $(CLIENT_CFLAGS)
485
486weston_nested_client_SOURCES = clients/nested-client.c
487weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
488endif
489
490weston_eventdemo_SOURCES = clients/eventdemo.c
491weston_eventdemo_LDADD = libtoytoolkit.la
492weston_eventdemo_CFLAGS = $(CLIENT_CFLAGS)
493
494weston_clickdot_SOURCES = clients/clickdot.c
495weston_clickdot_LDADD = libtoytoolkit.la
496weston_clickdot_CFLAGS = $(CLIENT_CFLAGS)
497
498weston_transformed_SOURCES = clients/transformed.c
499weston_transformed_LDADD = libtoytoolkit.la
500weston_transformed_CFLAGS = $(CLIENT_CFLAGS)
501
502weston_fullscreen_SOURCES = clients/fullscreen.c
503weston_fullscreen_LDADD = libtoytoolkit.la
504weston_fullscreen_CFLAGS = $(CLIENT_CFLAGS)
505
506weston_stacking_SOURCES = clients/stacking.c
507weston_stacking_LDADD = libtoytoolkit.la
508weston_stacking_CFLAGS = $(CLIENT_CFLAGS)
509
510weston_calibrator_SOURCES = clients/calibrator.c \
511 shared/matrix.c \
512 shared/matrix.h
513weston_calibrator_LDADD = libtoytoolkit.la
514weston_calibrator_CFLAGS = $(CLIENT_CFLAGS)
515
516if BUILD_SUBSURFACES_CLIENT
517demo_clients += weston-subsurfaces
518weston_subsurfaces_SOURCES = clients/subsurfaces.c
519weston_subsurfaces_CFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS) $(CLIENT_CFLAGS)
520weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
521endif
522
523if HAVE_PANGO
524demo_clients += weston-editor
525weston_editor_SOURCES = \
526 clients/editor.c \
527 clients/text-protocol.c \
528 clients/text-client-protocol.h
529weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
530weston_editor_CFLAGS = $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
531endif
532
533weston_keyboard_SOURCES = \
534 clients/keyboard.c \
535 clients/desktop-shell-client-protocol.h \
536 clients/desktop-shell-protocol.c \
537 clients/input-method-protocol.c \
538 clients/input-method-client-protocol.h
539weston_keyboard_LDADD = libtoytoolkit.la
540weston_keyboard_CFLAGS = $(CLIENT_CFLAGS)
541
542weston_simple_im_SOURCES = \
543 clients/weston-simple-im.c \
544 clients/input-method-protocol.c \
545 clients/input-method-client-protocol.h
546weston_simple_im_LDADD = $(CLIENT_LIBS)
547weston_simple_im_CFLAGS = $(CLIENT_CFLAGS)
548
549weston_info_SOURCES = \
550 clients/weston-info.c \
551 shared/os-compatibility.c \
552 shared/os-compatibility.h
553weston_info_LDADD = $(WESTON_INFO_LIBS)
554
555weston_desktop_shell_SOURCES = \
556 clients/desktop-shell.c \
557 clients/desktop-shell-client-protocol.h \
558 clients/desktop-shell-protocol.c
559weston_desktop_shell_LDADD = libtoytoolkit.la
560weston_desktop_shell_CFLAGS = $(CLIENT_CFLAGS)
561
562if BUILD_FULL_GL_CLIENTS
563demo_clients += weston-gears
564weston_gears_SOURCES = clients/gears.c
565weston_gears_LDADD = libtoytoolkit.la
566weston_gears_CFLAGS = $(CLIENT_CFLAGS)
567
568if HAVE_GLU
569libexec_PROGRAMS += weston-screensaver
570weston_screensaver_SOURCES = \
571 clients/wscreensaver.c \
572 clients/wscreensaver.h \
573 clients/desktop-shell-client-protocol.h \
574 clients/desktop-shell-protocol.c \
575 clients/wscreensaver-glue.c \
576 clients/wscreensaver-glue.h \
577 clients/glmatrix.c \
578 clients/matrix3.xpm
579weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
580weston_screensaver_CFLAGS = $(GLU_CFLAGS) $(CLIENT_CFLAGS)
581
582endif
583
584endif
585
586endif
587
588BUILT_SOURCES += \
589 clients/screenshooter-client-protocol.h \
590 clients/screenshooter-protocol.c \
591 clients/text-cursor-position-client-protocol.h \
592 clients/text-cursor-position-protocol.c \
593 clients/text-protocol.c \
594 clients/text-client-protocol.h \
595 clients/input-method-protocol.c \
596 clients/input-method-client-protocol.h \
597 clients/desktop-shell-client-protocol.h \
598 clients/desktop-shell-protocol.c \
599 clients/scaler-client-protocol.h \
600 clients/scaler-protocol.c \
601 clients/workspaces-client-protocol.h \
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500602 clients/workspaces-protocol.c \
603 clients/xdg-shell-protocol.c \
604 clients/xdg-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800605
606
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800607westondatadir = $(datadir)/weston
608dist_westondata_DATA = \
609 data/wayland.svg \
610 data/wayland.png \
611 data/pattern.png \
612 data/terminal.png \
613 data/border.png \
614 data/icon_window.png \
615 data/sign_close.png \
616 data/sign_maximize.png \
617 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800618
619
620if BUILD_WCAP_TOOLS
621bin_PROGRAMS += wcap-decode
622
623wcap_decode_SOURCES = \
624 wcap/main.c \
625 wcap/wcap-decode.c \
626 wcap/wcap-decode.h
627
628wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
629wcap_decode_LDADD = $(WCAP_LIBS)
630endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800631
632
633if ENABLE_DESKTOP_SHELL
634
635module_LTLIBRARIES += desktop-shell.la
636
637desktop_shell_la_CPPFLAGS = \
638 -I$(top_srcdir)/shared \
639 -I$(top_srcdir)/src \
640 -I$(top_builddir)/src \
641 -I$(top_builddir)/desktop-shell \
642 -DDATADIR='"$(datadir)"' \
643 -DMODULEDIR='"$(moduledir)"' \
644 -DLIBEXECDIR='"$(libexecdir)"' \
645 -DIN_WESTON
646
647desktop_shell_la_LDFLAGS = -module -avoid-version
648desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800649 libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800650desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
651desktop_shell_la_SOURCES = \
652 desktop-shell/shell.h \
653 desktop-shell/shell.c \
654 desktop-shell/exposay.c \
655 desktop-shell/input-panel.c \
656 desktop-shell/desktop-shell-protocol.c \
657 desktop-shell/desktop-shell-server-protocol.h \
658 desktop-shell/xdg-shell-protocol.c \
659 desktop-shell/xdg-shell-server-protocol.h
660
661BUILT_SOURCES += \
662 desktop-shell/desktop-shell-protocol.c \
663 desktop-shell/desktop-shell-server-protocol.h \
664 desktop-shell/xdg-shell-protocol.c \
665 desktop-shell/xdg-shell-server-protocol.h
666endif
667
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800668
669if ENABLE_XWAYLAND
670
671module_LTLIBRARIES += xwayland.la
672
673xwayland_la_CPPFLAGS = \
674 -I$(top_srcdir)/shared \
675 -I$(top_srcdir)/src \
676 -I$(top_builddir)/src \
677 -I$(top_builddir)/xwayland \
678 -DDATADIR='"$(datadir)"' \
679 -DMODULEDIR='"$(moduledir)"' \
680 -DLIBEXECDIR='"$(libexecdir)"' \
681 -DXSERVER_PATH='"@XSERVER_PATH@"'
682
683xwayland_la_LDFLAGS = -module -avoid-version
684xwayland_la_LIBADD = \
685 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800686 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800687xwayland_la_CFLAGS = \
688 $(GCC_CFLAGS) \
689 $(COMPOSITOR_CFLAGS) \
690 $(PIXMAN_CFLAGS) \
691 $(CAIRO_CFLAGS)
692xwayland_la_SOURCES = \
693 xwayland/xwayland.h \
694 xwayland/window-manager.c \
695 xwayland/selection.c \
696 xwayland/dnd.c \
697 xwayland/launcher.c \
698 xwayland/xserver-protocol.c \
699 xwayland/xserver-server-protocol.h \
700 xwayland/hash.c \
701 xwayland/hash.h
702
703BUILT_SOURCES += \
704 xwayland/xserver-protocol.c \
705 xwayland/xserver-server-protocol.h
706endif
707
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800708
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800709#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800710# Shared utilities
711#
712
713noinst_LTLIBRARIES += libshared.la libshared-cairo.la
714
715libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
716
717libshared_la_SOURCES = \
718 shared/config-parser.c \
719 shared/option-parser.c \
720 shared/config-parser.h \
721 shared/os-compatibility.c \
722 shared/os-compatibility.h
723
724libshared_cairo_la_CFLAGS = \
725 -DDATADIR='"$(datadir)"' \
726 $(GCC_CFLAGS) \
727 $(COMPOSITOR_CFLAGS) \
728 $(PIXMAN_CFLAGS) \
729 $(CAIRO_CFLAGS) \
730 $(PNG_CFLAGS) \
731 $(WEBP_CFLAGS)
732
733libshared_cairo_la_LIBADD = \
734 $(PIXMAN_LIBS) \
735 $(CAIRO_LIBS) \
736 $(PNG_LIBS) \
737 $(WEBP_LIBS) \
738 $(JPEG_LIBS)
739
740libshared_cairo_la_SOURCES = \
741 $(libshared_la_SOURCES) \
742 shared/image-loader.c \
743 shared/image-loader.h \
744 shared/cairo-util.c \
745 shared/frame.c \
746 shared/cairo-util.h
747
748
749#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800750# tests subdirectory
751#
752
753TESTS = $(shared_tests) $(module_tests) $(weston_tests)
754
755shared_tests = \
756 config-parser.test \
757 vertex-clip.test
758
759module_tests = \
760 surface-test.la \
761 surface-global-test.la
762
763weston_tests = \
764 bad_buffer.weston \
765 keyboard.weston \
766 event.weston \
767 button.weston \
768 text.weston \
769 subsurface.weston
770
771
772AM_TESTS_ENVIRONMENT = \
773 abs_builddir='$(abs_builddir)'; export abs_builddir;
774
775TEST_EXTENSIONS = .la .weston
776LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
777WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
778
779clean-local:
780 -rm -rf tests/logs
781
782# To remove when automake 1.11 support is dropped
783export abs_builddir
784
785noinst_LTLIBRARIES += \
786 weston-test.la \
787 $(module_tests) \
788 libtest-runner.la \
789 libtest-client.la
790
791noinst_PROGRAMS += \
792 $(setbacklight) \
793 $(shared_tests) \
794 $(weston_tests) \
795 matrix-test
796
797test_module_ldflags = \
798 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
799
800surface_global_test_la_SOURCES = tests/surface-global-test.c
801surface_global_test_la_LDFLAGS = $(test_module_ldflags)
802surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
803
804surface_test_la_SOURCES = tests/surface-test.c
805surface_test_la_LDFLAGS = $(test_module_ldflags)
806surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
807
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800808weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800809weston_test_la_LDFLAGS = $(test_module_ldflags)
810weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
811weston_test_la_SOURCES = \
812 tests/weston-test.c \
813 tests/wayland-test-protocol.c \
814 tests/wayland-test-server-protocol.h
815
816if ENABLE_EGL
817weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
818weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
819endif
820
821libtest_runner_la_SOURCES = \
822 tests/weston-test-runner.c \
823 tests/weston-test-runner.h
824libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
825
826config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800827config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800828
829vertex_clip_test_SOURCES = \
830 tests/vertex-clip-test.c \
831 src/vertex-clipping.c \
832 src/vertex-clipping.h
833vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
834
835libtest_client_la_SOURCES = \
836 tests/weston-test-client-helper.c \
837 tests/weston-test-client-helper.h \
838 tests/wayland-test-protocol.c \
839 tests/wayland-test-client-protocol.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800840libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800841
842bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
843bad_buffer_weston_LDADD = libtest-client.la
844
845keyboard_weston_SOURCES = tests/keyboard-test.c
846keyboard_weston_LDADD = libtest-client.la
847
848event_weston_SOURCES = tests/event-test.c
849event_weston_LDADD = libtest-client.la
850
851button_weston_SOURCES = tests/button-test.c
852button_weston_LDADD = libtest-client.la
853
854text_weston_SOURCES = tests/text-test.c tests/text-protocol.c
855text_weston_LDADD = libtest-client.la
856
857subsurface_weston_SOURCES = tests/subsurface-test.c
858subsurface_weston_LDADD = libtest-client.la
859
860if ENABLE_EGL
861weston_tests += buffer-count.weston
862buffer_count_weston_SOURCES = tests/buffer-count-test.c
863buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
864buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
865endif
866
867if ENABLE_XWAYLAND_TEST
868weston_tests += xwayland.weston
869xwayland_weston_SOURCES = tests/xwayland-test.c
870xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
871xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
872endif
873
874matrix_test_SOURCES = \
875 tests/matrix-test.c \
876 shared/matrix.c \
877 shared/matrix.h
878matrix_test_CPPFLAGS = -DUNIT_TEST
879matrix_test_LDADD = -lm -lrt
880
881if BUILD_SETBACKLIGHT
882noinst_PROGRAMS += setbacklight
883setbacklight_SOURCES = \
884 tests/setbacklight.c \
885 src/libbacklight.c \
886 src/libbacklight.h
887setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
888setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
889endif
890
891EXTRA_DIST += tests/weston-tests-env
892
893BUILT_SOURCES += \
894 tests/wayland-test-protocol.c \
895 tests/wayland-test-server-protocol.h \
896 tests/wayland-test-client-protocol.h \
897 tests/text-protocol.c \
898 tests/text-client-protocol.h
899
Kristian Høgsbergcd312752014-02-01 00:38:15 -0800900EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800901 protocol/desktop-shell.xml \
902 protocol/screenshooter.xml \
903 protocol/xserver.xml \
904 protocol/text.xml \
905 protocol/input-method.xml \
906 protocol/workspaces.xml \
907 protocol/text-cursor-position.xml \
908 protocol/wayland-test.xml \
909 protocol/xdg-shell.xml \
910 protocol/scaler.xml
911
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800912man_MANS = weston.1 weston.ini.5
913
914if ENABLE_DRM_COMPOSITOR
915man_MANS += weston-drm.7
916endif
917
918MAN_SUBSTS = \
919 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
920 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
921 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
922 -e 's|__version__|$(PACKAGE_VERSION)|g'
923
924SUFFIXES = .1 .5 .7 .man
925
926%.1 %.5 %.7 : man/%.man
927 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
928
929EXTRA_DIST += \
930 man/weston.man \
931 man/weston-drm.man \
932 man/weston.ini.man
933
934CLEANFILES += $(man_MANS)
935
936
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800937wayland_protocoldir = $(top_srcdir)/protocol
Kristian Høgsberg08229422014-02-01 00:33:04 -0800938
939%-protocol.c : $(wayland_protocoldir)/%.xml
940 $(AM_V_GEN)$(wayland_scanner) code < $< > $@
941
942%-server-protocol.h : $(wayland_protocoldir)/%.xml
943 $(AM_V_GEN)$(wayland_scanner) server-header < $< > $@
944
945%-client-protocol.h : $(wayland_protocoldir)/%.xml
946 $(AM_V_GEN)$(wayland_scanner) client-header < $< > $@