blob: 217d21fc0efa4b22fcdd5a38ef7908feef5b8115 [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 =
Emil Velikov7fe47f32016-07-22 14:51:51 +01008libweston_moduledir = $(libdir)/libweston-$(LIBWESTON_MAJOR)
Giulio Camuffo179fcda2016-06-02 21:48:14 +03009libweston_module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080010noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080011BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -080012
Derek Foreman2ef9e812015-02-09 09:57:29 -060013AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050014
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090015EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000016
17weston.ini : $(srcdir)/weston.ini.in
18 $(AM_V_GEN)$(SED) \
19 -e 's|@bindir[@]|$(bindir)|g' \
20 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
21 -e 's|@libexecdir[@]|$(libexecdir)|g' \
22 $< > $@
23
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090024ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
Ross Burton2eff22b2015-07-17 12:33:45 +010025 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090026 -e 's|@bindir[@]|$(bindir)|g' \
27 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020028 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090029 -e 's|@libexecdir[@]|$(libexecdir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020030 -e 's|@plugin_prefix[@]||g' \
31 $< > $@
32
33tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in
Ross Burton2eff22b2015-07-17 12:33:45 +010034 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020035 -e 's|@bindir[@]|$(bindir)|g' \
36 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020037 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Derek Foremanbbdd9bc2015-06-16 13:30:35 -050038 -e 's|@libexecdir[@]|$(abs_builddir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020039 -e 's|@plugin_prefix[@]|$(abs_top_builddir)/.libs/|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090040 $< > $@
41
42all-local : weston.ini ivi-shell/weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080043
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080044AM_CFLAGS = $(GCC_CFLAGS)
45
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080046AM_CPPFLAGS = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +030047 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +010048 -I$(top_srcdir)/libweston \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080049 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080050 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080051 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010052 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080053 -DDATADIR='"$(datadir)"' \
Giulio Camuffo179fcda2016-06-02 21:48:14 +030054 -DLIBWESTON_MODULEDIR='"$(libweston_moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080055 -DLIBEXECDIR='"$(libexecdir)"' \
56 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080057
Pekka Paalanenf3a34532015-03-24 13:51:05 +020058CLEANFILES = weston.ini \
59 ivi-shell/weston.ini \
60 tests/weston-ivi.ini \
Derek Foreman1ce2ef52015-05-26 10:21:03 -050061 internal-screenshot-00.png \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020062 $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080063
Emil Velikov7fe47f32016-07-22 14:51:51 +010064lib_LTLIBRARIES = libweston-@LIBWESTON_MAJOR@.la
65libweston_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
66libweston_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
67libweston_@LIBWESTON_MAJOR@_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Giulio Camuffo8aedf7b2016-06-02 21:48:12 +030068 $(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) \
69 $(LIBINPUT_BACKEND_LIBS) libshared.la
Emil Velikov7fe47f32016-07-22 14:51:51 +010070libweston_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080071
Emil Velikov7fe47f32016-07-22 14:51:51 +010072libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +030073 libweston/git-version.h \
74 libweston/log.c \
75 libweston/compositor.c \
76 libweston/compositor.h \
77 libweston/compositor-drm.h \
78 libweston/compositor-fbdev.h \
79 libweston/compositor-headless.h \
80 libweston/compositor-rdp.h \
81 libweston/compositor-wayland.h \
82 libweston/compositor-x11.h \
83 libweston/input.c \
84 libweston/data-device.c \
85 libweston/screenshooter.c \
86 libweston/clipboard.c \
87 libweston/zoom.c \
88 libweston/bindings.c \
89 libweston/animation.c \
90 libweston/noop-renderer.c \
91 libweston/pixman-renderer.c \
92 libweston/pixman-renderer.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +020093 libweston/plugin-registry.c \
94 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +030095 libweston/timeline.c \
96 libweston/timeline.h \
97 libweston/timeline-object.h \
98 libweston/linux-dmabuf.c \
99 libweston/linux-dmabuf.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700100 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800101 shared/matrix.c \
102 shared/matrix.h \
Pekka Paalanenaa21f622015-07-03 15:44:50 +0300103 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800104 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100105 shared/platform.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300106 libweston/weston-egl-ext.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300107
Quentin Glidic248dd102016-08-12 10:41:34 +0200108lib_LTLIBRARIES += libweston-desktop-@LIBWESTON_MAJOR@.la
109libweston_desktop_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
110libweston_desktop_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
111libweston_desktop_@LIBWESTON_MAJOR@_la_LIBADD = libweston-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
112libweston_desktop_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
113
114libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \
115 libweston-desktop/client.c \
116 libweston-desktop/internal.h \
117 libweston-desktop/libweston-desktop.c \
118 libweston-desktop/libweston-desktop.h \
119 libweston-desktop/seat.c \
120 libweston-desktop/surface.c \
121 libweston-desktop/wl-shell.c \
122 libweston-desktop/xdg-shell-v5.c \
123 libweston-desktop/xwayland.c
124
125nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \
126 protocol/xdg-shell-unstable-v5-protocol.c \
127 protocol/xdg-shell-unstable-v5-server-protocol.h
128
129libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v5.lo: protocol/xdg-shell-unstable-v5-server-protocol.h
130
Egor Starkov7ce2e972015-09-25 18:00:27 +0300131if SYSTEMD_NOTIFY_SUPPORT
132module_LTLIBRARIES += systemd-notify.la
133systemd_notify_la_LDFLAGS = -module -avoid-version
134systemd_notify_la_LIBADD = $(SYSTEMD_DAEMON_LIBS)
135systemd_notify_la_CFLAGS = \
Pekka Paalanenaff703e2016-04-05 14:08:11 +0300136 $(COMPOSITOR_CFLAGS) \
137 $(SYSTEMD_DAEMON_CFLAGS) \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300138 $(PIXMAN_CFLAGS) \
139 $(AM_CFLAGS)
140systemd_notify_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300141 compositor/systemd-notify.c \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300142 shared/helpers.h \
143 shared/zalloc.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300144 libweston/compositor.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300145endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800146
Emil Velikov7fe47f32016-07-22 14:51:51 +0100147nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800148 protocol/weston-screenshooter-protocol.c \
149 protocol/weston-screenshooter-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800150 protocol/text-cursor-position-protocol.c \
151 protocol/text-cursor-position-server-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800152 protocol/text-input-unstable-v1-protocol.c \
153 protocol/text-input-unstable-v1-server-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800154 protocol/input-method-unstable-v1-protocol.c \
155 protocol/input-method-unstable-v1-server-protocol.h \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200156 protocol/presentation-time-protocol.c \
157 protocol/presentation-time-server-protocol.h \
Pekka Paalanene95ad5c2016-04-15 14:47:08 +0300158 protocol/viewporter-protocol.c \
159 protocol/viewporter-server-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800160 protocol/linux-dmabuf-unstable-v1-protocol.c \
Jonas Ådahl30d61d82014-10-22 21:21:17 +0200161 protocol/linux-dmabuf-unstable-v1-server-protocol.h \
162 protocol/relative-pointer-unstable-v1-protocol.c \
Jonas Ådahld3414f22016-07-22 17:56:31 +0800163 protocol/relative-pointer-unstable-v1-server-protocol.h \
164 protocol/pointer-constraints-unstable-v1-protocol.c \
165 protocol/pointer-constraints-unstable-v1-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800166
Emil Velikov7fe47f32016-07-22 14:51:51 +0100167BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES)
Giulio Camuffo9e445982016-06-02 21:48:15 +0300168
169bin_PROGRAMS += weston
170
171weston_LDFLAGS = -export-dynamic
172weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200173 -DMODULEDIR='"$(moduledir)"' \
174 -DXSERVER_PATH='"@XSERVER_PATH@"'
Giulio Camuffo9e445982016-06-02 21:48:15 +0300175weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +0100176weston_LDADD = libshared.la libweston-@LIBWESTON_MAJOR@.la \
177 $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Giulio Camuffo9e445982016-06-02 21:48:15 +0300178 $(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +0100179 -lm
Giulio Camuffo9e445982016-06-02 21:48:15 +0300180
181weston_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300182 compositor/main.c \
183 compositor/weston-screenshooter.c \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200184 compositor/text-backend.c \
185 compositor/xwayland.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800186
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800187# Track this dependency explicitly instead of using BUILT_SOURCES. We
188# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
189# in case we're building from tarballs.
190
Emil Velikova8840242016-07-04 14:57:12 +0100191compositor/main.c : $(top_builddir)/libweston/git-version.h
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300192libweston/compositor.c : $(top_builddir)/libweston/git-version.h
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800193
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800194noinst_LTLIBRARIES += \
195 libsession-helper.la
196
197libsession_helper_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300198 libweston/launcher-util.c \
199 libweston/launcher-util.h \
200 libweston/launcher-impl.h \
201 libweston/weston-launch.h \
202 libweston/launcher-weston-launch.c \
203 libweston/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500204libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800205libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
206
207if ENABLE_DBUS
208if HAVE_SYSTEMD_LOGIN
209libsession_helper_la_SOURCES += \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300210 libweston/dbus.h \
211 libweston/dbus.c \
212 libweston/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800213libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
214libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
215endif
216endif
217
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800218if HAVE_GIT_REPO
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300219libweston/git-version.h : $(top_srcdir)/.git/logs/HEAD
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800220 $(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 -0800221else
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300222libweston/git-version.h :
Kristian Høgsberg1d2dd072014-02-03 10:55:51 -0800223 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
224
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800225endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800226
227.FORCE :
228
229if BUILD_WESTON_LAUNCH
230bin_PROGRAMS += weston-launch
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300231weston_launch_SOURCES = libweston/weston-launch.c libweston/weston-launch.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800232weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
233weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500234 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800235 $(PAM_CFLAGS) \
236 $(SYSTEMD_LOGIN_CFLAGS) \
237 $(LIBDRM_CFLAGS)
238weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
239
240if ENABLE_SETUID_INSTALL
241install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700242 can_suid_files=no; \
243 chown root $(DESTDIR)$(bindir)/weston-launch \
244 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
245 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500246 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700247 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
248 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
249 false; \
250 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800251endif
252
253endif # BUILD_WESTON_LAUNCH
254
255pkgconfigdir = $(libdir)/pkgconfig
Quentin Glidic248dd102016-08-12 10:41:34 +0200256pkgconfig_DATA = \
257 libweston/libweston-${LIBWESTON_MAJOR}.pc \
258 libweston-desktop/libweston-desktop-${LIBWESTON_MAJOR}.pc \
259 compositor/weston.pc
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800260
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100261wayland_sessiondir = $(datadir)/wayland-sessions
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300262dist_wayland_session_DATA = compositor/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100263
Emil Velikov7fe47f32016-07-22 14:51:51 +0100264libwestonincludedir = $(includedir)/libweston-${LIBWESTON_MAJOR}
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300265libwestoninclude_HEADERS = \
266 libweston/version.h \
267 libweston/compositor.h \
268 libweston/compositor-drm.h \
269 libweston/compositor-fbdev.h \
270 libweston/compositor-headless.h \
271 libweston/compositor-rdp.h \
272 libweston/compositor-wayland.h \
273 libweston/compositor-x11.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +0200274 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300275 libweston/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800276 shared/matrix.h \
277 shared/config-parser.h \
Emil Velikovcbcf5452016-07-04 15:34:17 +0100278 shared/zalloc.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800279
Quentin Glidic248dd102016-08-12 10:41:34 +0200280libwestoninclude_HEADERS += \
281 libweston-desktop/libweston-desktop.h
282
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300283westonincludedir = $(includedir)/weston
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300284westoninclude_HEADERS = compositor/weston.h
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300285
Ucan, Emre \(ADITG/SW1\)ae2541d2015-10-15 14:51:43 +0000286if ENABLE_IVI_SHELL
287westoninclude_HEADERS += \
288 ivi-shell/ivi-layout-export.h
289endif
290
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800291if ENABLE_EGL
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300292libweston_module_LTLIBRARIES += gl-renderer.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800293gl_renderer_la_LDFLAGS = -module -avoid-version
294gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
295gl_renderer_la_CFLAGS = \
296 $(COMPOSITOR_CFLAGS) \
297 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300298 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500299 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800300gl_renderer_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300301 libweston/gl-renderer.h \
302 libweston/gl-renderer.c \
303 libweston/vertex-clipping.c \
304 libweston/vertex-clipping.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700305 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800306endif
307
308if ENABLE_X11_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300309libweston_module_LTLIBRARIES += x11-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800310x11_backend_la_LDFLAGS = -module -avoid-version
311x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800312 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800313x11_backend_la_CFLAGS = \
314 $(COMPOSITOR_CFLAGS) \
315 $(EGL_CFLAGS) \
316 $(PIXMAN_CFLAGS) \
317 $(CAIRO_CFLAGS) \
318 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500319 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700320x11_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300321 libweston/compositor-x11.c \
322 libweston/compositor-x11.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700323 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800324endif
325
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100326INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000327INPUT_BACKEND_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300328 libweston/libinput-seat.c \
329 libweston/libinput-seat.h \
330 libweston/libinput-device.c \
331 libweston/libinput-device.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700332 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100333
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800334if ENABLE_DRM_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300335libweston_module_LTLIBRARIES += drm-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800336drm_backend_la_LDFLAGS = -module -avoid-version
337drm_backend_la_LIBADD = \
338 $(COMPOSITOR_LIBS) \
339 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100340 $(INPUT_BACKEND_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300341 libshared.la \
342 $(CLOCK_GETTIME_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800343 libsession-helper.la
344drm_backend_la_CFLAGS = \
345 $(COMPOSITOR_CFLAGS) \
346 $(EGL_CFLAGS) \
347 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500348 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800349drm_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300350 libweston/compositor-drm.c \
351 libweston/compositor-drm.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100352 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700353 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200354 shared/timespec-util.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300355 libweston/libbacklight.c \
356 libweston/libbacklight.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800357
358if ENABLE_VAAPI_RECORDER
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300359drm_backend_la_SOURCES += libweston/vaapi-recorder.c libweston/vaapi-recorder.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800360drm_backend_la_LIBADD += $(LIBVA_LIBS)
361drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
362endif
363endif
364
365if ENABLE_WAYLAND_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300366libweston_module_LTLIBRARIES += wayland-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800367wayland_backend_la_LDFLAGS = -module -avoid-version
368wayland_backend_la_LIBADD = \
369 $(COMPOSITOR_LIBS) \
370 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800371 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800372wayland_backend_la_CFLAGS = \
373 $(COMPOSITOR_CFLAGS) \
374 $(EGL_CFLAGS) \
375 $(PIXMAN_CFLAGS) \
376 $(CAIRO_CFLAGS) \
377 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500378 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700379wayland_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300380 libweston/compositor-wayland.c \
381 libweston/compositor-wayland.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700382 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500383nodist_wayland_backend_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800384 protocol/fullscreen-shell-unstable-v1-protocol.c \
385 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800386endif
387
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800388if ENABLE_HEADLESS_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300389libweston_module_LTLIBRARIES += headless-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800390headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800391headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500392headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700393headless_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300394 libweston/compositor-headless.c \
395 libweston/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700396 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800397endif
398
399if ENABLE_FBDEV_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300400libweston_module_LTLIBRARIES += fbdev-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800401fbdev_backend_la_LDFLAGS = -module -avoid-version
402fbdev_backend_la_LIBADD = \
403 $(COMPOSITOR_LIBS) \
404 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100405 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800406 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800407 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800408fbdev_backend_la_CFLAGS = \
409 $(COMPOSITOR_CFLAGS) \
410 $(EGL_CFLAGS) \
411 $(FBDEV_COMPOSITOR_CFLAGS) \
412 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500413 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800414fbdev_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300415 libweston/compositor-fbdev.c \
416 libweston/compositor-fbdev.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700417 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100418 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800419endif
420
421if ENABLE_RDP_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300422libweston_module_LTLIBRARIES += rdp-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800423rdp_backend_la_LDFLAGS = -module -avoid-version
424rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
425 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800426 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800427rdp_backend_la_CFLAGS = \
428 $(COMPOSITOR_CFLAGS) \
429 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500430 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700431rdp_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300432 libweston/compositor-rdp.c \
433 libweston/compositor-rdp.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700434 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800435endif
436
437if HAVE_LCMS
438module_LTLIBRARIES += cms-static.la
439cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800440cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500441cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800442cms_static_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300443 compositor/cms-static.c \
444 compositor/cms-helper.c \
445 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700446 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800447if ENABLE_COLORD
448module_LTLIBRARIES += cms-colord.la
449cms_colord_la_LDFLAGS = -module -avoid-version
450cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500451cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800452cms_colord_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300453 compositor/cms-colord.c \
454 compositor/cms-helper.c \
455 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700456 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800457endif
458endif
459
460noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500461spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800462spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
463spring_tool_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300464 libweston/spring-tool.c \
465 libweston/animation.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800466 shared/matrix.c \
467 shared/matrix.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300468 libweston/compositor.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800469
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800470if BUILD_CLIENTS
471
472bin_PROGRAMS += weston-terminal weston-info
473
474libexec_PROGRAMS += \
475 weston-desktop-shell \
476 weston-screenshooter \
477 weston-keyboard \
478 weston-simple-im
479
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900480if ENABLE_IVI_SHELL
481libexec_PROGRAMS += \
482 weston-ivi-shell-user-interface
483endif
484
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800485demo_clients = \
486 weston-flower \
487 weston-image \
488 weston-cliptest \
489 weston-dnd \
490 weston-smoke \
491 weston-resizor \
492 weston-eventdemo \
493 weston-clickdot \
Jonas Ådahl61831f42016-03-15 18:14:00 +0800494 weston-confine \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800495 weston-transformed \
496 weston-fullscreen \
497 weston-stacking \
498 weston-calibrator \
499 weston-scaler
500
501if INSTALL_DEMO_CLIENTS
502bin_PROGRAMS += $(demo_clients)
503else
504noinst_PROGRAMS += $(demo_clients)
505endif
506
507
508if BUILD_SIMPLE_CLIENTS
509demo_clients += \
510 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500511 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800512 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400513 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800514 weston-multi-resource
515
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800516weston_simple_shm_SOURCES = clients/simple-shm.c
517nodist_weston_simple_shm_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800518 protocol/xdg-shell-unstable-v5-protocol.c \
519 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800520 protocol/fullscreen-shell-unstable-v1-protocol.c \
521 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900522 protocol/ivi-application-protocol.c \
523 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800524weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800525weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800526
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500527weston_simple_damage_SOURCES = clients/simple-damage.c
528nodist_weston_simple_damage_SOURCES = \
Pekka Paalanen7b69d6c2016-04-15 17:00:21 +0300529 protocol/viewporter-protocol.c \
530 protocol/viewporter-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800531 protocol/xdg-shell-unstable-v5-protocol.c \
532 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800533 protocol/fullscreen-shell-unstable-v1-protocol.c \
534 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500535weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
536weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
537
Jon A. Cruzb09da242015-06-16 13:15:13 -0700538weston_simple_touch_SOURCES = \
539 clients/simple-touch.c \
540 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800541weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800542weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800543
Jon A. Cruzb09da242015-06-16 13:15:13 -0700544weston_presentation_shm_SOURCES = \
545 clients/presentation-shm.c \
546 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400547nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200548 protocol/presentation-time-protocol.c \
549 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400550weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300551weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400552
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800553weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800554weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300555weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800556endif
557
558if BUILD_SIMPLE_EGL_CLIENTS
559demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800560weston_simple_egl_SOURCES = clients/simple-egl.c
561nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800562 protocol/xdg-shell-unstable-v5-protocol.c \
563 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900564 protocol/ivi-application-protocol.c \
565 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800566weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800567weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
568endif
569
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000570if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
571demo_clients += weston-simple-dmabuf-intel
572weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
573nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800574 protocol/xdg-shell-unstable-v5-protocol.c \
575 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800576 protocol/fullscreen-shell-unstable-v1-protocol.c \
577 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800578 protocol/linux-dmabuf-unstable-v1-protocol.c \
579 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000580weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
581weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800582BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200583endif
584
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000585if BUILD_SIMPLE_DMABUF_V4L_CLIENT
586demo_clients += weston-simple-dmabuf-v4l
587weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
588nodist_weston_simple_dmabuf_v4l_SOURCES = \
589 protocol/xdg-shell-unstable-v5-protocol.c \
590 protocol/xdg-shell-unstable-v5-client-protocol.h \
591 protocol/fullscreen-shell-unstable-v1-protocol.c \
592 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
593 protocol/linux-dmabuf-unstable-v1-protocol.c \
594 protocol/linux-dmabuf-unstable-v1-client-protocol.h
595weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
596weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
597BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
598endif
599
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800600noinst_LTLIBRARIES += libtoytoolkit.la
601
602libtoytoolkit_la_SOURCES = \
603 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700604 clients/window.h \
605 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800606
607nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100608 protocol/text-cursor-position-protocol.c \
609 protocol/text-cursor-position-client-protocol.h \
Pekka Paalanen73511002016-04-15 16:53:41 +0300610 protocol/viewporter-protocol.c \
611 protocol/viewporter-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800612 protocol/xdg-shell-unstable-v5-protocol.c \
613 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900614 protocol/ivi-application-protocol.c \
Jonas Ådahle5a1bb42014-11-25 10:25:27 +0800615 protocol/ivi-application-client-protocol.h \
616 protocol/pointer-constraints-unstable-v1-protocol.c \
617 protocol/pointer-constraints-unstable-v1-client-protocol.h \
618 protocol/relative-pointer-unstable-v1-protocol.c \
619 protocol/relative-pointer-unstable-v1-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500620
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800621BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
622
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800623
624libtoytoolkit_la_LIBADD = \
625 $(CLIENT_LIBS) \
626 $(CAIRO_EGL_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300627 libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800628libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800629
630weston_flower_SOURCES = clients/flower.c
631weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800632weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800633
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100634weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800635 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800636nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800637 protocol/weston-screenshooter-protocol.c \
638 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800639weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800640weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800641
Jon A. Cruzb09da242015-06-16 13:15:13 -0700642weston_terminal_SOURCES = \
643 clients/terminal.c \
644 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800645weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800646weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800647
648weston_image_SOURCES = clients/image.c
649weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800650weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800651
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300652weston_cliptest_SOURCES = \
653 clients/cliptest.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300654 libweston/vertex-clipping.c \
655 libweston/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800656weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800657weston_cliptest_LDADD = libtoytoolkit.la
658
Jon A. Cruzb09da242015-06-16 13:15:13 -0700659weston_dnd_SOURCES = \
660 clients/dnd.c \
661 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800662weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800663weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800664
665weston_smoke_SOURCES = clients/smoke.c
666weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800667weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800668
669weston_resizor_SOURCES = clients/resizor.c
670weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800671weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800672
673weston_scaler_SOURCES = clients/scaler.c
674weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800675weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800676
677if HAVE_CAIRO_GLESV2
678demo_clients += weston-nested weston-nested-client
679
Jon A. Cruzb09da242015-06-16 13:15:13 -0700680weston_nested_SOURCES = \
681 clients/nested.c \
682 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800683weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800684weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800685
686weston_nested_client_SOURCES = clients/nested-client.c
687weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800688weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800689endif
690
Jon A. Cruzb09da242015-06-16 13:15:13 -0700691weston_eventdemo_SOURCES = \
692 clients/eventdemo.c \
693 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800694weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800695weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800696
Jon A. Cruzb09da242015-06-16 13:15:13 -0700697weston_clickdot_SOURCES = \
698 clients/clickdot.c \
699 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800700weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800701weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800702
Jonas Ådahl61831f42016-03-15 18:14:00 +0800703weston_confine_SOURCES = \
704 clients/confine.c \
705 shared/helpers.h
706weston_confine_LDADD = libtoytoolkit.la
707weston_confine_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
708
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800709weston_transformed_SOURCES = clients/transformed.c
710weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800711weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800712
713weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500714nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800715 protocol/fullscreen-shell-unstable-v1-protocol.c \
716 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800717weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800718weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800719
Jon A. Cruzb09da242015-06-16 13:15:13 -0700720weston_stacking_SOURCES = \
721 clients/stacking.c \
722 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800723weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800724weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800725
Jon A. Cruzb09da242015-06-16 13:15:13 -0700726weston_calibrator_SOURCES = \
727 clients/calibrator.c \
728 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800729 shared/matrix.c \
730 shared/matrix.h
731weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800732weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800733
734if BUILD_SUBSURFACES_CLIENT
735demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700736weston_subsurfaces_SOURCES = \
737 clients/subsurfaces.c \
738 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800739weston_subsurfaces_CFLAGS = \
740 $(AM_CFLAGS) \
741 $(SIMPLE_EGL_CLIENT_CFLAGS) \
742 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800743weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
744endif
745
746if HAVE_PANGO
747demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700748weston_editor_SOURCES = \
749 clients/editor.c \
750 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800751nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800752 protocol/text-input-unstable-v1-protocol.c \
753 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800754weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800755weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800756endif
757
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800758weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800759nodist_weston_keyboard_SOURCES = \
760 protocol/weston-desktop-shell-client-protocol.h \
761 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800762 protocol/input-method-unstable-v1-protocol.c \
763 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800764weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800765weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800766
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800767weston_simple_im_SOURCES = clients/weston-simple-im.c
768nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800769 protocol/input-method-unstable-v1-protocol.c \
770 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800771weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800772weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800773
Jon A. Cruzb09da242015-06-16 13:15:13 -0700774weston_info_SOURCES = \
775 clients/weston-info.c \
776 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400777nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200778 protocol/presentation-time-protocol.c \
779 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800780weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200781weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800782
Jon A. Cruzb09da242015-06-16 13:15:13 -0700783weston_desktop_shell_SOURCES = \
784 clients/desktop-shell.c \
785 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800786nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800787 protocol/weston-desktop-shell-client-protocol.h \
788 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800789weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800790weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800791
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900792if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700793weston_ivi_shell_user_interface_SOURCES = \
794 clients/ivi-shell-user-interface.c \
795 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900796nodist_weston_ivi_shell_user_interface_SOURCES = \
797 protocol/ivi-hmi-controller-client-protocol.h \
798 protocol/ivi-hmi-controller-protocol.c \
799 protocol/ivi-application-client-protocol.h \
800 protocol/ivi-application-protocol.c
801weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
802weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
803endif
804
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800805if BUILD_FULL_GL_CLIENTS
806demo_clients += weston-gears
807weston_gears_SOURCES = clients/gears.c
808weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800809weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800810endif
811
812endif
813
814BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800815 protocol/weston-screenshooter-protocol.c \
816 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100817 protocol/text-cursor-position-client-protocol.h \
818 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800819 protocol/text-input-unstable-v1-protocol.c \
820 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800821 protocol/input-method-unstable-v1-protocol.c \
822 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800823 protocol/weston-desktop-shell-client-protocol.h \
824 protocol/weston-desktop-shell-protocol.c \
Pekka Paalanen73511002016-04-15 16:53:41 +0300825 protocol/viewporter-client-protocol.h \
826 protocol/viewporter-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200827 protocol/presentation-time-protocol.c \
828 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800829 protocol/fullscreen-shell-unstable-v1-protocol.c \
830 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800831 protocol/xdg-shell-unstable-v5-protocol.c \
832 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900833 protocol/ivi-hmi-controller-protocol.c \
834 protocol/ivi-hmi-controller-client-protocol.h \
835 protocol/ivi-application-protocol.c \
836 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800837
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800838westondatadir = $(datadir)/weston
839dist_westondata_DATA = \
840 data/wayland.svg \
841 data/wayland.png \
842 data/pattern.png \
843 data/terminal.png \
844 data/border.png \
Bryce Harrington6bc52542016-03-24 17:57:39 -0700845 data/icon_editor.png \
846 data/icon_flower.png \
847 data/icon_terminal.png \
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800848 data/icon_window.png \
849 data/sign_close.png \
850 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100851 data/sign_minimize.png
852
853if ENABLE_IVI_SHELL
854dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900855 data/background.png \
856 data/tiling.png \
857 data/fullscreen.png \
858 data/panel.png \
859 data/random.png \
860 data/sidebyside.png \
861 data/home.png \
862 data/icon_ivi_clickdot.png \
863 data/icon_ivi_flower.png \
864 data/icon_ivi_simple-egl.png \
865 data/icon_ivi_simple-shm.png \
866 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100867endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800868
869
870if BUILD_WCAP_TOOLS
871bin_PROGRAMS += wcap-decode
872
873wcap_decode_SOURCES = \
874 wcap/main.c \
875 wcap/wcap-decode.c \
876 wcap/wcap-decode.h
877
Derek Foreman4ff38742015-06-18 11:43:11 -0500878wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800879wcap_decode_LDADD = $(WCAP_LIBS)
880endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800881
882
883if ENABLE_DESKTOP_SHELL
884
885module_LTLIBRARIES += desktop-shell.la
886
887desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100888 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800889 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300890 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100891 -I$(top_srcdir)/libweston \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800892 -I$(top_builddir)/desktop-shell \
893 -DDATADIR='"$(datadir)"' \
894 -DMODULEDIR='"$(moduledir)"' \
895 -DLIBEXECDIR='"$(libexecdir)"' \
896 -DIN_WESTON
897
898desktop_shell_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100899desktop_shell_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500900desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800901desktop_shell_la_SOURCES = \
902 desktop-shell/shell.h \
903 desktop-shell/shell.c \
904 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700905 desktop-shell/input-panel.c \
906 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800907nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800908 protocol/weston-desktop-shell-protocol.c \
909 protocol/weston-desktop-shell-server-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800910 protocol/xdg-shell-unstable-v5-protocol.c \
911 protocol/xdg-shell-unstable-v5-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800912
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800913BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800914endif
915
Jason Ekstrand946a9482014-04-02 19:53:47 -0500916if ENABLE_FULLSCREEN_SHELL
917
918module_LTLIBRARIES += fullscreen-shell.la
919
920fullscreen_shell_la_CPPFLAGS = \
921 -I$(top_builddir)/protocol \
922 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300923 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100924 -I$(top_srcdir)/libweston \
Jason Ekstrand946a9482014-04-02 19:53:47 -0500925 -DIN_WESTON
926
927fullscreen_shell_la_LDFLAGS = -module -avoid-version
928fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500929fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500930fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700931 fullscreen-shell/fullscreen-shell.c \
932 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500933nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800934 protocol/fullscreen-shell-unstable-v1-protocol.c \
935 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500936
937BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
938endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800939
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900940if ENABLE_IVI_SHELL
941
942module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900943 $(ivi_shell) \
944 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900945
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900946ivi_shell = ivi-shell.la
947ivi_shell_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100948ivi_shell_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500949ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900950ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900951 ivi-shell/ivi-layout-export.h \
952 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +0200953 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900954 ivi-shell/ivi-layout.c \
955 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900956 ivi-shell/ivi-shell.h \
957 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700958 ivi-shell/input-panel-ivi.c \
959 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900960nodist_ivi_shell_la_SOURCES = \
961 protocol/ivi-application-protocol.c \
962 protocol/ivi-application-server-protocol.h
963
964BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
965
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900966hmi_controller = hmi-controller.la
967hmi_controller_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100968hmi_controller_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500969hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900970hmi_controller_la_SOURCES = \
971 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700972 ivi-shell/hmi-controller.c \
973 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900974nodist_hmi_controller_la_SOURCES = \
975 protocol/ivi-hmi-controller-protocol.c \
976 protocol/ivi-hmi-controller-server-protocol.h
977
978BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
979
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900980endif
981
982
Jason Ekstrand47928d82014-04-02 19:54:01 -0500983if ENABLE_SCREEN_SHARING
984
985module_LTLIBRARIES += screen-share.la
986
987screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
988screen_share_la_LDFLAGS = -module -avoid-version
989screen_share_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +0100990 libshared-cairo.la \
Jason Ekstrand47928d82014-04-02 19:54:01 -0500991 $(COMPOSITOR_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +0100992 $(SCREEN_SHARE_LIBS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500993screen_share_la_CFLAGS = \
994 $(COMPOSITOR_CFLAGS) \
995 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500996 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500997screen_share_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300998 compositor/screen-share.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700999 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001000nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +08001001 protocol/fullscreen-shell-unstable-v1-protocol.c \
1002 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001003
1004endif
1005
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001006if ENABLE_XWAYLAND
1007
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001008libweston_module_LTLIBRARIES += xwayland.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001009
1010xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001011 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001012 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001013 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +01001014 -I$(top_srcdir)/libweston \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001015 -I$(top_builddir)/xwayland \
1016 -DDATADIR='"$(datadir)"' \
1017 -DMODULEDIR='"$(moduledir)"' \
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001018 -DLIBEXECDIR='"$(libexecdir)"'
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001019
1020xwayland_la_LDFLAGS = -module -avoid-version
1021xwayland_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001022 libshared-cairo.la \
1023 $(XWAYLAND_LIBS)
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001024xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -05001025 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001026 $(COMPOSITOR_CFLAGS) \
1027 $(PIXMAN_CFLAGS) \
1028 $(CAIRO_CFLAGS)
1029xwayland_la_SOURCES = \
1030 xwayland/xwayland.h \
1031 xwayland/window-manager.c \
1032 xwayland/selection.c \
1033 xwayland/dnd.c \
1034 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001035 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001036 xwayland/hash.h \
1037 shared/helpers.h
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001038
1039libwestoninclude_HEADERS += xwayland/xwayland-api.h
1040
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001041endif
1042
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001043
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001044#
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001045# Shared utilities
1046#
1047
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001048noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1049 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001050
Derek Foreman4ff38742015-06-18 11:43:11 -05001051libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001052
1053libshared_la_SOURCES = \
1054 shared/config-parser.c \
1055 shared/option-parser.c \
1056 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001057 shared/file-util.c \
1058 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001059 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001060 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001061 shared/os-compatibility.h \
1062 shared/xalloc.c \
1063 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001064
1065libshared_cairo_la_CFLAGS = \
1066 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001067 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001068 $(COMPOSITOR_CFLAGS) \
1069 $(PIXMAN_CFLAGS) \
1070 $(CAIRO_CFLAGS) \
1071 $(PNG_CFLAGS) \
1072 $(WEBP_CFLAGS)
1073
1074libshared_cairo_la_LIBADD = \
1075 $(PIXMAN_LIBS) \
1076 $(CAIRO_LIBS) \
1077 $(PNG_LIBS) \
1078 $(WEBP_LIBS) \
1079 $(JPEG_LIBS)
1080
1081libshared_cairo_la_SOURCES = \
1082 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001083 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001084 shared/image-loader.c \
1085 shared/image-loader.h \
1086 shared/cairo-util.c \
1087 shared/frame.c \
1088 shared/cairo-util.h
1089
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001090libzunitc_la_SOURCES = \
1091 tools/zunitc/inc/zunitc/zunitc.h \
1092 tools/zunitc/inc/zunitc/zunitc_impl.h \
1093 tools/zunitc/src/zuc_base_logger.c \
1094 tools/zunitc/src/zuc_base_logger.h \
1095 tools/zunitc/src/zuc_collector.c \
1096 tools/zunitc/src/zuc_collector.h \
1097 tools/zunitc/src/zuc_context.h \
1098 tools/zunitc/src/zuc_event.h \
1099 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001100 tools/zunitc/src/zuc_junit_reporter.c \
1101 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001102 tools/zunitc/src/zuc_types.h \
1103 tools/zunitc/src/zunitc_impl.c \
1104 shared/helpers.h
1105
1106libzunitc_la_CFLAGS = \
1107 $(AM_CFLAGS) \
1108 -I$(top_srcdir)/tools/zunitc/inc
1109
1110libzunitc_la_LIBADD = \
Gustavo Zacarias57c83f62016-04-22 10:54:35 -03001111 libshared.la \
1112 $(CLOCK_GETTIME_LIBS)
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001113
Jon A. Cruz646aef52015-07-15 19:22:41 -07001114if ENABLE_JUNIT_XML
1115libzunitc_la_CFLAGS += \
1116 $(LIBXML2_CFLAGS)
1117libzunitc_la_LIBADD += \
1118 $(LIBXML2_LIBS)
1119endif
1120
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001121libzunitcmain_la_SOURCES = \
1122 tools/zunitc/src/main.c
1123
1124libzunitcmain_la_CFLAGS = \
1125 $(AM_CFLAGS) \
1126 -I$(top_srcdir)/tools/zunitc/inc
1127
1128libzunitcmain_la_LIBADD = \
1129 libzunitc.la \
1130 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001131
1132#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001133# tests subdirectory
1134#
1135
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001136TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1137
1138internal_tests = \
1139 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001140
1141shared_tests = \
1142 config-parser.test \
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001143 string.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001144 vertex-clip.test \
1145 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001146
1147module_tests = \
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001148 plugin-registry-test.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001149 surface-test.la \
1150 surface-global-test.la
1151
1152weston_tests = \
1153 bad_buffer.weston \
1154 keyboard.weston \
1155 event.weston \
1156 button.weston \
1157 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001158 presentation.weston \
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001159 viewporter.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001160 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001161 subsurface.weston \
1162 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001163
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001164ivi_tests =
1165
1166$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001167
1168AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001169 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1170 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001171
1172TEST_EXTENSIONS = .la .weston
1173LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1174WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1175
1176clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001177 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001178 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001179
1180# To remove when automake 1.11 support is dropped
1181export abs_builddir
1182
1183noinst_LTLIBRARIES += \
1184 weston-test.la \
1185 $(module_tests) \
1186 libtest-runner.la \
1187 libtest-client.la
1188
1189noinst_PROGRAMS += \
1190 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001191 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001192 $(shared_tests) \
1193 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001194 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001195 matrix-test
1196
1197test_module_ldflags = \
1198 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1199
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001200plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
1201plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1202plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1203
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001204surface_global_test_la_SOURCES = tests/surface-global-test.c
1205surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001206surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001207
1208surface_test_la_SOURCES = tests/surface-test.c
1209surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001210surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001211
Emil Velikov67351452016-07-22 14:52:42 +01001212weston_test_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001213weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001214weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001215weston_test_la_SOURCES = \
1216 tests/weston-test.c \
1217 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001218nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001219 protocol/weston-test-protocol.c \
1220 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001221
1222if ENABLE_EGL
1223weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1224weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1225endif
1226
1227libtest_runner_la_SOURCES = \
1228 tests/weston-test-runner.c \
1229 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001230libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001231
1232config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001233config_parser_test_LDADD = \
1234 libshared.la \
1235 $(COMPOSITOR_LIBS) \
1236 libzunitc.la \
1237 libzunitcmain.la
1238config_parser_test_CFLAGS = \
1239 $(AM_CFLAGS) \
1240 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001241
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001242string_test_SOURCES = \
1243 tests/string-test.c \
1244 shared/string-helpers.h
1245string_test_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1246string_test_LDADD = libtest-client.la
1247
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001248vertex_clip_test_SOURCES = \
1249 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001250 shared/helpers.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001251 libweston/vertex-clipping.c \
1252 libweston/vertex-clipping.h
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001253vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001254
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001255libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001256 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001257 tests/weston-test-client-helper.h
1258nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001259 protocol/weston-test-protocol.c \
1260 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001261libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +01001262libtest_client_la_LIBADD = libshared.la libtest-runner.la $(TEST_CLIENT_LIBS) $(CAIRO_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001263
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001264
1265#
1266# Internal tests - tests functionality of the testsuite itself
1267#
1268
1269internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001270internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1271internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001272
1273
1274#
1275# Weston Tests
1276#
1277
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001278bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001279bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001280bad_buffer_weston_LDADD = libtest-client.la
1281
1282keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001283keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001284keyboard_weston_LDADD = libtest-client.la
1285
1286event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001287event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001288event_weston_LDADD = libtest-client.la
1289
1290button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001291button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001292button_weston_LDADD = libtest-client.la
1293
Marek Chalupa5fd81402015-03-30 09:21:29 -04001294devices_weston_SOURCES = tests/devices-test.c
1295devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1296devices_weston_LDADD = libtest-client.la
1297
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001298text_weston_SOURCES = tests/text-test.c
1299nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001300 protocol/text-input-unstable-v1-protocol.c \
1301 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001302text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001303text_weston_LDADD = libtest-client.la
1304
1305subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001306subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001307subsurface_weston_LDADD = libtest-client.la
1308
Jon A. Cruzb09da242015-06-16 13:15:13 -07001309presentation_weston_SOURCES = \
1310 tests/presentation-test.c \
1311 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001312nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001313 protocol/presentation-time-protocol.c \
1314 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001315presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1316presentation_weston_LDADD = libtest-client.la
1317
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001318roles_weston_SOURCES = tests/roles-test.c
1319roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1320roles_weston_LDADD = libtest-client.la
1321
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001322viewporter_weston_SOURCES = \
1323 tests/viewporter-test.c \
1324 shared/helpers.h
1325nodist_viewporter_weston_SOURCES = \
1326 protocol/viewporter-protocol.c \
1327 protocol/viewporter-client-protocol.h
1328viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1329viewporter_weston_LDADD = libtest-client.la
1330
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001331if ENABLE_EGL
1332weston_tests += buffer-count.weston
1333buffer_count_weston_SOURCES = tests/buffer-count-test.c
Pekka Paalanen924cd942016-05-20 17:25:38 +03001334buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001335buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1336endif
1337
1338if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001339weston_tests += xwayland-test.weston
1340xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001341xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001342xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001343endif
1344
1345matrix_test_SOURCES = \
1346 tests/matrix-test.c \
1347 shared/matrix.c \
1348 shared/matrix.h
1349matrix_test_CPPFLAGS = -DUNIT_TEST
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001350matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001351
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001352if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001353module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001354 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001355 ivi-layout-test.la
1356
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001357ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1358ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001359ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001360ivi_layout_internal_test_la_SOURCES = \
1361 tests/ivi_layout-internal-test.c
1362
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001363ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1364ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001365ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001366ivi_layout_test_la_SOURCES = \
1367 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001368 tests/ivi-test.h \
1369 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001370nodist_ivi_layout_test_la_SOURCES = \
1371 protocol/weston-test-protocol.c \
1372 protocol/weston-test-server-protocol.h
1373
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001374ivi_tests += \
1375 ivi-shell-app.weston
1376
1377ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1378nodist_ivi_shell_app_weston_SOURCES = \
1379 protocol/ivi-application-protocol.c \
1380 protocol/ivi-application-client-protocol.h
1381ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1382ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001383
1384noinst_PROGRAMS += ivi-layout.ivi
1385
1386ivi_layout_ivi_SOURCES = \
1387 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001388 tests/ivi-test.h \
1389 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001390nodist_ivi_layout_ivi_SOURCES = \
1391 protocol/ivi-application-protocol.c \
1392 protocol/ivi-application-client-protocol.h
1393ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1394ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001395endif
1396
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001397if BUILD_SETBACKLIGHT
1398noinst_PROGRAMS += setbacklight
1399setbacklight_SOURCES = \
1400 tests/setbacklight.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001401 libweston/libbacklight.c \
1402 libweston/libbacklight.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001403setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1404setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1405endif
1406
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001407all-local: zuctest$(EXEEXT)
1408
1409noinst_PROGRAMS += zuctest$(EXEEXT)
1410
1411zuctest_LDADD = \
1412 libzunitc.la \
1413 libzunitcmain.la
1414
1415zuctest_CFLAGS = \
1416 $(AM_CFLAGS) \
1417 -I$(top_srcdir)/tools/zunitc/inc
1418
1419zuctest_SOURCES = \
1420 tools/zunitc/test/fixtures_test.c \
1421 tools/zunitc/test/zunitc_test.c
1422
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001423EXTRA_DIST += \
1424 tests/weston-tests-env \
1425 tests/internal-screenshot.ini \
1426 tests/reference/internal-screenshot-bad-00.png \
1427 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001428
1429BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001430 protocol/weston-test-protocol.c \
1431 protocol/weston-test-server-protocol.h \
1432 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001433 protocol/text-input-unstable-v1-protocol.c \
1434 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001435
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001436EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001437 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001438 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001439 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001440 protocol/weston-test.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001441 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001442 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001443
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001444#
1445# manual test modules in tests subdirectory
1446#
1447
1448noinst_LTLIBRARIES += \
1449 surface-screenshot.la
1450
Emil Velikov67351452016-07-22 14:52:42 +01001451surface_screenshot_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001452surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001453surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001454surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1455
1456
1457#
1458# Documentation
1459#
1460
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001461man_MANS = weston.1 weston.ini.5
1462
1463if ENABLE_DRM_COMPOSITOR
1464man_MANS += weston-drm.7
1465endif
1466
1467MAN_SUBSTS = \
1468 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1469 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1470 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1471 -e 's|__version__|$(PACKAGE_VERSION)|g'
1472
1473SUFFIXES = .1 .5 .7 .man
1474
1475%.1 %.5 %.7 : man/%.man
1476 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1477
1478EXTRA_DIST += \
1479 man/weston.man \
1480 man/weston-drm.man \
1481 man/weston.ini.man
1482
1483CLEANFILES += $(man_MANS)
1484
Jon A. Cruz179c1862015-07-15 19:22:43 -07001485if ENABLE_DEVDOCS
1486DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1487
1488docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1489 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1490
1491docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1492 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1493endif
1494
1495DOCDIRS = \
1496 docs/developer \
1497 docs/tools
1498
1499$(DOCDIRS):
1500 $(MKDIR_P) $@
1501
1502.PHONY: doc $(DOXYGEN_INDICES)
1503
1504doc: $(DOXYGEN_INDICES)
1505
Jonas Ådahl496adb32015-11-17 16:00:27 +08001506.SECONDEXPANSION:
1507
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001508define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001509$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001510endef
1511
1512define protoname
1513$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1514endef
1515
1516protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001517 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1518
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001519protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001520 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1521
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001522protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001523 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1524
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001525protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1526 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001527
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001528protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1529 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001530
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001531protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1532 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@