blob: a0d0c196cf30ba5e12a097d948343b922634176e [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
Derek Foreman2ef9e812015-02-09 09:57:29 -060011AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050012
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090013EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000014
15weston.ini : $(srcdir)/weston.ini.in
16 $(AM_V_GEN)$(SED) \
17 -e 's|@bindir[@]|$(bindir)|g' \
18 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
19 -e 's|@libexecdir[@]|$(libexecdir)|g' \
20 $< > $@
21
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090022ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
23 $(AM_V_GEN)$(SED) \
24 -e 's|@bindir[@]|$(bindir)|g' \
25 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020026 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090027 -e 's|@libexecdir[@]|$(libexecdir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020028 -e 's|@plugin_prefix[@]||g' \
29 $< > $@
30
31tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in
32 $(AM_V_GEN)$(SED) \
33 -e 's|@bindir[@]|$(bindir)|g' \
34 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020035 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Derek Foremanbbdd9bc2015-06-16 13:30:35 -050036 -e 's|@libexecdir[@]|$(abs_builddir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020037 -e 's|@plugin_prefix[@]|$(abs_top_builddir)/.libs/|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090038 $< > $@
39
40all-local : weston.ini ivi-shell/weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080041
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080042AM_CFLAGS = $(GCC_CFLAGS)
43
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080044AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080045 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080046 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080047 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080048 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080049 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010050 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080051 -DDATADIR='"$(datadir)"' \
52 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080053 -DLIBEXECDIR='"$(libexecdir)"' \
54 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080055
Pekka Paalanenf3a34532015-03-24 13:51:05 +020056CLEANFILES = weston.ini \
57 ivi-shell/weston.ini \
58 tests/weston-ivi.ini \
Derek Foreman1ce2ef52015-05-26 10:21:03 -050059 internal-screenshot-00.png \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020060 $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080061
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080062bin_PROGRAMS += weston
63
64weston_LDFLAGS = -export-dynamic
65weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
Derek Foreman4ff38742015-06-18 11:43:11 -050066weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080067weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080068 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080069
70weston_SOURCES = \
71 src/git-version.h \
72 src/log.c \
73 src/compositor.c \
74 src/compositor.h \
75 src/input.c \
76 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080077 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080078 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080079 src/zoom.c \
80 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080081 src/bindings.c \
82 src/animation.c \
83 src/noop-renderer.c \
84 src/pixman-renderer.c \
85 src/pixman-renderer.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +020086 src/timeline.c \
87 src/timeline.h \
88 src/timeline-object.h \
Giulio Camuffobab996e2014-10-12 00:24:25 +030089 src/main.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -070090 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080091 shared/matrix.c \
92 shared/matrix.h \
93 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +010094 shared/platform.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080095 src/weston-egl-ext.h
96
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080097nodist_weston_SOURCES = \
98 protocol/screenshooter-protocol.c \
99 protocol/screenshooter-server-protocol.h \
100 protocol/text-cursor-position-protocol.c \
101 protocol/text-cursor-position-server-protocol.h \
102 protocol/text-protocol.c \
103 protocol/text-server-protocol.h \
104 protocol/input-method-protocol.c \
105 protocol/input-method-server-protocol.h \
106 protocol/workspaces-protocol.c \
107 protocol/workspaces-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400108 protocol/presentation_timing-protocol.c \
109 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800110 protocol/scaler-protocol.c \
111 protocol/scaler-server-protocol.h
112
113BUILT_SOURCES += $(nodist_weston_SOURCES)
114
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800115# Track this dependency explicitly instead of using BUILT_SOURCES. We
116# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
117# in case we're building from tarballs.
118
119src/compositor.c : $(top_builddir)/src/git-version.h
120
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800121noinst_LTLIBRARIES += \
122 libsession-helper.la
123
124libsession_helper_la_SOURCES = \
125 src/weston-launch.h \
126 src/launcher-util.c \
127 src/launcher-util.h
Derek Foreman4ff38742015-06-18 11:43:11 -0500128libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800129libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
130
131if ENABLE_DBUS
132if HAVE_SYSTEMD_LOGIN
133libsession_helper_la_SOURCES += \
134 src/dbus.h \
135 src/dbus.c \
136 src/logind-util.h \
137 src/logind-util.c
138libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
139libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
140endif
141endif
142
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800143if HAVE_GIT_REPO
144src/git-version.h : $(top_srcdir)/.git/logs/HEAD
145 $(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 -0800146else
147src/git-version.h :
148 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
149
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800150endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800151
152.FORCE :
153
154if BUILD_WESTON_LAUNCH
155bin_PROGRAMS += weston-launch
156weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
157weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
158weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500159 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800160 $(PAM_CFLAGS) \
161 $(SYSTEMD_LOGIN_CFLAGS) \
162 $(LIBDRM_CFLAGS)
163weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
164
165if ENABLE_SETUID_INSTALL
166install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700167 can_suid_files=no; \
168 chown root $(DESTDIR)$(bindir)/weston-launch \
169 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
170 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500171 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700172 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
173 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
174 false; \
175 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800176endif
177
178endif # BUILD_WESTON_LAUNCH
179
180pkgconfigdir = $(libdir)/pkgconfig
181pkgconfig_DATA = src/weston.pc
182
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100183wayland_sessiondir = $(datadir)/wayland-sessions
184wayland_session_DATA = src/weston.desktop
Marek Chalupa194ca2b2015-01-22 10:03:03 +0100185dist_wayland_session_DATA = $(wayland_session_DATA)
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100186
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800187westonincludedir = $(includedir)/weston
188westoninclude_HEADERS = \
189 src/version.h \
190 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200191 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800192 shared/matrix.h \
193 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100194 shared/zalloc.h \
195 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800196
197if ENABLE_EGL
198module_LTLIBRARIES += gl-renderer.la
199gl_renderer_la_LDFLAGS = -module -avoid-version
200gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
201gl_renderer_la_CFLAGS = \
202 $(COMPOSITOR_CFLAGS) \
203 $(EGL_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500204 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800205gl_renderer_la_SOURCES = \
206 src/gl-renderer.h \
207 src/gl-renderer.c \
208 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700209 src/vertex-clipping.h \
210 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800211endif
212
213if ENABLE_X11_COMPOSITOR
214module_LTLIBRARIES += x11-backend.la
215x11_backend_la_LDFLAGS = -module -avoid-version
216x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800217 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800218x11_backend_la_CFLAGS = \
219 $(COMPOSITOR_CFLAGS) \
220 $(EGL_CFLAGS) \
221 $(PIXMAN_CFLAGS) \
222 $(CAIRO_CFLAGS) \
223 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500224 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700225x11_backend_la_SOURCES = \
226 src/compositor-x11.c \
227 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800228endif
229
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100230INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000231INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100232 src/libinput-seat.c \
233 src/libinput-seat.h \
234 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700235 src/libinput-device.h \
236 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100237
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800238if ENABLE_DRM_COMPOSITOR
239module_LTLIBRARIES += drm-backend.la
240drm_backend_la_LDFLAGS = -module -avoid-version
241drm_backend_la_LIBADD = \
242 $(COMPOSITOR_LIBS) \
243 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100244 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100245 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800246 libsession-helper.la
247drm_backend_la_CFLAGS = \
248 $(COMPOSITOR_CFLAGS) \
249 $(EGL_CFLAGS) \
250 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500251 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800252drm_backend_la_SOURCES = \
253 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100254 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700255 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800256 src/libbacklight.c \
257 src/libbacklight.h
258
259if ENABLE_VAAPI_RECORDER
260drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
261drm_backend_la_LIBADD += $(LIBVA_LIBS)
262drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
263endif
264endif
265
266if ENABLE_WAYLAND_COMPOSITOR
267module_LTLIBRARIES += wayland-backend.la
268wayland_backend_la_LDFLAGS = -module -avoid-version
269wayland_backend_la_LIBADD = \
270 $(COMPOSITOR_LIBS) \
271 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800272 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800273wayland_backend_la_CFLAGS = \
274 $(COMPOSITOR_CFLAGS) \
275 $(EGL_CFLAGS) \
276 $(PIXMAN_CFLAGS) \
277 $(CAIRO_CFLAGS) \
278 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500279 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700280wayland_backend_la_SOURCES = \
281 src/compositor-wayland.c \
282 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500283nodist_wayland_backend_la_SOURCES = \
284 protocol/fullscreen-shell-protocol.c \
285 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800286endif
287
288if ENABLE_RPI_COMPOSITOR
289if INSTALL_RPI_COMPOSITOR
290module_LTLIBRARIES += rpi-backend.la
291else
292noinst_LTLIBRARIES += rpi-backend.la
293endif
294
295rpi_backend_la_LDFLAGS = -module -avoid-version
296rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
297 $(RPI_COMPOSITOR_LIBS) \
298 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100299 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800300 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800301 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800302rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500303 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800304 $(COMPOSITOR_CFLAGS) \
305 $(RPI_COMPOSITOR_CFLAGS) \
306 $(RPI_BCM_HOST_CFLAGS)
307rpi_backend_la_SOURCES = \
308 src/compositor-rpi.c \
309 src/rpi-renderer.c \
310 src/rpi-renderer.h \
311 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700312 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100313 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800314
315if ENABLE_EGL
316rpi_backend_la_LIBADD += $(EGL_LIBS)
317rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
318endif
319
320endif
321
322if ENABLE_HEADLESS_COMPOSITOR
323module_LTLIBRARIES += headless-backend.la
324headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800325headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500326headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700327headless_backend_la_SOURCES = \
328 src/compositor-headless.c \
329 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800330endif
331
332if ENABLE_FBDEV_COMPOSITOR
333module_LTLIBRARIES += fbdev-backend.la
334fbdev_backend_la_LDFLAGS = -module -avoid-version
335fbdev_backend_la_LIBADD = \
336 $(COMPOSITOR_LIBS) \
337 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100338 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800339 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800340 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800341fbdev_backend_la_CFLAGS = \
342 $(COMPOSITOR_CFLAGS) \
343 $(EGL_CFLAGS) \
344 $(FBDEV_COMPOSITOR_CFLAGS) \
345 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500346 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800347fbdev_backend_la_SOURCES = \
348 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700349 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100350 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800351endif
352
353if ENABLE_RDP_COMPOSITOR
354module_LTLIBRARIES += rdp-backend.la
355rdp_backend_la_LDFLAGS = -module -avoid-version
356rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
357 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800358 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800359rdp_backend_la_CFLAGS = \
360 $(COMPOSITOR_CFLAGS) \
361 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500362 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700363rdp_backend_la_SOURCES = \
364 src/compositor-rdp.c \
365 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800366endif
367
368if HAVE_LCMS
369module_LTLIBRARIES += cms-static.la
370cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800371cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500372cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800373cms_static_la_SOURCES = \
374 src/cms-static.c \
375 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700376 src/cms-helper.h \
377 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800378if ENABLE_COLORD
379module_LTLIBRARIES += cms-colord.la
380cms_colord_la_LDFLAGS = -module -avoid-version
381cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500382cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800383cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100384 src/cms-colord.c \
385 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700386 src/cms-helper.h \
387 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800388endif
389endif
390
391noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500392spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800393spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
394spring_tool_SOURCES = \
395 src/spring-tool.c \
396 src/animation.c \
397 shared/matrix.c \
398 shared/matrix.h \
399 src/compositor.h
400
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800401if BUILD_CLIENTS
402
403bin_PROGRAMS += weston-terminal weston-info
404
405libexec_PROGRAMS += \
406 weston-desktop-shell \
407 weston-screenshooter \
408 weston-keyboard \
409 weston-simple-im
410
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900411if ENABLE_IVI_SHELL
412libexec_PROGRAMS += \
413 weston-ivi-shell-user-interface
414endif
415
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800416demo_clients = \
417 weston-flower \
418 weston-image \
419 weston-cliptest \
420 weston-dnd \
421 weston-smoke \
422 weston-resizor \
423 weston-eventdemo \
424 weston-clickdot \
425 weston-transformed \
426 weston-fullscreen \
427 weston-stacking \
428 weston-calibrator \
429 weston-scaler
430
431if INSTALL_DEMO_CLIENTS
432bin_PROGRAMS += $(demo_clients)
433else
434noinst_PROGRAMS += $(demo_clients)
435endif
436
437
438if BUILD_SIMPLE_CLIENTS
439demo_clients += \
440 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500441 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800442 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400443 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800444 weston-multi-resource
445
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800446weston_simple_shm_SOURCES = clients/simple-shm.c
447nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800448 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500449 protocol/xdg-shell-client-protocol.h \
450 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900451 protocol/fullscreen-shell-client-protocol.h \
452 protocol/ivi-application-protocol.c \
453 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800454weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800455weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800456
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500457weston_simple_damage_SOURCES = clients/simple-damage.c
458nodist_weston_simple_damage_SOURCES = \
459 protocol/scaler-protocol.c \
460 protocol/scaler-client-protocol.h \
461 protocol/xdg-shell-protocol.c \
462 protocol/xdg-shell-client-protocol.h \
463 protocol/fullscreen-shell-protocol.c \
464 protocol/fullscreen-shell-client-protocol.h
465weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
466weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
467
Jon A. Cruzb09da242015-06-16 13:15:13 -0700468weston_simple_touch_SOURCES = \
469 clients/simple-touch.c \
470 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800471weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800472weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800473
Jon A. Cruzb09da242015-06-16 13:15:13 -0700474weston_presentation_shm_SOURCES = \
475 clients/presentation-shm.c \
476 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400477nodist_weston_presentation_shm_SOURCES = \
478 protocol/presentation_timing-protocol.c \
479 protocol/presentation_timing-client-protocol.h
480weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
481weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
482
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800483weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800484weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000485weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800486endif
487
488if BUILD_SIMPLE_EGL_CLIENTS
489demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800490weston_simple_egl_SOURCES = clients/simple-egl.c
491nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800492 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900493 protocol/xdg-shell-client-protocol.h \
494 protocol/ivi-application-protocol.c \
495 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800496weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800497weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
498endif
499
500noinst_LTLIBRARIES += libtoytoolkit.la
501
502libtoytoolkit_la_SOURCES = \
503 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700504 clients/window.h \
505 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800506
507nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100508 protocol/text-cursor-position-protocol.c \
509 protocol/text-cursor-position-client-protocol.h \
510 protocol/scaler-protocol.c \
511 protocol/scaler-client-protocol.h \
512 protocol/workspaces-protocol.c \
513 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400514 protocol/presentation_timing-protocol.c \
515 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100516 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900517 protocol/xdg-shell-client-protocol.h \
518 protocol/ivi-application-protocol.c \
519 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500520
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800521BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
522
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800523
524libtoytoolkit_la_LIBADD = \
525 $(CLIENT_LIBS) \
526 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800527 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800528libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800529
530weston_flower_SOURCES = clients/flower.c
531weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800532weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800533
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100534weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800535 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800536nodist_weston_screenshooter_SOURCES = \
537 protocol/screenshooter-protocol.c \
538 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800539weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800540weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800541
Jon A. Cruzb09da242015-06-16 13:15:13 -0700542weston_terminal_SOURCES = \
543 clients/terminal.c \
544 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800545weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800546weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800547
548weston_image_SOURCES = clients/image.c
549weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800550weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800551
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300552weston_cliptest_SOURCES = \
553 clients/cliptest.c \
554 src/vertex-clipping.c \
555 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800556weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800557weston_cliptest_LDADD = libtoytoolkit.la
558
Jon A. Cruzb09da242015-06-16 13:15:13 -0700559weston_dnd_SOURCES = \
560 clients/dnd.c \
561 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800562weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800563weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800564
565weston_smoke_SOURCES = clients/smoke.c
566weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800567weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800568
569weston_resizor_SOURCES = clients/resizor.c
570weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800571weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800572
573weston_scaler_SOURCES = clients/scaler.c
574weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800575weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800576
577if HAVE_CAIRO_GLESV2
578demo_clients += weston-nested weston-nested-client
579
Jon A. Cruzb09da242015-06-16 13:15:13 -0700580weston_nested_SOURCES = \
581 clients/nested.c \
582 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800583weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800584weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800585
586weston_nested_client_SOURCES = clients/nested-client.c
587weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800588weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800589endif
590
Jon A. Cruzb09da242015-06-16 13:15:13 -0700591weston_eventdemo_SOURCES = \
592 clients/eventdemo.c \
593 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800594weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800595weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800596
Jon A. Cruzb09da242015-06-16 13:15:13 -0700597weston_clickdot_SOURCES = \
598 clients/clickdot.c \
599 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800600weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800601weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800602
603weston_transformed_SOURCES = clients/transformed.c
604weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800605weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800606
607weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500608nodist_weston_fullscreen_SOURCES = \
609 protocol/fullscreen-shell-protocol.c \
610 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800611weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800612weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800613
Jon A. Cruzb09da242015-06-16 13:15:13 -0700614weston_stacking_SOURCES = \
615 clients/stacking.c \
616 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800617weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800618weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800619
Jon A. Cruzb09da242015-06-16 13:15:13 -0700620weston_calibrator_SOURCES = \
621 clients/calibrator.c \
622 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800623 shared/matrix.c \
624 shared/matrix.h
625weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800626weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800627
628if BUILD_SUBSURFACES_CLIENT
629demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700630weston_subsurfaces_SOURCES = \
631 clients/subsurfaces.c \
632 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800633weston_subsurfaces_CFLAGS = \
634 $(AM_CFLAGS) \
635 $(SIMPLE_EGL_CLIENT_CFLAGS) \
636 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800637weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
638endif
639
640if HAVE_PANGO
641demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700642weston_editor_SOURCES = \
643 clients/editor.c \
644 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800645nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100646 protocol/text-protocol.c \
647 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800648weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800649weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800650endif
651
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800652weston_keyboard_SOURCES = clients/keyboard.c
653nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100654 protocol/desktop-shell-client-protocol.h \
655 protocol/desktop-shell-protocol.c \
656 protocol/input-method-protocol.c \
657 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800658weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800659weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800660
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800661weston_simple_im_SOURCES = clients/weston-simple-im.c
662nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100663 protocol/input-method-protocol.c \
664 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800665weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800666weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800667
Jon A. Cruzb09da242015-06-16 13:15:13 -0700668weston_info_SOURCES = \
669 clients/weston-info.c \
670 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400671nodist_weston_info_SOURCES = \
672 protocol/presentation_timing-protocol.c \
673 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800674weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200675weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800676
Jon A. Cruzb09da242015-06-16 13:15:13 -0700677weston_desktop_shell_SOURCES = \
678 clients/desktop-shell.c \
679 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800680nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100681 protocol/desktop-shell-client-protocol.h \
682 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800683weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800684weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800685
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900686if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700687weston_ivi_shell_user_interface_SOURCES = \
688 clients/ivi-shell-user-interface.c \
689 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900690nodist_weston_ivi_shell_user_interface_SOURCES = \
691 protocol/ivi-hmi-controller-client-protocol.h \
692 protocol/ivi-hmi-controller-protocol.c \
693 protocol/ivi-application-client-protocol.h \
694 protocol/ivi-application-protocol.c
695weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
696weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
697endif
698
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800699if BUILD_FULL_GL_CLIENTS
700demo_clients += weston-gears
701weston_gears_SOURCES = clients/gears.c
702weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800703weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800704endif
705
706endif
707
708BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100709 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800710 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100711 protocol/text-cursor-position-client-protocol.h \
712 protocol/text-cursor-position-protocol.c \
713 protocol/text-protocol.c \
714 protocol/text-client-protocol.h \
715 protocol/input-method-protocol.c \
716 protocol/input-method-client-protocol.h \
717 protocol/desktop-shell-client-protocol.h \
718 protocol/desktop-shell-protocol.c \
719 protocol/scaler-client-protocol.h \
720 protocol/scaler-protocol.c \
721 protocol/workspaces-client-protocol.h \
722 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500723 protocol/fullscreen-shell-protocol.c \
724 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100725 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900726 protocol/xdg-shell-client-protocol.h \
727 protocol/ivi-hmi-controller-protocol.c \
728 protocol/ivi-hmi-controller-client-protocol.h \
729 protocol/ivi-application-protocol.c \
730 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800731
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800732westondatadir = $(datadir)/weston
733dist_westondata_DATA = \
734 data/wayland.svg \
735 data/wayland.png \
736 data/pattern.png \
737 data/terminal.png \
738 data/border.png \
739 data/icon_window.png \
740 data/sign_close.png \
741 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100742 data/sign_minimize.png
743
744if ENABLE_IVI_SHELL
745dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900746 data/background.png \
747 data/tiling.png \
748 data/fullscreen.png \
749 data/panel.png \
750 data/random.png \
751 data/sidebyside.png \
752 data/home.png \
753 data/icon_ivi_clickdot.png \
754 data/icon_ivi_flower.png \
755 data/icon_ivi_simple-egl.png \
756 data/icon_ivi_simple-shm.png \
757 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100758endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800759
760
761if BUILD_WCAP_TOOLS
762bin_PROGRAMS += wcap-decode
763
764wcap_decode_SOURCES = \
765 wcap/main.c \
766 wcap/wcap-decode.c \
767 wcap/wcap-decode.h
768
Derek Foreman4ff38742015-06-18 11:43:11 -0500769wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800770wcap_decode_LDADD = $(WCAP_LIBS)
771endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800772
773
774if ENABLE_DESKTOP_SHELL
775
776module_LTLIBRARIES += desktop-shell.la
777
778desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100779 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800780 -I$(top_srcdir)/shared \
781 -I$(top_srcdir)/src \
782 -I$(top_builddir)/src \
783 -I$(top_builddir)/desktop-shell \
784 -DDATADIR='"$(datadir)"' \
785 -DMODULEDIR='"$(moduledir)"' \
786 -DLIBEXECDIR='"$(libexecdir)"' \
787 -DIN_WESTON
788
789desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800790desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500791desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800792desktop_shell_la_SOURCES = \
793 desktop-shell/shell.h \
794 desktop-shell/shell.c \
795 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700796 desktop-shell/input-panel.c \
797 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800798nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100799 protocol/desktop-shell-protocol.c \
800 protocol/desktop-shell-server-protocol.h \
801 protocol/xdg-shell-protocol.c \
802 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800803
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800804BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800805endif
806
Jason Ekstrand946a9482014-04-02 19:53:47 -0500807if ENABLE_FULLSCREEN_SHELL
808
809module_LTLIBRARIES += fullscreen-shell.la
810
811fullscreen_shell_la_CPPFLAGS = \
812 -I$(top_builddir)/protocol \
813 -I$(top_srcdir)/shared \
814 -I$(top_srcdir)/src \
815 -I$(top_builddir)/src \
816 -DIN_WESTON
817
818fullscreen_shell_la_LDFLAGS = -module -avoid-version
819fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500820fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500821fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700822 fullscreen-shell/fullscreen-shell.c \
823 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500824nodist_fullscreen_shell_la_SOURCES = \
825 protocol/fullscreen-shell-protocol.c \
826 protocol/fullscreen-shell-server-protocol.h
827
828BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
829endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800830
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900831if ENABLE_IVI_SHELL
832
833module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900834 $(ivi_shell) \
835 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900836
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900837ivi_shell = ivi-shell.la
838ivi_shell_la_LDFLAGS = -module -avoid-version
839ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500840ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900841ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900842 ivi-shell/ivi-layout-export.h \
843 ivi-shell/ivi-layout-private.h \
844 ivi-shell/ivi-layout.c \
845 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900846 ivi-shell/ivi-shell.h \
847 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700848 ivi-shell/input-panel-ivi.c \
849 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900850nodist_ivi_shell_la_SOURCES = \
851 protocol/ivi-application-protocol.c \
852 protocol/ivi-application-server-protocol.h
853
854BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
855
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900856hmi_controller = hmi-controller.la
857hmi_controller_la_LDFLAGS = -module -avoid-version
858hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500859hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900860hmi_controller_la_SOURCES = \
861 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700862 ivi-shell/hmi-controller.c \
863 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900864nodist_hmi_controller_la_SOURCES = \
865 protocol/ivi-hmi-controller-protocol.c \
866 protocol/ivi-hmi-controller-server-protocol.h
867
868BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
869
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900870endif
871
872
Jason Ekstrand47928d82014-04-02 19:54:01 -0500873if ENABLE_SCREEN_SHARING
874
875module_LTLIBRARIES += screen-share.la
876
877screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
878screen_share_la_LDFLAGS = -module -avoid-version
879screen_share_la_LIBADD = \
880 $(COMPOSITOR_LIBS) \
881 $(SCREEN_SHARE_LIBS) \
882 libshared-cairo.la
883screen_share_la_CFLAGS = \
884 $(COMPOSITOR_CFLAGS) \
885 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500886 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500887screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700888 src/screen-share.c \
889 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500890nodist_screen_share_la_SOURCES = \
891 protocol/fullscreen-shell-protocol.c \
892 protocol/fullscreen-shell-client-protocol.h
893
894endif
895
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800896if ENABLE_XWAYLAND
897
898module_LTLIBRARIES += xwayland.la
899
900xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100901 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800902 -I$(top_srcdir)/shared \
903 -I$(top_srcdir)/src \
904 -I$(top_builddir)/src \
905 -I$(top_builddir)/xwayland \
906 -DDATADIR='"$(datadir)"' \
907 -DMODULEDIR='"$(moduledir)"' \
908 -DLIBEXECDIR='"$(libexecdir)"' \
909 -DXSERVER_PATH='"@XSERVER_PATH@"'
910
911xwayland_la_LDFLAGS = -module -avoid-version
912xwayland_la_LIBADD = \
913 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800914 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800915xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500916 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800917 $(COMPOSITOR_CFLAGS) \
918 $(PIXMAN_CFLAGS) \
919 $(CAIRO_CFLAGS)
920xwayland_la_SOURCES = \
921 xwayland/xwayland.h \
922 xwayland/window-manager.c \
923 xwayland/selection.c \
924 xwayland/dnd.c \
925 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800926 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700927 xwayland/hash.h \
928 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800929endif
930
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800931
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800932#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800933# Shared utilities
934#
935
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700936noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
937 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800938
Derek Foreman4ff38742015-06-18 11:43:11 -0500939libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800940
941libshared_la_SOURCES = \
942 shared/config-parser.c \
943 shared/option-parser.c \
944 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200945 shared/file-util.c \
946 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700947 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800948 shared/os-compatibility.c \
949 shared/os-compatibility.h
950
951libshared_cairo_la_CFLAGS = \
952 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -0500953 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800954 $(COMPOSITOR_CFLAGS) \
955 $(PIXMAN_CFLAGS) \
956 $(CAIRO_CFLAGS) \
957 $(PNG_CFLAGS) \
958 $(WEBP_CFLAGS)
959
960libshared_cairo_la_LIBADD = \
961 $(PIXMAN_LIBS) \
962 $(CAIRO_LIBS) \
963 $(PNG_LIBS) \
964 $(WEBP_LIBS) \
965 $(JPEG_LIBS)
966
967libshared_cairo_la_SOURCES = \
968 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700969 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800970 shared/image-loader.c \
971 shared/image-loader.h \
972 shared/cairo-util.c \
973 shared/frame.c \
974 shared/cairo-util.h
975
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700976libzunitc_la_SOURCES = \
977 tools/zunitc/inc/zunitc/zunitc.h \
978 tools/zunitc/inc/zunitc/zunitc_impl.h \
979 tools/zunitc/src/zuc_base_logger.c \
980 tools/zunitc/src/zuc_base_logger.h \
981 tools/zunitc/src/zuc_collector.c \
982 tools/zunitc/src/zuc_collector.h \
983 tools/zunitc/src/zuc_context.h \
984 tools/zunitc/src/zuc_event.h \
985 tools/zunitc/src/zuc_event_listener.h \
986 tools/zunitc/src/zuc_types.h \
987 tools/zunitc/src/zunitc_impl.c \
988 shared/helpers.h
989
990libzunitc_la_CFLAGS = \
991 $(AM_CFLAGS) \
992 -I$(top_srcdir)/tools/zunitc/inc
993
994libzunitc_la_LIBADD = \
995 libshared.la
996
997libzunitcmain_la_SOURCES = \
998 tools/zunitc/src/main.c
999
1000libzunitcmain_la_CFLAGS = \
1001 $(AM_CFLAGS) \
1002 -I$(top_srcdir)/tools/zunitc/inc
1003
1004libzunitcmain_la_LIBADD = \
1005 libzunitc.la \
1006 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001007
1008#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001009# tests subdirectory
1010#
1011
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001012TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1013
1014internal_tests = \
1015 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001016
1017shared_tests = \
1018 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001019 vertex-clip.test \
1020 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001021
1022module_tests = \
1023 surface-test.la \
1024 surface-global-test.la
1025
1026weston_tests = \
1027 bad_buffer.weston \
1028 keyboard.weston \
1029 event.weston \
1030 button.weston \
1031 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001032 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001033 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001034 subsurface.weston \
1035 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001036
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001037ivi_tests =
1038
1039$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001040
1041AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001042 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1043 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001044
1045TEST_EXTENSIONS = .la .weston
1046LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1047WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1048
1049clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001050 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001051
1052# To remove when automake 1.11 support is dropped
1053export abs_builddir
1054
1055noinst_LTLIBRARIES += \
1056 weston-test.la \
1057 $(module_tests) \
1058 libtest-runner.la \
1059 libtest-client.la
1060
1061noinst_PROGRAMS += \
1062 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001063 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001064 $(shared_tests) \
1065 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001066 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001067 matrix-test
1068
1069test_module_ldflags = \
1070 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1071
1072surface_global_test_la_SOURCES = tests/surface-global-test.c
1073surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001074surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001075
1076surface_test_la_SOURCES = tests/surface-test.c
1077surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001078surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001079
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001080weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001081weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001082weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001083weston_test_la_SOURCES = \
1084 tests/weston-test.c \
1085 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001086nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001087 protocol/weston-test-protocol.c \
1088 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001089
1090if ENABLE_EGL
1091weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1092weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1093endif
1094
1095libtest_runner_la_SOURCES = \
1096 tests/weston-test-runner.c \
1097 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001098libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001099
1100config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001101config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001102
1103vertex_clip_test_SOURCES = \
1104 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001105 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001106 src/vertex-clipping.c \
1107 src/vertex-clipping.h
1108vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1109
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001110libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001111 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001112 tests/weston-test-client-helper.h
1113nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001114 protocol/weston-test-protocol.c \
1115 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001116libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001117libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001118
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001119
1120#
1121# Internal tests - tests functionality of the testsuite itself
1122#
1123
1124internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1125internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1126internal_screenshot_weston_LDADD = libtest-client.la $(CAIRO_LIBS)
1127
1128
1129#
1130# Weston Tests
1131#
1132
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001133bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001134bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001135bad_buffer_weston_LDADD = libtest-client.la
1136
1137keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001138keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001139keyboard_weston_LDADD = libtest-client.la
1140
1141event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001142event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001143event_weston_LDADD = libtest-client.la
1144
1145button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001146button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001147button_weston_LDADD = libtest-client.la
1148
Marek Chalupa5fd81402015-03-30 09:21:29 -04001149devices_weston_SOURCES = tests/devices-test.c
1150devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1151devices_weston_LDADD = libtest-client.la
1152
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001153text_weston_SOURCES = tests/text-test.c
1154nodist_text_weston_SOURCES = \
1155 protocol/text-protocol.c \
1156 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001157text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001158text_weston_LDADD = libtest-client.la
1159
1160subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001161subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001162subsurface_weston_LDADD = libtest-client.la
1163
Jon A. Cruzb09da242015-06-16 13:15:13 -07001164presentation_weston_SOURCES = \
1165 tests/presentation-test.c \
1166 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001167nodist_presentation_weston_SOURCES = \
1168 protocol/presentation_timing-protocol.c \
1169 protocol/presentation_timing-client-protocol.h
1170presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1171presentation_weston_LDADD = libtest-client.la
1172
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001173roles_weston_SOURCES = tests/roles-test.c
1174roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1175roles_weston_LDADD = libtest-client.la
1176
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001177if ENABLE_EGL
1178weston_tests += buffer-count.weston
1179buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001180buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001181buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1182endif
1183
1184if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001185weston_tests += xwayland-test.weston
1186xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001187xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001188xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001189endif
1190
1191matrix_test_SOURCES = \
1192 tests/matrix-test.c \
1193 shared/matrix.c \
1194 shared/matrix.h
1195matrix_test_CPPFLAGS = -DUNIT_TEST
1196matrix_test_LDADD = -lm -lrt
1197
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001198if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001199module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001200 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001201 ivi-layout-test.la
1202
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001203ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1204ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001205ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001206ivi_layout_internal_test_la_SOURCES = \
1207 tests/ivi_layout-internal-test.c
1208
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001209ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1210ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001211ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001212ivi_layout_test_la_SOURCES = \
1213 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001214 tests/ivi-test.h \
1215 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001216nodist_ivi_layout_test_la_SOURCES = \
1217 protocol/weston-test-protocol.c \
1218 protocol/weston-test-server-protocol.h
1219
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001220ivi_tests += \
1221 ivi-shell-app.weston
1222
1223ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1224nodist_ivi_shell_app_weston_SOURCES = \
1225 protocol/ivi-application-protocol.c \
1226 protocol/ivi-application-client-protocol.h
1227ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1228ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001229
1230noinst_PROGRAMS += ivi-layout.ivi
1231
1232ivi_layout_ivi_SOURCES = \
1233 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001234 tests/ivi-test.h \
1235 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001236nodist_ivi_layout_ivi_SOURCES = \
1237 protocol/ivi-application-protocol.c \
1238 protocol/ivi-application-client-protocol.h
1239ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1240ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001241endif
1242
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001243if BUILD_SETBACKLIGHT
1244noinst_PROGRAMS += setbacklight
1245setbacklight_SOURCES = \
1246 tests/setbacklight.c \
1247 src/libbacklight.c \
1248 src/libbacklight.h
1249setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1250setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1251endif
1252
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001253all-local: zuctest$(EXEEXT)
1254
1255noinst_PROGRAMS += zuctest$(EXEEXT)
1256
1257zuctest_LDADD = \
1258 libzunitc.la \
1259 libzunitcmain.la
1260
1261zuctest_CFLAGS = \
1262 $(AM_CFLAGS) \
1263 -I$(top_srcdir)/tools/zunitc/inc
1264
1265zuctest_SOURCES = \
1266 tools/zunitc/test/fixtures_test.c \
1267 tools/zunitc/test/zunitc_test.c
1268
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001269EXTRA_DIST += \
1270 tests/weston-tests-env \
1271 tests/internal-screenshot.ini \
1272 tests/reference/internal-screenshot-bad-00.png \
1273 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001274
1275BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001276 protocol/weston-test-protocol.c \
1277 protocol/weston-test-server-protocol.h \
1278 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001279 protocol/text-protocol.c \
1280 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001281
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001282EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001283 protocol/desktop-shell.xml \
1284 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001285 protocol/text.xml \
1286 protocol/input-method.xml \
1287 protocol/workspaces.xml \
1288 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001289 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001290 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001291 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001292 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001293 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001294 protocol/ivi-application.xml \
1295 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001296
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001297#
1298# manual test modules in tests subdirectory
1299#
1300
1301noinst_LTLIBRARIES += \
1302 surface-screenshot.la
1303
1304surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1305surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001306surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001307surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1308
1309
1310#
1311# Documentation
1312#
1313
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001314man_MANS = weston.1 weston.ini.5
1315
1316if ENABLE_DRM_COMPOSITOR
1317man_MANS += weston-drm.7
1318endif
1319
1320MAN_SUBSTS = \
1321 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1322 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1323 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1324 -e 's|__version__|$(PACKAGE_VERSION)|g'
1325
1326SUFFIXES = .1 .5 .7 .man
1327
1328%.1 %.5 %.7 : man/%.man
1329 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1330
1331EXTRA_DIST += \
1332 man/weston.man \
1333 man/weston-drm.man \
1334 man/weston.ini.man
1335
1336CLEANFILES += $(man_MANS)
1337
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001338protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1339 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001340
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001341protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1342 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001343
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001344protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1345 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@