blob: a2d005051a7caf083c18ff17cf8d4ff951db3764 [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
108if SYSTEMD_NOTIFY_SUPPORT
109module_LTLIBRARIES += systemd-notify.la
110systemd_notify_la_LDFLAGS = -module -avoid-version
111systemd_notify_la_LIBADD = $(SYSTEMD_DAEMON_LIBS)
112systemd_notify_la_CFLAGS = \
Pekka Paalanenaff703e2016-04-05 14:08:11 +0300113 $(COMPOSITOR_CFLAGS) \
114 $(SYSTEMD_DAEMON_CFLAGS) \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300115 $(PIXMAN_CFLAGS) \
116 $(AM_CFLAGS)
117systemd_notify_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300118 compositor/systemd-notify.c \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300119 shared/helpers.h \
120 shared/zalloc.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300121 libweston/compositor.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300122endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800123
Emil Velikov7fe47f32016-07-22 14:51:51 +0100124nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800125 protocol/weston-screenshooter-protocol.c \
126 protocol/weston-screenshooter-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800127 protocol/text-cursor-position-protocol.c \
128 protocol/text-cursor-position-server-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800129 protocol/text-input-unstable-v1-protocol.c \
130 protocol/text-input-unstable-v1-server-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800131 protocol/input-method-unstable-v1-protocol.c \
132 protocol/input-method-unstable-v1-server-protocol.h \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200133 protocol/presentation-time-protocol.c \
134 protocol/presentation-time-server-protocol.h \
Pekka Paalanene95ad5c2016-04-15 14:47:08 +0300135 protocol/viewporter-protocol.c \
136 protocol/viewporter-server-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800137 protocol/linux-dmabuf-unstable-v1-protocol.c \
Jonas Ådahl30d61d82014-10-22 21:21:17 +0200138 protocol/linux-dmabuf-unstable-v1-server-protocol.h \
139 protocol/relative-pointer-unstable-v1-protocol.c \
Jonas Ådahld3414f22016-07-22 17:56:31 +0800140 protocol/relative-pointer-unstable-v1-server-protocol.h \
141 protocol/pointer-constraints-unstable-v1-protocol.c \
142 protocol/pointer-constraints-unstable-v1-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800143
Emil Velikov7fe47f32016-07-22 14:51:51 +0100144BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES)
Giulio Camuffo9e445982016-06-02 21:48:15 +0300145
146bin_PROGRAMS += weston
147
148weston_LDFLAGS = -export-dynamic
149weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200150 -DMODULEDIR='"$(moduledir)"' \
151 -DXSERVER_PATH='"@XSERVER_PATH@"'
Giulio Camuffo9e445982016-06-02 21:48:15 +0300152weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +0100153weston_LDADD = libshared.la libweston-@LIBWESTON_MAJOR@.la \
154 $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Giulio Camuffo9e445982016-06-02 21:48:15 +0300155 $(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +0100156 -lm
Giulio Camuffo9e445982016-06-02 21:48:15 +0300157
158weston_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300159 compositor/main.c \
160 compositor/weston-screenshooter.c \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200161 compositor/text-backend.c \
162 compositor/xwayland.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800163
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800164# Track this dependency explicitly instead of using BUILT_SOURCES. We
165# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
166# in case we're building from tarballs.
167
Emil Velikova8840242016-07-04 14:57:12 +0100168compositor/main.c : $(top_builddir)/libweston/git-version.h
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300169libweston/compositor.c : $(top_builddir)/libweston/git-version.h
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800170
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800171noinst_LTLIBRARIES += \
172 libsession-helper.la
173
174libsession_helper_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300175 libweston/launcher-util.c \
176 libweston/launcher-util.h \
177 libweston/launcher-impl.h \
178 libweston/weston-launch.h \
179 libweston/launcher-weston-launch.c \
180 libweston/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500181libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800182libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
183
184if ENABLE_DBUS
185if HAVE_SYSTEMD_LOGIN
186libsession_helper_la_SOURCES += \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300187 libweston/dbus.h \
188 libweston/dbus.c \
189 libweston/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800190libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
191libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
192endif
193endif
194
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800195if HAVE_GIT_REPO
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300196libweston/git-version.h : $(top_srcdir)/.git/logs/HEAD
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800197 $(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 -0800198else
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300199libweston/git-version.h :
Kristian Høgsberg1d2dd072014-02-03 10:55:51 -0800200 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
201
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800202endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800203
204.FORCE :
205
206if BUILD_WESTON_LAUNCH
207bin_PROGRAMS += weston-launch
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300208weston_launch_SOURCES = libweston/weston-launch.c libweston/weston-launch.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800209weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
210weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500211 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800212 $(PAM_CFLAGS) \
213 $(SYSTEMD_LOGIN_CFLAGS) \
214 $(LIBDRM_CFLAGS)
215weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
216
217if ENABLE_SETUID_INSTALL
218install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700219 can_suid_files=no; \
220 chown root $(DESTDIR)$(bindir)/weston-launch \
221 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
222 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500223 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700224 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
225 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
226 false; \
227 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800228endif
229
230endif # BUILD_WESTON_LAUNCH
231
232pkgconfigdir = $(libdir)/pkgconfig
Emil Velikov7fe47f32016-07-22 14:51:51 +0100233pkgconfig_DATA = compositor/weston.pc libweston/libweston-${LIBWESTON_MAJOR}.pc
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800234
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100235wayland_sessiondir = $(datadir)/wayland-sessions
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300236dist_wayland_session_DATA = compositor/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100237
Emil Velikov7fe47f32016-07-22 14:51:51 +0100238libwestonincludedir = $(includedir)/libweston-${LIBWESTON_MAJOR}
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300239libwestoninclude_HEADERS = \
240 libweston/version.h \
241 libweston/compositor.h \
242 libweston/compositor-drm.h \
243 libweston/compositor-fbdev.h \
244 libweston/compositor-headless.h \
245 libweston/compositor-rdp.h \
246 libweston/compositor-wayland.h \
247 libweston/compositor-x11.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +0200248 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300249 libweston/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800250 shared/matrix.h \
251 shared/config-parser.h \
Emil Velikovcbcf5452016-07-04 15:34:17 +0100252 shared/zalloc.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800253
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300254westonincludedir = $(includedir)/weston
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300255westoninclude_HEADERS = compositor/weston.h
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300256
Ucan, Emre \(ADITG/SW1\)ae2541d2015-10-15 14:51:43 +0000257if ENABLE_IVI_SHELL
258westoninclude_HEADERS += \
259 ivi-shell/ivi-layout-export.h
260endif
261
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800262if ENABLE_EGL
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300263libweston_module_LTLIBRARIES += gl-renderer.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800264gl_renderer_la_LDFLAGS = -module -avoid-version
265gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
266gl_renderer_la_CFLAGS = \
267 $(COMPOSITOR_CFLAGS) \
268 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300269 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500270 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800271gl_renderer_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300272 libweston/gl-renderer.h \
273 libweston/gl-renderer.c \
274 libweston/vertex-clipping.c \
275 libweston/vertex-clipping.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700276 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800277endif
278
279if ENABLE_X11_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300280libweston_module_LTLIBRARIES += x11-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800281x11_backend_la_LDFLAGS = -module -avoid-version
282x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800283 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800284x11_backend_la_CFLAGS = \
285 $(COMPOSITOR_CFLAGS) \
286 $(EGL_CFLAGS) \
287 $(PIXMAN_CFLAGS) \
288 $(CAIRO_CFLAGS) \
289 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500290 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700291x11_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300292 libweston/compositor-x11.c \
293 libweston/compositor-x11.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700294 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800295endif
296
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100297INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000298INPUT_BACKEND_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300299 libweston/libinput-seat.c \
300 libweston/libinput-seat.h \
301 libweston/libinput-device.c \
302 libweston/libinput-device.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700303 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100304
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800305if ENABLE_DRM_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300306libweston_module_LTLIBRARIES += drm-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800307drm_backend_la_LDFLAGS = -module -avoid-version
308drm_backend_la_LIBADD = \
309 $(COMPOSITOR_LIBS) \
310 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100311 $(INPUT_BACKEND_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300312 libshared.la \
313 $(CLOCK_GETTIME_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800314 libsession-helper.la
315drm_backend_la_CFLAGS = \
316 $(COMPOSITOR_CFLAGS) \
317 $(EGL_CFLAGS) \
318 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500319 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800320drm_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300321 libweston/compositor-drm.c \
322 libweston/compositor-drm.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100323 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700324 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200325 shared/timespec-util.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300326 libweston/libbacklight.c \
327 libweston/libbacklight.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800328
329if ENABLE_VAAPI_RECORDER
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300330drm_backend_la_SOURCES += libweston/vaapi-recorder.c libweston/vaapi-recorder.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800331drm_backend_la_LIBADD += $(LIBVA_LIBS)
332drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
333endif
334endif
335
336if ENABLE_WAYLAND_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300337libweston_module_LTLIBRARIES += wayland-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800338wayland_backend_la_LDFLAGS = -module -avoid-version
339wayland_backend_la_LIBADD = \
340 $(COMPOSITOR_LIBS) \
341 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800342 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800343wayland_backend_la_CFLAGS = \
344 $(COMPOSITOR_CFLAGS) \
345 $(EGL_CFLAGS) \
346 $(PIXMAN_CFLAGS) \
347 $(CAIRO_CFLAGS) \
348 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500349 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700350wayland_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300351 libweston/compositor-wayland.c \
352 libweston/compositor-wayland.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700353 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500354nodist_wayland_backend_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800355 protocol/fullscreen-shell-unstable-v1-protocol.c \
356 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800357endif
358
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800359if ENABLE_HEADLESS_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300360libweston_module_LTLIBRARIES += headless-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800361headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800362headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500363headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700364headless_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300365 libweston/compositor-headless.c \
366 libweston/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700367 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800368endif
369
370if ENABLE_FBDEV_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300371libweston_module_LTLIBRARIES += fbdev-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800372fbdev_backend_la_LDFLAGS = -module -avoid-version
373fbdev_backend_la_LIBADD = \
374 $(COMPOSITOR_LIBS) \
375 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100376 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800377 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800378 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800379fbdev_backend_la_CFLAGS = \
380 $(COMPOSITOR_CFLAGS) \
381 $(EGL_CFLAGS) \
382 $(FBDEV_COMPOSITOR_CFLAGS) \
383 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500384 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800385fbdev_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300386 libweston/compositor-fbdev.c \
387 libweston/compositor-fbdev.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700388 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100389 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800390endif
391
392if ENABLE_RDP_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300393libweston_module_LTLIBRARIES += rdp-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800394rdp_backend_la_LDFLAGS = -module -avoid-version
395rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
396 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800397 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800398rdp_backend_la_CFLAGS = \
399 $(COMPOSITOR_CFLAGS) \
400 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500401 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700402rdp_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300403 libweston/compositor-rdp.c \
404 libweston/compositor-rdp.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700405 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800406endif
407
408if HAVE_LCMS
409module_LTLIBRARIES += cms-static.la
410cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800411cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500412cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800413cms_static_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300414 compositor/cms-static.c \
415 compositor/cms-helper.c \
416 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700417 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800418if ENABLE_COLORD
419module_LTLIBRARIES += cms-colord.la
420cms_colord_la_LDFLAGS = -module -avoid-version
421cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500422cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800423cms_colord_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300424 compositor/cms-colord.c \
425 compositor/cms-helper.c \
426 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700427 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800428endif
429endif
430
431noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500432spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800433spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
434spring_tool_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300435 libweston/spring-tool.c \
436 libweston/animation.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800437 shared/matrix.c \
438 shared/matrix.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300439 libweston/compositor.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800440
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800441if BUILD_CLIENTS
442
443bin_PROGRAMS += weston-terminal weston-info
444
445libexec_PROGRAMS += \
446 weston-desktop-shell \
447 weston-screenshooter \
448 weston-keyboard \
449 weston-simple-im
450
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900451if ENABLE_IVI_SHELL
452libexec_PROGRAMS += \
453 weston-ivi-shell-user-interface
454endif
455
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800456demo_clients = \
457 weston-flower \
458 weston-image \
459 weston-cliptest \
460 weston-dnd \
461 weston-smoke \
462 weston-resizor \
463 weston-eventdemo \
464 weston-clickdot \
Jonas Ådahl61831f42016-03-15 18:14:00 +0800465 weston-confine \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800466 weston-transformed \
467 weston-fullscreen \
468 weston-stacking \
469 weston-calibrator \
470 weston-scaler
471
472if INSTALL_DEMO_CLIENTS
473bin_PROGRAMS += $(demo_clients)
474else
475noinst_PROGRAMS += $(demo_clients)
476endif
477
478
479if BUILD_SIMPLE_CLIENTS
480demo_clients += \
481 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500482 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800483 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400484 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800485 weston-multi-resource
486
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800487weston_simple_shm_SOURCES = clients/simple-shm.c
488nodist_weston_simple_shm_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800489 protocol/xdg-shell-unstable-v5-protocol.c \
490 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800491 protocol/fullscreen-shell-unstable-v1-protocol.c \
492 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900493 protocol/ivi-application-protocol.c \
494 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800495weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800496weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800497
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500498weston_simple_damage_SOURCES = clients/simple-damage.c
499nodist_weston_simple_damage_SOURCES = \
Pekka Paalanen7b69d6c2016-04-15 17:00:21 +0300500 protocol/viewporter-protocol.c \
501 protocol/viewporter-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800502 protocol/xdg-shell-unstable-v5-protocol.c \
503 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800504 protocol/fullscreen-shell-unstable-v1-protocol.c \
505 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500506weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
507weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
508
Jon A. Cruzb09da242015-06-16 13:15:13 -0700509weston_simple_touch_SOURCES = \
510 clients/simple-touch.c \
511 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800512weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800513weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800514
Jon A. Cruzb09da242015-06-16 13:15:13 -0700515weston_presentation_shm_SOURCES = \
516 clients/presentation-shm.c \
517 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400518nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200519 protocol/presentation-time-protocol.c \
520 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400521weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300522weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400523
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800524weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800525weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300526weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800527endif
528
529if BUILD_SIMPLE_EGL_CLIENTS
530demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800531weston_simple_egl_SOURCES = clients/simple-egl.c
532nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800533 protocol/xdg-shell-unstable-v5-protocol.c \
534 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900535 protocol/ivi-application-protocol.c \
536 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800537weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800538weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
539endif
540
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000541if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
542demo_clients += weston-simple-dmabuf-intel
543weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
544nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800545 protocol/xdg-shell-unstable-v5-protocol.c \
546 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800547 protocol/fullscreen-shell-unstable-v1-protocol.c \
548 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800549 protocol/linux-dmabuf-unstable-v1-protocol.c \
550 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000551weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
552weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800553BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200554endif
555
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000556if BUILD_SIMPLE_DMABUF_V4L_CLIENT
557demo_clients += weston-simple-dmabuf-v4l
558weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
559nodist_weston_simple_dmabuf_v4l_SOURCES = \
560 protocol/xdg-shell-unstable-v5-protocol.c \
561 protocol/xdg-shell-unstable-v5-client-protocol.h \
562 protocol/fullscreen-shell-unstable-v1-protocol.c \
563 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
564 protocol/linux-dmabuf-unstable-v1-protocol.c \
565 protocol/linux-dmabuf-unstable-v1-client-protocol.h
566weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
567weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
568BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
569endif
570
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800571noinst_LTLIBRARIES += libtoytoolkit.la
572
573libtoytoolkit_la_SOURCES = \
574 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700575 clients/window.h \
576 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800577
578nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100579 protocol/text-cursor-position-protocol.c \
580 protocol/text-cursor-position-client-protocol.h \
Pekka Paalanen73511002016-04-15 16:53:41 +0300581 protocol/viewporter-protocol.c \
582 protocol/viewporter-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800583 protocol/xdg-shell-unstable-v5-protocol.c \
584 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900585 protocol/ivi-application-protocol.c \
Jonas Ådahle5a1bb42014-11-25 10:25:27 +0800586 protocol/ivi-application-client-protocol.h \
587 protocol/pointer-constraints-unstable-v1-protocol.c \
588 protocol/pointer-constraints-unstable-v1-client-protocol.h \
589 protocol/relative-pointer-unstable-v1-protocol.c \
590 protocol/relative-pointer-unstable-v1-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500591
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800592BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
593
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800594
595libtoytoolkit_la_LIBADD = \
596 $(CLIENT_LIBS) \
597 $(CAIRO_EGL_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300598 libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800599libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800600
601weston_flower_SOURCES = clients/flower.c
602weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800603weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800604
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100605weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800606 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800607nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800608 protocol/weston-screenshooter-protocol.c \
609 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800610weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800611weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800612
Jon A. Cruzb09da242015-06-16 13:15:13 -0700613weston_terminal_SOURCES = \
614 clients/terminal.c \
615 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800616weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800617weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800618
619weston_image_SOURCES = clients/image.c
620weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800621weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800622
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300623weston_cliptest_SOURCES = \
624 clients/cliptest.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300625 libweston/vertex-clipping.c \
626 libweston/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800627weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800628weston_cliptest_LDADD = libtoytoolkit.la
629
Jon A. Cruzb09da242015-06-16 13:15:13 -0700630weston_dnd_SOURCES = \
631 clients/dnd.c \
632 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800633weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800634weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800635
636weston_smoke_SOURCES = clients/smoke.c
637weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800638weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800639
640weston_resizor_SOURCES = clients/resizor.c
641weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800642weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800643
644weston_scaler_SOURCES = clients/scaler.c
645weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800646weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800647
648if HAVE_CAIRO_GLESV2
649demo_clients += weston-nested weston-nested-client
650
Jon A. Cruzb09da242015-06-16 13:15:13 -0700651weston_nested_SOURCES = \
652 clients/nested.c \
653 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800654weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800655weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800656
657weston_nested_client_SOURCES = clients/nested-client.c
658weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800659weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800660endif
661
Jon A. Cruzb09da242015-06-16 13:15:13 -0700662weston_eventdemo_SOURCES = \
663 clients/eventdemo.c \
664 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800665weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800666weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800667
Jon A. Cruzb09da242015-06-16 13:15:13 -0700668weston_clickdot_SOURCES = \
669 clients/clickdot.c \
670 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800671weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800672weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800673
Jonas Ådahl61831f42016-03-15 18:14:00 +0800674weston_confine_SOURCES = \
675 clients/confine.c \
676 shared/helpers.h
677weston_confine_LDADD = libtoytoolkit.la
678weston_confine_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
679
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800680weston_transformed_SOURCES = clients/transformed.c
681weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800682weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800683
684weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500685nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800686 protocol/fullscreen-shell-unstable-v1-protocol.c \
687 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800688weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800689weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800690
Jon A. Cruzb09da242015-06-16 13:15:13 -0700691weston_stacking_SOURCES = \
692 clients/stacking.c \
693 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800694weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800695weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800696
Jon A. Cruzb09da242015-06-16 13:15:13 -0700697weston_calibrator_SOURCES = \
698 clients/calibrator.c \
699 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800700 shared/matrix.c \
701 shared/matrix.h
702weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800703weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800704
705if BUILD_SUBSURFACES_CLIENT
706demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700707weston_subsurfaces_SOURCES = \
708 clients/subsurfaces.c \
709 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800710weston_subsurfaces_CFLAGS = \
711 $(AM_CFLAGS) \
712 $(SIMPLE_EGL_CLIENT_CFLAGS) \
713 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800714weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
715endif
716
717if HAVE_PANGO
718demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700719weston_editor_SOURCES = \
720 clients/editor.c \
721 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800722nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800723 protocol/text-input-unstable-v1-protocol.c \
724 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800725weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800726weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800727endif
728
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800729weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800730nodist_weston_keyboard_SOURCES = \
731 protocol/weston-desktop-shell-client-protocol.h \
732 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800733 protocol/input-method-unstable-v1-protocol.c \
734 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800735weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800736weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800737
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800738weston_simple_im_SOURCES = clients/weston-simple-im.c
739nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800740 protocol/input-method-unstable-v1-protocol.c \
741 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800742weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800743weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800744
Jon A. Cruzb09da242015-06-16 13:15:13 -0700745weston_info_SOURCES = \
746 clients/weston-info.c \
747 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400748nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200749 protocol/presentation-time-protocol.c \
750 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800751weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200752weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800753
Jon A. Cruzb09da242015-06-16 13:15:13 -0700754weston_desktop_shell_SOURCES = \
755 clients/desktop-shell.c \
756 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800757nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800758 protocol/weston-desktop-shell-client-protocol.h \
759 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800760weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800761weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800762
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900763if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700764weston_ivi_shell_user_interface_SOURCES = \
765 clients/ivi-shell-user-interface.c \
766 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900767nodist_weston_ivi_shell_user_interface_SOURCES = \
768 protocol/ivi-hmi-controller-client-protocol.h \
769 protocol/ivi-hmi-controller-protocol.c \
770 protocol/ivi-application-client-protocol.h \
771 protocol/ivi-application-protocol.c
772weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
773weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
774endif
775
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800776if BUILD_FULL_GL_CLIENTS
777demo_clients += weston-gears
778weston_gears_SOURCES = clients/gears.c
779weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800780weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800781endif
782
783endif
784
785BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800786 protocol/weston-screenshooter-protocol.c \
787 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100788 protocol/text-cursor-position-client-protocol.h \
789 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800790 protocol/text-input-unstable-v1-protocol.c \
791 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800792 protocol/input-method-unstable-v1-protocol.c \
793 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800794 protocol/weston-desktop-shell-client-protocol.h \
795 protocol/weston-desktop-shell-protocol.c \
Pekka Paalanen73511002016-04-15 16:53:41 +0300796 protocol/viewporter-client-protocol.h \
797 protocol/viewporter-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200798 protocol/presentation-time-protocol.c \
799 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800800 protocol/fullscreen-shell-unstable-v1-protocol.c \
801 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800802 protocol/xdg-shell-unstable-v5-protocol.c \
803 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900804 protocol/ivi-hmi-controller-protocol.c \
805 protocol/ivi-hmi-controller-client-protocol.h \
806 protocol/ivi-application-protocol.c \
807 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800808
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800809westondatadir = $(datadir)/weston
810dist_westondata_DATA = \
811 data/wayland.svg \
812 data/wayland.png \
813 data/pattern.png \
814 data/terminal.png \
815 data/border.png \
Bryce Harrington6bc52542016-03-24 17:57:39 -0700816 data/icon_editor.png \
817 data/icon_flower.png \
818 data/icon_terminal.png \
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800819 data/icon_window.png \
820 data/sign_close.png \
821 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100822 data/sign_minimize.png
823
824if ENABLE_IVI_SHELL
825dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900826 data/background.png \
827 data/tiling.png \
828 data/fullscreen.png \
829 data/panel.png \
830 data/random.png \
831 data/sidebyside.png \
832 data/home.png \
833 data/icon_ivi_clickdot.png \
834 data/icon_ivi_flower.png \
835 data/icon_ivi_simple-egl.png \
836 data/icon_ivi_simple-shm.png \
837 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100838endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800839
840
841if BUILD_WCAP_TOOLS
842bin_PROGRAMS += wcap-decode
843
844wcap_decode_SOURCES = \
845 wcap/main.c \
846 wcap/wcap-decode.c \
847 wcap/wcap-decode.h
848
Derek Foreman4ff38742015-06-18 11:43:11 -0500849wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800850wcap_decode_LDADD = $(WCAP_LIBS)
851endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800852
853
854if ENABLE_DESKTOP_SHELL
855
856module_LTLIBRARIES += desktop-shell.la
857
858desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100859 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800860 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300861 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100862 -I$(top_srcdir)/libweston \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800863 -I$(top_builddir)/desktop-shell \
864 -DDATADIR='"$(datadir)"' \
865 -DMODULEDIR='"$(moduledir)"' \
866 -DLIBEXECDIR='"$(libexecdir)"' \
867 -DIN_WESTON
868
869desktop_shell_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100870desktop_shell_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500871desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800872desktop_shell_la_SOURCES = \
873 desktop-shell/shell.h \
874 desktop-shell/shell.c \
875 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700876 desktop-shell/input-panel.c \
877 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800878nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800879 protocol/weston-desktop-shell-protocol.c \
880 protocol/weston-desktop-shell-server-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800881 protocol/xdg-shell-unstable-v5-protocol.c \
882 protocol/xdg-shell-unstable-v5-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800883
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800884BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800885endif
886
Jason Ekstrand946a9482014-04-02 19:53:47 -0500887if ENABLE_FULLSCREEN_SHELL
888
889module_LTLIBRARIES += fullscreen-shell.la
890
891fullscreen_shell_la_CPPFLAGS = \
892 -I$(top_builddir)/protocol \
893 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300894 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100895 -I$(top_srcdir)/libweston \
Jason Ekstrand946a9482014-04-02 19:53:47 -0500896 -DIN_WESTON
897
898fullscreen_shell_la_LDFLAGS = -module -avoid-version
899fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500900fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500901fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700902 fullscreen-shell/fullscreen-shell.c \
903 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500904nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800905 protocol/fullscreen-shell-unstable-v1-protocol.c \
906 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500907
908BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
909endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800910
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900911if ENABLE_IVI_SHELL
912
913module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900914 $(ivi_shell) \
915 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900916
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900917ivi_shell = ivi-shell.la
918ivi_shell_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100919ivi_shell_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500920ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900921ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900922 ivi-shell/ivi-layout-export.h \
923 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +0200924 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900925 ivi-shell/ivi-layout.c \
926 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900927 ivi-shell/ivi-shell.h \
928 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700929 ivi-shell/input-panel-ivi.c \
930 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900931nodist_ivi_shell_la_SOURCES = \
932 protocol/ivi-application-protocol.c \
933 protocol/ivi-application-server-protocol.h
934
935BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
936
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900937hmi_controller = hmi-controller.la
938hmi_controller_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100939hmi_controller_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500940hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900941hmi_controller_la_SOURCES = \
942 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700943 ivi-shell/hmi-controller.c \
944 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900945nodist_hmi_controller_la_SOURCES = \
946 protocol/ivi-hmi-controller-protocol.c \
947 protocol/ivi-hmi-controller-server-protocol.h
948
949BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
950
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900951endif
952
953
Jason Ekstrand47928d82014-04-02 19:54:01 -0500954if ENABLE_SCREEN_SHARING
955
956module_LTLIBRARIES += screen-share.la
957
958screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
959screen_share_la_LDFLAGS = -module -avoid-version
960screen_share_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +0100961 libshared-cairo.la \
Jason Ekstrand47928d82014-04-02 19:54:01 -0500962 $(COMPOSITOR_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +0100963 $(SCREEN_SHARE_LIBS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500964screen_share_la_CFLAGS = \
965 $(COMPOSITOR_CFLAGS) \
966 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500967 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500968screen_share_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300969 compositor/screen-share.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700970 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500971nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800972 protocol/fullscreen-shell-unstable-v1-protocol.c \
973 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500974
975endif
976
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800977if ENABLE_XWAYLAND
978
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200979libweston_module_LTLIBRARIES += xwayland.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800980
981xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100982 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800983 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300984 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100985 -I$(top_srcdir)/libweston \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800986 -I$(top_builddir)/xwayland \
987 -DDATADIR='"$(datadir)"' \
988 -DMODULEDIR='"$(moduledir)"' \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200989 -DLIBEXECDIR='"$(libexecdir)"'
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800990
991xwayland_la_LDFLAGS = -module -avoid-version
992xwayland_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +0100993 libshared-cairo.la \
994 $(XWAYLAND_LIBS)
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800995xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500996 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800997 $(COMPOSITOR_CFLAGS) \
998 $(PIXMAN_CFLAGS) \
999 $(CAIRO_CFLAGS)
1000xwayland_la_SOURCES = \
1001 xwayland/xwayland.h \
1002 xwayland/window-manager.c \
1003 xwayland/selection.c \
1004 xwayland/dnd.c \
1005 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001006 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001007 xwayland/hash.h \
1008 shared/helpers.h
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001009
1010libwestoninclude_HEADERS += xwayland/xwayland-api.h
1011
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001012endif
1013
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001014
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001015#
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001016# Shared utilities
1017#
1018
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001019noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1020 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001021
Derek Foreman4ff38742015-06-18 11:43:11 -05001022libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001023
1024libshared_la_SOURCES = \
1025 shared/config-parser.c \
1026 shared/option-parser.c \
1027 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001028 shared/file-util.c \
1029 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001030 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001031 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001032 shared/os-compatibility.h \
1033 shared/xalloc.c \
1034 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001035
1036libshared_cairo_la_CFLAGS = \
1037 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001038 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001039 $(COMPOSITOR_CFLAGS) \
1040 $(PIXMAN_CFLAGS) \
1041 $(CAIRO_CFLAGS) \
1042 $(PNG_CFLAGS) \
1043 $(WEBP_CFLAGS)
1044
1045libshared_cairo_la_LIBADD = \
1046 $(PIXMAN_LIBS) \
1047 $(CAIRO_LIBS) \
1048 $(PNG_LIBS) \
1049 $(WEBP_LIBS) \
1050 $(JPEG_LIBS)
1051
1052libshared_cairo_la_SOURCES = \
1053 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001054 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001055 shared/image-loader.c \
1056 shared/image-loader.h \
1057 shared/cairo-util.c \
1058 shared/frame.c \
1059 shared/cairo-util.h
1060
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001061libzunitc_la_SOURCES = \
1062 tools/zunitc/inc/zunitc/zunitc.h \
1063 tools/zunitc/inc/zunitc/zunitc_impl.h \
1064 tools/zunitc/src/zuc_base_logger.c \
1065 tools/zunitc/src/zuc_base_logger.h \
1066 tools/zunitc/src/zuc_collector.c \
1067 tools/zunitc/src/zuc_collector.h \
1068 tools/zunitc/src/zuc_context.h \
1069 tools/zunitc/src/zuc_event.h \
1070 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001071 tools/zunitc/src/zuc_junit_reporter.c \
1072 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001073 tools/zunitc/src/zuc_types.h \
1074 tools/zunitc/src/zunitc_impl.c \
1075 shared/helpers.h
1076
1077libzunitc_la_CFLAGS = \
1078 $(AM_CFLAGS) \
1079 -I$(top_srcdir)/tools/zunitc/inc
1080
1081libzunitc_la_LIBADD = \
Gustavo Zacarias57c83f62016-04-22 10:54:35 -03001082 libshared.la \
1083 $(CLOCK_GETTIME_LIBS)
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001084
Jon A. Cruz646aef52015-07-15 19:22:41 -07001085if ENABLE_JUNIT_XML
1086libzunitc_la_CFLAGS += \
1087 $(LIBXML2_CFLAGS)
1088libzunitc_la_LIBADD += \
1089 $(LIBXML2_LIBS)
1090endif
1091
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001092libzunitcmain_la_SOURCES = \
1093 tools/zunitc/src/main.c
1094
1095libzunitcmain_la_CFLAGS = \
1096 $(AM_CFLAGS) \
1097 -I$(top_srcdir)/tools/zunitc/inc
1098
1099libzunitcmain_la_LIBADD = \
1100 libzunitc.la \
1101 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001102
1103#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001104# tests subdirectory
1105#
1106
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001107TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1108
1109internal_tests = \
1110 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001111
1112shared_tests = \
1113 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001114 vertex-clip.test \
1115 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001116
1117module_tests = \
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001118 plugin-registry-test.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001119 surface-test.la \
1120 surface-global-test.la
1121
1122weston_tests = \
1123 bad_buffer.weston \
1124 keyboard.weston \
1125 event.weston \
1126 button.weston \
1127 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001128 presentation.weston \
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001129 viewporter.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001130 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001131 subsurface.weston \
1132 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001133
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001134ivi_tests =
1135
1136$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001137
1138AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001139 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1140 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001141
1142TEST_EXTENSIONS = .la .weston
1143LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1144WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1145
1146clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001147 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001148 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001149
1150# To remove when automake 1.11 support is dropped
1151export abs_builddir
1152
1153noinst_LTLIBRARIES += \
1154 weston-test.la \
1155 $(module_tests) \
1156 libtest-runner.la \
1157 libtest-client.la
1158
1159noinst_PROGRAMS += \
1160 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001161 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001162 $(shared_tests) \
1163 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001164 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001165 matrix-test
1166
1167test_module_ldflags = \
1168 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1169
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001170plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
1171plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1172plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1173
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001174surface_global_test_la_SOURCES = tests/surface-global-test.c
1175surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001176surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001177
1178surface_test_la_SOURCES = tests/surface-test.c
1179surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001180surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001181
Emil Velikov67351452016-07-22 14:52:42 +01001182weston_test_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001183weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001184weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001185weston_test_la_SOURCES = \
1186 tests/weston-test.c \
1187 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001188nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001189 protocol/weston-test-protocol.c \
1190 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001191
1192if ENABLE_EGL
1193weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1194weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1195endif
1196
1197libtest_runner_la_SOURCES = \
1198 tests/weston-test-runner.c \
1199 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001200libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001201
1202config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001203config_parser_test_LDADD = \
1204 libshared.la \
1205 $(COMPOSITOR_LIBS) \
1206 libzunitc.la \
1207 libzunitcmain.la
1208config_parser_test_CFLAGS = \
1209 $(AM_CFLAGS) \
1210 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001211
1212vertex_clip_test_SOURCES = \
1213 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001214 shared/helpers.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001215 libweston/vertex-clipping.c \
1216 libweston/vertex-clipping.h
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001217vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001218
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001219libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001220 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001221 tests/weston-test-client-helper.h
1222nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001223 protocol/weston-test-protocol.c \
1224 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001225libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +01001226libtest_client_la_LIBADD = libshared.la libtest-runner.la $(TEST_CLIENT_LIBS) $(CAIRO_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001227
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001228
1229#
1230# Internal tests - tests functionality of the testsuite itself
1231#
1232
1233internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001234internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1235internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001236
1237
1238#
1239# Weston Tests
1240#
1241
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001242bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001243bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001244bad_buffer_weston_LDADD = libtest-client.la
1245
1246keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001247keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001248keyboard_weston_LDADD = libtest-client.la
1249
1250event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001251event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001252event_weston_LDADD = libtest-client.la
1253
1254button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001255button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001256button_weston_LDADD = libtest-client.la
1257
Marek Chalupa5fd81402015-03-30 09:21:29 -04001258devices_weston_SOURCES = tests/devices-test.c
1259devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1260devices_weston_LDADD = libtest-client.la
1261
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001262text_weston_SOURCES = tests/text-test.c
1263nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001264 protocol/text-input-unstable-v1-protocol.c \
1265 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001266text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001267text_weston_LDADD = libtest-client.la
1268
1269subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001270subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001271subsurface_weston_LDADD = libtest-client.la
1272
Jon A. Cruzb09da242015-06-16 13:15:13 -07001273presentation_weston_SOURCES = \
1274 tests/presentation-test.c \
1275 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001276nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001277 protocol/presentation-time-protocol.c \
1278 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001279presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1280presentation_weston_LDADD = libtest-client.la
1281
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001282roles_weston_SOURCES = tests/roles-test.c
1283roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1284roles_weston_LDADD = libtest-client.la
1285
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001286viewporter_weston_SOURCES = \
1287 tests/viewporter-test.c \
1288 shared/helpers.h
1289nodist_viewporter_weston_SOURCES = \
1290 protocol/viewporter-protocol.c \
1291 protocol/viewporter-client-protocol.h
1292viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1293viewporter_weston_LDADD = libtest-client.la
1294
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001295if ENABLE_EGL
1296weston_tests += buffer-count.weston
1297buffer_count_weston_SOURCES = tests/buffer-count-test.c
Pekka Paalanen924cd942016-05-20 17:25:38 +03001298buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001299buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1300endif
1301
1302if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001303weston_tests += xwayland-test.weston
1304xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001305xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001306xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001307endif
1308
1309matrix_test_SOURCES = \
1310 tests/matrix-test.c \
1311 shared/matrix.c \
1312 shared/matrix.h
1313matrix_test_CPPFLAGS = -DUNIT_TEST
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001314matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001315
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001316if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001317module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001318 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001319 ivi-layout-test.la
1320
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001321ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1322ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001323ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001324ivi_layout_internal_test_la_SOURCES = \
1325 tests/ivi_layout-internal-test.c
1326
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001327ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1328ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001329ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001330ivi_layout_test_la_SOURCES = \
1331 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001332 tests/ivi-test.h \
1333 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001334nodist_ivi_layout_test_la_SOURCES = \
1335 protocol/weston-test-protocol.c \
1336 protocol/weston-test-server-protocol.h
1337
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001338ivi_tests += \
1339 ivi-shell-app.weston
1340
1341ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1342nodist_ivi_shell_app_weston_SOURCES = \
1343 protocol/ivi-application-protocol.c \
1344 protocol/ivi-application-client-protocol.h
1345ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1346ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001347
1348noinst_PROGRAMS += ivi-layout.ivi
1349
1350ivi_layout_ivi_SOURCES = \
1351 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001352 tests/ivi-test.h \
1353 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001354nodist_ivi_layout_ivi_SOURCES = \
1355 protocol/ivi-application-protocol.c \
1356 protocol/ivi-application-client-protocol.h
1357ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1358ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001359endif
1360
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001361if BUILD_SETBACKLIGHT
1362noinst_PROGRAMS += setbacklight
1363setbacklight_SOURCES = \
1364 tests/setbacklight.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001365 libweston/libbacklight.c \
1366 libweston/libbacklight.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001367setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1368setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1369endif
1370
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001371all-local: zuctest$(EXEEXT)
1372
1373noinst_PROGRAMS += zuctest$(EXEEXT)
1374
1375zuctest_LDADD = \
1376 libzunitc.la \
1377 libzunitcmain.la
1378
1379zuctest_CFLAGS = \
1380 $(AM_CFLAGS) \
1381 -I$(top_srcdir)/tools/zunitc/inc
1382
1383zuctest_SOURCES = \
1384 tools/zunitc/test/fixtures_test.c \
1385 tools/zunitc/test/zunitc_test.c
1386
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001387EXTRA_DIST += \
1388 tests/weston-tests-env \
1389 tests/internal-screenshot.ini \
1390 tests/reference/internal-screenshot-bad-00.png \
1391 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001392
1393BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001394 protocol/weston-test-protocol.c \
1395 protocol/weston-test-server-protocol.h \
1396 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001397 protocol/text-input-unstable-v1-protocol.c \
1398 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001399
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001400EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001401 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001402 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001403 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001404 protocol/weston-test.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001405 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001406 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001407
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001408#
1409# manual test modules in tests subdirectory
1410#
1411
1412noinst_LTLIBRARIES += \
1413 surface-screenshot.la
1414
Emil Velikov67351452016-07-22 14:52:42 +01001415surface_screenshot_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001416surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001417surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001418surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1419
1420
1421#
1422# Documentation
1423#
1424
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001425man_MANS = weston.1 weston.ini.5
1426
1427if ENABLE_DRM_COMPOSITOR
1428man_MANS += weston-drm.7
1429endif
1430
1431MAN_SUBSTS = \
1432 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1433 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1434 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1435 -e 's|__version__|$(PACKAGE_VERSION)|g'
1436
1437SUFFIXES = .1 .5 .7 .man
1438
1439%.1 %.5 %.7 : man/%.man
1440 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1441
1442EXTRA_DIST += \
1443 man/weston.man \
1444 man/weston-drm.man \
1445 man/weston.ini.man
1446
1447CLEANFILES += $(man_MANS)
1448
Jon A. Cruz179c1862015-07-15 19:22:43 -07001449if ENABLE_DEVDOCS
1450DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1451
1452docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1453 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1454
1455docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1456 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1457endif
1458
1459DOCDIRS = \
1460 docs/developer \
1461 docs/tools
1462
1463$(DOCDIRS):
1464 $(MKDIR_P) $@
1465
1466.PHONY: doc $(DOXYGEN_INDICES)
1467
1468doc: $(DOXYGEN_INDICES)
1469
Jonas Ådahl496adb32015-11-17 16:00:27 +08001470.SECONDEXPANSION:
1471
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001472define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001473$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001474endef
1475
1476define protoname
1477$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1478endef
1479
1480protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001481 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1482
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001483protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001484 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1485
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001486protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001487 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1488
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001489protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1490 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001491
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001492protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1493 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001494
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001495protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1496 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@