blob: 3b3b8a1b5b4c763288d062e25a9e4dc53d343d79 [file] [log] [blame]
Thierry Reding0e6d9a72014-05-27 09:07:54 +02001ACLOCAL_AMFLAGS = -I m4
2
Kristian Høgsberge895f142014-01-27 21:46:30 -08003bin_PROGRAMS =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08004noinst_PROGRAMS =
Kristian Høgsberge73eccd2014-01-31 16:15:11 -08005libexec_PROGRAMS =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08006moduledir = $(libdir)/weston
7module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08008noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08009BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -080010
Pekka Paalanen3d3f4852014-08-20 12:11:04 +030011# Do not run xwayland test while it is known broken.
12AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install --disable-xwayland-test
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050013
Kristian Høgsberg08229422014-02-01 00:33:04 -080014EXTRA_DIST = weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000015
16weston.ini : $(srcdir)/weston.ini.in
17 $(AM_V_GEN)$(SED) \
18 -e 's|@bindir[@]|$(bindir)|g' \
19 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
20 -e 's|@libexecdir[@]|$(libexecdir)|g' \
21 $< > $@
22
Kristian Høgsbergcd312752014-02-01 00:38:15 -080023all-local : weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080024
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080025AM_CFLAGS = $(GCC_CFLAGS)
26
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080027AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080028 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080029 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080030 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080031 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080032 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010033 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080034 -DDATADIR='"$(datadir)"' \
35 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080036 -DLIBEXECDIR='"$(libexecdir)"' \
37 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080038
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080039CLEANFILES = weston.ini $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080040
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080041bin_PROGRAMS += weston
42
43weston_LDFLAGS = -export-dynamic
44weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
45weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
46weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080047 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080048
49weston_SOURCES = \
50 src/git-version.h \
51 src/log.c \
52 src/compositor.c \
53 src/compositor.h \
54 src/input.c \
55 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080056 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080057 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080058 src/zoom.c \
59 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080060 src/bindings.c \
61 src/animation.c \
62 src/noop-renderer.c \
63 src/pixman-renderer.c \
64 src/pixman-renderer.h \
65 shared/matrix.c \
66 shared/matrix.h \
67 shared/zalloc.h \
68 src/weston-egl-ext.h
69
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080070nodist_weston_SOURCES = \
71 protocol/screenshooter-protocol.c \
72 protocol/screenshooter-server-protocol.h \
73 protocol/text-cursor-position-protocol.c \
74 protocol/text-cursor-position-server-protocol.h \
75 protocol/text-protocol.c \
76 protocol/text-server-protocol.h \
77 protocol/input-method-protocol.c \
78 protocol/input-method-server-protocol.h \
79 protocol/workspaces-protocol.c \
80 protocol/workspaces-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -040081 protocol/presentation_timing-protocol.c \
82 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080083 protocol/scaler-protocol.c \
84 protocol/scaler-server-protocol.h
85
86BUILT_SOURCES += $(nodist_weston_SOURCES)
87
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -080088# Track this dependency explicitly instead of using BUILT_SOURCES. We
89# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
90# in case we're building from tarballs.
91
92src/compositor.c : $(top_builddir)/src/git-version.h
93
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080094noinst_LTLIBRARIES += \
95 libsession-helper.la
96
97libsession_helper_la_SOURCES = \
98 src/weston-launch.h \
99 src/launcher-util.c \
100 src/launcher-util.h
101libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
102libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
103
104if ENABLE_DBUS
105if HAVE_SYSTEMD_LOGIN
106libsession_helper_la_SOURCES += \
107 src/dbus.h \
108 src/dbus.c \
109 src/logind-util.h \
110 src/logind-util.c
111libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
112libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
113endif
114endif
115
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800116if HAVE_GIT_REPO
117src/git-version.h : $(top_srcdir)/.git/logs/HEAD
118 $(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)')\"" > $@
Kristian Høgsberg1d2dd072014-02-03 10:55:51 -0800119else
120src/git-version.h :
121 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
122
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800123endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800124
125.FORCE :
126
127if BUILD_WESTON_LAUNCH
128bin_PROGRAMS += weston-launch
129weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
130weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
131weston_launch_CFLAGS= \
132 $(GCC_CFLAGS) \
133 $(PAM_CFLAGS) \
134 $(SYSTEMD_LOGIN_CFLAGS) \
135 $(LIBDRM_CFLAGS)
136weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
137
138if ENABLE_SETUID_INSTALL
139install-exec-hook:
140 chown root $(DESTDIR)$(bindir)/weston-launch
141 chmod u+s $(DESTDIR)$(bindir)/weston-launch
142endif
143
144endif # BUILD_WESTON_LAUNCH
145
146pkgconfigdir = $(libdir)/pkgconfig
147pkgconfig_DATA = src/weston.pc
148
149westonincludedir = $(includedir)/weston
150westoninclude_HEADERS = \
151 src/version.h \
152 src/compositor.h \
153 shared/matrix.h \
154 shared/config-parser.h \
155 shared/zalloc.h
156
157if ENABLE_EGL
158module_LTLIBRARIES += gl-renderer.la
159gl_renderer_la_LDFLAGS = -module -avoid-version
160gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
161gl_renderer_la_CFLAGS = \
162 $(COMPOSITOR_CFLAGS) \
163 $(EGL_CFLAGS) \
164 $(GCC_CFLAGS)
165gl_renderer_la_SOURCES = \
166 src/gl-renderer.h \
167 src/gl-renderer.c \
168 src/vertex-clipping.c \
169 src/vertex-clipping.h
170endif
171
172if ENABLE_X11_COMPOSITOR
173module_LTLIBRARIES += x11-backend.la
174x11_backend_la_LDFLAGS = -module -avoid-version
175x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800176 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800177x11_backend_la_CFLAGS = \
178 $(COMPOSITOR_CFLAGS) \
179 $(EGL_CFLAGS) \
180 $(PIXMAN_CFLAGS) \
181 $(CAIRO_CFLAGS) \
182 $(X11_COMPOSITOR_CFLAGS) \
183 $(GCC_CFLAGS)
184x11_backend_la_SOURCES = src/compositor-x11.c
185endif
186
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100187INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000188INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100189 src/libinput-seat.c \
190 src/libinput-seat.h \
191 src/libinput-device.c \
192 src/libinput-device.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100193
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800194if ENABLE_DRM_COMPOSITOR
195module_LTLIBRARIES += drm-backend.la
196drm_backend_la_LDFLAGS = -module -avoid-version
197drm_backend_la_LIBADD = \
198 $(COMPOSITOR_LIBS) \
199 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100200 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100201 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800202 libsession-helper.la
203drm_backend_la_CFLAGS = \
204 $(COMPOSITOR_CFLAGS) \
205 $(EGL_CFLAGS) \
206 $(DRM_COMPOSITOR_CFLAGS) \
207 $(GCC_CFLAGS)
208drm_backend_la_SOURCES = \
209 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100210 $(INPUT_BACKEND_SOURCES) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800211 src/libbacklight.c \
212 src/libbacklight.h
213
214if ENABLE_VAAPI_RECORDER
215drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
216drm_backend_la_LIBADD += $(LIBVA_LIBS)
217drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
218endif
219endif
220
221if ENABLE_WAYLAND_COMPOSITOR
222module_LTLIBRARIES += wayland-backend.la
223wayland_backend_la_LDFLAGS = -module -avoid-version
224wayland_backend_la_LIBADD = \
225 $(COMPOSITOR_LIBS) \
226 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800227 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800228wayland_backend_la_CFLAGS = \
229 $(COMPOSITOR_CFLAGS) \
230 $(EGL_CFLAGS) \
231 $(PIXMAN_CFLAGS) \
232 $(CAIRO_CFLAGS) \
233 $(WAYLAND_COMPOSITOR_CFLAGS) \
234 $(GCC_CFLAGS)
235wayland_backend_la_SOURCES = src/compositor-wayland.c
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500236nodist_wayland_backend_la_SOURCES = \
237 protocol/fullscreen-shell-protocol.c \
238 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800239endif
240
241if ENABLE_RPI_COMPOSITOR
242if INSTALL_RPI_COMPOSITOR
243module_LTLIBRARIES += rpi-backend.la
244else
245noinst_LTLIBRARIES += rpi-backend.la
246endif
247
248rpi_backend_la_LDFLAGS = -module -avoid-version
249rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
250 $(RPI_COMPOSITOR_LIBS) \
251 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100252 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800253 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800254 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800255rpi_backend_la_CFLAGS = \
256 $(GCC_CFLAGS) \
257 $(COMPOSITOR_CFLAGS) \
258 $(RPI_COMPOSITOR_CFLAGS) \
259 $(RPI_BCM_HOST_CFLAGS)
260rpi_backend_la_SOURCES = \
261 src/compositor-rpi.c \
262 src/rpi-renderer.c \
263 src/rpi-renderer.h \
264 src/rpi-bcm-stubs.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100265 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800266
267if ENABLE_EGL
268rpi_backend_la_LIBADD += $(EGL_LIBS)
269rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
270endif
271
272endif
273
274if ENABLE_HEADLESS_COMPOSITOR
275module_LTLIBRARIES += headless-backend.la
276headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800277headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
278headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800279headless_backend_la_SOURCES = src/compositor-headless.c
280endif
281
282if ENABLE_FBDEV_COMPOSITOR
283module_LTLIBRARIES += fbdev-backend.la
284fbdev_backend_la_LDFLAGS = -module -avoid-version
285fbdev_backend_la_LIBADD = \
286 $(COMPOSITOR_LIBS) \
287 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100288 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800289 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800290 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800291fbdev_backend_la_CFLAGS = \
292 $(COMPOSITOR_CFLAGS) \
293 $(EGL_CFLAGS) \
294 $(FBDEV_COMPOSITOR_CFLAGS) \
295 $(PIXMAN_CFLAGS) \
296 $(GCC_CFLAGS)
297fbdev_backend_la_SOURCES = \
298 src/compositor-fbdev.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100299 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800300endif
301
302if ENABLE_RDP_COMPOSITOR
303module_LTLIBRARIES += rdp-backend.la
304rdp_backend_la_LDFLAGS = -module -avoid-version
305rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
306 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800307 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800308rdp_backend_la_CFLAGS = \
309 $(COMPOSITOR_CFLAGS) \
310 $(RDP_COMPOSITOR_CFLAGS) \
311 $(GCC_CFLAGS)
312rdp_backend_la_SOURCES = src/compositor-rdp.c
313endif
314
315if HAVE_LCMS
316module_LTLIBRARIES += cms-static.la
317cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800318cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800319cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
320cms_static_la_SOURCES = \
321 src/cms-static.c \
322 src/cms-helper.c \
323 src/cms-helper.h
324if ENABLE_COLORD
325module_LTLIBRARIES += cms-colord.la
326cms_colord_la_LDFLAGS = -module -avoid-version
327cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
328cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
329cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100330 src/cms-colord.c \
331 src/cms-helper.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800332 src/cms-helper.h
333endif
334endif
335
336noinst_PROGRAMS += spring-tool
337spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
338spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
339spring_tool_SOURCES = \
340 src/spring-tool.c \
341 src/animation.c \
342 shared/matrix.c \
343 shared/matrix.h \
344 src/compositor.h
345
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800346if BUILD_CLIENTS
347
348bin_PROGRAMS += weston-terminal weston-info
349
350libexec_PROGRAMS += \
351 weston-desktop-shell \
352 weston-screenshooter \
353 weston-keyboard \
354 weston-simple-im
355
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900356if ENABLE_IVI_SHELL
357libexec_PROGRAMS += \
358 weston-ivi-shell-user-interface
359endif
360
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800361demo_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 \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500386 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800387 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400388 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800389 weston-multi-resource
390
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800391weston_simple_shm_SOURCES = clients/simple-shm.c
392nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800393 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500394 protocol/xdg-shell-client-protocol.h \
395 protocol/fullscreen-shell-protocol.c \
396 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800397weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800398weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800399
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500400weston_simple_damage_SOURCES = clients/simple-damage.c
401nodist_weston_simple_damage_SOURCES = \
402 protocol/scaler-protocol.c \
403 protocol/scaler-client-protocol.h \
404 protocol/xdg-shell-protocol.c \
405 protocol/xdg-shell-client-protocol.h \
406 protocol/fullscreen-shell-protocol.c \
407 protocol/fullscreen-shell-client-protocol.h
408weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
409weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
410
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800411weston_simple_touch_SOURCES = clients/simple-touch.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800412weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800413weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800414
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400415weston_presentation_shm_SOURCES = clients/presentation-shm.c
416nodist_weston_presentation_shm_SOURCES = \
417 protocol/presentation_timing-protocol.c \
418 protocol/presentation_timing-client-protocol.h
419weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
420weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
421
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800422weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800423weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000424weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800425endif
426
427if BUILD_SIMPLE_EGL_CLIENTS
428demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800429weston_simple_egl_SOURCES = clients/simple-egl.c
430nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800431 protocol/xdg-shell-protocol.c \
432 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800433weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800434weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
435endif
436
437noinst_LTLIBRARIES += libtoytoolkit.la
438
439libtoytoolkit_la_SOURCES = \
440 clients/window.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800441 clients/window.h
442
443nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100444 protocol/text-cursor-position-protocol.c \
445 protocol/text-cursor-position-client-protocol.h \
446 protocol/scaler-protocol.c \
447 protocol/scaler-client-protocol.h \
448 protocol/workspaces-protocol.c \
449 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400450 protocol/presentation_timing-protocol.c \
451 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100452 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900453 protocol/xdg-shell-client-protocol.h \
454 protocol/ivi-application-protocol.c \
455 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500456
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800457BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
458
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800459
460libtoytoolkit_la_LIBADD = \
461 $(CLIENT_LIBS) \
462 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800463 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800464libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800465
466weston_flower_SOURCES = clients/flower.c
467weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800468weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800469
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100470weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800471 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800472nodist_weston_screenshooter_SOURCES = \
473 protocol/screenshooter-protocol.c \
474 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800475weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800476weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800477
478weston_terminal_SOURCES = clients/terminal.c
479weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800480weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800481
482weston_image_SOURCES = clients/image.c
483weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800484weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800485
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300486weston_cliptest_SOURCES = \
487 clients/cliptest.c \
488 src/vertex-clipping.c \
489 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800490weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800491weston_cliptest_LDADD = libtoytoolkit.la
492
493weston_dnd_SOURCES = clients/dnd.c
494weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800495weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800496
497weston_smoke_SOURCES = clients/smoke.c
498weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800499weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800500
501weston_resizor_SOURCES = clients/resizor.c
502weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800503weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800504
505weston_scaler_SOURCES = clients/scaler.c
506weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800507weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800508
509if HAVE_CAIRO_GLESV2
510demo_clients += weston-nested weston-nested-client
511
512weston_nested_SOURCES = clients/nested.c
513weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800514weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800515
516weston_nested_client_SOURCES = clients/nested-client.c
517weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800518weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800519endif
520
521weston_eventdemo_SOURCES = clients/eventdemo.c
522weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800523weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800524
525weston_clickdot_SOURCES = clients/clickdot.c
526weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800527weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800528
529weston_transformed_SOURCES = clients/transformed.c
530weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800531weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800532
533weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500534nodist_weston_fullscreen_SOURCES = \
535 protocol/fullscreen-shell-protocol.c \
536 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800537weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800538weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800539
540weston_stacking_SOURCES = clients/stacking.c
541weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800542weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800543
544weston_calibrator_SOURCES = clients/calibrator.c \
545 shared/matrix.c \
546 shared/matrix.h
547weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800548weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800549
550if BUILD_SUBSURFACES_CLIENT
551demo_clients += weston-subsurfaces
552weston_subsurfaces_SOURCES = clients/subsurfaces.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800553weston_subsurfaces_CFLAGS = \
554 $(AM_CFLAGS) \
555 $(SIMPLE_EGL_CLIENT_CFLAGS) \
556 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800557weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
558endif
559
560if HAVE_PANGO
561demo_clients += weston-editor
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800562weston_editor_SOURCES = clients/editor.c
563nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100564 protocol/text-protocol.c \
565 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800566weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800567weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800568endif
569
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800570weston_keyboard_SOURCES = clients/keyboard.c
571nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100572 protocol/desktop-shell-client-protocol.h \
573 protocol/desktop-shell-protocol.c \
574 protocol/input-method-protocol.c \
575 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800576weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800577weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800578
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800579weston_simple_im_SOURCES = clients/weston-simple-im.c
580nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100581 protocol/input-method-protocol.c \
582 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800583weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800584weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800585
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800586weston_info_SOURCES = clients/weston-info.c
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400587nodist_weston_info_SOURCES = \
588 protocol/presentation_timing-protocol.c \
589 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800590weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200591weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800592
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800593weston_desktop_shell_SOURCES = clients/desktop-shell.c
594nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100595 protocol/desktop-shell-client-protocol.h \
596 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800597weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800598weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800599
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900600if ENABLE_IVI_SHELL
601weston_ivi_shell_user_interface_SOURCES = clients/ivi-shell-user-interface.c
602nodist_weston_ivi_shell_user_interface_SOURCES = \
603 protocol/ivi-hmi-controller-client-protocol.h \
604 protocol/ivi-hmi-controller-protocol.c \
605 protocol/ivi-application-client-protocol.h \
606 protocol/ivi-application-protocol.c
607weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
608weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
609endif
610
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800611if BUILD_FULL_GL_CLIENTS
612demo_clients += weston-gears
613weston_gears_SOURCES = clients/gears.c
614weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800615weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800616
617if HAVE_GLU
618libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100619weston_screensaver_SOURCES = \
620 clients/wscreensaver.c \
621 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100622 clients/wscreensaver-glue.c \
623 clients/wscreensaver-glue.h \
624 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800625 clients/matrix3.xpm
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800626nodist_weston_screensaver_SOURCES = \
627 protocol/desktop-shell-client-protocol.h \
628 protocol/desktop-shell-protocol.c
629
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800630weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800631weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800632
633endif
634
635endif
636
637endif
638
639BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100640 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800641 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100642 protocol/text-cursor-position-client-protocol.h \
643 protocol/text-cursor-position-protocol.c \
644 protocol/text-protocol.c \
645 protocol/text-client-protocol.h \
646 protocol/input-method-protocol.c \
647 protocol/input-method-client-protocol.h \
648 protocol/desktop-shell-client-protocol.h \
649 protocol/desktop-shell-protocol.c \
650 protocol/scaler-client-protocol.h \
651 protocol/scaler-protocol.c \
652 protocol/workspaces-client-protocol.h \
653 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500654 protocol/fullscreen-shell-protocol.c \
655 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100656 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900657 protocol/xdg-shell-client-protocol.h \
658 protocol/ivi-hmi-controller-protocol.c \
659 protocol/ivi-hmi-controller-client-protocol.h \
660 protocol/ivi-application-protocol.c \
661 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800662
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800663westondatadir = $(datadir)/weston
664dist_westondata_DATA = \
665 data/wayland.svg \
666 data/wayland.png \
667 data/pattern.png \
668 data/terminal.png \
669 data/border.png \
670 data/icon_window.png \
671 data/sign_close.png \
672 data/sign_maximize.png \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900673 data/sign_minimize.png \
674 data/background.png \
675 data/tiling.png \
676 data/fullscreen.png \
677 data/panel.png \
678 data/random.png \
679 data/sidebyside.png \
680 data/home.png \
681 data/icon_ivi_clickdot.png \
682 data/icon_ivi_flower.png \
683 data/icon_ivi_simple-egl.png \
684 data/icon_ivi_simple-shm.png \
685 data/icon_ivi_smoke.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800686
687
688if BUILD_WCAP_TOOLS
689bin_PROGRAMS += wcap-decode
690
691wcap_decode_SOURCES = \
692 wcap/main.c \
693 wcap/wcap-decode.c \
694 wcap/wcap-decode.h
695
696wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
697wcap_decode_LDADD = $(WCAP_LIBS)
698endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800699
700
701if ENABLE_DESKTOP_SHELL
702
703module_LTLIBRARIES += desktop-shell.la
704
705desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100706 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800707 -I$(top_srcdir)/shared \
708 -I$(top_srcdir)/src \
709 -I$(top_builddir)/src \
710 -I$(top_builddir)/desktop-shell \
711 -DDATADIR='"$(datadir)"' \
712 -DMODULEDIR='"$(moduledir)"' \
713 -DLIBEXECDIR='"$(libexecdir)"' \
714 -DIN_WESTON
715
716desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800717desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800718desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
719desktop_shell_la_SOURCES = \
720 desktop-shell/shell.h \
721 desktop-shell/shell.c \
722 desktop-shell/exposay.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800723 desktop-shell/input-panel.c
724nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100725 protocol/desktop-shell-protocol.c \
726 protocol/desktop-shell-server-protocol.h \
727 protocol/xdg-shell-protocol.c \
728 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800729
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800730BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800731endif
732
Jason Ekstrand946a9482014-04-02 19:53:47 -0500733if ENABLE_FULLSCREEN_SHELL
734
735module_LTLIBRARIES += fullscreen-shell.la
736
737fullscreen_shell_la_CPPFLAGS = \
738 -I$(top_builddir)/protocol \
739 -I$(top_srcdir)/shared \
740 -I$(top_srcdir)/src \
741 -I$(top_builddir)/src \
742 -DIN_WESTON
743
744fullscreen_shell_la_LDFLAGS = -module -avoid-version
745fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
746fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
747fullscreen_shell_la_SOURCES = \
748 fullscreen-shell/fullscreen-shell.c
749nodist_fullscreen_shell_la_SOURCES = \
750 protocol/fullscreen-shell-protocol.c \
751 protocol/fullscreen-shell-server-protocol.h
752
753BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
754endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800755
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900756if ENABLE_IVI_SHELL
757
758module_LTLIBRARIES += \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900759 $(ivi_layout) \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900760 $(ivi_shell) \
761 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900762
763ivi_layout = ivi-layout.la
764ivi_layout_la_LDFLAGS = -module -avoid-version
765ivi_layout_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
766ivi_layout_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
767ivi_layout_la_SOURCES = \
768 ivi-shell/ivi-layout-export.h \
769 ivi-shell/ivi-layout-private.h \
770 ivi-shell/ivi-layout.c \
771 ivi-shell/ivi-layout-transition.c
772
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900773ivi_shell = ivi-shell.la
774ivi_shell_la_LDFLAGS = -module -avoid-version
775ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
776ivi_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
777ivi_shell_la_SOURCES = \
778 ivi-shell/ivi-shell.h \
779 ivi-shell/ivi-shell.c \
780 ivi-shell/ivi-layout-private.h
781nodist_ivi_shell_la_SOURCES = \
782 protocol/ivi-application-protocol.c \
783 protocol/ivi-application-server-protocol.h
784
785BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
786
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900787hmi_controller = hmi-controller.la
788hmi_controller_la_LDFLAGS = -module -avoid-version
789hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
790hmi_controller_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
791hmi_controller_la_SOURCES = \
792 ivi-shell/ivi-layout-export.h \
793 ivi-shell/hmi-controller.c
794nodist_hmi_controller_la_SOURCES = \
795 protocol/ivi-hmi-controller-protocol.c \
796 protocol/ivi-hmi-controller-server-protocol.h
797
798BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
799
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900800endif
801
802
Jason Ekstrand47928d82014-04-02 19:54:01 -0500803if ENABLE_SCREEN_SHARING
804
805module_LTLIBRARIES += screen-share.la
806
807screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
808screen_share_la_LDFLAGS = -module -avoid-version
809screen_share_la_LIBADD = \
810 $(COMPOSITOR_LIBS) \
811 $(SCREEN_SHARE_LIBS) \
812 libshared-cairo.la
813screen_share_la_CFLAGS = \
814 $(COMPOSITOR_CFLAGS) \
815 $(SCREEN_SHARE_CFLAGS) \
816 $(GCC_CFLAGS)
817screen_share_la_SOURCES = \
818 src/screen-share.c
819nodist_screen_share_la_SOURCES = \
820 protocol/fullscreen-shell-protocol.c \
821 protocol/fullscreen-shell-client-protocol.h
822
823endif
824
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800825if ENABLE_XWAYLAND
826
827module_LTLIBRARIES += xwayland.la
828
829xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100830 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800831 -I$(top_srcdir)/shared \
832 -I$(top_srcdir)/src \
833 -I$(top_builddir)/src \
834 -I$(top_builddir)/xwayland \
835 -DDATADIR='"$(datadir)"' \
836 -DMODULEDIR='"$(moduledir)"' \
837 -DLIBEXECDIR='"$(libexecdir)"' \
838 -DXSERVER_PATH='"@XSERVER_PATH@"'
839
840xwayland_la_LDFLAGS = -module -avoid-version
841xwayland_la_LIBADD = \
842 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800843 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800844xwayland_la_CFLAGS = \
845 $(GCC_CFLAGS) \
846 $(COMPOSITOR_CFLAGS) \
847 $(PIXMAN_CFLAGS) \
848 $(CAIRO_CFLAGS)
849xwayland_la_SOURCES = \
850 xwayland/xwayland.h \
851 xwayland/window-manager.c \
852 xwayland/selection.c \
853 xwayland/dnd.c \
854 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800855 xwayland/hash.c \
856 xwayland/hash.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800857endif
858
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800859
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800860#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800861# Shared utilities
862#
863
864noinst_LTLIBRARIES += libshared.la libshared-cairo.la
865
866libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
867
868libshared_la_SOURCES = \
869 shared/config-parser.c \
870 shared/option-parser.c \
871 shared/config-parser.h \
872 shared/os-compatibility.c \
873 shared/os-compatibility.h
874
875libshared_cairo_la_CFLAGS = \
876 -DDATADIR='"$(datadir)"' \
877 $(GCC_CFLAGS) \
878 $(COMPOSITOR_CFLAGS) \
879 $(PIXMAN_CFLAGS) \
880 $(CAIRO_CFLAGS) \
881 $(PNG_CFLAGS) \
882 $(WEBP_CFLAGS)
883
884libshared_cairo_la_LIBADD = \
885 $(PIXMAN_LIBS) \
886 $(CAIRO_LIBS) \
887 $(PNG_LIBS) \
888 $(WEBP_LIBS) \
889 $(JPEG_LIBS)
890
891libshared_cairo_la_SOURCES = \
892 $(libshared_la_SOURCES) \
893 shared/image-loader.c \
894 shared/image-loader.h \
895 shared/cairo-util.c \
896 shared/frame.c \
897 shared/cairo-util.h
898
899
900#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800901# tests subdirectory
902#
903
904TESTS = $(shared_tests) $(module_tests) $(weston_tests)
905
906shared_tests = \
907 config-parser.test \
908 vertex-clip.test
909
910module_tests = \
911 surface-test.la \
912 surface-global-test.la
913
914weston_tests = \
915 bad_buffer.weston \
916 keyboard.weston \
917 event.weston \
918 button.weston \
919 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -0400920 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +0300921 roles.weston \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800922 subsurface.weston
923
924
925AM_TESTS_ENVIRONMENT = \
926 abs_builddir='$(abs_builddir)'; export abs_builddir;
927
928TEST_EXTENSIONS = .la .weston
929LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
930WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
931
932clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +0300933 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800934
935# To remove when automake 1.11 support is dropped
936export abs_builddir
937
938noinst_LTLIBRARIES += \
939 weston-test.la \
940 $(module_tests) \
941 libtest-runner.la \
942 libtest-client.la
943
944noinst_PROGRAMS += \
945 $(setbacklight) \
946 $(shared_tests) \
947 $(weston_tests) \
948 matrix-test
949
950test_module_ldflags = \
951 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
952
953surface_global_test_la_SOURCES = tests/surface-global-test.c
954surface_global_test_la_LDFLAGS = $(test_module_ldflags)
955surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
956
957surface_test_la_SOURCES = tests/surface-test.c
958surface_test_la_LDFLAGS = $(test_module_ldflags)
959surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
960
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800961weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800962weston_test_la_LDFLAGS = $(test_module_ldflags)
963weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800964weston_test_la_SOURCES = tests/weston-test.c
965nodist_weston_test_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100966 protocol/wayland-test-protocol.c \
967 protocol/wayland-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800968
969if ENABLE_EGL
970weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
971weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
972endif
973
974libtest_runner_la_SOURCES = \
975 tests/weston-test-runner.c \
976 tests/weston-test-runner.h
977libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
978
979config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800980config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800981
982vertex_clip_test_SOURCES = \
983 tests/vertex-clip-test.c \
984 src/vertex-clipping.c \
985 src/vertex-clipping.h
986vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
987
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100988libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800989 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800990 tests/weston-test-client-helper.h
991nodist_libtest_client_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100992 protocol/wayland-test-protocol.c \
993 protocol/wayland-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800994libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800995libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800996
997bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800998bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800999bad_buffer_weston_LDADD = libtest-client.la
1000
1001keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001002keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001003keyboard_weston_LDADD = libtest-client.la
1004
1005event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001006event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001007event_weston_LDADD = libtest-client.la
1008
1009button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001010button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001011button_weston_LDADD = libtest-client.la
1012
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001013text_weston_SOURCES = tests/text-test.c
1014nodist_text_weston_SOURCES = \
1015 protocol/text-protocol.c \
1016 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001017text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001018text_weston_LDADD = libtest-client.la
1019
1020subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001021subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001022subsurface_weston_LDADD = libtest-client.la
1023
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001024presentation_weston_SOURCES = tests/presentation-test.c
1025nodist_presentation_weston_SOURCES = \
1026 protocol/presentation_timing-protocol.c \
1027 protocol/presentation_timing-client-protocol.h
1028presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1029presentation_weston_LDADD = libtest-client.la
1030
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001031roles_weston_SOURCES = tests/roles-test.c
1032roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1033roles_weston_LDADD = libtest-client.la
1034
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001035if ENABLE_EGL
1036weston_tests += buffer-count.weston
1037buffer_count_weston_SOURCES = tests/buffer-count-test.c
1038buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
1039buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1040endif
1041
1042if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001043weston_tests += xwayland-test.weston
1044xwayland_test_weston_SOURCES = tests/xwayland-test.c
1045xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
1046xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001047endif
1048
1049matrix_test_SOURCES = \
1050 tests/matrix-test.c \
1051 shared/matrix.c \
1052 shared/matrix.h
1053matrix_test_CPPFLAGS = -DUNIT_TEST
1054matrix_test_LDADD = -lm -lrt
1055
1056if BUILD_SETBACKLIGHT
1057noinst_PROGRAMS += setbacklight
1058setbacklight_SOURCES = \
1059 tests/setbacklight.c \
1060 src/libbacklight.c \
1061 src/libbacklight.h
1062setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1063setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1064endif
1065
1066EXTRA_DIST += tests/weston-tests-env
1067
1068BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001069 protocol/wayland-test-protocol.c \
1070 protocol/wayland-test-server-protocol.h \
1071 protocol/wayland-test-client-protocol.h \
1072 protocol/text-protocol.c \
1073 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001074
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001075EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001076 protocol/desktop-shell.xml \
1077 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001078 protocol/text.xml \
1079 protocol/input-method.xml \
1080 protocol/workspaces.xml \
1081 protocol/text-cursor-position.xml \
1082 protocol/wayland-test.xml \
1083 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001084 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001085 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001086 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001087 protocol/ivi-application.xml \
1088 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001089
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001090man_MANS = weston.1 weston.ini.5
1091
1092if ENABLE_DRM_COMPOSITOR
1093man_MANS += weston-drm.7
1094endif
1095
1096MAN_SUBSTS = \
1097 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1098 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1099 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1100 -e 's|__version__|$(PACKAGE_VERSION)|g'
1101
1102SUFFIXES = .1 .5 .7 .man
1103
1104%.1 %.5 %.7 : man/%.man
1105 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1106
1107EXTRA_DIST += \
1108 man/weston.man \
1109 man/weston-drm.man \
1110 man/weston.ini.man
1111
1112CLEANFILES += $(man_MANS)
1113
1114
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001115protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1116 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001117
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001118protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1119 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001120
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001121protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1122 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@