blob: 7acbc2de2e08eb98cd9a13835c2189fc4220f2a5 [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
Ross Burton2eff22b2015-07-17 12:33:45 +010023 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090024 -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
Ross Burton2eff22b2015-07-17 12:33:45 +010032 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020033 -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 \
Pekka Paalanenaa21f622015-07-03 15:44:50 +030093 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080094 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +010095 shared/platform.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080096 src/weston-egl-ext.h
97
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080098nodist_weston_SOURCES = \
99 protocol/screenshooter-protocol.c \
100 protocol/screenshooter-server-protocol.h \
101 protocol/text-cursor-position-protocol.c \
102 protocol/text-cursor-position-server-protocol.h \
103 protocol/text-protocol.c \
104 protocol/text-server-protocol.h \
105 protocol/input-method-protocol.c \
106 protocol/input-method-server-protocol.h \
107 protocol/workspaces-protocol.c \
108 protocol/workspaces-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400109 protocol/presentation_timing-protocol.c \
110 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800111 protocol/scaler-protocol.c \
Pekka Paalanen23ab7152014-09-29 14:08:29 -0400112 protocol/scaler-server-protocol.h \
113 protocol/linux-dmabuf-protocol.c \
114 protocol/linux-dmabuf-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800115
116BUILT_SOURCES += $(nodist_weston_SOURCES)
117
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800118# Track this dependency explicitly instead of using BUILT_SOURCES. We
119# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
120# in case we're building from tarballs.
121
122src/compositor.c : $(top_builddir)/src/git-version.h
123
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800124noinst_LTLIBRARIES += \
125 libsession-helper.la
126
127libsession_helper_la_SOURCES = \
128 src/weston-launch.h \
129 src/launcher-util.c \
130 src/launcher-util.h
Derek Foreman4ff38742015-06-18 11:43:11 -0500131libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800132libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
133
134if ENABLE_DBUS
135if HAVE_SYSTEMD_LOGIN
136libsession_helper_la_SOURCES += \
137 src/dbus.h \
138 src/dbus.c \
139 src/logind-util.h \
140 src/logind-util.c
141libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
142libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
143endif
144endif
145
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800146if HAVE_GIT_REPO
147src/git-version.h : $(top_srcdir)/.git/logs/HEAD
148 $(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 -0800149else
150src/git-version.h :
151 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
152
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800153endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800154
155.FORCE :
156
157if BUILD_WESTON_LAUNCH
158bin_PROGRAMS += weston-launch
159weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
160weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
161weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500162 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800163 $(PAM_CFLAGS) \
164 $(SYSTEMD_LOGIN_CFLAGS) \
165 $(LIBDRM_CFLAGS)
166weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
167
168if ENABLE_SETUID_INSTALL
169install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700170 can_suid_files=no; \
171 chown root $(DESTDIR)$(bindir)/weston-launch \
172 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
173 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500174 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700175 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
176 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
177 false; \
178 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800179endif
180
181endif # BUILD_WESTON_LAUNCH
182
183pkgconfigdir = $(libdir)/pkgconfig
184pkgconfig_DATA = src/weston.pc
185
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100186wayland_sessiondir = $(datadir)/wayland-sessions
Ross Burton315476f2015-07-16 20:56:32 +0100187dist_wayland_session_DATA = src/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100188
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800189westonincludedir = $(includedir)/weston
190westoninclude_HEADERS = \
191 src/version.h \
192 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200193 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800194 shared/matrix.h \
195 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100196 shared/zalloc.h \
197 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800198
199if ENABLE_EGL
200module_LTLIBRARIES += gl-renderer.la
201gl_renderer_la_LDFLAGS = -module -avoid-version
202gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
203gl_renderer_la_CFLAGS = \
204 $(COMPOSITOR_CFLAGS) \
205 $(EGL_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500206 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800207gl_renderer_la_SOURCES = \
208 src/gl-renderer.h \
209 src/gl-renderer.c \
210 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700211 src/vertex-clipping.h \
212 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800213endif
214
215if ENABLE_X11_COMPOSITOR
216module_LTLIBRARIES += x11-backend.la
217x11_backend_la_LDFLAGS = -module -avoid-version
218x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800219 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800220x11_backend_la_CFLAGS = \
221 $(COMPOSITOR_CFLAGS) \
222 $(EGL_CFLAGS) \
223 $(PIXMAN_CFLAGS) \
224 $(CAIRO_CFLAGS) \
225 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500226 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700227x11_backend_la_SOURCES = \
228 src/compositor-x11.c \
229 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800230endif
231
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100232INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000233INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100234 src/libinput-seat.c \
235 src/libinput-seat.h \
236 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700237 src/libinput-device.h \
238 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100239
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800240if ENABLE_DRM_COMPOSITOR
241module_LTLIBRARIES += drm-backend.la
242drm_backend_la_LDFLAGS = -module -avoid-version
243drm_backend_la_LIBADD = \
244 $(COMPOSITOR_LIBS) \
245 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100246 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100247 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800248 libsession-helper.la
249drm_backend_la_CFLAGS = \
250 $(COMPOSITOR_CFLAGS) \
251 $(EGL_CFLAGS) \
252 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500253 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800254drm_backend_la_SOURCES = \
255 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100256 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700257 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200258 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800259 src/libbacklight.c \
260 src/libbacklight.h
261
262if ENABLE_VAAPI_RECORDER
263drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
264drm_backend_la_LIBADD += $(LIBVA_LIBS)
265drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
266endif
267endif
268
269if ENABLE_WAYLAND_COMPOSITOR
270module_LTLIBRARIES += wayland-backend.la
271wayland_backend_la_LDFLAGS = -module -avoid-version
272wayland_backend_la_LIBADD = \
273 $(COMPOSITOR_LIBS) \
274 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800275 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800276wayland_backend_la_CFLAGS = \
277 $(COMPOSITOR_CFLAGS) \
278 $(EGL_CFLAGS) \
279 $(PIXMAN_CFLAGS) \
280 $(CAIRO_CFLAGS) \
281 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500282 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700283wayland_backend_la_SOURCES = \
284 src/compositor-wayland.c \
285 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500286nodist_wayland_backend_la_SOURCES = \
287 protocol/fullscreen-shell-protocol.c \
288 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800289endif
290
291if ENABLE_RPI_COMPOSITOR
292if INSTALL_RPI_COMPOSITOR
293module_LTLIBRARIES += rpi-backend.la
294else
295noinst_LTLIBRARIES += rpi-backend.la
296endif
297
298rpi_backend_la_LDFLAGS = -module -avoid-version
299rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
300 $(RPI_COMPOSITOR_LIBS) \
301 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100302 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800303 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800304 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800305rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500306 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800307 $(COMPOSITOR_CFLAGS) \
308 $(RPI_COMPOSITOR_CFLAGS) \
309 $(RPI_BCM_HOST_CFLAGS)
310rpi_backend_la_SOURCES = \
311 src/compositor-rpi.c \
312 src/rpi-renderer.c \
313 src/rpi-renderer.h \
314 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700315 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100316 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800317
318if ENABLE_EGL
319rpi_backend_la_LIBADD += $(EGL_LIBS)
320rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
321endif
322
323endif
324
325if ENABLE_HEADLESS_COMPOSITOR
326module_LTLIBRARIES += headless-backend.la
327headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800328headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500329headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700330headless_backend_la_SOURCES = \
331 src/compositor-headless.c \
332 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800333endif
334
335if ENABLE_FBDEV_COMPOSITOR
336module_LTLIBRARIES += fbdev-backend.la
337fbdev_backend_la_LDFLAGS = -module -avoid-version
338fbdev_backend_la_LIBADD = \
339 $(COMPOSITOR_LIBS) \
340 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100341 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800342 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800343 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800344fbdev_backend_la_CFLAGS = \
345 $(COMPOSITOR_CFLAGS) \
346 $(EGL_CFLAGS) \
347 $(FBDEV_COMPOSITOR_CFLAGS) \
348 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500349 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800350fbdev_backend_la_SOURCES = \
351 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700352 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100353 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800354endif
355
356if ENABLE_RDP_COMPOSITOR
357module_LTLIBRARIES += rdp-backend.la
358rdp_backend_la_LDFLAGS = -module -avoid-version
359rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
360 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800361 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800362rdp_backend_la_CFLAGS = \
363 $(COMPOSITOR_CFLAGS) \
364 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500365 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700366rdp_backend_la_SOURCES = \
367 src/compositor-rdp.c \
368 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800369endif
370
371if HAVE_LCMS
372module_LTLIBRARIES += cms-static.la
373cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800374cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500375cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800376cms_static_la_SOURCES = \
377 src/cms-static.c \
378 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700379 src/cms-helper.h \
380 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800381if ENABLE_COLORD
382module_LTLIBRARIES += cms-colord.la
383cms_colord_la_LDFLAGS = -module -avoid-version
384cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500385cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800386cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100387 src/cms-colord.c \
388 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700389 src/cms-helper.h \
390 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800391endif
392endif
393
394noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500395spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800396spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
397spring_tool_SOURCES = \
398 src/spring-tool.c \
399 src/animation.c \
400 shared/matrix.c \
401 shared/matrix.h \
402 src/compositor.h
403
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800404if BUILD_CLIENTS
405
406bin_PROGRAMS += weston-terminal weston-info
407
408libexec_PROGRAMS += \
409 weston-desktop-shell \
410 weston-screenshooter \
411 weston-keyboard \
412 weston-simple-im
413
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900414if ENABLE_IVI_SHELL
415libexec_PROGRAMS += \
416 weston-ivi-shell-user-interface
417endif
418
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800419demo_clients = \
420 weston-flower \
421 weston-image \
422 weston-cliptest \
423 weston-dnd \
424 weston-smoke \
425 weston-resizor \
426 weston-eventdemo \
427 weston-clickdot \
428 weston-transformed \
429 weston-fullscreen \
430 weston-stacking \
431 weston-calibrator \
432 weston-scaler
433
434if INSTALL_DEMO_CLIENTS
435bin_PROGRAMS += $(demo_clients)
436else
437noinst_PROGRAMS += $(demo_clients)
438endif
439
440
441if BUILD_SIMPLE_CLIENTS
442demo_clients += \
443 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500444 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800445 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400446 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800447 weston-multi-resource
448
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800449weston_simple_shm_SOURCES = clients/simple-shm.c
450nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800451 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500452 protocol/xdg-shell-client-protocol.h \
453 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900454 protocol/fullscreen-shell-client-protocol.h \
455 protocol/ivi-application-protocol.c \
456 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800457weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800458weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800459
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500460weston_simple_damage_SOURCES = clients/simple-damage.c
461nodist_weston_simple_damage_SOURCES = \
462 protocol/scaler-protocol.c \
463 protocol/scaler-client-protocol.h \
464 protocol/xdg-shell-protocol.c \
465 protocol/xdg-shell-client-protocol.h \
466 protocol/fullscreen-shell-protocol.c \
467 protocol/fullscreen-shell-client-protocol.h
468weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
469weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
470
Jon A. Cruzb09da242015-06-16 13:15:13 -0700471weston_simple_touch_SOURCES = \
472 clients/simple-touch.c \
473 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800474weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800475weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800476
Jon A. Cruzb09da242015-06-16 13:15:13 -0700477weston_presentation_shm_SOURCES = \
478 clients/presentation-shm.c \
479 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400480nodist_weston_presentation_shm_SOURCES = \
481 protocol/presentation_timing-protocol.c \
482 protocol/presentation_timing-client-protocol.h
483weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
484weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
485
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800486weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800487weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000488weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800489endif
490
491if BUILD_SIMPLE_EGL_CLIENTS
492demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800493weston_simple_egl_SOURCES = clients/simple-egl.c
494nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800495 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900496 protocol/xdg-shell-client-protocol.h \
497 protocol/ivi-application-protocol.c \
498 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800499weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800500weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
501endif
502
503noinst_LTLIBRARIES += libtoytoolkit.la
504
505libtoytoolkit_la_SOURCES = \
506 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700507 clients/window.h \
508 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800509
510nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100511 protocol/text-cursor-position-protocol.c \
512 protocol/text-cursor-position-client-protocol.h \
513 protocol/scaler-protocol.c \
514 protocol/scaler-client-protocol.h \
515 protocol/workspaces-protocol.c \
516 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400517 protocol/presentation_timing-protocol.c \
518 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100519 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900520 protocol/xdg-shell-client-protocol.h \
521 protocol/ivi-application-protocol.c \
522 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500523
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800524BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
525
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800526
527libtoytoolkit_la_LIBADD = \
528 $(CLIENT_LIBS) \
529 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800530 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800531libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800532
533weston_flower_SOURCES = clients/flower.c
534weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800535weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800536
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100537weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800538 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800539nodist_weston_screenshooter_SOURCES = \
540 protocol/screenshooter-protocol.c \
541 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800542weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800543weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800544
Jon A. Cruzb09da242015-06-16 13:15:13 -0700545weston_terminal_SOURCES = \
546 clients/terminal.c \
547 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800548weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800549weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800550
551weston_image_SOURCES = clients/image.c
552weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800553weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800554
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300555weston_cliptest_SOURCES = \
556 clients/cliptest.c \
557 src/vertex-clipping.c \
558 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800559weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800560weston_cliptest_LDADD = libtoytoolkit.la
561
Jon A. Cruzb09da242015-06-16 13:15:13 -0700562weston_dnd_SOURCES = \
563 clients/dnd.c \
564 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800565weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800566weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800567
568weston_smoke_SOURCES = clients/smoke.c
569weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800570weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800571
572weston_resizor_SOURCES = clients/resizor.c
573weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800574weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800575
576weston_scaler_SOURCES = clients/scaler.c
577weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800578weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800579
580if HAVE_CAIRO_GLESV2
581demo_clients += weston-nested weston-nested-client
582
Jon A. Cruzb09da242015-06-16 13:15:13 -0700583weston_nested_SOURCES = \
584 clients/nested.c \
585 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800586weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800587weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800588
589weston_nested_client_SOURCES = clients/nested-client.c
590weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800591weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800592endif
593
Jon A. Cruzb09da242015-06-16 13:15:13 -0700594weston_eventdemo_SOURCES = \
595 clients/eventdemo.c \
596 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800597weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800598weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800599
Jon A. Cruzb09da242015-06-16 13:15:13 -0700600weston_clickdot_SOURCES = \
601 clients/clickdot.c \
602 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800603weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800604weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800605
606weston_transformed_SOURCES = clients/transformed.c
607weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800608weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800609
610weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500611nodist_weston_fullscreen_SOURCES = \
612 protocol/fullscreen-shell-protocol.c \
613 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800614weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800615weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800616
Jon A. Cruzb09da242015-06-16 13:15:13 -0700617weston_stacking_SOURCES = \
618 clients/stacking.c \
619 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800620weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800621weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800622
Jon A. Cruzb09da242015-06-16 13:15:13 -0700623weston_calibrator_SOURCES = \
624 clients/calibrator.c \
625 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800626 shared/matrix.c \
627 shared/matrix.h
628weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800629weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800630
631if BUILD_SUBSURFACES_CLIENT
632demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700633weston_subsurfaces_SOURCES = \
634 clients/subsurfaces.c \
635 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800636weston_subsurfaces_CFLAGS = \
637 $(AM_CFLAGS) \
638 $(SIMPLE_EGL_CLIENT_CFLAGS) \
639 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800640weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
641endif
642
643if HAVE_PANGO
644demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700645weston_editor_SOURCES = \
646 clients/editor.c \
647 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800648nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100649 protocol/text-protocol.c \
650 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800651weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800652weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800653endif
654
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800655weston_keyboard_SOURCES = clients/keyboard.c
656nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100657 protocol/desktop-shell-client-protocol.h \
658 protocol/desktop-shell-protocol.c \
659 protocol/input-method-protocol.c \
660 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800661weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800662weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800663
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800664weston_simple_im_SOURCES = clients/weston-simple-im.c
665nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100666 protocol/input-method-protocol.c \
667 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800668weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800669weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800670
Jon A. Cruzb09da242015-06-16 13:15:13 -0700671weston_info_SOURCES = \
672 clients/weston-info.c \
673 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400674nodist_weston_info_SOURCES = \
675 protocol/presentation_timing-protocol.c \
676 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800677weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200678weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800679
Jon A. Cruzb09da242015-06-16 13:15:13 -0700680weston_desktop_shell_SOURCES = \
681 clients/desktop-shell.c \
682 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800683nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100684 protocol/desktop-shell-client-protocol.h \
685 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800686weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800687weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800688
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900689if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700690weston_ivi_shell_user_interface_SOURCES = \
691 clients/ivi-shell-user-interface.c \
692 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900693nodist_weston_ivi_shell_user_interface_SOURCES = \
694 protocol/ivi-hmi-controller-client-protocol.h \
695 protocol/ivi-hmi-controller-protocol.c \
696 protocol/ivi-application-client-protocol.h \
697 protocol/ivi-application-protocol.c
698weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
699weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
700endif
701
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800702if BUILD_FULL_GL_CLIENTS
703demo_clients += weston-gears
704weston_gears_SOURCES = clients/gears.c
705weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800706weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800707endif
708
709endif
710
711BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100712 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800713 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100714 protocol/text-cursor-position-client-protocol.h \
715 protocol/text-cursor-position-protocol.c \
716 protocol/text-protocol.c \
717 protocol/text-client-protocol.h \
718 protocol/input-method-protocol.c \
719 protocol/input-method-client-protocol.h \
720 protocol/desktop-shell-client-protocol.h \
721 protocol/desktop-shell-protocol.c \
722 protocol/scaler-client-protocol.h \
723 protocol/scaler-protocol.c \
724 protocol/workspaces-client-protocol.h \
725 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500726 protocol/fullscreen-shell-protocol.c \
727 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100728 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900729 protocol/xdg-shell-client-protocol.h \
730 protocol/ivi-hmi-controller-protocol.c \
731 protocol/ivi-hmi-controller-client-protocol.h \
732 protocol/ivi-application-protocol.c \
733 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800734
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800735westondatadir = $(datadir)/weston
736dist_westondata_DATA = \
737 data/wayland.svg \
738 data/wayland.png \
739 data/pattern.png \
740 data/terminal.png \
741 data/border.png \
742 data/icon_window.png \
743 data/sign_close.png \
744 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100745 data/sign_minimize.png
746
747if ENABLE_IVI_SHELL
748dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900749 data/background.png \
750 data/tiling.png \
751 data/fullscreen.png \
752 data/panel.png \
753 data/random.png \
754 data/sidebyside.png \
755 data/home.png \
756 data/icon_ivi_clickdot.png \
757 data/icon_ivi_flower.png \
758 data/icon_ivi_simple-egl.png \
759 data/icon_ivi_simple-shm.png \
760 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100761endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800762
763
764if BUILD_WCAP_TOOLS
765bin_PROGRAMS += wcap-decode
766
767wcap_decode_SOURCES = \
768 wcap/main.c \
769 wcap/wcap-decode.c \
770 wcap/wcap-decode.h
771
Derek Foreman4ff38742015-06-18 11:43:11 -0500772wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800773wcap_decode_LDADD = $(WCAP_LIBS)
774endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800775
776
777if ENABLE_DESKTOP_SHELL
778
779module_LTLIBRARIES += desktop-shell.la
780
781desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100782 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800783 -I$(top_srcdir)/shared \
784 -I$(top_srcdir)/src \
785 -I$(top_builddir)/src \
786 -I$(top_builddir)/desktop-shell \
787 -DDATADIR='"$(datadir)"' \
788 -DMODULEDIR='"$(moduledir)"' \
789 -DLIBEXECDIR='"$(libexecdir)"' \
790 -DIN_WESTON
791
792desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800793desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500794desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800795desktop_shell_la_SOURCES = \
796 desktop-shell/shell.h \
797 desktop-shell/shell.c \
798 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700799 desktop-shell/input-panel.c \
800 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800801nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100802 protocol/desktop-shell-protocol.c \
803 protocol/desktop-shell-server-protocol.h \
804 protocol/xdg-shell-protocol.c \
805 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800806
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800807BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800808endif
809
Jason Ekstrand946a9482014-04-02 19:53:47 -0500810if ENABLE_FULLSCREEN_SHELL
811
812module_LTLIBRARIES += fullscreen-shell.la
813
814fullscreen_shell_la_CPPFLAGS = \
815 -I$(top_builddir)/protocol \
816 -I$(top_srcdir)/shared \
817 -I$(top_srcdir)/src \
818 -I$(top_builddir)/src \
819 -DIN_WESTON
820
821fullscreen_shell_la_LDFLAGS = -module -avoid-version
822fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500823fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500824fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700825 fullscreen-shell/fullscreen-shell.c \
826 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500827nodist_fullscreen_shell_la_SOURCES = \
828 protocol/fullscreen-shell-protocol.c \
829 protocol/fullscreen-shell-server-protocol.h
830
831BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
832endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800833
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900834if ENABLE_IVI_SHELL
835
836module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900837 $(ivi_shell) \
838 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900839
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900840ivi_shell = ivi-shell.la
841ivi_shell_la_LDFLAGS = -module -avoid-version
842ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500843ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900844ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900845 ivi-shell/ivi-layout-export.h \
846 ivi-shell/ivi-layout-private.h \
847 ivi-shell/ivi-layout.c \
848 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900849 ivi-shell/ivi-shell.h \
850 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700851 ivi-shell/input-panel-ivi.c \
852 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900853nodist_ivi_shell_la_SOURCES = \
854 protocol/ivi-application-protocol.c \
855 protocol/ivi-application-server-protocol.h
856
857BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
858
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900859hmi_controller = hmi-controller.la
860hmi_controller_la_LDFLAGS = -module -avoid-version
861hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500862hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900863hmi_controller_la_SOURCES = \
864 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700865 ivi-shell/hmi-controller.c \
866 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900867nodist_hmi_controller_la_SOURCES = \
868 protocol/ivi-hmi-controller-protocol.c \
869 protocol/ivi-hmi-controller-server-protocol.h
870
871BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
872
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900873endif
874
875
Jason Ekstrand47928d82014-04-02 19:54:01 -0500876if ENABLE_SCREEN_SHARING
877
878module_LTLIBRARIES += screen-share.la
879
880screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
881screen_share_la_LDFLAGS = -module -avoid-version
882screen_share_la_LIBADD = \
883 $(COMPOSITOR_LIBS) \
884 $(SCREEN_SHARE_LIBS) \
885 libshared-cairo.la
886screen_share_la_CFLAGS = \
887 $(COMPOSITOR_CFLAGS) \
888 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500889 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500890screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700891 src/screen-share.c \
892 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500893nodist_screen_share_la_SOURCES = \
894 protocol/fullscreen-shell-protocol.c \
895 protocol/fullscreen-shell-client-protocol.h
896
897endif
898
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800899if ENABLE_XWAYLAND
900
901module_LTLIBRARIES += xwayland.la
902
903xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100904 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800905 -I$(top_srcdir)/shared \
906 -I$(top_srcdir)/src \
907 -I$(top_builddir)/src \
908 -I$(top_builddir)/xwayland \
909 -DDATADIR='"$(datadir)"' \
910 -DMODULEDIR='"$(moduledir)"' \
911 -DLIBEXECDIR='"$(libexecdir)"' \
912 -DXSERVER_PATH='"@XSERVER_PATH@"'
913
914xwayland_la_LDFLAGS = -module -avoid-version
915xwayland_la_LIBADD = \
916 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800917 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800918xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500919 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800920 $(COMPOSITOR_CFLAGS) \
921 $(PIXMAN_CFLAGS) \
922 $(CAIRO_CFLAGS)
923xwayland_la_SOURCES = \
924 xwayland/xwayland.h \
925 xwayland/window-manager.c \
926 xwayland/selection.c \
927 xwayland/dnd.c \
928 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800929 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700930 xwayland/hash.h \
931 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800932endif
933
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800934
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800935#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800936# Shared utilities
937#
938
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700939noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
940 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800941
Derek Foreman4ff38742015-06-18 11:43:11 -0500942libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800943
944libshared_la_SOURCES = \
945 shared/config-parser.c \
946 shared/option-parser.c \
947 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200948 shared/file-util.c \
949 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700950 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800951 shared/os-compatibility.c \
952 shared/os-compatibility.h
953
954libshared_cairo_la_CFLAGS = \
955 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -0500956 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800957 $(COMPOSITOR_CFLAGS) \
958 $(PIXMAN_CFLAGS) \
959 $(CAIRO_CFLAGS) \
960 $(PNG_CFLAGS) \
961 $(WEBP_CFLAGS)
962
963libshared_cairo_la_LIBADD = \
964 $(PIXMAN_LIBS) \
965 $(CAIRO_LIBS) \
966 $(PNG_LIBS) \
967 $(WEBP_LIBS) \
968 $(JPEG_LIBS)
969
970libshared_cairo_la_SOURCES = \
971 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700972 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800973 shared/image-loader.c \
974 shared/image-loader.h \
975 shared/cairo-util.c \
976 shared/frame.c \
977 shared/cairo-util.h
978
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700979libzunitc_la_SOURCES = \
980 tools/zunitc/inc/zunitc/zunitc.h \
981 tools/zunitc/inc/zunitc/zunitc_impl.h \
982 tools/zunitc/src/zuc_base_logger.c \
983 tools/zunitc/src/zuc_base_logger.h \
984 tools/zunitc/src/zuc_collector.c \
985 tools/zunitc/src/zuc_collector.h \
986 tools/zunitc/src/zuc_context.h \
987 tools/zunitc/src/zuc_event.h \
988 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -0700989 tools/zunitc/src/zuc_junit_reporter.c \
990 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700991 tools/zunitc/src/zuc_types.h \
992 tools/zunitc/src/zunitc_impl.c \
993 shared/helpers.h
994
995libzunitc_la_CFLAGS = \
996 $(AM_CFLAGS) \
997 -I$(top_srcdir)/tools/zunitc/inc
998
999libzunitc_la_LIBADD = \
1000 libshared.la
1001
Jon A. Cruz646aef52015-07-15 19:22:41 -07001002if ENABLE_JUNIT_XML
1003libzunitc_la_CFLAGS += \
1004 $(LIBXML2_CFLAGS)
1005libzunitc_la_LIBADD += \
1006 $(LIBXML2_LIBS)
1007endif
1008
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001009libzunitcmain_la_SOURCES = \
1010 tools/zunitc/src/main.c
1011
1012libzunitcmain_la_CFLAGS = \
1013 $(AM_CFLAGS) \
1014 -I$(top_srcdir)/tools/zunitc/inc
1015
1016libzunitcmain_la_LIBADD = \
1017 libzunitc.la \
1018 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001019
1020#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001021# tests subdirectory
1022#
1023
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001024TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1025
1026internal_tests = \
1027 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001028
1029shared_tests = \
1030 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001031 vertex-clip.test \
1032 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001033
1034module_tests = \
1035 surface-test.la \
1036 surface-global-test.la
1037
1038weston_tests = \
1039 bad_buffer.weston \
1040 keyboard.weston \
1041 event.weston \
1042 button.weston \
1043 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001044 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001045 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001046 subsurface.weston \
1047 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001048
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001049ivi_tests =
1050
1051$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001052
1053AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001054 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1055 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001056
1057TEST_EXTENSIONS = .la .weston
1058LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1059WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1060
1061clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001062 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001063 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001064
1065# To remove when automake 1.11 support is dropped
1066export abs_builddir
1067
1068noinst_LTLIBRARIES += \
1069 weston-test.la \
1070 $(module_tests) \
1071 libtest-runner.la \
1072 libtest-client.la
1073
1074noinst_PROGRAMS += \
1075 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001076 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001077 $(shared_tests) \
1078 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001079 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001080 matrix-test
1081
1082test_module_ldflags = \
1083 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1084
1085surface_global_test_la_SOURCES = tests/surface-global-test.c
1086surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001087surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001088
1089surface_test_la_SOURCES = tests/surface-test.c
1090surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001091surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001092
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001093weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001094weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001095weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001096weston_test_la_SOURCES = \
1097 tests/weston-test.c \
1098 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001099nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001100 protocol/weston-test-protocol.c \
1101 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001102
1103if ENABLE_EGL
1104weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1105weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1106endif
1107
1108libtest_runner_la_SOURCES = \
1109 tests/weston-test-runner.c \
1110 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001111libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001112
1113config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001114config_parser_test_LDADD = \
1115 libshared.la \
1116 $(COMPOSITOR_LIBS) \
1117 libzunitc.la \
1118 libzunitcmain.la
1119config_parser_test_CFLAGS = \
1120 $(AM_CFLAGS) \
1121 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001122
1123vertex_clip_test_SOURCES = \
1124 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001125 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001126 src/vertex-clipping.c \
1127 src/vertex-clipping.h
1128vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1129
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001130libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001131 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001132 tests/weston-test-client-helper.h
1133nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001134 protocol/weston-test-protocol.c \
1135 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001136libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001137libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001138
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001139
1140#
1141# Internal tests - tests functionality of the testsuite itself
1142#
1143
1144internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1145internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1146internal_screenshot_weston_LDADD = libtest-client.la $(CAIRO_LIBS)
1147
1148
1149#
1150# Weston Tests
1151#
1152
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001153bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001154bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001155bad_buffer_weston_LDADD = libtest-client.la
1156
1157keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001158keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001159keyboard_weston_LDADD = libtest-client.la
1160
1161event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001162event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001163event_weston_LDADD = libtest-client.la
1164
1165button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001166button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001167button_weston_LDADD = libtest-client.la
1168
Marek Chalupa5fd81402015-03-30 09:21:29 -04001169devices_weston_SOURCES = tests/devices-test.c
1170devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1171devices_weston_LDADD = libtest-client.la
1172
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001173text_weston_SOURCES = tests/text-test.c
1174nodist_text_weston_SOURCES = \
1175 protocol/text-protocol.c \
1176 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001177text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001178text_weston_LDADD = libtest-client.la
1179
1180subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001181subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001182subsurface_weston_LDADD = libtest-client.la
1183
Jon A. Cruzb09da242015-06-16 13:15:13 -07001184presentation_weston_SOURCES = \
1185 tests/presentation-test.c \
1186 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001187nodist_presentation_weston_SOURCES = \
1188 protocol/presentation_timing-protocol.c \
1189 protocol/presentation_timing-client-protocol.h
1190presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1191presentation_weston_LDADD = libtest-client.la
1192
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001193roles_weston_SOURCES = tests/roles-test.c
1194roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1195roles_weston_LDADD = libtest-client.la
1196
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001197if ENABLE_EGL
1198weston_tests += buffer-count.weston
1199buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001200buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001201buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1202endif
1203
1204if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001205weston_tests += xwayland-test.weston
1206xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001207xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001208xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001209endif
1210
1211matrix_test_SOURCES = \
1212 tests/matrix-test.c \
1213 shared/matrix.c \
1214 shared/matrix.h
1215matrix_test_CPPFLAGS = -DUNIT_TEST
1216matrix_test_LDADD = -lm -lrt
1217
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001218if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001219module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001220 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001221 ivi-layout-test.la
1222
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001223ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1224ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001225ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001226ivi_layout_internal_test_la_SOURCES = \
1227 tests/ivi_layout-internal-test.c
1228
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001229ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1230ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001231ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001232ivi_layout_test_la_SOURCES = \
1233 tests/ivi_layout-test-plugin.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_test_la_SOURCES = \
1237 protocol/weston-test-protocol.c \
1238 protocol/weston-test-server-protocol.h
1239
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001240ivi_tests += \
1241 ivi-shell-app.weston
1242
1243ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1244nodist_ivi_shell_app_weston_SOURCES = \
1245 protocol/ivi-application-protocol.c \
1246 protocol/ivi-application-client-protocol.h
1247ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1248ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001249
1250noinst_PROGRAMS += ivi-layout.ivi
1251
1252ivi_layout_ivi_SOURCES = \
1253 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001254 tests/ivi-test.h \
1255 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001256nodist_ivi_layout_ivi_SOURCES = \
1257 protocol/ivi-application-protocol.c \
1258 protocol/ivi-application-client-protocol.h
1259ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1260ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001261endif
1262
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001263if BUILD_SETBACKLIGHT
1264noinst_PROGRAMS += setbacklight
1265setbacklight_SOURCES = \
1266 tests/setbacklight.c \
1267 src/libbacklight.c \
1268 src/libbacklight.h
1269setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1270setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1271endif
1272
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001273all-local: zuctest$(EXEEXT)
1274
1275noinst_PROGRAMS += zuctest$(EXEEXT)
1276
1277zuctest_LDADD = \
1278 libzunitc.la \
1279 libzunitcmain.la
1280
1281zuctest_CFLAGS = \
1282 $(AM_CFLAGS) \
1283 -I$(top_srcdir)/tools/zunitc/inc
1284
1285zuctest_SOURCES = \
1286 tools/zunitc/test/fixtures_test.c \
1287 tools/zunitc/test/zunitc_test.c
1288
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001289EXTRA_DIST += \
1290 tests/weston-tests-env \
1291 tests/internal-screenshot.ini \
1292 tests/reference/internal-screenshot-bad-00.png \
1293 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001294
1295BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001296 protocol/weston-test-protocol.c \
1297 protocol/weston-test-server-protocol.h \
1298 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001299 protocol/text-protocol.c \
1300 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001301
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001302EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001303 protocol/desktop-shell.xml \
1304 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001305 protocol/text.xml \
1306 protocol/input-method.xml \
1307 protocol/workspaces.xml \
1308 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001309 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001310 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001311 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001312 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001313 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001314 protocol/ivi-application.xml \
Pekka Paalanen23ab7152014-09-29 14:08:29 -04001315 protocol/ivi-hmi-controller.xml \
1316 protocol/linux-dmabuf.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001317
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001318#
1319# manual test modules in tests subdirectory
1320#
1321
1322noinst_LTLIBRARIES += \
1323 surface-screenshot.la
1324
1325surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1326surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001327surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001328surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1329
1330
1331#
1332# Documentation
1333#
1334
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001335man_MANS = weston.1 weston.ini.5
1336
1337if ENABLE_DRM_COMPOSITOR
1338man_MANS += weston-drm.7
1339endif
1340
1341MAN_SUBSTS = \
1342 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1343 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1344 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1345 -e 's|__version__|$(PACKAGE_VERSION)|g'
1346
1347SUFFIXES = .1 .5 .7 .man
1348
1349%.1 %.5 %.7 : man/%.man
1350 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1351
1352EXTRA_DIST += \
1353 man/weston.man \
1354 man/weston-drm.man \
1355 man/weston.ini.man
1356
1357CLEANFILES += $(man_MANS)
1358
Jon A. Cruz179c1862015-07-15 19:22:43 -07001359if ENABLE_DEVDOCS
1360DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1361
1362docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1363 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1364
1365docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1366 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1367endif
1368
1369DOCDIRS = \
1370 docs/developer \
1371 docs/tools
1372
1373$(DOCDIRS):
1374 $(MKDIR_P) $@
1375
1376.PHONY: doc $(DOXYGEN_INDICES)
1377
1378doc: $(DOXYGEN_INDICES)
1379
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001380protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1381 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001382
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001383protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1384 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001385
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001386protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1387 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@