blob: f50587e1549104431a41f8cf9ae949d2c9426817 [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 \
Pekka Paalanen230f3b12014-09-29 14:18:40 -040090 src/linux-dmabuf.c \
91 src/linux-dmabuf.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -070092 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080093 shared/matrix.c \
94 shared/matrix.h \
Pekka Paalanenaa21f622015-07-03 15:44:50 +030095 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080096 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +010097 shared/platform.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080098 src/weston-egl-ext.h
99
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800100nodist_weston_SOURCES = \
101 protocol/screenshooter-protocol.c \
102 protocol/screenshooter-server-protocol.h \
103 protocol/text-cursor-position-protocol.c \
104 protocol/text-cursor-position-server-protocol.h \
105 protocol/text-protocol.c \
106 protocol/text-server-protocol.h \
107 protocol/input-method-protocol.c \
108 protocol/input-method-server-protocol.h \
109 protocol/workspaces-protocol.c \
110 protocol/workspaces-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400111 protocol/presentation_timing-protocol.c \
112 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800113 protocol/scaler-protocol.c \
Pekka Paalanen23ab7152014-09-29 14:08:29 -0400114 protocol/scaler-server-protocol.h \
115 protocol/linux-dmabuf-protocol.c \
116 protocol/linux-dmabuf-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800117
118BUILT_SOURCES += $(nodist_weston_SOURCES)
119
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800120# Track this dependency explicitly instead of using BUILT_SOURCES. We
121# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
122# in case we're building from tarballs.
123
124src/compositor.c : $(top_builddir)/src/git-version.h
125
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800126noinst_LTLIBRARIES += \
127 libsession-helper.la
128
129libsession_helper_la_SOURCES = \
130 src/weston-launch.h \
131 src/launcher-util.c \
132 src/launcher-util.h
Derek Foreman4ff38742015-06-18 11:43:11 -0500133libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800134libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
135
136if ENABLE_DBUS
137if HAVE_SYSTEMD_LOGIN
138libsession_helper_la_SOURCES += \
139 src/dbus.h \
140 src/dbus.c \
141 src/logind-util.h \
142 src/logind-util.c
143libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
144libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
145endif
146endif
147
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800148if HAVE_GIT_REPO
149src/git-version.h : $(top_srcdir)/.git/logs/HEAD
150 $(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 -0800151else
152src/git-version.h :
153 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
154
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800155endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800156
157.FORCE :
158
159if BUILD_WESTON_LAUNCH
160bin_PROGRAMS += weston-launch
161weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
162weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
163weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500164 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800165 $(PAM_CFLAGS) \
166 $(SYSTEMD_LOGIN_CFLAGS) \
167 $(LIBDRM_CFLAGS)
168weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
169
170if ENABLE_SETUID_INSTALL
171install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700172 can_suid_files=no; \
173 chown root $(DESTDIR)$(bindir)/weston-launch \
174 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
175 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500176 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700177 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
178 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
179 false; \
180 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800181endif
182
183endif # BUILD_WESTON_LAUNCH
184
185pkgconfigdir = $(libdir)/pkgconfig
186pkgconfig_DATA = src/weston.pc
187
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100188wayland_sessiondir = $(datadir)/wayland-sessions
Ross Burton315476f2015-07-16 20:56:32 +0100189dist_wayland_session_DATA = src/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100190
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800191westonincludedir = $(includedir)/weston
192westoninclude_HEADERS = \
193 src/version.h \
194 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200195 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800196 shared/matrix.h \
197 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100198 shared/zalloc.h \
199 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800200
201if ENABLE_EGL
202module_LTLIBRARIES += gl-renderer.la
203gl_renderer_la_LDFLAGS = -module -avoid-version
204gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
205gl_renderer_la_CFLAGS = \
206 $(COMPOSITOR_CFLAGS) \
207 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300208 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500209 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800210gl_renderer_la_SOURCES = \
211 src/gl-renderer.h \
212 src/gl-renderer.c \
213 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700214 src/vertex-clipping.h \
215 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800216endif
217
218if ENABLE_X11_COMPOSITOR
219module_LTLIBRARIES += x11-backend.la
220x11_backend_la_LDFLAGS = -module -avoid-version
221x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800222 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800223x11_backend_la_CFLAGS = \
224 $(COMPOSITOR_CFLAGS) \
225 $(EGL_CFLAGS) \
226 $(PIXMAN_CFLAGS) \
227 $(CAIRO_CFLAGS) \
228 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500229 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700230x11_backend_la_SOURCES = \
231 src/compositor-x11.c \
232 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800233endif
234
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100235INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000236INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100237 src/libinput-seat.c \
238 src/libinput-seat.h \
239 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700240 src/libinput-device.h \
241 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100242
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800243if ENABLE_DRM_COMPOSITOR
244module_LTLIBRARIES += drm-backend.la
245drm_backend_la_LDFLAGS = -module -avoid-version
246drm_backend_la_LIBADD = \
247 $(COMPOSITOR_LIBS) \
248 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100249 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100250 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800251 libsession-helper.la
252drm_backend_la_CFLAGS = \
253 $(COMPOSITOR_CFLAGS) \
254 $(EGL_CFLAGS) \
255 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500256 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800257drm_backend_la_SOURCES = \
258 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100259 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700260 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200261 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800262 src/libbacklight.c \
263 src/libbacklight.h
264
265if ENABLE_VAAPI_RECORDER
266drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
267drm_backend_la_LIBADD += $(LIBVA_LIBS)
268drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
269endif
270endif
271
272if ENABLE_WAYLAND_COMPOSITOR
273module_LTLIBRARIES += wayland-backend.la
274wayland_backend_la_LDFLAGS = -module -avoid-version
275wayland_backend_la_LIBADD = \
276 $(COMPOSITOR_LIBS) \
277 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800278 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800279wayland_backend_la_CFLAGS = \
280 $(COMPOSITOR_CFLAGS) \
281 $(EGL_CFLAGS) \
282 $(PIXMAN_CFLAGS) \
283 $(CAIRO_CFLAGS) \
284 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500285 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700286wayland_backend_la_SOURCES = \
287 src/compositor-wayland.c \
288 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500289nodist_wayland_backend_la_SOURCES = \
290 protocol/fullscreen-shell-protocol.c \
291 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800292endif
293
294if ENABLE_RPI_COMPOSITOR
295if INSTALL_RPI_COMPOSITOR
296module_LTLIBRARIES += rpi-backend.la
297else
298noinst_LTLIBRARIES += rpi-backend.la
299endif
300
301rpi_backend_la_LDFLAGS = -module -avoid-version
302rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
303 $(RPI_COMPOSITOR_LIBS) \
304 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100305 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800306 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800307 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800308rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500309 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800310 $(COMPOSITOR_CFLAGS) \
311 $(RPI_COMPOSITOR_CFLAGS) \
312 $(RPI_BCM_HOST_CFLAGS)
313rpi_backend_la_SOURCES = \
314 src/compositor-rpi.c \
315 src/rpi-renderer.c \
316 src/rpi-renderer.h \
317 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700318 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100319 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800320
321if ENABLE_EGL
322rpi_backend_la_LIBADD += $(EGL_LIBS)
323rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
324endif
325
326endif
327
328if ENABLE_HEADLESS_COMPOSITOR
329module_LTLIBRARIES += headless-backend.la
330headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800331headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500332headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700333headless_backend_la_SOURCES = \
334 src/compositor-headless.c \
335 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800336endif
337
338if ENABLE_FBDEV_COMPOSITOR
339module_LTLIBRARIES += fbdev-backend.la
340fbdev_backend_la_LDFLAGS = -module -avoid-version
341fbdev_backend_la_LIBADD = \
342 $(COMPOSITOR_LIBS) \
343 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100344 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800345 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800346 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800347fbdev_backend_la_CFLAGS = \
348 $(COMPOSITOR_CFLAGS) \
349 $(EGL_CFLAGS) \
350 $(FBDEV_COMPOSITOR_CFLAGS) \
351 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500352 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800353fbdev_backend_la_SOURCES = \
354 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700355 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100356 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800357endif
358
359if ENABLE_RDP_COMPOSITOR
360module_LTLIBRARIES += rdp-backend.la
361rdp_backend_la_LDFLAGS = -module -avoid-version
362rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
363 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800364 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800365rdp_backend_la_CFLAGS = \
366 $(COMPOSITOR_CFLAGS) \
367 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500368 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700369rdp_backend_la_SOURCES = \
370 src/compositor-rdp.c \
371 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800372endif
373
374if HAVE_LCMS
375module_LTLIBRARIES += cms-static.la
376cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800377cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500378cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800379cms_static_la_SOURCES = \
380 src/cms-static.c \
381 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700382 src/cms-helper.h \
383 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800384if ENABLE_COLORD
385module_LTLIBRARIES += cms-colord.la
386cms_colord_la_LDFLAGS = -module -avoid-version
387cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500388cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800389cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100390 src/cms-colord.c \
391 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700392 src/cms-helper.h \
393 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800394endif
395endif
396
397noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500398spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800399spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
400spring_tool_SOURCES = \
401 src/spring-tool.c \
402 src/animation.c \
403 shared/matrix.c \
404 shared/matrix.h \
405 src/compositor.h
406
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800407if BUILD_CLIENTS
408
409bin_PROGRAMS += weston-terminal weston-info
410
411libexec_PROGRAMS += \
412 weston-desktop-shell \
413 weston-screenshooter \
414 weston-keyboard \
415 weston-simple-im
416
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900417if ENABLE_IVI_SHELL
418libexec_PROGRAMS += \
419 weston-ivi-shell-user-interface
420endif
421
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800422demo_clients = \
423 weston-flower \
424 weston-image \
425 weston-cliptest \
426 weston-dnd \
427 weston-smoke \
428 weston-resizor \
429 weston-eventdemo \
430 weston-clickdot \
431 weston-transformed \
432 weston-fullscreen \
433 weston-stacking \
434 weston-calibrator \
435 weston-scaler
436
437if INSTALL_DEMO_CLIENTS
438bin_PROGRAMS += $(demo_clients)
439else
440noinst_PROGRAMS += $(demo_clients)
441endif
442
443
444if BUILD_SIMPLE_CLIENTS
445demo_clients += \
446 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500447 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800448 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400449 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800450 weston-multi-resource
451
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800452weston_simple_shm_SOURCES = clients/simple-shm.c
453nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800454 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500455 protocol/xdg-shell-client-protocol.h \
456 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900457 protocol/fullscreen-shell-client-protocol.h \
458 protocol/ivi-application-protocol.c \
459 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800460weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800461weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800462
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500463weston_simple_damage_SOURCES = clients/simple-damage.c
464nodist_weston_simple_damage_SOURCES = \
465 protocol/scaler-protocol.c \
466 protocol/scaler-client-protocol.h \
467 protocol/xdg-shell-protocol.c \
468 protocol/xdg-shell-client-protocol.h \
469 protocol/fullscreen-shell-protocol.c \
470 protocol/fullscreen-shell-client-protocol.h
471weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
472weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
473
Jon A. Cruzb09da242015-06-16 13:15:13 -0700474weston_simple_touch_SOURCES = \
475 clients/simple-touch.c \
476 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800477weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800478weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800479
Jon A. Cruzb09da242015-06-16 13:15:13 -0700480weston_presentation_shm_SOURCES = \
481 clients/presentation-shm.c \
482 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400483nodist_weston_presentation_shm_SOURCES = \
484 protocol/presentation_timing-protocol.c \
485 protocol/presentation_timing-client-protocol.h
486weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
487weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
488
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800489weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800490weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000491weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800492endif
493
494if BUILD_SIMPLE_EGL_CLIENTS
495demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800496weston_simple_egl_SOURCES = clients/simple-egl.c
497nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800498 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900499 protocol/xdg-shell-client-protocol.h \
500 protocol/ivi-application-protocol.c \
501 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800502weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800503weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
504endif
505
506noinst_LTLIBRARIES += libtoytoolkit.la
507
508libtoytoolkit_la_SOURCES = \
509 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700510 clients/window.h \
511 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800512
513nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100514 protocol/text-cursor-position-protocol.c \
515 protocol/text-cursor-position-client-protocol.h \
516 protocol/scaler-protocol.c \
517 protocol/scaler-client-protocol.h \
518 protocol/workspaces-protocol.c \
519 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400520 protocol/presentation_timing-protocol.c \
521 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100522 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900523 protocol/xdg-shell-client-protocol.h \
524 protocol/ivi-application-protocol.c \
525 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500526
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800527BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
528
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800529
530libtoytoolkit_la_LIBADD = \
531 $(CLIENT_LIBS) \
532 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800533 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800534libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800535
536weston_flower_SOURCES = clients/flower.c
537weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800538weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800539
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100540weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800541 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800542nodist_weston_screenshooter_SOURCES = \
543 protocol/screenshooter-protocol.c \
544 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800545weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800546weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800547
Jon A. Cruzb09da242015-06-16 13:15:13 -0700548weston_terminal_SOURCES = \
549 clients/terminal.c \
550 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800551weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800552weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800553
554weston_image_SOURCES = clients/image.c
555weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800556weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800557
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300558weston_cliptest_SOURCES = \
559 clients/cliptest.c \
560 src/vertex-clipping.c \
561 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800562weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800563weston_cliptest_LDADD = libtoytoolkit.la
564
Jon A. Cruzb09da242015-06-16 13:15:13 -0700565weston_dnd_SOURCES = \
566 clients/dnd.c \
567 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800568weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800569weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800570
571weston_smoke_SOURCES = clients/smoke.c
572weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800573weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800574
575weston_resizor_SOURCES = clients/resizor.c
576weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800577weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800578
579weston_scaler_SOURCES = clients/scaler.c
580weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800581weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800582
583if HAVE_CAIRO_GLESV2
584demo_clients += weston-nested weston-nested-client
585
Jon A. Cruzb09da242015-06-16 13:15:13 -0700586weston_nested_SOURCES = \
587 clients/nested.c \
588 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800589weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800590weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800591
592weston_nested_client_SOURCES = clients/nested-client.c
593weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800594weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800595endif
596
Jon A. Cruzb09da242015-06-16 13:15:13 -0700597weston_eventdemo_SOURCES = \
598 clients/eventdemo.c \
599 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800600weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800601weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800602
Jon A. Cruzb09da242015-06-16 13:15:13 -0700603weston_clickdot_SOURCES = \
604 clients/clickdot.c \
605 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800606weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800607weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800608
609weston_transformed_SOURCES = clients/transformed.c
610weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800611weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800612
613weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500614nodist_weston_fullscreen_SOURCES = \
615 protocol/fullscreen-shell-protocol.c \
616 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800617weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800618weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800619
Jon A. Cruzb09da242015-06-16 13:15:13 -0700620weston_stacking_SOURCES = \
621 clients/stacking.c \
622 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800623weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800624weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800625
Jon A. Cruzb09da242015-06-16 13:15:13 -0700626weston_calibrator_SOURCES = \
627 clients/calibrator.c \
628 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800629 shared/matrix.c \
630 shared/matrix.h
631weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800632weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800633
634if BUILD_SUBSURFACES_CLIENT
635demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700636weston_subsurfaces_SOURCES = \
637 clients/subsurfaces.c \
638 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800639weston_subsurfaces_CFLAGS = \
640 $(AM_CFLAGS) \
641 $(SIMPLE_EGL_CLIENT_CFLAGS) \
642 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800643weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
644endif
645
646if HAVE_PANGO
647demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700648weston_editor_SOURCES = \
649 clients/editor.c \
650 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800651nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100652 protocol/text-protocol.c \
653 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800654weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800655weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800656endif
657
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800658weston_keyboard_SOURCES = clients/keyboard.c
659nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100660 protocol/desktop-shell-client-protocol.h \
661 protocol/desktop-shell-protocol.c \
662 protocol/input-method-protocol.c \
663 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800664weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800665weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800666
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800667weston_simple_im_SOURCES = clients/weston-simple-im.c
668nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100669 protocol/input-method-protocol.c \
670 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800671weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800672weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800673
Jon A. Cruzb09da242015-06-16 13:15:13 -0700674weston_info_SOURCES = \
675 clients/weston-info.c \
676 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400677nodist_weston_info_SOURCES = \
678 protocol/presentation_timing-protocol.c \
679 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800680weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200681weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800682
Jon A. Cruzb09da242015-06-16 13:15:13 -0700683weston_desktop_shell_SOURCES = \
684 clients/desktop-shell.c \
685 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800686nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100687 protocol/desktop-shell-client-protocol.h \
688 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800689weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800690weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800691
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900692if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700693weston_ivi_shell_user_interface_SOURCES = \
694 clients/ivi-shell-user-interface.c \
695 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900696nodist_weston_ivi_shell_user_interface_SOURCES = \
697 protocol/ivi-hmi-controller-client-protocol.h \
698 protocol/ivi-hmi-controller-protocol.c \
699 protocol/ivi-application-client-protocol.h \
700 protocol/ivi-application-protocol.c
701weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
702weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
703endif
704
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800705if BUILD_FULL_GL_CLIENTS
706demo_clients += weston-gears
707weston_gears_SOURCES = clients/gears.c
708weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800709weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800710endif
711
712endif
713
714BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100715 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800716 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100717 protocol/text-cursor-position-client-protocol.h \
718 protocol/text-cursor-position-protocol.c \
719 protocol/text-protocol.c \
720 protocol/text-client-protocol.h \
721 protocol/input-method-protocol.c \
722 protocol/input-method-client-protocol.h \
723 protocol/desktop-shell-client-protocol.h \
724 protocol/desktop-shell-protocol.c \
725 protocol/scaler-client-protocol.h \
726 protocol/scaler-protocol.c \
727 protocol/workspaces-client-protocol.h \
728 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500729 protocol/fullscreen-shell-protocol.c \
730 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100731 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900732 protocol/xdg-shell-client-protocol.h \
733 protocol/ivi-hmi-controller-protocol.c \
734 protocol/ivi-hmi-controller-client-protocol.h \
735 protocol/ivi-application-protocol.c \
736 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800737
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800738westondatadir = $(datadir)/weston
739dist_westondata_DATA = \
740 data/wayland.svg \
741 data/wayland.png \
742 data/pattern.png \
743 data/terminal.png \
744 data/border.png \
745 data/icon_window.png \
746 data/sign_close.png \
747 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100748 data/sign_minimize.png
749
750if ENABLE_IVI_SHELL
751dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900752 data/background.png \
753 data/tiling.png \
754 data/fullscreen.png \
755 data/panel.png \
756 data/random.png \
757 data/sidebyside.png \
758 data/home.png \
759 data/icon_ivi_clickdot.png \
760 data/icon_ivi_flower.png \
761 data/icon_ivi_simple-egl.png \
762 data/icon_ivi_simple-shm.png \
763 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100764endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800765
766
767if BUILD_WCAP_TOOLS
768bin_PROGRAMS += wcap-decode
769
770wcap_decode_SOURCES = \
771 wcap/main.c \
772 wcap/wcap-decode.c \
773 wcap/wcap-decode.h
774
Derek Foreman4ff38742015-06-18 11:43:11 -0500775wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800776wcap_decode_LDADD = $(WCAP_LIBS)
777endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800778
779
780if ENABLE_DESKTOP_SHELL
781
782module_LTLIBRARIES += desktop-shell.la
783
784desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100785 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800786 -I$(top_srcdir)/shared \
787 -I$(top_srcdir)/src \
788 -I$(top_builddir)/src \
789 -I$(top_builddir)/desktop-shell \
790 -DDATADIR='"$(datadir)"' \
791 -DMODULEDIR='"$(moduledir)"' \
792 -DLIBEXECDIR='"$(libexecdir)"' \
793 -DIN_WESTON
794
795desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800796desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500797desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800798desktop_shell_la_SOURCES = \
799 desktop-shell/shell.h \
800 desktop-shell/shell.c \
801 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700802 desktop-shell/input-panel.c \
803 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800804nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100805 protocol/desktop-shell-protocol.c \
806 protocol/desktop-shell-server-protocol.h \
807 protocol/xdg-shell-protocol.c \
808 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800809
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800810BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800811endif
812
Jason Ekstrand946a9482014-04-02 19:53:47 -0500813if ENABLE_FULLSCREEN_SHELL
814
815module_LTLIBRARIES += fullscreen-shell.la
816
817fullscreen_shell_la_CPPFLAGS = \
818 -I$(top_builddir)/protocol \
819 -I$(top_srcdir)/shared \
820 -I$(top_srcdir)/src \
821 -I$(top_builddir)/src \
822 -DIN_WESTON
823
824fullscreen_shell_la_LDFLAGS = -module -avoid-version
825fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500826fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500827fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700828 fullscreen-shell/fullscreen-shell.c \
829 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500830nodist_fullscreen_shell_la_SOURCES = \
831 protocol/fullscreen-shell-protocol.c \
832 protocol/fullscreen-shell-server-protocol.h
833
834BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
835endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800836
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900837if ENABLE_IVI_SHELL
838
839module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900840 $(ivi_shell) \
841 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900842
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900843ivi_shell = ivi-shell.la
844ivi_shell_la_LDFLAGS = -module -avoid-version
845ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500846ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900847ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900848 ivi-shell/ivi-layout-export.h \
849 ivi-shell/ivi-layout-private.h \
850 ivi-shell/ivi-layout.c \
851 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900852 ivi-shell/ivi-shell.h \
853 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700854 ivi-shell/input-panel-ivi.c \
855 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900856nodist_ivi_shell_la_SOURCES = \
857 protocol/ivi-application-protocol.c \
858 protocol/ivi-application-server-protocol.h
859
860BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
861
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900862hmi_controller = hmi-controller.la
863hmi_controller_la_LDFLAGS = -module -avoid-version
864hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500865hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900866hmi_controller_la_SOURCES = \
867 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700868 ivi-shell/hmi-controller.c \
869 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900870nodist_hmi_controller_la_SOURCES = \
871 protocol/ivi-hmi-controller-protocol.c \
872 protocol/ivi-hmi-controller-server-protocol.h
873
874BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
875
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900876endif
877
878
Jason Ekstrand47928d82014-04-02 19:54:01 -0500879if ENABLE_SCREEN_SHARING
880
881module_LTLIBRARIES += screen-share.la
882
883screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
884screen_share_la_LDFLAGS = -module -avoid-version
885screen_share_la_LIBADD = \
886 $(COMPOSITOR_LIBS) \
887 $(SCREEN_SHARE_LIBS) \
888 libshared-cairo.la
889screen_share_la_CFLAGS = \
890 $(COMPOSITOR_CFLAGS) \
891 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500892 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500893screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700894 src/screen-share.c \
895 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500896nodist_screen_share_la_SOURCES = \
897 protocol/fullscreen-shell-protocol.c \
898 protocol/fullscreen-shell-client-protocol.h
899
900endif
901
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800902if ENABLE_XWAYLAND
903
904module_LTLIBRARIES += xwayland.la
905
906xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100907 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800908 -I$(top_srcdir)/shared \
909 -I$(top_srcdir)/src \
910 -I$(top_builddir)/src \
911 -I$(top_builddir)/xwayland \
912 -DDATADIR='"$(datadir)"' \
913 -DMODULEDIR='"$(moduledir)"' \
914 -DLIBEXECDIR='"$(libexecdir)"' \
915 -DXSERVER_PATH='"@XSERVER_PATH@"'
916
917xwayland_la_LDFLAGS = -module -avoid-version
918xwayland_la_LIBADD = \
919 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800920 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800921xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500922 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800923 $(COMPOSITOR_CFLAGS) \
924 $(PIXMAN_CFLAGS) \
925 $(CAIRO_CFLAGS)
926xwayland_la_SOURCES = \
927 xwayland/xwayland.h \
928 xwayland/window-manager.c \
929 xwayland/selection.c \
930 xwayland/dnd.c \
931 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800932 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700933 xwayland/hash.h \
934 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800935endif
936
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800937
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800938#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800939# Shared utilities
940#
941
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700942noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
943 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800944
Derek Foreman4ff38742015-06-18 11:43:11 -0500945libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800946
947libshared_la_SOURCES = \
948 shared/config-parser.c \
949 shared/option-parser.c \
950 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200951 shared/file-util.c \
952 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700953 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800954 shared/os-compatibility.c \
955 shared/os-compatibility.h
956
957libshared_cairo_la_CFLAGS = \
958 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -0500959 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800960 $(COMPOSITOR_CFLAGS) \
961 $(PIXMAN_CFLAGS) \
962 $(CAIRO_CFLAGS) \
963 $(PNG_CFLAGS) \
964 $(WEBP_CFLAGS)
965
966libshared_cairo_la_LIBADD = \
967 $(PIXMAN_LIBS) \
968 $(CAIRO_LIBS) \
969 $(PNG_LIBS) \
970 $(WEBP_LIBS) \
971 $(JPEG_LIBS)
972
973libshared_cairo_la_SOURCES = \
974 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700975 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800976 shared/image-loader.c \
977 shared/image-loader.h \
978 shared/cairo-util.c \
979 shared/frame.c \
980 shared/cairo-util.h
981
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700982libzunitc_la_SOURCES = \
983 tools/zunitc/inc/zunitc/zunitc.h \
984 tools/zunitc/inc/zunitc/zunitc_impl.h \
985 tools/zunitc/src/zuc_base_logger.c \
986 tools/zunitc/src/zuc_base_logger.h \
987 tools/zunitc/src/zuc_collector.c \
988 tools/zunitc/src/zuc_collector.h \
989 tools/zunitc/src/zuc_context.h \
990 tools/zunitc/src/zuc_event.h \
991 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -0700992 tools/zunitc/src/zuc_junit_reporter.c \
993 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700994 tools/zunitc/src/zuc_types.h \
995 tools/zunitc/src/zunitc_impl.c \
996 shared/helpers.h
997
998libzunitc_la_CFLAGS = \
999 $(AM_CFLAGS) \
1000 -I$(top_srcdir)/tools/zunitc/inc
1001
1002libzunitc_la_LIBADD = \
1003 libshared.la
1004
Jon A. Cruz646aef52015-07-15 19:22:41 -07001005if ENABLE_JUNIT_XML
1006libzunitc_la_CFLAGS += \
1007 $(LIBXML2_CFLAGS)
1008libzunitc_la_LIBADD += \
1009 $(LIBXML2_LIBS)
1010endif
1011
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001012libzunitcmain_la_SOURCES = \
1013 tools/zunitc/src/main.c
1014
1015libzunitcmain_la_CFLAGS = \
1016 $(AM_CFLAGS) \
1017 -I$(top_srcdir)/tools/zunitc/inc
1018
1019libzunitcmain_la_LIBADD = \
1020 libzunitc.la \
1021 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001022
1023#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001024# tests subdirectory
1025#
1026
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001027TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1028
1029internal_tests = \
1030 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001031
1032shared_tests = \
1033 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001034 vertex-clip.test \
1035 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001036
1037module_tests = \
1038 surface-test.la \
1039 surface-global-test.la
1040
1041weston_tests = \
1042 bad_buffer.weston \
1043 keyboard.weston \
1044 event.weston \
1045 button.weston \
1046 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001047 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001048 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001049 subsurface.weston \
1050 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001051
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001052ivi_tests =
1053
1054$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001055
1056AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001057 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1058 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001059
1060TEST_EXTENSIONS = .la .weston
1061LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1062WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1063
1064clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001065 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001066 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001067
1068# To remove when automake 1.11 support is dropped
1069export abs_builddir
1070
1071noinst_LTLIBRARIES += \
1072 weston-test.la \
1073 $(module_tests) \
1074 libtest-runner.la \
1075 libtest-client.la
1076
1077noinst_PROGRAMS += \
1078 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001079 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001080 $(shared_tests) \
1081 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001082 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001083 matrix-test
1084
1085test_module_ldflags = \
1086 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1087
1088surface_global_test_la_SOURCES = tests/surface-global-test.c
1089surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001090surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001091
1092surface_test_la_SOURCES = tests/surface-test.c
1093surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001094surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001095
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001096weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001097weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001098weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001099weston_test_la_SOURCES = \
1100 tests/weston-test.c \
1101 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001102nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001103 protocol/weston-test-protocol.c \
1104 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001105
1106if ENABLE_EGL
1107weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1108weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1109endif
1110
1111libtest_runner_la_SOURCES = \
1112 tests/weston-test-runner.c \
1113 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001114libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001115
1116config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001117config_parser_test_LDADD = \
1118 libshared.la \
1119 $(COMPOSITOR_LIBS) \
1120 libzunitc.la \
1121 libzunitcmain.la
1122config_parser_test_CFLAGS = \
1123 $(AM_CFLAGS) \
1124 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001125
1126vertex_clip_test_SOURCES = \
1127 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001128 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001129 src/vertex-clipping.c \
1130 src/vertex-clipping.h
1131vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1132
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001133libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001134 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001135 tests/weston-test-client-helper.h
1136nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001137 protocol/weston-test-protocol.c \
1138 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001139libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001140libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001141
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001142
1143#
1144# Internal tests - tests functionality of the testsuite itself
1145#
1146
1147internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1148internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1149internal_screenshot_weston_LDADD = libtest-client.la $(CAIRO_LIBS)
1150
1151
1152#
1153# Weston Tests
1154#
1155
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001156bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001157bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001158bad_buffer_weston_LDADD = libtest-client.la
1159
1160keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001161keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001162keyboard_weston_LDADD = libtest-client.la
1163
1164event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001165event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001166event_weston_LDADD = libtest-client.la
1167
1168button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001169button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001170button_weston_LDADD = libtest-client.la
1171
Marek Chalupa5fd81402015-03-30 09:21:29 -04001172devices_weston_SOURCES = tests/devices-test.c
1173devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1174devices_weston_LDADD = libtest-client.la
1175
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001176text_weston_SOURCES = tests/text-test.c
1177nodist_text_weston_SOURCES = \
1178 protocol/text-protocol.c \
1179 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001180text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001181text_weston_LDADD = libtest-client.la
1182
1183subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001184subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001185subsurface_weston_LDADD = libtest-client.la
1186
Jon A. Cruzb09da242015-06-16 13:15:13 -07001187presentation_weston_SOURCES = \
1188 tests/presentation-test.c \
1189 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001190nodist_presentation_weston_SOURCES = \
1191 protocol/presentation_timing-protocol.c \
1192 protocol/presentation_timing-client-protocol.h
1193presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1194presentation_weston_LDADD = libtest-client.la
1195
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001196roles_weston_SOURCES = tests/roles-test.c
1197roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1198roles_weston_LDADD = libtest-client.la
1199
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001200if ENABLE_EGL
1201weston_tests += buffer-count.weston
1202buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001203buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001204buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1205endif
1206
1207if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001208weston_tests += xwayland-test.weston
1209xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001210xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001211xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001212endif
1213
1214matrix_test_SOURCES = \
1215 tests/matrix-test.c \
1216 shared/matrix.c \
1217 shared/matrix.h
1218matrix_test_CPPFLAGS = -DUNIT_TEST
1219matrix_test_LDADD = -lm -lrt
1220
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001221if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001222module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001223 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001224 ivi-layout-test.la
1225
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001226ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1227ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001228ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001229ivi_layout_internal_test_la_SOURCES = \
1230 tests/ivi_layout-internal-test.c
1231
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001232ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1233ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001234ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001235ivi_layout_test_la_SOURCES = \
1236 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001237 tests/ivi-test.h \
1238 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001239nodist_ivi_layout_test_la_SOURCES = \
1240 protocol/weston-test-protocol.c \
1241 protocol/weston-test-server-protocol.h
1242
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001243ivi_tests += \
1244 ivi-shell-app.weston
1245
1246ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1247nodist_ivi_shell_app_weston_SOURCES = \
1248 protocol/ivi-application-protocol.c \
1249 protocol/ivi-application-client-protocol.h
1250ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1251ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001252
1253noinst_PROGRAMS += ivi-layout.ivi
1254
1255ivi_layout_ivi_SOURCES = \
1256 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001257 tests/ivi-test.h \
1258 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001259nodist_ivi_layout_ivi_SOURCES = \
1260 protocol/ivi-application-protocol.c \
1261 protocol/ivi-application-client-protocol.h
1262ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1263ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001264endif
1265
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001266if BUILD_SETBACKLIGHT
1267noinst_PROGRAMS += setbacklight
1268setbacklight_SOURCES = \
1269 tests/setbacklight.c \
1270 src/libbacklight.c \
1271 src/libbacklight.h
1272setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1273setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1274endif
1275
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001276all-local: zuctest$(EXEEXT)
1277
1278noinst_PROGRAMS += zuctest$(EXEEXT)
1279
1280zuctest_LDADD = \
1281 libzunitc.la \
1282 libzunitcmain.la
1283
1284zuctest_CFLAGS = \
1285 $(AM_CFLAGS) \
1286 -I$(top_srcdir)/tools/zunitc/inc
1287
1288zuctest_SOURCES = \
1289 tools/zunitc/test/fixtures_test.c \
1290 tools/zunitc/test/zunitc_test.c
1291
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001292EXTRA_DIST += \
1293 tests/weston-tests-env \
1294 tests/internal-screenshot.ini \
1295 tests/reference/internal-screenshot-bad-00.png \
1296 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001297
1298BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001299 protocol/weston-test-protocol.c \
1300 protocol/weston-test-server-protocol.h \
1301 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001302 protocol/text-protocol.c \
1303 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001304
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001305EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001306 protocol/desktop-shell.xml \
1307 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001308 protocol/text.xml \
1309 protocol/input-method.xml \
1310 protocol/workspaces.xml \
1311 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001312 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001313 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001314 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001315 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001316 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001317 protocol/ivi-application.xml \
Pekka Paalanen23ab7152014-09-29 14:08:29 -04001318 protocol/ivi-hmi-controller.xml \
1319 protocol/linux-dmabuf.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001320
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001321#
1322# manual test modules in tests subdirectory
1323#
1324
1325noinst_LTLIBRARIES += \
1326 surface-screenshot.la
1327
1328surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1329surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001330surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001331surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1332
1333
1334#
1335# Documentation
1336#
1337
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001338man_MANS = weston.1 weston.ini.5
1339
1340if ENABLE_DRM_COMPOSITOR
1341man_MANS += weston-drm.7
1342endif
1343
1344MAN_SUBSTS = \
1345 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1346 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1347 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1348 -e 's|__version__|$(PACKAGE_VERSION)|g'
1349
1350SUFFIXES = .1 .5 .7 .man
1351
1352%.1 %.5 %.7 : man/%.man
1353 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1354
1355EXTRA_DIST += \
1356 man/weston.man \
1357 man/weston-drm.man \
1358 man/weston.ini.man
1359
1360CLEANFILES += $(man_MANS)
1361
Jon A. Cruz179c1862015-07-15 19:22:43 -07001362if ENABLE_DEVDOCS
1363DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1364
1365docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1366 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1367
1368docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1369 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1370endif
1371
1372DOCDIRS = \
1373 docs/developer \
1374 docs/tools
1375
1376$(DOCDIRS):
1377 $(MKDIR_P) $@
1378
1379.PHONY: doc $(DOXYGEN_INDICES)
1380
1381doc: $(DOXYGEN_INDICES)
1382
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001383protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1384 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001385
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001386protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1387 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001388
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001389protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1390 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@