blob: 702a2099f07e3f02bd7d45a99070e0ca31e585be [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) \
Armin Krezovićb08e1a52016-12-09 22:58:27 +0100387 $(WAYLAND_COMPOSITOR_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800388 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800389wayland_backend_la_CFLAGS = \
390 $(COMPOSITOR_CFLAGS) \
391 $(EGL_CFLAGS) \
392 $(PIXMAN_CFLAGS) \
393 $(CAIRO_CFLAGS) \
394 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500395 $(AM_CFLAGS)
Armin Krezović34476192016-11-21 18:42:42 +0100396wayland_backend_la_SOURCES = \
397 libweston/compositor-wayland.c \
398 libweston/compositor-wayland.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700399 shared/helpers.h
Pekka Paalanen9f3d95e2016-11-23 11:46:57 +0200400nodist_wayland_backend_la_SOURCES = \
401 protocol/fullscreen-shell-unstable-v1-protocol.c \
402 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
403 protocol/xdg-shell-unstable-v6-protocol.c \
404 protocol/xdg-shell-unstable-v6-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800405endif
406
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800407if ENABLE_HEADLESS_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300408libweston_module_LTLIBRARIES += headless-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800409headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800410headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500411headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700412headless_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300413 libweston/compositor-headless.c \
414 libweston/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700415 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800416endif
417
418if ENABLE_FBDEV_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300419libweston_module_LTLIBRARIES += fbdev-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800420fbdev_backend_la_LDFLAGS = -module -avoid-version
421fbdev_backend_la_LIBADD = \
422 $(COMPOSITOR_LIBS) \
423 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100424 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800425 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800426 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800427fbdev_backend_la_CFLAGS = \
428 $(COMPOSITOR_CFLAGS) \
429 $(EGL_CFLAGS) \
430 $(FBDEV_COMPOSITOR_CFLAGS) \
431 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500432 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800433fbdev_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300434 libweston/compositor-fbdev.c \
435 libweston/compositor-fbdev.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700436 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100437 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800438endif
439
440if ENABLE_RDP_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300441libweston_module_LTLIBRARIES += rdp-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800442rdp_backend_la_LDFLAGS = -module -avoid-version
443rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
444 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800445 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800446rdp_backend_la_CFLAGS = \
447 $(COMPOSITOR_CFLAGS) \
448 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500449 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700450rdp_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300451 libweston/compositor-rdp.c \
452 libweston/compositor-rdp.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700453 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800454endif
455
456if HAVE_LCMS
457module_LTLIBRARIES += cms-static.la
458cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800459cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500460cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800461cms_static_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300462 compositor/cms-static.c \
463 compositor/cms-helper.c \
464 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700465 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800466if ENABLE_COLORD
467module_LTLIBRARIES += cms-colord.la
468cms_colord_la_LDFLAGS = -module -avoid-version
469cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500470cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800471cms_colord_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300472 compositor/cms-colord.c \
473 compositor/cms-helper.c \
474 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700475 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800476endif
477endif
478
479noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500480spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800481spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
482spring_tool_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300483 libweston/spring-tool.c \
484 libweston/animation.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800485 shared/matrix.c \
486 shared/matrix.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300487 libweston/compositor.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800488
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800489if BUILD_CLIENTS
490
491bin_PROGRAMS += weston-terminal weston-info
492
493libexec_PROGRAMS += \
494 weston-desktop-shell \
495 weston-screenshooter \
496 weston-keyboard \
497 weston-simple-im
498
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900499if ENABLE_IVI_SHELL
500libexec_PROGRAMS += \
501 weston-ivi-shell-user-interface
502endif
503
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800504demo_clients = \
505 weston-flower \
506 weston-image \
507 weston-cliptest \
508 weston-dnd \
509 weston-smoke \
510 weston-resizor \
511 weston-eventdemo \
512 weston-clickdot \
Jonas Ådahl61831f42016-03-15 18:14:00 +0800513 weston-confine \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800514 weston-transformed \
515 weston-fullscreen \
516 weston-stacking \
517 weston-calibrator \
518 weston-scaler
519
520if INSTALL_DEMO_CLIENTS
521bin_PROGRAMS += $(demo_clients)
522else
523noinst_PROGRAMS += $(demo_clients)
524endif
525
526
527if BUILD_SIMPLE_CLIENTS
528demo_clients += \
529 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500530 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800531 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400532 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800533 weston-multi-resource
534
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800535weston_simple_shm_SOURCES = clients/simple-shm.c
536nodist_weston_simple_shm_SOURCES = \
Jonas Ådahle023cbc2016-08-11 23:29:38 +0800537 protocol/xdg-shell-unstable-v6-protocol.c \
538 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800539 protocol/fullscreen-shell-unstable-v1-protocol.c \
540 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900541 protocol/ivi-application-protocol.c \
542 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800543weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800544weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800545
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500546weston_simple_damage_SOURCES = clients/simple-damage.c
547nodist_weston_simple_damage_SOURCES = \
Pekka Paalanen7b69d6c2016-04-15 17:00:21 +0300548 protocol/viewporter-protocol.c \
549 protocol/viewporter-client-protocol.h \
Jonas Ådahla74eff92016-08-11 23:39:31 +0800550 protocol/xdg-shell-unstable-v6-protocol.c \
551 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800552 protocol/fullscreen-shell-unstable-v1-protocol.c \
553 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500554weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
555weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
556
Jon A. Cruzb09da242015-06-16 13:15:13 -0700557weston_simple_touch_SOURCES = \
558 clients/simple-touch.c \
559 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800560weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800561weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800562
Jon A. Cruzb09da242015-06-16 13:15:13 -0700563weston_presentation_shm_SOURCES = \
564 clients/presentation-shm.c \
565 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400566nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200567 protocol/presentation-time-protocol.c \
568 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400569weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300570weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400571
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800572weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800573weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300574weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800575endif
576
577if BUILD_SIMPLE_EGL_CLIENTS
578demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800579weston_simple_egl_SOURCES = clients/simple-egl.c
580nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl83630022016-08-11 23:13:20 +0800581 protocol/xdg-shell-unstable-v6-protocol.c \
582 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900583 protocol/ivi-application-protocol.c \
584 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800585weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800586weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
587endif
588
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000589if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
590demo_clients += weston-simple-dmabuf-intel
591weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
592nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl42682622016-08-11 23:44:41 +0800593 protocol/xdg-shell-unstable-v6-protocol.c \
594 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800595 protocol/fullscreen-shell-unstable-v1-protocol.c \
596 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800597 protocol/linux-dmabuf-unstable-v1-protocol.c \
598 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000599weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
600weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800601BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200602endif
603
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000604if BUILD_SIMPLE_DMABUF_V4L_CLIENT
605demo_clients += weston-simple-dmabuf-v4l
606weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
607nodist_weston_simple_dmabuf_v4l_SOURCES = \
Jonas Ådahl6ccd2862016-08-12 10:01:29 +0800608 protocol/xdg-shell-unstable-v6-protocol.c \
609 protocol/xdg-shell-unstable-v6-client-protocol.h \
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000610 protocol/fullscreen-shell-unstable-v1-protocol.c \
611 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
612 protocol/linux-dmabuf-unstable-v1-protocol.c \
613 protocol/linux-dmabuf-unstable-v1-client-protocol.h
614weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
615weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
616BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
617endif
618
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800619noinst_LTLIBRARIES += libtoytoolkit.la
620
621libtoytoolkit_la_SOURCES = \
622 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700623 clients/window.h \
624 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800625
626nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100627 protocol/text-cursor-position-protocol.c \
628 protocol/text-cursor-position-client-protocol.h \
Pekka Paalanen73511002016-04-15 16:53:41 +0300629 protocol/viewporter-protocol.c \
630 protocol/viewporter-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800631 protocol/xdg-shell-unstable-v6-protocol.c \
632 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900633 protocol/ivi-application-protocol.c \
Jonas Ådahle5a1bb42014-11-25 10:25:27 +0800634 protocol/ivi-application-client-protocol.h \
635 protocol/pointer-constraints-unstable-v1-protocol.c \
636 protocol/pointer-constraints-unstable-v1-client-protocol.h \
637 protocol/relative-pointer-unstable-v1-protocol.c \
638 protocol/relative-pointer-unstable-v1-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500639
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800640BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
641
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800642
643libtoytoolkit_la_LIBADD = \
644 $(CLIENT_LIBS) \
645 $(CAIRO_EGL_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300646 libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800647libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800648
649weston_flower_SOURCES = clients/flower.c
650weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800651weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800652
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100653weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800654 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800655nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800656 protocol/weston-screenshooter-protocol.c \
657 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800658weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800659weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800660
Jon A. Cruzb09da242015-06-16 13:15:13 -0700661weston_terminal_SOURCES = \
662 clients/terminal.c \
663 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800664weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800665weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800666
667weston_image_SOURCES = clients/image.c
668weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800669weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800670
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300671weston_cliptest_SOURCES = \
672 clients/cliptest.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300673 libweston/vertex-clipping.c \
674 libweston/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800675weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800676weston_cliptest_LDADD = libtoytoolkit.la
677
Jon A. Cruzb09da242015-06-16 13:15:13 -0700678weston_dnd_SOURCES = \
679 clients/dnd.c \
680 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800681weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800682weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800683
684weston_smoke_SOURCES = clients/smoke.c
685weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800686weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800687
688weston_resizor_SOURCES = clients/resizor.c
689weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800690weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800691
692weston_scaler_SOURCES = clients/scaler.c
693weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800694weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800695
696if HAVE_CAIRO_GLESV2
697demo_clients += weston-nested weston-nested-client
698
Jon A. Cruzb09da242015-06-16 13:15:13 -0700699weston_nested_SOURCES = \
700 clients/nested.c \
701 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800702weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800703weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800704
705weston_nested_client_SOURCES = clients/nested-client.c
706weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800707weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800708endif
709
Jon A. Cruzb09da242015-06-16 13:15:13 -0700710weston_eventdemo_SOURCES = \
711 clients/eventdemo.c \
712 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800713weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800714weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800715
Jon A. Cruzb09da242015-06-16 13:15:13 -0700716weston_clickdot_SOURCES = \
717 clients/clickdot.c \
718 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800719weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800720weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800721
Jonas Ådahl61831f42016-03-15 18:14:00 +0800722weston_confine_SOURCES = \
723 clients/confine.c \
724 shared/helpers.h
725weston_confine_LDADD = libtoytoolkit.la
726weston_confine_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
727
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800728weston_transformed_SOURCES = clients/transformed.c
729weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800730weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800731
732weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500733nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800734 protocol/fullscreen-shell-unstable-v1-protocol.c \
735 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800736weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800737weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800738
Jon A. Cruzb09da242015-06-16 13:15:13 -0700739weston_stacking_SOURCES = \
740 clients/stacking.c \
741 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800742weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800743weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800744
Jon A. Cruzb09da242015-06-16 13:15:13 -0700745weston_calibrator_SOURCES = \
746 clients/calibrator.c \
747 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800748 shared/matrix.c \
749 shared/matrix.h
750weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800751weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800752
753if BUILD_SUBSURFACES_CLIENT
754demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700755weston_subsurfaces_SOURCES = \
756 clients/subsurfaces.c \
757 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800758weston_subsurfaces_CFLAGS = \
759 $(AM_CFLAGS) \
760 $(SIMPLE_EGL_CLIENT_CFLAGS) \
761 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800762weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
763endif
764
765if HAVE_PANGO
766demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700767weston_editor_SOURCES = \
768 clients/editor.c \
769 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800770nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800771 protocol/text-input-unstable-v1-protocol.c \
772 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800773weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800774weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800775endif
776
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800777weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800778nodist_weston_keyboard_SOURCES = \
779 protocol/weston-desktop-shell-client-protocol.h \
780 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800781 protocol/input-method-unstable-v1-protocol.c \
782 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800783weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800784weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800785
Bryce Harringtonc6a899d2016-10-11 16:24:05 -0700786weston_simple_im_SOURCES = clients/simple-im.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800787nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800788 protocol/input-method-unstable-v1-protocol.c \
789 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800790weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800791weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800792
Jon A. Cruzb09da242015-06-16 13:15:13 -0700793weston_info_SOURCES = \
794 clients/weston-info.c \
795 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400796nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200797 protocol/presentation-time-protocol.c \
798 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800799weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200800weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800801
Jon A. Cruzb09da242015-06-16 13:15:13 -0700802weston_desktop_shell_SOURCES = \
803 clients/desktop-shell.c \
804 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800805nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800806 protocol/weston-desktop-shell-client-protocol.h \
807 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800808weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800809weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800810
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900811if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700812weston_ivi_shell_user_interface_SOURCES = \
813 clients/ivi-shell-user-interface.c \
814 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900815nodist_weston_ivi_shell_user_interface_SOURCES = \
816 protocol/ivi-hmi-controller-client-protocol.h \
817 protocol/ivi-hmi-controller-protocol.c \
818 protocol/ivi-application-client-protocol.h \
819 protocol/ivi-application-protocol.c
820weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
821weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
822endif
823
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800824if BUILD_FULL_GL_CLIENTS
825demo_clients += weston-gears
826weston_gears_SOURCES = clients/gears.c
827weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800828weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800829endif
830
831endif
832
833BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800834 protocol/weston-screenshooter-protocol.c \
835 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100836 protocol/text-cursor-position-client-protocol.h \
837 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800838 protocol/text-input-unstable-v1-protocol.c \
839 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800840 protocol/input-method-unstable-v1-protocol.c \
841 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800842 protocol/weston-desktop-shell-client-protocol.h \
843 protocol/weston-desktop-shell-protocol.c \
Pekka Paalanen73511002016-04-15 16:53:41 +0300844 protocol/viewporter-client-protocol.h \
845 protocol/viewporter-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200846 protocol/presentation-time-protocol.c \
847 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800848 protocol/fullscreen-shell-unstable-v1-protocol.c \
849 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800850 protocol/xdg-shell-unstable-v6-protocol.c \
851 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900852 protocol/ivi-hmi-controller-protocol.c \
853 protocol/ivi-hmi-controller-client-protocol.h \
854 protocol/ivi-application-protocol.c \
Bryce Harrington6303d3b2016-08-30 12:04:05 -0700855 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800856
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800857westondatadir = $(datadir)/weston
858dist_westondata_DATA = \
859 data/wayland.svg \
860 data/wayland.png \
861 data/pattern.png \
862 data/terminal.png \
863 data/border.png \
Bryce Harrington6bc52542016-03-24 17:57:39 -0700864 data/icon_editor.png \
865 data/icon_flower.png \
866 data/icon_terminal.png \
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800867 data/icon_window.png \
868 data/sign_close.png \
869 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100870 data/sign_minimize.png
871
872if ENABLE_IVI_SHELL
873dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900874 data/background.png \
875 data/tiling.png \
876 data/fullscreen.png \
877 data/panel.png \
878 data/random.png \
879 data/sidebyside.png \
880 data/home.png \
881 data/icon_ivi_clickdot.png \
882 data/icon_ivi_flower.png \
883 data/icon_ivi_simple-egl.png \
884 data/icon_ivi_simple-shm.png \
885 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100886endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800887
888
889if BUILD_WCAP_TOOLS
890bin_PROGRAMS += wcap-decode
891
892wcap_decode_SOURCES = \
893 wcap/main.c \
894 wcap/wcap-decode.c \
895 wcap/wcap-decode.h
896
Derek Foreman4ff38742015-06-18 11:43:11 -0500897wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800898wcap_decode_LDADD = $(WCAP_LIBS)
899endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800900
901
902if ENABLE_DESKTOP_SHELL
903
904module_LTLIBRARIES += desktop-shell.la
905
906desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100907 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800908 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300909 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100910 -I$(top_srcdir)/libweston \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800911 -I$(top_builddir)/desktop-shell \
912 -DDATADIR='"$(datadir)"' \
913 -DMODULEDIR='"$(moduledir)"' \
914 -DLIBEXECDIR='"$(libexecdir)"' \
915 -DIN_WESTON
916
917desktop_shell_la_LDFLAGS = -module -avoid-version
Quentin Glidic8f9d90a2016-08-12 10:41:36 +0200918desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500919desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800920desktop_shell_la_SOURCES = \
921 desktop-shell/shell.h \
922 desktop-shell/shell.c \
923 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700924 desktop-shell/input-panel.c \
925 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800926nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800927 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahl5ac91a12016-08-15 17:31:02 +0800928 protocol/weston-desktop-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800929
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800930BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800931endif
932
Jason Ekstrand946a9482014-04-02 19:53:47 -0500933if ENABLE_FULLSCREEN_SHELL
934
935module_LTLIBRARIES += fullscreen-shell.la
936
937fullscreen_shell_la_CPPFLAGS = \
938 -I$(top_builddir)/protocol \
939 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300940 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100941 -I$(top_srcdir)/libweston \
Jason Ekstrand946a9482014-04-02 19:53:47 -0500942 -DIN_WESTON
943
944fullscreen_shell_la_LDFLAGS = -module -avoid-version
945fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500946fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500947fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700948 fullscreen-shell/fullscreen-shell.c \
949 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500950nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800951 protocol/fullscreen-shell-unstable-v1-protocol.c \
952 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500953
954BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
955endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800956
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900957if ENABLE_IVI_SHELL
958
959module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900960 $(ivi_shell) \
961 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900962
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900963ivi_shell = ivi-shell.la
964ivi_shell_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100965ivi_shell_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500966ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900967ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900968 ivi-shell/ivi-layout-export.h \
969 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +0200970 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900971 ivi-shell/ivi-layout.c \
972 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900973 ivi-shell/ivi-shell.h \
974 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700975 ivi-shell/input-panel-ivi.c \
976 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900977nodist_ivi_shell_la_SOURCES = \
978 protocol/ivi-application-protocol.c \
979 protocol/ivi-application-server-protocol.h
980
981BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
982
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900983hmi_controller = hmi-controller.la
984hmi_controller_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100985hmi_controller_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500986hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900987hmi_controller_la_SOURCES = \
988 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700989 ivi-shell/hmi-controller.c \
990 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900991nodist_hmi_controller_la_SOURCES = \
992 protocol/ivi-hmi-controller-protocol.c \
993 protocol/ivi-hmi-controller-server-protocol.h
994
995BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
996
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900997endif
998
999
Jason Ekstrand47928d82014-04-02 19:54:01 -05001000if ENABLE_SCREEN_SHARING
1001
1002module_LTLIBRARIES += screen-share.la
1003
1004screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
1005screen_share_la_LDFLAGS = -module -avoid-version
1006screen_share_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001007 libshared-cairo.la \
Jason Ekstrand47928d82014-04-02 19:54:01 -05001008 $(COMPOSITOR_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +01001009 $(SCREEN_SHARE_LIBS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001010screen_share_la_CFLAGS = \
1011 $(COMPOSITOR_CFLAGS) \
1012 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -05001013 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001014screen_share_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +03001015 compositor/screen-share.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001016 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001017nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +08001018 protocol/fullscreen-shell-unstable-v1-protocol.c \
1019 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001020
1021endif
1022
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001023if ENABLE_XWAYLAND
1024
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001025libweston_module_LTLIBRARIES += xwayland.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001026
1027xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001028 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001029 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001030 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +01001031 -I$(top_srcdir)/libweston \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001032 -I$(top_builddir)/xwayland \
1033 -DDATADIR='"$(datadir)"' \
1034 -DMODULEDIR='"$(moduledir)"' \
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001035 -DLIBEXECDIR='"$(libexecdir)"'
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001036
1037xwayland_la_LDFLAGS = -module -avoid-version
1038xwayland_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001039 libshared-cairo.la \
1040 $(XWAYLAND_LIBS)
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001041xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -05001042 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001043 $(COMPOSITOR_CFLAGS) \
1044 $(PIXMAN_CFLAGS) \
1045 $(CAIRO_CFLAGS)
1046xwayland_la_SOURCES = \
1047 xwayland/xwayland.h \
Quentin Glidic955cec02016-08-12 10:41:35 +02001048 xwayland/xwayland-internal-interface.h \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001049 xwayland/window-manager.c \
1050 xwayland/selection.c \
1051 xwayland/dnd.c \
1052 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001053 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001054 xwayland/hash.h \
1055 shared/helpers.h
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001056
1057libwestoninclude_HEADERS += xwayland/xwayland-api.h
1058
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001059endif
1060
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001061
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001062#
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001063# Shared utilities
1064#
1065
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001066noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1067 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001068
Derek Foreman4ff38742015-06-18 11:43:11 -05001069libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001070
1071libshared_la_SOURCES = \
1072 shared/config-parser.c \
1073 shared/option-parser.c \
1074 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001075 shared/file-util.c \
1076 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001077 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001078 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001079 shared/os-compatibility.h \
1080 shared/xalloc.c \
1081 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001082
1083libshared_cairo_la_CFLAGS = \
1084 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001085 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001086 $(COMPOSITOR_CFLAGS) \
1087 $(PIXMAN_CFLAGS) \
1088 $(CAIRO_CFLAGS) \
1089 $(PNG_CFLAGS) \
1090 $(WEBP_CFLAGS)
1091
1092libshared_cairo_la_LIBADD = \
1093 $(PIXMAN_LIBS) \
1094 $(CAIRO_LIBS) \
1095 $(PNG_LIBS) \
1096 $(WEBP_LIBS) \
1097 $(JPEG_LIBS)
1098
1099libshared_cairo_la_SOURCES = \
1100 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001101 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001102 shared/image-loader.c \
1103 shared/image-loader.h \
1104 shared/cairo-util.c \
1105 shared/frame.c \
1106 shared/cairo-util.h
1107
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001108libzunitc_la_SOURCES = \
1109 tools/zunitc/inc/zunitc/zunitc.h \
1110 tools/zunitc/inc/zunitc/zunitc_impl.h \
1111 tools/zunitc/src/zuc_base_logger.c \
1112 tools/zunitc/src/zuc_base_logger.h \
1113 tools/zunitc/src/zuc_collector.c \
1114 tools/zunitc/src/zuc_collector.h \
1115 tools/zunitc/src/zuc_context.h \
1116 tools/zunitc/src/zuc_event.h \
1117 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001118 tools/zunitc/src/zuc_junit_reporter.c \
1119 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001120 tools/zunitc/src/zuc_types.h \
1121 tools/zunitc/src/zunitc_impl.c \
1122 shared/helpers.h
1123
1124libzunitc_la_CFLAGS = \
1125 $(AM_CFLAGS) \
1126 -I$(top_srcdir)/tools/zunitc/inc
1127
1128libzunitc_la_LIBADD = \
Gustavo Zacarias57c83f62016-04-22 10:54:35 -03001129 libshared.la \
1130 $(CLOCK_GETTIME_LIBS)
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001131
Jon A. Cruz646aef52015-07-15 19:22:41 -07001132if ENABLE_JUNIT_XML
1133libzunitc_la_CFLAGS += \
1134 $(LIBXML2_CFLAGS)
1135libzunitc_la_LIBADD += \
1136 $(LIBXML2_LIBS)
1137endif
1138
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001139libzunitcmain_la_SOURCES = \
1140 tools/zunitc/src/main.c
1141
1142libzunitcmain_la_CFLAGS = \
1143 $(AM_CFLAGS) \
1144 -I$(top_srcdir)/tools/zunitc/inc
1145
1146libzunitcmain_la_LIBADD = \
1147 libzunitc.la \
1148 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001149
1150#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001151# tests subdirectory
1152#
1153
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001154TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1155
1156internal_tests = \
1157 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001158
1159shared_tests = \
1160 config-parser.test \
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001161 string.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001162 vertex-clip.test \
1163 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001164
1165module_tests = \
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001166 plugin-registry-test.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001167 surface-test.la \
1168 surface-global-test.la
1169
1170weston_tests = \
1171 bad_buffer.weston \
1172 keyboard.weston \
1173 event.weston \
1174 button.weston \
1175 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001176 presentation.weston \
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001177 viewporter.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001178 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001179 subsurface.weston \
1180 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001181
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001182ivi_tests =
1183
1184$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001185
1186AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001187 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1188 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001189
1190TEST_EXTENSIONS = .la .weston
1191LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1192WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1193
1194clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001195 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001196 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001197
1198# To remove when automake 1.11 support is dropped
1199export abs_builddir
1200
1201noinst_LTLIBRARIES += \
1202 weston-test.la \
1203 $(module_tests) \
1204 libtest-runner.la \
1205 libtest-client.la
1206
1207noinst_PROGRAMS += \
1208 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001209 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001210 $(shared_tests) \
1211 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001212 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001213 matrix-test
1214
1215test_module_ldflags = \
1216 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1217
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001218plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
1219plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1220plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1221
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001222surface_global_test_la_SOURCES = tests/surface-global-test.c
1223surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001224surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001225
1226surface_test_la_SOURCES = tests/surface-test.c
1227surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001228surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001229
Emil Velikov67351452016-07-22 14:52:42 +01001230weston_test_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001231weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001232weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001233weston_test_la_SOURCES = \
1234 tests/weston-test.c \
1235 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001236nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001237 protocol/weston-test-protocol.c \
1238 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001239
1240if ENABLE_EGL
1241weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1242weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1243endif
1244
1245libtest_runner_la_SOURCES = \
1246 tests/weston-test-runner.c \
1247 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001248libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001249
1250config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001251config_parser_test_LDADD = \
1252 libshared.la \
1253 $(COMPOSITOR_LIBS) \
1254 libzunitc.la \
1255 libzunitcmain.la
1256config_parser_test_CFLAGS = \
1257 $(AM_CFLAGS) \
1258 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001259
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001260string_test_SOURCES = \
1261 tests/string-test.c \
1262 shared/string-helpers.h
1263string_test_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1264string_test_LDADD = libtest-client.la
1265
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001266vertex_clip_test_SOURCES = \
1267 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001268 shared/helpers.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001269 libweston/vertex-clipping.c \
1270 libweston/vertex-clipping.h
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001271vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001272
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001273libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001274 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001275 tests/weston-test-client-helper.h
1276nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001277 protocol/weston-test-protocol.c \
1278 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001279libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +01001280libtest_client_la_LIBADD = libshared.la libtest-runner.la $(TEST_CLIENT_LIBS) $(CAIRO_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001281
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001282
1283#
1284# Internal tests - tests functionality of the testsuite itself
1285#
1286
1287internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001288internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1289internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001290
1291
1292#
1293# Weston Tests
1294#
1295
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001296bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001297bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001298bad_buffer_weston_LDADD = libtest-client.la
1299
1300keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001301keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001302keyboard_weston_LDADD = libtest-client.la
1303
1304event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001305event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001306event_weston_LDADD = libtest-client.la
1307
1308button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001309button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001310button_weston_LDADD = libtest-client.la
1311
Marek Chalupa5fd81402015-03-30 09:21:29 -04001312devices_weston_SOURCES = tests/devices-test.c
1313devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1314devices_weston_LDADD = libtest-client.la
1315
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001316text_weston_SOURCES = tests/text-test.c
1317nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001318 protocol/text-input-unstable-v1-protocol.c \
1319 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001320text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001321text_weston_LDADD = libtest-client.la
1322
1323subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001324subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001325subsurface_weston_LDADD = libtest-client.la
1326
Jon A. Cruzb09da242015-06-16 13:15:13 -07001327presentation_weston_SOURCES = \
1328 tests/presentation-test.c \
1329 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001330nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001331 protocol/presentation-time-protocol.c \
1332 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001333presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1334presentation_weston_LDADD = libtest-client.la
1335
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001336roles_weston_SOURCES = tests/roles-test.c
1337roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1338roles_weston_LDADD = libtest-client.la
1339
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001340viewporter_weston_SOURCES = \
1341 tests/viewporter-test.c \
1342 shared/helpers.h
1343nodist_viewporter_weston_SOURCES = \
1344 protocol/viewporter-protocol.c \
1345 protocol/viewporter-client-protocol.h
1346viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1347viewporter_weston_LDADD = libtest-client.la
1348
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001349if ENABLE_EGL
1350weston_tests += buffer-count.weston
1351buffer_count_weston_SOURCES = tests/buffer-count-test.c
Pekka Paalanen924cd942016-05-20 17:25:38 +03001352buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001353buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1354endif
1355
1356if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001357weston_tests += xwayland-test.weston
1358xwayland_test_weston_SOURCES = tests/xwayland-test.c
Daniel Stone2295a622016-11-29 11:05:49 +00001359xwayland_test_weston_CFLAGS = \
1360 $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS) -DXSERVER_PATH='"@XSERVER_PATH@"'
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001361xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001362endif
1363
1364matrix_test_SOURCES = \
1365 tests/matrix-test.c \
1366 shared/matrix.c \
1367 shared/matrix.h
1368matrix_test_CPPFLAGS = -DUNIT_TEST
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001369matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001370
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001371if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001372module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001373 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001374 ivi-layout-test.la
1375
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001376ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1377ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001378ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001379ivi_layout_internal_test_la_SOURCES = \
1380 tests/ivi_layout-internal-test.c
1381
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001382ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1383ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001384ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001385ivi_layout_test_la_SOURCES = \
1386 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001387 tests/ivi-test.h \
1388 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001389nodist_ivi_layout_test_la_SOURCES = \
1390 protocol/weston-test-protocol.c \
1391 protocol/weston-test-server-protocol.h
1392
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001393ivi_tests += \
1394 ivi-shell-app.weston
1395
1396ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1397nodist_ivi_shell_app_weston_SOURCES = \
1398 protocol/ivi-application-protocol.c \
1399 protocol/ivi-application-client-protocol.h
1400ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1401ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001402
1403noinst_PROGRAMS += ivi-layout.ivi
1404
1405ivi_layout_ivi_SOURCES = \
1406 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001407 tests/ivi-test.h \
1408 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001409nodist_ivi_layout_ivi_SOURCES = \
1410 protocol/ivi-application-protocol.c \
1411 protocol/ivi-application-client-protocol.h
1412ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1413ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001414endif
1415
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001416if BUILD_SETBACKLIGHT
1417noinst_PROGRAMS += setbacklight
1418setbacklight_SOURCES = \
1419 tests/setbacklight.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001420 libweston/libbacklight.c \
1421 libweston/libbacklight.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001422setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1423setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1424endif
1425
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001426all-local: zuctest$(EXEEXT)
1427
1428noinst_PROGRAMS += zuctest$(EXEEXT)
1429
1430zuctest_LDADD = \
1431 libzunitc.la \
1432 libzunitcmain.la
1433
1434zuctest_CFLAGS = \
1435 $(AM_CFLAGS) \
1436 -I$(top_srcdir)/tools/zunitc/inc
1437
1438zuctest_SOURCES = \
1439 tools/zunitc/test/fixtures_test.c \
1440 tools/zunitc/test/zunitc_test.c
1441
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001442EXTRA_DIST += \
1443 tests/weston-tests-env \
1444 tests/internal-screenshot.ini \
1445 tests/reference/internal-screenshot-bad-00.png \
1446 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001447
1448BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001449 protocol/weston-test-protocol.c \
1450 protocol/weston-test-server-protocol.h \
1451 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001452 protocol/text-input-unstable-v1-protocol.c \
1453 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001454
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001455EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001456 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001457 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001458 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001459 protocol/weston-test.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001460 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001461 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001462
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001463#
1464# manual test modules in tests subdirectory
1465#
1466
1467noinst_LTLIBRARIES += \
1468 surface-screenshot.la
1469
Emil Velikov67351452016-07-22 14:52:42 +01001470surface_screenshot_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001471surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001472surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001473surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1474
1475
1476#
1477# Documentation
1478#
1479
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001480man_MANS = weston.1 weston.ini.5
1481
1482if ENABLE_DRM_COMPOSITOR
1483man_MANS += weston-drm.7
1484endif
1485
1486MAN_SUBSTS = \
1487 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1488 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1489 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1490 -e 's|__version__|$(PACKAGE_VERSION)|g'
1491
1492SUFFIXES = .1 .5 .7 .man
1493
1494%.1 %.5 %.7 : man/%.man
1495 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1496
1497EXTRA_DIST += \
1498 man/weston.man \
1499 man/weston-drm.man \
1500 man/weston.ini.man
1501
1502CLEANFILES += $(man_MANS)
1503
Jon A. Cruz179c1862015-07-15 19:22:43 -07001504if ENABLE_DEVDOCS
1505DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1506
1507docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1508 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1509
1510docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1511 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1512endif
1513
1514DOCDIRS = \
1515 docs/developer \
1516 docs/tools
1517
1518$(DOCDIRS):
1519 $(MKDIR_P) $@
1520
1521.PHONY: doc $(DOXYGEN_INDICES)
1522
1523doc: $(DOXYGEN_INDICES)
1524
Jonas Ådahl496adb32015-11-17 16:00:27 +08001525.SECONDEXPANSION:
1526
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001527define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001528$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001529endef
1530
1531define protoname
1532$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1533endef
1534
1535protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001536 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1537
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001538protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001539 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1540
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001541protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001542 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1543
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001544protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1545 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001546
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001547protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1548 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001549
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001550protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1551 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@