blob: 53f8f51d100abf80b5d633579ad23f990bd55d7d [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
Quentin Glidic154c5d22016-08-15 17:29:09 +020064# Libtool race fix
65# libweston-desktop depends on libweston, and desktop-shell depends on both.
66# This leads to a libtool race at installation, because libtool re-links
67# everything.
68# If you add more fixes, you may need a workaround to keep automake generated
69# targets. See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328
70install-libweston_moduleLTLIBRARIES install-moduleLTLIBRARIES: install-libLTLIBRARIES
71
Emil Velikov7fe47f32016-07-22 14:51:51 +010072lib_LTLIBRARIES = libweston-@LIBWESTON_MAJOR@.la
73libweston_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
74libweston_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
75libweston_@LIBWESTON_MAJOR@_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Giulio Camuffo8aedf7b2016-06-02 21:48:12 +030076 $(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) \
77 $(LIBINPUT_BACKEND_LIBS) libshared.la
Emil Velikov7fe47f32016-07-22 14:51:51 +010078libweston_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080079
Emil Velikov7fe47f32016-07-22 14:51:51 +010080libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +030081 libweston/git-version.h \
82 libweston/log.c \
83 libweston/compositor.c \
84 libweston/compositor.h \
85 libweston/compositor-drm.h \
86 libweston/compositor-fbdev.h \
87 libweston/compositor-headless.h \
88 libweston/compositor-rdp.h \
89 libweston/compositor-wayland.h \
90 libweston/compositor-x11.h \
91 libweston/input.c \
92 libweston/data-device.c \
93 libweston/screenshooter.c \
94 libweston/clipboard.c \
95 libweston/zoom.c \
96 libweston/bindings.c \
97 libweston/animation.c \
98 libweston/noop-renderer.c \
99 libweston/pixman-renderer.c \
100 libweston/pixman-renderer.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +0200101 libweston/plugin-registry.c \
102 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300103 libweston/timeline.c \
104 libweston/timeline.h \
105 libweston/timeline-object.h \
106 libweston/linux-dmabuf.c \
107 libweston/linux-dmabuf.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700108 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800109 shared/matrix.c \
110 shared/matrix.h \
Pekka Paalanenaa21f622015-07-03 15:44:50 +0300111 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800112 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100113 shared/platform.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300114 libweston/weston-egl-ext.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300115
Quentin Glidic248dd102016-08-12 10:41:34 +0200116lib_LTLIBRARIES += libweston-desktop-@LIBWESTON_MAJOR@.la
117libweston_desktop_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
118libweston_desktop_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
119libweston_desktop_@LIBWESTON_MAJOR@_la_LIBADD = libweston-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
120libweston_desktop_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
121
122libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \
123 libweston-desktop/client.c \
124 libweston-desktop/internal.h \
125 libweston-desktop/libweston-desktop.c \
126 libweston-desktop/libweston-desktop.h \
127 libweston-desktop/seat.c \
128 libweston-desktop/surface.c \
129 libweston-desktop/wl-shell.c \
Quentin Glidic9c5dd7e2016-08-12 10:41:37 +0200130 libweston-desktop/xdg-shell-v6.c \
Quentin Glidic248dd102016-08-12 10:41:34 +0200131 libweston-desktop/xdg-shell-v5.c \
132 libweston-desktop/xwayland.c
133
134nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \
Quentin Glidic9c5dd7e2016-08-12 10:41:37 +0200135 protocol/xdg-shell-unstable-v6-protocol.c \
136 protocol/xdg-shell-unstable-v6-server-protocol.h \
Quentin Glidic248dd102016-08-12 10:41:34 +0200137 protocol/xdg-shell-unstable-v5-protocol.c \
138 protocol/xdg-shell-unstable-v5-server-protocol.h
139
Jonas Ådahl5ac91a12016-08-15 17:31:02 +0800140BUILT_SOURCES += $(nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES)
141
Quentin Glidic9c5dd7e2016-08-12 10:41:37 +0200142libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v6.lo: protocol/xdg-shell-unstable-v6-server-protocol.h
Quentin Glidic248dd102016-08-12 10:41:34 +0200143libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v5.lo: protocol/xdg-shell-unstable-v5-server-protocol.h
144
Egor Starkov7ce2e972015-09-25 18:00:27 +0300145if SYSTEMD_NOTIFY_SUPPORT
146module_LTLIBRARIES += systemd-notify.la
147systemd_notify_la_LDFLAGS = -module -avoid-version
148systemd_notify_la_LIBADD = $(SYSTEMD_DAEMON_LIBS)
149systemd_notify_la_CFLAGS = \
Pekka Paalanenaff703e2016-04-05 14:08:11 +0300150 $(COMPOSITOR_CFLAGS) \
151 $(SYSTEMD_DAEMON_CFLAGS) \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300152 $(PIXMAN_CFLAGS) \
153 $(AM_CFLAGS)
154systemd_notify_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300155 compositor/systemd-notify.c \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300156 shared/helpers.h \
157 shared/zalloc.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300158 libweston/compositor.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300159endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800160
Emil Velikov7fe47f32016-07-22 14:51:51 +0100161nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800162 protocol/weston-screenshooter-protocol.c \
163 protocol/weston-screenshooter-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800164 protocol/text-cursor-position-protocol.c \
165 protocol/text-cursor-position-server-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800166 protocol/text-input-unstable-v1-protocol.c \
167 protocol/text-input-unstable-v1-server-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800168 protocol/input-method-unstable-v1-protocol.c \
169 protocol/input-method-unstable-v1-server-protocol.h \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200170 protocol/presentation-time-protocol.c \
171 protocol/presentation-time-server-protocol.h \
Pekka Paalanene95ad5c2016-04-15 14:47:08 +0300172 protocol/viewporter-protocol.c \
173 protocol/viewporter-server-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800174 protocol/linux-dmabuf-unstable-v1-protocol.c \
Jonas Ådahl30d61d82014-10-22 21:21:17 +0200175 protocol/linux-dmabuf-unstable-v1-server-protocol.h \
176 protocol/relative-pointer-unstable-v1-protocol.c \
Jonas Ådahld3414f22016-07-22 17:56:31 +0800177 protocol/relative-pointer-unstable-v1-server-protocol.h \
178 protocol/pointer-constraints-unstable-v1-protocol.c \
Bryce Harrington873a3f82016-08-30 12:05:01 -0700179 protocol/pointer-constraints-unstable-v1-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800180
Emil Velikov7fe47f32016-07-22 14:51:51 +0100181BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES)
Giulio Camuffo9e445982016-06-02 21:48:15 +0300182
183bin_PROGRAMS += weston
184
185weston_LDFLAGS = -export-dynamic
186weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200187 -DMODULEDIR='"$(moduledir)"' \
188 -DXSERVER_PATH='"@XSERVER_PATH@"'
Giulio Camuffo9e445982016-06-02 21:48:15 +0300189weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +0100190weston_LDADD = libshared.la libweston-@LIBWESTON_MAJOR@.la \
191 $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Giulio Camuffo9e445982016-06-02 21:48:15 +0300192 $(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \
Yann E. MORINb51e6ed2016-12-19 18:20:09 +0100193 $(CLOCK_GETRES_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +0100194 -lm
Giulio Camuffo9e445982016-06-02 21:48:15 +0300195
196weston_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300197 compositor/main.c \
198 compositor/weston-screenshooter.c \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200199 compositor/text-backend.c \
200 compositor/xwayland.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800201
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800202# Track this dependency explicitly instead of using BUILT_SOURCES. We
203# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
204# in case we're building from tarballs.
205
Emil Velikova8840242016-07-04 14:57:12 +0100206compositor/main.c : $(top_builddir)/libweston/git-version.h
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300207libweston/compositor.c : $(top_builddir)/libweston/git-version.h
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800208
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800209noinst_LTLIBRARIES += \
210 libsession-helper.la
211
212libsession_helper_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300213 libweston/launcher-util.c \
214 libweston/launcher-util.h \
215 libweston/launcher-impl.h \
216 libweston/weston-launch.h \
217 libweston/launcher-weston-launch.c \
218 libweston/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500219libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800220libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
221
222if ENABLE_DBUS
223if HAVE_SYSTEMD_LOGIN
224libsession_helper_la_SOURCES += \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300225 libweston/dbus.h \
226 libweston/dbus.c \
227 libweston/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800228libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
229libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
230endif
231endif
232
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800233if HAVE_GIT_REPO
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300234libweston/git-version.h : $(top_srcdir)/.git/logs/HEAD
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800235 $(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 -0800236else
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300237libweston/git-version.h :
Kristian Høgsberg1d2dd072014-02-03 10:55:51 -0800238 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
239
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800240endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800241
242.FORCE :
243
244if BUILD_WESTON_LAUNCH
245bin_PROGRAMS += weston-launch
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300246weston_launch_SOURCES = libweston/weston-launch.c libweston/weston-launch.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800247weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
248weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500249 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800250 $(PAM_CFLAGS) \
251 $(SYSTEMD_LOGIN_CFLAGS) \
252 $(LIBDRM_CFLAGS)
253weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
254
255if ENABLE_SETUID_INSTALL
256install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700257 can_suid_files=no; \
258 chown root $(DESTDIR)$(bindir)/weston-launch \
259 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
260 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500261 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700262 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
263 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
264 false; \
265 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800266endif
267
268endif # BUILD_WESTON_LAUNCH
269
270pkgconfigdir = $(libdir)/pkgconfig
Quentin Glidic248dd102016-08-12 10:41:34 +0200271pkgconfig_DATA = \
272 libweston/libweston-${LIBWESTON_MAJOR}.pc \
273 libweston-desktop/libweston-desktop-${LIBWESTON_MAJOR}.pc \
274 compositor/weston.pc
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800275
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100276wayland_sessiondir = $(datadir)/wayland-sessions
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300277dist_wayland_session_DATA = compositor/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100278
Emil Velikov7fe47f32016-07-22 14:51:51 +0100279libwestonincludedir = $(includedir)/libweston-${LIBWESTON_MAJOR}
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300280libwestoninclude_HEADERS = \
281 libweston/version.h \
282 libweston/compositor.h \
283 libweston/compositor-drm.h \
284 libweston/compositor-fbdev.h \
285 libweston/compositor-headless.h \
286 libweston/compositor-rdp.h \
287 libweston/compositor-wayland.h \
288 libweston/compositor-x11.h \
Armin Krezović4690c562016-09-30 14:11:03 +0200289 libweston/windowed-output-api.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +0200290 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300291 libweston/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800292 shared/matrix.h \
293 shared/config-parser.h \
Emil Velikovcbcf5452016-07-04 15:34:17 +0100294 shared/zalloc.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800295
Quentin Glidic248dd102016-08-12 10:41:34 +0200296libwestoninclude_HEADERS += \
297 libweston-desktop/libweston-desktop.h
298
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300299westonincludedir = $(includedir)/weston
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300300westoninclude_HEADERS = compositor/weston.h
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300301
Ucan, Emre \(ADITG/SW1\)ae2541d2015-10-15 14:51:43 +0000302if ENABLE_IVI_SHELL
303westoninclude_HEADERS += \
304 ivi-shell/ivi-layout-export.h
305endif
306
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800307if ENABLE_EGL
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300308libweston_module_LTLIBRARIES += gl-renderer.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800309gl_renderer_la_LDFLAGS = -module -avoid-version
310gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
311gl_renderer_la_CFLAGS = \
312 $(COMPOSITOR_CFLAGS) \
313 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300314 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500315 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800316gl_renderer_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300317 libweston/gl-renderer.h \
318 libweston/gl-renderer.c \
319 libweston/vertex-clipping.c \
320 libweston/vertex-clipping.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700321 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800322endif
323
324if ENABLE_X11_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300325libweston_module_LTLIBRARIES += x11-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800326x11_backend_la_LDFLAGS = -module -avoid-version
327x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800328 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800329x11_backend_la_CFLAGS = \
330 $(COMPOSITOR_CFLAGS) \
331 $(EGL_CFLAGS) \
332 $(PIXMAN_CFLAGS) \
333 $(CAIRO_CFLAGS) \
334 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500335 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700336x11_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300337 libweston/compositor-x11.c \
338 libweston/compositor-x11.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700339 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800340endif
341
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100342INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000343INPUT_BACKEND_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300344 libweston/libinput-seat.c \
345 libweston/libinput-seat.h \
346 libweston/libinput-device.c \
347 libweston/libinput-device.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700348 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100349
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800350if ENABLE_DRM_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300351libweston_module_LTLIBRARIES += drm-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800352drm_backend_la_LDFLAGS = -module -avoid-version
353drm_backend_la_LIBADD = \
354 $(COMPOSITOR_LIBS) \
355 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100356 $(INPUT_BACKEND_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300357 libshared.la \
358 $(CLOCK_GETTIME_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800359 libsession-helper.la
360drm_backend_la_CFLAGS = \
361 $(COMPOSITOR_CFLAGS) \
362 $(EGL_CFLAGS) \
363 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500364 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800365drm_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300366 libweston/compositor-drm.c \
367 libweston/compositor-drm.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100368 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700369 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200370 shared/timespec-util.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300371 libweston/libbacklight.c \
372 libweston/libbacklight.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800373
374if ENABLE_VAAPI_RECORDER
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300375drm_backend_la_SOURCES += libweston/vaapi-recorder.c libweston/vaapi-recorder.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800376drm_backend_la_LIBADD += $(LIBVA_LIBS)
377drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
378endif
379endif
380
381if ENABLE_WAYLAND_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300382libweston_module_LTLIBRARIES += wayland-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800383wayland_backend_la_LDFLAGS = -module -avoid-version
384wayland_backend_la_LIBADD = \
385 $(COMPOSITOR_LIBS) \
386 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800387 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800388wayland_backend_la_CFLAGS = \
389 $(COMPOSITOR_CFLAGS) \
390 $(EGL_CFLAGS) \
391 $(PIXMAN_CFLAGS) \
392 $(CAIRO_CFLAGS) \
393 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500394 $(AM_CFLAGS)
Armin Krezović34476192016-11-21 18:42:42 +0100395wayland_backend_la_SOURCES = \
396 libweston/compositor-wayland.c \
397 libweston/compositor-wayland.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700398 shared/helpers.h
Pekka Paalanen9f3d95e2016-11-23 11:46:57 +0200399nodist_wayland_backend_la_SOURCES = \
400 protocol/fullscreen-shell-unstable-v1-protocol.c \
401 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
402 protocol/xdg-shell-unstable-v6-protocol.c \
403 protocol/xdg-shell-unstable-v6-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800404endif
405
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800406if ENABLE_HEADLESS_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300407libweston_module_LTLIBRARIES += headless-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800408headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800409headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500410headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700411headless_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300412 libweston/compositor-headless.c \
413 libweston/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700414 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800415endif
416
417if ENABLE_FBDEV_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300418libweston_module_LTLIBRARIES += fbdev-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800419fbdev_backend_la_LDFLAGS = -module -avoid-version
420fbdev_backend_la_LIBADD = \
421 $(COMPOSITOR_LIBS) \
422 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100423 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800424 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800425 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800426fbdev_backend_la_CFLAGS = \
427 $(COMPOSITOR_CFLAGS) \
428 $(EGL_CFLAGS) \
429 $(FBDEV_COMPOSITOR_CFLAGS) \
430 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500431 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800432fbdev_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300433 libweston/compositor-fbdev.c \
434 libweston/compositor-fbdev.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700435 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100436 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800437endif
438
439if ENABLE_RDP_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300440libweston_module_LTLIBRARIES += rdp-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800441rdp_backend_la_LDFLAGS = -module -avoid-version
442rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
443 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800444 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800445rdp_backend_la_CFLAGS = \
446 $(COMPOSITOR_CFLAGS) \
447 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500448 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700449rdp_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300450 libweston/compositor-rdp.c \
451 libweston/compositor-rdp.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700452 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800453endif
454
455if HAVE_LCMS
456module_LTLIBRARIES += cms-static.la
457cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800458cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500459cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800460cms_static_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300461 compositor/cms-static.c \
462 compositor/cms-helper.c \
463 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700464 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800465if ENABLE_COLORD
466module_LTLIBRARIES += cms-colord.la
467cms_colord_la_LDFLAGS = -module -avoid-version
468cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500469cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800470cms_colord_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300471 compositor/cms-colord.c \
472 compositor/cms-helper.c \
473 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700474 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800475endif
476endif
477
478noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500479spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800480spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
481spring_tool_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300482 libweston/spring-tool.c \
483 libweston/animation.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800484 shared/matrix.c \
485 shared/matrix.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300486 libweston/compositor.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800487
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800488if BUILD_CLIENTS
489
490bin_PROGRAMS += weston-terminal weston-info
491
492libexec_PROGRAMS += \
493 weston-desktop-shell \
494 weston-screenshooter \
495 weston-keyboard \
496 weston-simple-im
497
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900498if ENABLE_IVI_SHELL
499libexec_PROGRAMS += \
500 weston-ivi-shell-user-interface
501endif
502
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800503demo_clients = \
504 weston-flower \
505 weston-image \
506 weston-cliptest \
507 weston-dnd \
508 weston-smoke \
509 weston-resizor \
510 weston-eventdemo \
511 weston-clickdot \
Jonas Ådahl61831f42016-03-15 18:14:00 +0800512 weston-confine \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800513 weston-transformed \
514 weston-fullscreen \
515 weston-stacking \
516 weston-calibrator \
517 weston-scaler
518
519if INSTALL_DEMO_CLIENTS
520bin_PROGRAMS += $(demo_clients)
521else
522noinst_PROGRAMS += $(demo_clients)
523endif
524
525
526if BUILD_SIMPLE_CLIENTS
527demo_clients += \
528 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500529 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800530 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400531 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800532 weston-multi-resource
533
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800534weston_simple_shm_SOURCES = clients/simple-shm.c
535nodist_weston_simple_shm_SOURCES = \
Jonas Ådahle023cbc2016-08-11 23:29:38 +0800536 protocol/xdg-shell-unstable-v6-protocol.c \
537 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800538 protocol/fullscreen-shell-unstable-v1-protocol.c \
539 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900540 protocol/ivi-application-protocol.c \
541 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800542weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800543weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800544
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500545weston_simple_damage_SOURCES = clients/simple-damage.c
546nodist_weston_simple_damage_SOURCES = \
Pekka Paalanen7b69d6c2016-04-15 17:00:21 +0300547 protocol/viewporter-protocol.c \
548 protocol/viewporter-client-protocol.h \
Jonas Ådahla74eff92016-08-11 23:39:31 +0800549 protocol/xdg-shell-unstable-v6-protocol.c \
550 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800551 protocol/fullscreen-shell-unstable-v1-protocol.c \
552 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500553weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
554weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
555
Jon A. Cruzb09da242015-06-16 13:15:13 -0700556weston_simple_touch_SOURCES = \
557 clients/simple-touch.c \
558 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800559weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800560weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800561
Jon A. Cruzb09da242015-06-16 13:15:13 -0700562weston_presentation_shm_SOURCES = \
563 clients/presentation-shm.c \
564 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400565nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200566 protocol/presentation-time-protocol.c \
567 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400568weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300569weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400570
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800571weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800572weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300573weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800574endif
575
576if BUILD_SIMPLE_EGL_CLIENTS
577demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800578weston_simple_egl_SOURCES = clients/simple-egl.c
579nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl83630022016-08-11 23:13:20 +0800580 protocol/xdg-shell-unstable-v6-protocol.c \
581 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900582 protocol/ivi-application-protocol.c \
583 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800584weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800585weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
586endif
587
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000588if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
589demo_clients += weston-simple-dmabuf-intel
590weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
591nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl42682622016-08-11 23:44:41 +0800592 protocol/xdg-shell-unstable-v6-protocol.c \
593 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800594 protocol/fullscreen-shell-unstable-v1-protocol.c \
595 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800596 protocol/linux-dmabuf-unstable-v1-protocol.c \
597 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000598weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
599weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800600BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200601endif
602
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000603if BUILD_SIMPLE_DMABUF_V4L_CLIENT
604demo_clients += weston-simple-dmabuf-v4l
605weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
606nodist_weston_simple_dmabuf_v4l_SOURCES = \
Jonas Ådahl6ccd2862016-08-12 10:01:29 +0800607 protocol/xdg-shell-unstable-v6-protocol.c \
608 protocol/xdg-shell-unstable-v6-client-protocol.h \
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000609 protocol/fullscreen-shell-unstable-v1-protocol.c \
610 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
611 protocol/linux-dmabuf-unstable-v1-protocol.c \
612 protocol/linux-dmabuf-unstable-v1-client-protocol.h
613weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
614weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
615BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
616endif
617
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800618noinst_LTLIBRARIES += libtoytoolkit.la
619
620libtoytoolkit_la_SOURCES = \
621 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700622 clients/window.h \
623 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800624
625nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100626 protocol/text-cursor-position-protocol.c \
627 protocol/text-cursor-position-client-protocol.h \
Pekka Paalanen73511002016-04-15 16:53:41 +0300628 protocol/viewporter-protocol.c \
629 protocol/viewporter-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800630 protocol/xdg-shell-unstable-v6-protocol.c \
631 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900632 protocol/ivi-application-protocol.c \
Jonas Ådahle5a1bb42014-11-25 10:25:27 +0800633 protocol/ivi-application-client-protocol.h \
634 protocol/pointer-constraints-unstable-v1-protocol.c \
635 protocol/pointer-constraints-unstable-v1-client-protocol.h \
636 protocol/relative-pointer-unstable-v1-protocol.c \
637 protocol/relative-pointer-unstable-v1-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500638
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800639BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
640
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800641
642libtoytoolkit_la_LIBADD = \
643 $(CLIENT_LIBS) \
644 $(CAIRO_EGL_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300645 libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800646libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800647
648weston_flower_SOURCES = clients/flower.c
649weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800650weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800651
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100652weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800653 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800654nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800655 protocol/weston-screenshooter-protocol.c \
656 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800657weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800658weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800659
Jon A. Cruzb09da242015-06-16 13:15:13 -0700660weston_terminal_SOURCES = \
661 clients/terminal.c \
662 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800663weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800664weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800665
666weston_image_SOURCES = clients/image.c
667weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800668weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800669
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300670weston_cliptest_SOURCES = \
671 clients/cliptest.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300672 libweston/vertex-clipping.c \
673 libweston/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800674weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800675weston_cliptest_LDADD = libtoytoolkit.la
676
Jon A. Cruzb09da242015-06-16 13:15:13 -0700677weston_dnd_SOURCES = \
678 clients/dnd.c \
679 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800680weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800681weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800682
683weston_smoke_SOURCES = clients/smoke.c
684weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800685weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800686
687weston_resizor_SOURCES = clients/resizor.c
688weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800689weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800690
691weston_scaler_SOURCES = clients/scaler.c
692weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800693weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800694
695if HAVE_CAIRO_GLESV2
696demo_clients += weston-nested weston-nested-client
697
Jon A. Cruzb09da242015-06-16 13:15:13 -0700698weston_nested_SOURCES = \
699 clients/nested.c \
700 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800701weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800702weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800703
704weston_nested_client_SOURCES = clients/nested-client.c
705weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800706weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800707endif
708
Jon A. Cruzb09da242015-06-16 13:15:13 -0700709weston_eventdemo_SOURCES = \
710 clients/eventdemo.c \
711 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800712weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800713weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800714
Jon A. Cruzb09da242015-06-16 13:15:13 -0700715weston_clickdot_SOURCES = \
716 clients/clickdot.c \
717 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800718weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800719weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800720
Jonas Ådahl61831f42016-03-15 18:14:00 +0800721weston_confine_SOURCES = \
722 clients/confine.c \
723 shared/helpers.h
724weston_confine_LDADD = libtoytoolkit.la
725weston_confine_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
726
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800727weston_transformed_SOURCES = clients/transformed.c
728weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800729weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800730
731weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500732nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800733 protocol/fullscreen-shell-unstable-v1-protocol.c \
734 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800735weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800736weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800737
Jon A. Cruzb09da242015-06-16 13:15:13 -0700738weston_stacking_SOURCES = \
739 clients/stacking.c \
740 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800741weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800742weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800743
Jon A. Cruzb09da242015-06-16 13:15:13 -0700744weston_calibrator_SOURCES = \
745 clients/calibrator.c \
746 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800747 shared/matrix.c \
748 shared/matrix.h
749weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800750weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800751
752if BUILD_SUBSURFACES_CLIENT
753demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700754weston_subsurfaces_SOURCES = \
755 clients/subsurfaces.c \
756 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800757weston_subsurfaces_CFLAGS = \
758 $(AM_CFLAGS) \
759 $(SIMPLE_EGL_CLIENT_CFLAGS) \
760 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800761weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
762endif
763
764if HAVE_PANGO
765demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700766weston_editor_SOURCES = \
767 clients/editor.c \
768 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800769nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800770 protocol/text-input-unstable-v1-protocol.c \
771 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800772weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800773weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800774endif
775
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800776weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800777nodist_weston_keyboard_SOURCES = \
778 protocol/weston-desktop-shell-client-protocol.h \
779 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800780 protocol/input-method-unstable-v1-protocol.c \
781 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800782weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800783weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800784
Bryce Harringtonc6a899d2016-10-11 16:24:05 -0700785weston_simple_im_SOURCES = clients/simple-im.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800786nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800787 protocol/input-method-unstable-v1-protocol.c \
788 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800789weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800790weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800791
Jon A. Cruzb09da242015-06-16 13:15:13 -0700792weston_info_SOURCES = \
793 clients/weston-info.c \
794 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400795nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200796 protocol/presentation-time-protocol.c \
797 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800798weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200799weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800800
Jon A. Cruzb09da242015-06-16 13:15:13 -0700801weston_desktop_shell_SOURCES = \
802 clients/desktop-shell.c \
803 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800804nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800805 protocol/weston-desktop-shell-client-protocol.h \
806 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800807weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800808weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800809
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900810if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700811weston_ivi_shell_user_interface_SOURCES = \
812 clients/ivi-shell-user-interface.c \
813 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900814nodist_weston_ivi_shell_user_interface_SOURCES = \
815 protocol/ivi-hmi-controller-client-protocol.h \
816 protocol/ivi-hmi-controller-protocol.c \
817 protocol/ivi-application-client-protocol.h \
818 protocol/ivi-application-protocol.c
819weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
820weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
821endif
822
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800823if BUILD_FULL_GL_CLIENTS
824demo_clients += weston-gears
825weston_gears_SOURCES = clients/gears.c
826weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800827weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800828endif
829
830endif
831
832BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800833 protocol/weston-screenshooter-protocol.c \
834 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100835 protocol/text-cursor-position-client-protocol.h \
836 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800837 protocol/text-input-unstable-v1-protocol.c \
838 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800839 protocol/input-method-unstable-v1-protocol.c \
840 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800841 protocol/weston-desktop-shell-client-protocol.h \
842 protocol/weston-desktop-shell-protocol.c \
Pekka Paalanen73511002016-04-15 16:53:41 +0300843 protocol/viewporter-client-protocol.h \
844 protocol/viewporter-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200845 protocol/presentation-time-protocol.c \
846 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800847 protocol/fullscreen-shell-unstable-v1-protocol.c \
848 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800849 protocol/xdg-shell-unstable-v6-protocol.c \
850 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900851 protocol/ivi-hmi-controller-protocol.c \
852 protocol/ivi-hmi-controller-client-protocol.h \
853 protocol/ivi-application-protocol.c \
Bryce Harrington6303d3b2016-08-30 12:04:05 -0700854 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800855
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800856westondatadir = $(datadir)/weston
857dist_westondata_DATA = \
858 data/wayland.svg \
859 data/wayland.png \
860 data/pattern.png \
861 data/terminal.png \
862 data/border.png \
Bryce Harrington6bc52542016-03-24 17:57:39 -0700863 data/icon_editor.png \
864 data/icon_flower.png \
865 data/icon_terminal.png \
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800866 data/icon_window.png \
867 data/sign_close.png \
868 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100869 data/sign_minimize.png
870
871if ENABLE_IVI_SHELL
872dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900873 data/background.png \
874 data/tiling.png \
875 data/fullscreen.png \
876 data/panel.png \
877 data/random.png \
878 data/sidebyside.png \
879 data/home.png \
880 data/icon_ivi_clickdot.png \
881 data/icon_ivi_flower.png \
882 data/icon_ivi_simple-egl.png \
883 data/icon_ivi_simple-shm.png \
884 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100885endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800886
887
888if BUILD_WCAP_TOOLS
889bin_PROGRAMS += wcap-decode
890
891wcap_decode_SOURCES = \
892 wcap/main.c \
893 wcap/wcap-decode.c \
894 wcap/wcap-decode.h
895
Derek Foreman4ff38742015-06-18 11:43:11 -0500896wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800897wcap_decode_LDADD = $(WCAP_LIBS)
898endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800899
900
901if ENABLE_DESKTOP_SHELL
902
903module_LTLIBRARIES += desktop-shell.la
904
905desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100906 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800907 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300908 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100909 -I$(top_srcdir)/libweston \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800910 -I$(top_builddir)/desktop-shell \
911 -DDATADIR='"$(datadir)"' \
912 -DMODULEDIR='"$(moduledir)"' \
913 -DLIBEXECDIR='"$(libexecdir)"' \
914 -DIN_WESTON
915
916desktop_shell_la_LDFLAGS = -module -avoid-version
Quentin Glidic8f9d90a2016-08-12 10:41:36 +0200917desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500918desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800919desktop_shell_la_SOURCES = \
920 desktop-shell/shell.h \
921 desktop-shell/shell.c \
922 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700923 desktop-shell/input-panel.c \
924 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800925nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800926 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahl5ac91a12016-08-15 17:31:02 +0800927 protocol/weston-desktop-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800928
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800929BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800930endif
931
Jason Ekstrand946a9482014-04-02 19:53:47 -0500932if ENABLE_FULLSCREEN_SHELL
933
934module_LTLIBRARIES += fullscreen-shell.la
935
936fullscreen_shell_la_CPPFLAGS = \
937 -I$(top_builddir)/protocol \
938 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300939 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100940 -I$(top_srcdir)/libweston \
Jason Ekstrand946a9482014-04-02 19:53:47 -0500941 -DIN_WESTON
942
943fullscreen_shell_la_LDFLAGS = -module -avoid-version
944fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500945fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500946fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700947 fullscreen-shell/fullscreen-shell.c \
948 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500949nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800950 protocol/fullscreen-shell-unstable-v1-protocol.c \
951 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500952
953BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
954endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800955
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900956if ENABLE_IVI_SHELL
957
958module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900959 $(ivi_shell) \
960 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900961
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900962ivi_shell = ivi-shell.la
963ivi_shell_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100964ivi_shell_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500965ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900966ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900967 ivi-shell/ivi-layout-export.h \
968 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +0200969 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900970 ivi-shell/ivi-layout.c \
971 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900972 ivi-shell/ivi-shell.h \
973 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700974 ivi-shell/input-panel-ivi.c \
975 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900976nodist_ivi_shell_la_SOURCES = \
977 protocol/ivi-application-protocol.c \
978 protocol/ivi-application-server-protocol.h
979
980BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
981
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900982hmi_controller = hmi-controller.la
983hmi_controller_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100984hmi_controller_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500985hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900986hmi_controller_la_SOURCES = \
987 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700988 ivi-shell/hmi-controller.c \
989 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900990nodist_hmi_controller_la_SOURCES = \
991 protocol/ivi-hmi-controller-protocol.c \
992 protocol/ivi-hmi-controller-server-protocol.h
993
994BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
995
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900996endif
997
998
Jason Ekstrand47928d82014-04-02 19:54:01 -0500999if ENABLE_SCREEN_SHARING
1000
1001module_LTLIBRARIES += screen-share.la
1002
1003screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
1004screen_share_la_LDFLAGS = -module -avoid-version
1005screen_share_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001006 libshared-cairo.la \
Jason Ekstrand47928d82014-04-02 19:54:01 -05001007 $(COMPOSITOR_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +01001008 $(SCREEN_SHARE_LIBS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001009screen_share_la_CFLAGS = \
1010 $(COMPOSITOR_CFLAGS) \
1011 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -05001012 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001013screen_share_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +03001014 compositor/screen-share.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001015 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001016nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +08001017 protocol/fullscreen-shell-unstable-v1-protocol.c \
1018 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001019
1020endif
1021
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001022if ENABLE_XWAYLAND
1023
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001024libweston_module_LTLIBRARIES += xwayland.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001025
1026xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001027 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001028 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001029 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +01001030 -I$(top_srcdir)/libweston \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001031 -I$(top_builddir)/xwayland \
1032 -DDATADIR='"$(datadir)"' \
1033 -DMODULEDIR='"$(moduledir)"' \
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001034 -DLIBEXECDIR='"$(libexecdir)"'
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001035
1036xwayland_la_LDFLAGS = -module -avoid-version
1037xwayland_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001038 libshared-cairo.la \
1039 $(XWAYLAND_LIBS)
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001040xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -05001041 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001042 $(COMPOSITOR_CFLAGS) \
1043 $(PIXMAN_CFLAGS) \
1044 $(CAIRO_CFLAGS)
1045xwayland_la_SOURCES = \
1046 xwayland/xwayland.h \
Quentin Glidic955cec02016-08-12 10:41:35 +02001047 xwayland/xwayland-internal-interface.h \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001048 xwayland/window-manager.c \
1049 xwayland/selection.c \
1050 xwayland/dnd.c \
1051 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001052 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001053 xwayland/hash.h \
1054 shared/helpers.h
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001055
1056libwestoninclude_HEADERS += xwayland/xwayland-api.h
1057
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001058endif
1059
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001060
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001061#
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001062# Shared utilities
1063#
1064
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001065noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1066 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001067
Derek Foreman4ff38742015-06-18 11:43:11 -05001068libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001069
1070libshared_la_SOURCES = \
1071 shared/config-parser.c \
1072 shared/option-parser.c \
1073 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001074 shared/file-util.c \
1075 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001076 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001077 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001078 shared/os-compatibility.h \
1079 shared/xalloc.c \
1080 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001081
1082libshared_cairo_la_CFLAGS = \
1083 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001084 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001085 $(COMPOSITOR_CFLAGS) \
1086 $(PIXMAN_CFLAGS) \
1087 $(CAIRO_CFLAGS) \
1088 $(PNG_CFLAGS) \
1089 $(WEBP_CFLAGS)
1090
1091libshared_cairo_la_LIBADD = \
1092 $(PIXMAN_LIBS) \
1093 $(CAIRO_LIBS) \
1094 $(PNG_LIBS) \
1095 $(WEBP_LIBS) \
1096 $(JPEG_LIBS)
1097
1098libshared_cairo_la_SOURCES = \
1099 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001100 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001101 shared/image-loader.c \
1102 shared/image-loader.h \
1103 shared/cairo-util.c \
1104 shared/frame.c \
1105 shared/cairo-util.h
1106
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001107libzunitc_la_SOURCES = \
1108 tools/zunitc/inc/zunitc/zunitc.h \
1109 tools/zunitc/inc/zunitc/zunitc_impl.h \
1110 tools/zunitc/src/zuc_base_logger.c \
1111 tools/zunitc/src/zuc_base_logger.h \
1112 tools/zunitc/src/zuc_collector.c \
1113 tools/zunitc/src/zuc_collector.h \
1114 tools/zunitc/src/zuc_context.h \
1115 tools/zunitc/src/zuc_event.h \
1116 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001117 tools/zunitc/src/zuc_junit_reporter.c \
1118 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001119 tools/zunitc/src/zuc_types.h \
1120 tools/zunitc/src/zunitc_impl.c \
1121 shared/helpers.h
1122
1123libzunitc_la_CFLAGS = \
1124 $(AM_CFLAGS) \
1125 -I$(top_srcdir)/tools/zunitc/inc
1126
1127libzunitc_la_LIBADD = \
Gustavo Zacarias57c83f62016-04-22 10:54:35 -03001128 libshared.la \
1129 $(CLOCK_GETTIME_LIBS)
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001130
Jon A. Cruz646aef52015-07-15 19:22:41 -07001131if ENABLE_JUNIT_XML
1132libzunitc_la_CFLAGS += \
1133 $(LIBXML2_CFLAGS)
1134libzunitc_la_LIBADD += \
1135 $(LIBXML2_LIBS)
1136endif
1137
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001138libzunitcmain_la_SOURCES = \
1139 tools/zunitc/src/main.c
1140
1141libzunitcmain_la_CFLAGS = \
1142 $(AM_CFLAGS) \
1143 -I$(top_srcdir)/tools/zunitc/inc
1144
1145libzunitcmain_la_LIBADD = \
1146 libzunitc.la \
1147 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001148
1149#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001150# tests subdirectory
1151#
1152
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001153TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1154
1155internal_tests = \
1156 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001157
1158shared_tests = \
1159 config-parser.test \
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001160 string.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001161 vertex-clip.test \
1162 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001163
1164module_tests = \
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001165 plugin-registry-test.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001166 surface-test.la \
1167 surface-global-test.la
1168
1169weston_tests = \
1170 bad_buffer.weston \
1171 keyboard.weston \
1172 event.weston \
1173 button.weston \
1174 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001175 presentation.weston \
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001176 viewporter.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001177 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001178 subsurface.weston \
1179 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001180
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001181ivi_tests =
1182
1183$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001184
1185AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001186 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1187 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001188
1189TEST_EXTENSIONS = .la .weston
1190LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1191WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1192
1193clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001194 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001195 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001196
1197# To remove when automake 1.11 support is dropped
1198export abs_builddir
1199
1200noinst_LTLIBRARIES += \
1201 weston-test.la \
1202 $(module_tests) \
1203 libtest-runner.la \
1204 libtest-client.la
1205
1206noinst_PROGRAMS += \
1207 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001208 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001209 $(shared_tests) \
1210 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001211 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001212 matrix-test
1213
1214test_module_ldflags = \
1215 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1216
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001217plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
1218plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1219plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1220
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001221surface_global_test_la_SOURCES = tests/surface-global-test.c
1222surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001223surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001224
1225surface_test_la_SOURCES = tests/surface-test.c
1226surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001227surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001228
Emil Velikov67351452016-07-22 14:52:42 +01001229weston_test_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001230weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001231weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001232weston_test_la_SOURCES = \
1233 tests/weston-test.c \
1234 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001235nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001236 protocol/weston-test-protocol.c \
1237 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001238
1239if ENABLE_EGL
1240weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1241weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1242endif
1243
1244libtest_runner_la_SOURCES = \
1245 tests/weston-test-runner.c \
1246 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001247libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001248
1249config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001250config_parser_test_LDADD = \
1251 libshared.la \
1252 $(COMPOSITOR_LIBS) \
1253 libzunitc.la \
1254 libzunitcmain.la
1255config_parser_test_CFLAGS = \
1256 $(AM_CFLAGS) \
1257 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001258
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001259string_test_SOURCES = \
1260 tests/string-test.c \
1261 shared/string-helpers.h
1262string_test_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1263string_test_LDADD = libtest-client.la
1264
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001265vertex_clip_test_SOURCES = \
1266 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001267 shared/helpers.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001268 libweston/vertex-clipping.c \
1269 libweston/vertex-clipping.h
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001270vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001271
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001272libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001273 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001274 tests/weston-test-client-helper.h
1275nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001276 protocol/weston-test-protocol.c \
1277 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001278libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +01001279libtest_client_la_LIBADD = libshared.la libtest-runner.la $(TEST_CLIENT_LIBS) $(CAIRO_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001280
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001281
1282#
1283# Internal tests - tests functionality of the testsuite itself
1284#
1285
1286internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001287internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1288internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001289
1290
1291#
1292# Weston Tests
1293#
1294
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001295bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001296bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001297bad_buffer_weston_LDADD = libtest-client.la
1298
1299keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001300keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001301keyboard_weston_LDADD = libtest-client.la
1302
1303event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001304event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001305event_weston_LDADD = libtest-client.la
1306
1307button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001308button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001309button_weston_LDADD = libtest-client.la
1310
Marek Chalupa5fd81402015-03-30 09:21:29 -04001311devices_weston_SOURCES = tests/devices-test.c
1312devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1313devices_weston_LDADD = libtest-client.la
1314
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001315text_weston_SOURCES = tests/text-test.c
1316nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001317 protocol/text-input-unstable-v1-protocol.c \
1318 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001319text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001320text_weston_LDADD = libtest-client.la
1321
1322subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001323subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001324subsurface_weston_LDADD = libtest-client.la
1325
Jon A. Cruzb09da242015-06-16 13:15:13 -07001326presentation_weston_SOURCES = \
1327 tests/presentation-test.c \
1328 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001329nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001330 protocol/presentation-time-protocol.c \
1331 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001332presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1333presentation_weston_LDADD = libtest-client.la
1334
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001335roles_weston_SOURCES = tests/roles-test.c
1336roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1337roles_weston_LDADD = libtest-client.la
1338
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001339viewporter_weston_SOURCES = \
1340 tests/viewporter-test.c \
1341 shared/helpers.h
1342nodist_viewporter_weston_SOURCES = \
1343 protocol/viewporter-protocol.c \
1344 protocol/viewporter-client-protocol.h
1345viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1346viewporter_weston_LDADD = libtest-client.la
1347
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001348if ENABLE_EGL
1349weston_tests += buffer-count.weston
1350buffer_count_weston_SOURCES = tests/buffer-count-test.c
Pekka Paalanen924cd942016-05-20 17:25:38 +03001351buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001352buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1353endif
1354
1355if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001356weston_tests += xwayland-test.weston
1357xwayland_test_weston_SOURCES = tests/xwayland-test.c
Daniel Stone2295a622016-11-29 11:05:49 +00001358xwayland_test_weston_CFLAGS = \
1359 $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS) -DXSERVER_PATH='"@XSERVER_PATH@"'
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001360xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001361endif
1362
1363matrix_test_SOURCES = \
1364 tests/matrix-test.c \
1365 shared/matrix.c \
1366 shared/matrix.h
1367matrix_test_CPPFLAGS = -DUNIT_TEST
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001368matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001369
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001370if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001371module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001372 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001373 ivi-layout-test.la
1374
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001375ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1376ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001377ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001378ivi_layout_internal_test_la_SOURCES = \
1379 tests/ivi_layout-internal-test.c
1380
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001381ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1382ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001383ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001384ivi_layout_test_la_SOURCES = \
1385 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001386 tests/ivi-test.h \
1387 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001388nodist_ivi_layout_test_la_SOURCES = \
1389 protocol/weston-test-protocol.c \
1390 protocol/weston-test-server-protocol.h
1391
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001392ivi_tests += \
1393 ivi-shell-app.weston
1394
1395ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1396nodist_ivi_shell_app_weston_SOURCES = \
1397 protocol/ivi-application-protocol.c \
1398 protocol/ivi-application-client-protocol.h
1399ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1400ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001401
1402noinst_PROGRAMS += ivi-layout.ivi
1403
1404ivi_layout_ivi_SOURCES = \
1405 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001406 tests/ivi-test.h \
1407 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001408nodist_ivi_layout_ivi_SOURCES = \
1409 protocol/ivi-application-protocol.c \
1410 protocol/ivi-application-client-protocol.h
1411ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1412ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001413endif
1414
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001415if BUILD_SETBACKLIGHT
1416noinst_PROGRAMS += setbacklight
1417setbacklight_SOURCES = \
1418 tests/setbacklight.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001419 libweston/libbacklight.c \
1420 libweston/libbacklight.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001421setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1422setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1423endif
1424
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001425all-local: zuctest$(EXEEXT)
1426
1427noinst_PROGRAMS += zuctest$(EXEEXT)
1428
1429zuctest_LDADD = \
1430 libzunitc.la \
1431 libzunitcmain.la
1432
1433zuctest_CFLAGS = \
1434 $(AM_CFLAGS) \
1435 -I$(top_srcdir)/tools/zunitc/inc
1436
1437zuctest_SOURCES = \
1438 tools/zunitc/test/fixtures_test.c \
1439 tools/zunitc/test/zunitc_test.c
1440
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001441EXTRA_DIST += \
1442 tests/weston-tests-env \
1443 tests/internal-screenshot.ini \
1444 tests/reference/internal-screenshot-bad-00.png \
1445 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001446
1447BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001448 protocol/weston-test-protocol.c \
1449 protocol/weston-test-server-protocol.h \
1450 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001451 protocol/text-input-unstable-v1-protocol.c \
1452 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001453
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001454EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001455 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001456 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001457 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001458 protocol/weston-test.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001459 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001460 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001461
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001462#
1463# manual test modules in tests subdirectory
1464#
1465
1466noinst_LTLIBRARIES += \
1467 surface-screenshot.la
1468
Emil Velikov67351452016-07-22 14:52:42 +01001469surface_screenshot_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001470surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001471surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001472surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1473
1474
1475#
1476# Documentation
1477#
1478
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001479man_MANS = weston.1 weston.ini.5
1480
1481if ENABLE_DRM_COMPOSITOR
1482man_MANS += weston-drm.7
1483endif
1484
1485MAN_SUBSTS = \
1486 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1487 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1488 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1489 -e 's|__version__|$(PACKAGE_VERSION)|g'
1490
1491SUFFIXES = .1 .5 .7 .man
1492
1493%.1 %.5 %.7 : man/%.man
1494 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1495
1496EXTRA_DIST += \
1497 man/weston.man \
1498 man/weston-drm.man \
1499 man/weston.ini.man
1500
1501CLEANFILES += $(man_MANS)
1502
Jon A. Cruz179c1862015-07-15 19:22:43 -07001503if ENABLE_DEVDOCS
1504DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1505
1506docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1507 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1508
1509docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1510 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1511endif
1512
1513DOCDIRS = \
1514 docs/developer \
1515 docs/tools
1516
1517$(DOCDIRS):
1518 $(MKDIR_P) $@
1519
1520.PHONY: doc $(DOXYGEN_INDICES)
1521
1522doc: $(DOXYGEN_INDICES)
1523
Jonas Ådahl496adb32015-11-17 16:00:27 +08001524.SECONDEXPANSION:
1525
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001526define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001527$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001528endef
1529
1530define protoname
1531$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1532endef
1533
1534protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001535 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1536
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001537protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001538 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1539
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001540protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001541 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1542
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001543protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1544 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001545
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001546protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1547 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001548
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001549protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1550 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@