blob: e9679e68532d39e0b383df8c14344996d7a2741c [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
Daniel Stone903721a2017-04-04 17:54:20 +010074libweston_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) \
Philipp Zabel552e4c42017-04-12 15:32:09 +020075 $(COMPOSITOR_CFLAGS) $(EGL_CFLAGS) $(LIBUNWIND_CFLAGS) $(LIBDRM_CFLAGS)
Emil Velikov7fe47f32016-07-22 14:51:51 +010076libweston_@LIBWESTON_MAJOR@_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Giulio Camuffo8aedf7b2016-06-02 21:48:12 +030077 $(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) \
78 $(LIBINPUT_BACKEND_LIBS) libshared.la
Emil Velikov7fe47f32016-07-22 14:51:51 +010079libweston_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080080
Emil Velikov7fe47f32016-07-22 14:51:51 +010081libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +030082 libweston/git-version.h \
83 libweston/log.c \
84 libweston/compositor.c \
85 libweston/compositor.h \
86 libweston/compositor-drm.h \
87 libweston/compositor-fbdev.h \
88 libweston/compositor-headless.h \
89 libweston/compositor-rdp.h \
90 libweston/compositor-wayland.h \
91 libweston/compositor-x11.h \
92 libweston/input.c \
93 libweston/data-device.c \
94 libweston/screenshooter.c \
95 libweston/clipboard.c \
96 libweston/zoom.c \
97 libweston/bindings.c \
98 libweston/animation.c \
99 libweston/noop-renderer.c \
100 libweston/pixman-renderer.c \
101 libweston/pixman-renderer.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +0200102 libweston/plugin-registry.c \
103 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300104 libweston/timeline.c \
105 libweston/timeline.h \
106 libweston/timeline-object.h \
107 libweston/linux-dmabuf.c \
108 libweston/linux-dmabuf.h \
Daniel Stone903721a2017-04-04 17:54:20 +0100109 libweston/pixel-formats.c \
110 libweston/pixel-formats.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700111 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800112 shared/matrix.c \
113 shared/matrix.h \
Pekka Paalanenaa21f622015-07-03 15:44:50 +0300114 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800115 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100116 shared/platform.h \
Daniel Stoneffff92d2016-11-24 19:14:20 +0000117 shared/weston-egl-ext.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300118
Quentin Glidic248dd102016-08-12 10:41:34 +0200119lib_LTLIBRARIES += libweston-desktop-@LIBWESTON_MAJOR@.la
120libweston_desktop_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
121libweston_desktop_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200122libweston_desktop_@LIBWESTON_MAJOR@_la_LIBADD = \
123 libweston-@LIBWESTON_MAJOR@.la \
124 $(COMPOSITOR_LIBS)
Quentin Glidic248dd102016-08-12 10:41:34 +0200125libweston_desktop_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
126
127libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \
128 libweston-desktop/client.c \
129 libweston-desktop/internal.h \
130 libweston-desktop/libweston-desktop.c \
131 libweston-desktop/libweston-desktop.h \
132 libweston-desktop/seat.c \
133 libweston-desktop/surface.c \
134 libweston-desktop/wl-shell.c \
Quentin Glidic9c5dd7e2016-08-12 10:41:37 +0200135 libweston-desktop/xdg-shell-v6.c \
Quentin Glidic248dd102016-08-12 10:41:34 +0200136 libweston-desktop/xdg-shell-v5.c \
137 libweston-desktop/xwayland.c
138
139nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \
Quentin Glidic9c5dd7e2016-08-12 10:41:37 +0200140 protocol/xdg-shell-unstable-v6-protocol.c \
141 protocol/xdg-shell-unstable-v6-server-protocol.h \
Quentin Glidic248dd102016-08-12 10:41:34 +0200142 protocol/xdg-shell-unstable-v5-protocol.c \
143 protocol/xdg-shell-unstable-v5-server-protocol.h
144
Jonas Ådahl5ac91a12016-08-15 17:31:02 +0800145BUILT_SOURCES += $(nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES)
146
Quentin Glidic9c5dd7e2016-08-12 10:41:37 +0200147libweston-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 +0200148libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v5.lo: protocol/xdg-shell-unstable-v5-server-protocol.h
149
Egor Starkov7ce2e972015-09-25 18:00:27 +0300150if SYSTEMD_NOTIFY_SUPPORT
151module_LTLIBRARIES += systemd-notify.la
152systemd_notify_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200153systemd_notify_la_LIBADD = libweston-@LIBWESTON_MAJOR@.la $(SYSTEMD_DAEMON_LIBS)
Egor Starkov7ce2e972015-09-25 18:00:27 +0300154systemd_notify_la_CFLAGS = \
Pekka Paalanenaff703e2016-04-05 14:08:11 +0300155 $(COMPOSITOR_CFLAGS) \
156 $(SYSTEMD_DAEMON_CFLAGS) \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300157 $(PIXMAN_CFLAGS) \
158 $(AM_CFLAGS)
159systemd_notify_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300160 compositor/systemd-notify.c \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300161 shared/helpers.h \
162 shared/zalloc.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300163 libweston/compositor.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300164endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800165
Emil Velikov7fe47f32016-07-22 14:51:51 +0100166nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800167 protocol/weston-screenshooter-protocol.c \
168 protocol/weston-screenshooter-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800169 protocol/text-cursor-position-protocol.c \
170 protocol/text-cursor-position-server-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800171 protocol/text-input-unstable-v1-protocol.c \
172 protocol/text-input-unstable-v1-server-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800173 protocol/input-method-unstable-v1-protocol.c \
174 protocol/input-method-unstable-v1-server-protocol.h \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200175 protocol/presentation-time-protocol.c \
176 protocol/presentation-time-server-protocol.h \
Pekka Paalanene95ad5c2016-04-15 14:47:08 +0300177 protocol/viewporter-protocol.c \
178 protocol/viewporter-server-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800179 protocol/linux-dmabuf-unstable-v1-protocol.c \
Jonas Ådahl30d61d82014-10-22 21:21:17 +0200180 protocol/linux-dmabuf-unstable-v1-server-protocol.h \
181 protocol/relative-pointer-unstable-v1-protocol.c \
Jonas Ådahld3414f22016-07-22 17:56:31 +0800182 protocol/relative-pointer-unstable-v1-server-protocol.h \
183 protocol/pointer-constraints-unstable-v1-protocol.c \
Bryce Harrington873a3f82016-08-30 12:05:01 -0700184 protocol/pointer-constraints-unstable-v1-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800185
Emil Velikov7fe47f32016-07-22 14:51:51 +0100186BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES)
Giulio Camuffo9e445982016-06-02 21:48:15 +0300187
188bin_PROGRAMS += weston
189
190weston_LDFLAGS = -export-dynamic
191weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200192 -DMODULEDIR='"$(moduledir)"' \
193 -DXSERVER_PATH='"@XSERVER_PATH@"'
Giulio Camuffo9e445982016-06-02 21:48:15 +0300194weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +0100195weston_LDADD = libshared.la libweston-@LIBWESTON_MAJOR@.la \
196 $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Giulio Camuffo9e445982016-06-02 21:48:15 +0300197 $(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \
Yann E. MORINb51e6ed2016-12-19 18:20:09 +0100198 $(CLOCK_GETRES_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +0100199 -lm
Giulio Camuffo9e445982016-06-02 21:48:15 +0300200
201weston_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300202 compositor/main.c \
203 compositor/weston-screenshooter.c \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200204 compositor/text-backend.c \
205 compositor/xwayland.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800206
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800207# Track this dependency explicitly instead of using BUILT_SOURCES. We
208# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
209# in case we're building from tarballs.
210
Emil Velikova8840242016-07-04 14:57:12 +0100211compositor/main.c : $(top_builddir)/libweston/git-version.h
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300212libweston/compositor.c : $(top_builddir)/libweston/git-version.h
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800213
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800214noinst_LTLIBRARIES += \
215 libsession-helper.la
216
217libsession_helper_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300218 libweston/launcher-util.c \
219 libweston/launcher-util.h \
220 libweston/launcher-impl.h \
221 libweston/weston-launch.h \
222 libweston/launcher-weston-launch.c \
223 libweston/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500224libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen4e3522b2017-04-06 13:57:57 +0300225libsession_helper_la_LIBADD = libweston-@LIBWESTON_MAJOR@.la
226
227if ENABLE_DRM_COMPOSITOR
228libsession_helper_la_LIBADD += $(LIBDRM_LIBS)
229endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800230
231if ENABLE_DBUS
232if HAVE_SYSTEMD_LOGIN
233libsession_helper_la_SOURCES += \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300234 libweston/dbus.h \
235 libweston/dbus.c \
236 libweston/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800237libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
238libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
239endif
240endif
241
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800242if HAVE_GIT_REPO
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300243libweston/git-version.h : $(top_srcdir)/.git/logs/HEAD
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800244 $(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 -0800245else
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300246libweston/git-version.h :
Kristian Høgsberg1d2dd072014-02-03 10:55:51 -0800247 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
248
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800249endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800250
251.FORCE :
252
253if BUILD_WESTON_LAUNCH
254bin_PROGRAMS += weston-launch
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300255weston_launch_SOURCES = libweston/weston-launch.c libweston/weston-launch.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800256weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
257weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500258 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800259 $(PAM_CFLAGS) \
260 $(SYSTEMD_LOGIN_CFLAGS) \
261 $(LIBDRM_CFLAGS)
Pekka Paalanen4e3522b2017-04-06 13:57:57 +0300262weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS)
263
264if ENABLE_DRM_COMPOSITOR
265weston_launch_LDADD += $(LIBDRM_LIBS)
266endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800267
268if ENABLE_SETUID_INSTALL
269install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700270 can_suid_files=no; \
271 chown root $(DESTDIR)$(bindir)/weston-launch \
272 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
273 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500274 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700275 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
276 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
277 false; \
278 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800279endif
280
281endif # BUILD_WESTON_LAUNCH
282
283pkgconfigdir = $(libdir)/pkgconfig
Quentin Glidic248dd102016-08-12 10:41:34 +0200284pkgconfig_DATA = \
285 libweston/libweston-${LIBWESTON_MAJOR}.pc \
286 libweston-desktop/libweston-desktop-${LIBWESTON_MAJOR}.pc \
287 compositor/weston.pc
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800288
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100289wayland_sessiondir = $(datadir)/wayland-sessions
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300290dist_wayland_session_DATA = compositor/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100291
Emil Velikov7fe47f32016-07-22 14:51:51 +0100292libwestonincludedir = $(includedir)/libweston-${LIBWESTON_MAJOR}
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300293libwestoninclude_HEADERS = \
294 libweston/version.h \
295 libweston/compositor.h \
296 libweston/compositor-drm.h \
297 libweston/compositor-fbdev.h \
298 libweston/compositor-headless.h \
299 libweston/compositor-rdp.h \
300 libweston/compositor-wayland.h \
301 libweston/compositor-x11.h \
Armin Krezović4690c562016-09-30 14:11:03 +0200302 libweston/windowed-output-api.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +0200303 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300304 libweston/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800305 shared/matrix.h \
306 shared/config-parser.h \
Emil Velikovcbcf5452016-07-04 15:34:17 +0100307 shared/zalloc.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800308
Quentin Glidic248dd102016-08-12 10:41:34 +0200309libwestoninclude_HEADERS += \
310 libweston-desktop/libweston-desktop.h
311
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300312westonincludedir = $(includedir)/weston
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300313westoninclude_HEADERS = compositor/weston.h
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300314
Ucan, Emre \(ADITG/SW1\)ae2541d2015-10-15 14:51:43 +0000315if ENABLE_IVI_SHELL
316westoninclude_HEADERS += \
317 ivi-shell/ivi-layout-export.h
318endif
319
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800320if ENABLE_EGL
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300321libweston_module_LTLIBRARIES += gl-renderer.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800322gl_renderer_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200323gl_renderer_la_LIBADD = \
324 libweston-@LIBWESTON_MAJOR@.la \
325 $(EGL_LIBS) \
326 $(COMPOSITOR_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800327gl_renderer_la_CFLAGS = \
328 $(COMPOSITOR_CFLAGS) \
329 $(EGL_CFLAGS) \
Pekka Paalanenb0308972017-04-06 14:06:20 +0300330 $(LIBDRM_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500331 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800332gl_renderer_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300333 libweston/gl-renderer.h \
334 libweston/gl-renderer.c \
335 libweston/vertex-clipping.c \
336 libweston/vertex-clipping.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700337 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800338endif
339
340if ENABLE_X11_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300341libweston_module_LTLIBRARIES += x11-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800342x11_backend_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200343x11_backend_la_LIBADD = \
344 libshared-cairo.la \
345 libweston-@LIBWESTON_MAJOR@.la \
346 $(X11_COMPOSITOR_LIBS) \
347 $(COMPOSITOR_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800348x11_backend_la_CFLAGS = \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200349 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800350 $(COMPOSITOR_CFLAGS) \
351 $(EGL_CFLAGS) \
352 $(PIXMAN_CFLAGS) \
353 $(CAIRO_CFLAGS) \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200354 $(X11_COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700355x11_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300356 libweston/compositor-x11.c \
357 libweston/compositor-x11.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700358 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800359endif
360
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100361INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000362INPUT_BACKEND_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300363 libweston/libinput-seat.c \
364 libweston/libinput-seat.h \
365 libweston/libinput-device.c \
366 libweston/libinput-device.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700367 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100368
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800369if ENABLE_DRM_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300370libweston_module_LTLIBRARIES += drm-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800371drm_backend_la_LDFLAGS = -module -avoid-version
372drm_backend_la_LIBADD = \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200373 libsession-helper.la \
374 libweston-@LIBWESTON_MAJOR@.la \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800375 $(COMPOSITOR_LIBS) \
376 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100377 $(INPUT_BACKEND_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300378 libshared.la \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200379 $(CLOCK_GETTIME_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800380drm_backend_la_CFLAGS = \
381 $(COMPOSITOR_CFLAGS) \
382 $(EGL_CFLAGS) \
383 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500384 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800385drm_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300386 libweston/compositor-drm.c \
387 libweston/compositor-drm.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100388 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700389 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200390 shared/timespec-util.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300391 libweston/libbacklight.c \
392 libweston/libbacklight.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800393
394if ENABLE_VAAPI_RECORDER
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300395drm_backend_la_SOURCES += libweston/vaapi-recorder.c libweston/vaapi-recorder.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800396drm_backend_la_LIBADD += $(LIBVA_LIBS)
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200397drm_backend_la_LDFLAGS += -pthread
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800398drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
399endif
400endif
401
402if ENABLE_WAYLAND_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300403libweston_module_LTLIBRARIES += wayland-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800404wayland_backend_la_LDFLAGS = -module -avoid-version
405wayland_backend_la_LIBADD = \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200406 libshared-cairo.la \
407 libweston-@LIBWESTON_MAJOR@.la \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800408 $(COMPOSITOR_LIBS) \
Armin Krezovićb08e1a52016-12-09 22:58:27 +0100409 $(WAYLAND_COMPOSITOR_EGL_LIBS) \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200410 $(WAYLAND_COMPOSITOR_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800411wayland_backend_la_CFLAGS = \
412 $(COMPOSITOR_CFLAGS) \
413 $(EGL_CFLAGS) \
414 $(PIXMAN_CFLAGS) \
415 $(CAIRO_CFLAGS) \
416 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500417 $(AM_CFLAGS)
Armin Krezović34476192016-11-21 18:42:42 +0100418wayland_backend_la_SOURCES = \
419 libweston/compositor-wayland.c \
420 libweston/compositor-wayland.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700421 shared/helpers.h
Pekka Paalanen9f3d95e2016-11-23 11:46:57 +0200422nodist_wayland_backend_la_SOURCES = \
423 protocol/fullscreen-shell-unstable-v1-protocol.c \
424 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
425 protocol/xdg-shell-unstable-v6-protocol.c \
426 protocol/xdg-shell-unstable-v6-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800427endif
428
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800429if ENABLE_HEADLESS_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300430libweston_module_LTLIBRARIES += headless-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800431headless_backend_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200432headless_backend_la_LIBADD = \
433 libshared.la \
434 libweston-@LIBWESTON_MAJOR@.la \
435 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500436headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700437headless_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300438 libweston/compositor-headless.c \
439 libweston/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700440 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800441endif
442
443if ENABLE_FBDEV_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300444libweston_module_LTLIBRARIES += fbdev-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800445fbdev_backend_la_LDFLAGS = -module -avoid-version
446fbdev_backend_la_LIBADD = \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200447 libshared.la \
448 libsession-helper.la \
449 libweston-@LIBWESTON_MAJOR@.la \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800450 $(COMPOSITOR_LIBS) \
451 $(FBDEV_COMPOSITOR_LIBS) \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200452 $(INPUT_BACKEND_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800453fbdev_backend_la_CFLAGS = \
454 $(COMPOSITOR_CFLAGS) \
455 $(EGL_CFLAGS) \
456 $(FBDEV_COMPOSITOR_CFLAGS) \
457 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500458 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800459fbdev_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300460 libweston/compositor-fbdev.c \
461 libweston/compositor-fbdev.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700462 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100463 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800464endif
465
466if ENABLE_RDP_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300467libweston_module_LTLIBRARIES += rdp-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800468rdp_backend_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200469rdp_backend_la_LIBADD = \
470 libshared.la \
471 libweston-@LIBWESTON_MAJOR@.la \
472 $(COMPOSITOR_LIBS) \
473 $(RDP_COMPOSITOR_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800474rdp_backend_la_CFLAGS = \
475 $(COMPOSITOR_CFLAGS) \
476 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500477 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700478rdp_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300479 libweston/compositor-rdp.c \
480 libweston/compositor-rdp.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700481 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800482endif
483
484if HAVE_LCMS
485module_LTLIBRARIES += cms-static.la
486cms_static_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200487cms_static_la_LIBADD = \
488 libshared.la \
489 libweston-@LIBWESTON_MAJOR@.la \
490 $(LCMS_LIBS) \
491 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500492cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800493cms_static_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300494 compositor/cms-static.c \
495 compositor/cms-helper.c \
496 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700497 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800498if ENABLE_COLORD
499module_LTLIBRARIES += cms-colord.la
500cms_colord_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200501cms_colord_la_LIBADD = \
502 libshared.la \
503 libweston-@LIBWESTON_MAJOR@.la \
504 $(COLORD_LIBS) \
505 $(LCMS_LIBS) \
506 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500507cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800508cms_colord_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300509 compositor/cms-colord.c \
510 compositor/cms-helper.c \
511 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700512 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800513endif
514endif
515
516noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500517spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800518spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
519spring_tool_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300520 libweston/spring-tool.c \
521 libweston/animation.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800522 shared/matrix.c \
523 shared/matrix.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300524 libweston/compositor.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800525
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800526if BUILD_CLIENTS
527
528bin_PROGRAMS += weston-terminal weston-info
529
530libexec_PROGRAMS += \
531 weston-desktop-shell \
532 weston-screenshooter \
533 weston-keyboard \
534 weston-simple-im
535
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900536if ENABLE_IVI_SHELL
537libexec_PROGRAMS += \
538 weston-ivi-shell-user-interface
539endif
540
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800541demo_clients = \
542 weston-flower \
543 weston-image \
544 weston-cliptest \
545 weston-dnd \
546 weston-smoke \
547 weston-resizor \
548 weston-eventdemo \
549 weston-clickdot \
Jonas Ådahl61831f42016-03-15 18:14:00 +0800550 weston-confine \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800551 weston-transformed \
552 weston-fullscreen \
553 weston-stacking \
554 weston-calibrator \
555 weston-scaler
556
557if INSTALL_DEMO_CLIENTS
558bin_PROGRAMS += $(demo_clients)
559else
560noinst_PROGRAMS += $(demo_clients)
561endif
562
563
564if BUILD_SIMPLE_CLIENTS
565demo_clients += \
566 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500567 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800568 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400569 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800570 weston-multi-resource
571
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800572weston_simple_shm_SOURCES = clients/simple-shm.c
573nodist_weston_simple_shm_SOURCES = \
Jonas Ådahle023cbc2016-08-11 23:29:38 +0800574 protocol/xdg-shell-unstable-v6-protocol.c \
575 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800576 protocol/fullscreen-shell-unstable-v1-protocol.c \
577 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900578 protocol/ivi-application-protocol.c \
579 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800580weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800581weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800582
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500583weston_simple_damage_SOURCES = clients/simple-damage.c
584nodist_weston_simple_damage_SOURCES = \
Pekka Paalanen7b69d6c2016-04-15 17:00:21 +0300585 protocol/viewporter-protocol.c \
586 protocol/viewporter-client-protocol.h \
Jonas Ådahla74eff92016-08-11 23:39:31 +0800587 protocol/xdg-shell-unstable-v6-protocol.c \
588 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800589 protocol/fullscreen-shell-unstable-v1-protocol.c \
590 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500591weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
592weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
593
Jon A. Cruzb09da242015-06-16 13:15:13 -0700594weston_simple_touch_SOURCES = \
595 clients/simple-touch.c \
596 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800597weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800598weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800599
Jon A. Cruzb09da242015-06-16 13:15:13 -0700600weston_presentation_shm_SOURCES = \
601 clients/presentation-shm.c \
602 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400603nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200604 protocol/presentation-time-protocol.c \
605 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400606weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300607weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400608
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800609weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800610weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300611weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800612endif
613
614if BUILD_SIMPLE_EGL_CLIENTS
615demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800616weston_simple_egl_SOURCES = clients/simple-egl.c
617nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl83630022016-08-11 23:13:20 +0800618 protocol/xdg-shell-unstable-v6-protocol.c \
619 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900620 protocol/ivi-application-protocol.c \
621 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800622weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800623weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
624endif
625
Varad Gautamf9dec672016-11-17 17:25:59 +0530626if BUILD_SIMPLE_DMABUF_DRM_CLIENT
627demo_clients += weston-simple-dmabuf-drm
Varad Gautamee589112016-11-23 14:03:21 +0530628weston_simple_dmabuf_drm_SOURCES = \
629 clients/simple-dmabuf-drm.c \
630 clients/simple-dmabuf-drm-data.h
Varad Gautamf9dec672016-11-17 17:25:59 +0530631nodist_weston_simple_dmabuf_drm_SOURCES = \
Jonas Ådahl42682622016-08-11 23:44:41 +0800632 protocol/xdg-shell-unstable-v6-protocol.c \
633 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800634 protocol/fullscreen-shell-unstable-v1-protocol.c \
635 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800636 protocol/linux-dmabuf-unstable-v1-protocol.c \
637 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Varad Gautamf9dec672016-11-17 17:25:59 +0530638weston_simple_dmabuf_drm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_DRM_CLIENT_CFLAGS)
Varad Gautamf7b3a392017-04-26 19:17:18 +0530639weston_simple_dmabuf_drm_LDADD = $(SIMPLE_DMABUF_DRM_CLIENT_LIBS) $(LIBDRM_PLATFORM_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800640BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200641endif
642
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000643if BUILD_SIMPLE_DMABUF_V4L_CLIENT
644demo_clients += weston-simple-dmabuf-v4l
645weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
646nodist_weston_simple_dmabuf_v4l_SOURCES = \
Jonas Ådahl6ccd2862016-08-12 10:01:29 +0800647 protocol/xdg-shell-unstable-v6-protocol.c \
648 protocol/xdg-shell-unstable-v6-client-protocol.h \
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000649 protocol/fullscreen-shell-unstable-v1-protocol.c \
650 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
651 protocol/linux-dmabuf-unstable-v1-protocol.c \
652 protocol/linux-dmabuf-unstable-v1-client-protocol.h
653weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
654weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
655BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
656endif
657
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800658noinst_LTLIBRARIES += libtoytoolkit.la
659
660libtoytoolkit_la_SOURCES = \
661 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700662 clients/window.h \
663 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800664
665nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100666 protocol/text-cursor-position-protocol.c \
667 protocol/text-cursor-position-client-protocol.h \
Pekka Paalanen73511002016-04-15 16:53:41 +0300668 protocol/viewporter-protocol.c \
669 protocol/viewporter-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800670 protocol/xdg-shell-unstable-v6-protocol.c \
671 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900672 protocol/ivi-application-protocol.c \
Jonas Ådahle5a1bb42014-11-25 10:25:27 +0800673 protocol/ivi-application-client-protocol.h \
674 protocol/pointer-constraints-unstable-v1-protocol.c \
675 protocol/pointer-constraints-unstable-v1-client-protocol.h \
676 protocol/relative-pointer-unstable-v1-protocol.c \
677 protocol/relative-pointer-unstable-v1-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500678
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800679BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
680
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800681
682libtoytoolkit_la_LIBADD = \
683 $(CLIENT_LIBS) \
684 $(CAIRO_EGL_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300685 libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800686libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800687
688weston_flower_SOURCES = clients/flower.c
689weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800690weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800691
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100692weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800693 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800694nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800695 protocol/weston-screenshooter-protocol.c \
696 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800697weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800698weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800699
Jon A. Cruzb09da242015-06-16 13:15:13 -0700700weston_terminal_SOURCES = \
701 clients/terminal.c \
702 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800703weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800704weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800705
706weston_image_SOURCES = clients/image.c
707weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800708weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800709
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300710weston_cliptest_SOURCES = \
711 clients/cliptest.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300712 libweston/vertex-clipping.c \
713 libweston/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800714weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800715weston_cliptest_LDADD = libtoytoolkit.la
716
Jon A. Cruzb09da242015-06-16 13:15:13 -0700717weston_dnd_SOURCES = \
718 clients/dnd.c \
719 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800720weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800721weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800722
723weston_smoke_SOURCES = clients/smoke.c
724weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800725weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800726
727weston_resizor_SOURCES = clients/resizor.c
728weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800729weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800730
731weston_scaler_SOURCES = clients/scaler.c
732weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800733weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800734
735if HAVE_CAIRO_GLESV2
736demo_clients += weston-nested weston-nested-client
737
Jon A. Cruzb09da242015-06-16 13:15:13 -0700738weston_nested_SOURCES = \
739 clients/nested.c \
740 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800741weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800742weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800743
744weston_nested_client_SOURCES = clients/nested-client.c
745weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800746weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800747endif
748
Jon A. Cruzb09da242015-06-16 13:15:13 -0700749weston_eventdemo_SOURCES = \
750 clients/eventdemo.c \
751 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800752weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800753weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800754
Jon A. Cruzb09da242015-06-16 13:15:13 -0700755weston_clickdot_SOURCES = \
756 clients/clickdot.c \
757 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800758weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800759weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800760
Jonas Ådahl61831f42016-03-15 18:14:00 +0800761weston_confine_SOURCES = \
762 clients/confine.c \
763 shared/helpers.h
764weston_confine_LDADD = libtoytoolkit.la
765weston_confine_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
766
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800767weston_transformed_SOURCES = clients/transformed.c
768weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800769weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800770
771weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500772nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800773 protocol/fullscreen-shell-unstable-v1-protocol.c \
774 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800775weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800776weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800777
Jon A. Cruzb09da242015-06-16 13:15:13 -0700778weston_stacking_SOURCES = \
779 clients/stacking.c \
780 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800781weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800782weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800783
Jon A. Cruzb09da242015-06-16 13:15:13 -0700784weston_calibrator_SOURCES = \
785 clients/calibrator.c \
786 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800787 shared/matrix.c \
788 shared/matrix.h
789weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800790weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800791
792if BUILD_SUBSURFACES_CLIENT
793demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700794weston_subsurfaces_SOURCES = \
795 clients/subsurfaces.c \
796 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800797weston_subsurfaces_CFLAGS = \
798 $(AM_CFLAGS) \
799 $(SIMPLE_EGL_CLIENT_CFLAGS) \
800 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800801weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
802endif
803
804if HAVE_PANGO
805demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700806weston_editor_SOURCES = \
807 clients/editor.c \
808 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800809nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800810 protocol/text-input-unstable-v1-protocol.c \
811 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800812weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800813weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800814endif
815
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800816weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800817nodist_weston_keyboard_SOURCES = \
818 protocol/weston-desktop-shell-client-protocol.h \
819 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800820 protocol/input-method-unstable-v1-protocol.c \
821 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800822weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800823weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800824
Bryce Harringtonc6a899d2016-10-11 16:24:05 -0700825weston_simple_im_SOURCES = clients/simple-im.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800826nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800827 protocol/input-method-unstable-v1-protocol.c \
828 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800829weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800830weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800831
Jon A. Cruzb09da242015-06-16 13:15:13 -0700832weston_info_SOURCES = \
833 clients/weston-info.c \
834 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400835nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200836 protocol/presentation-time-protocol.c \
837 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800838weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200839weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800840
Jon A. Cruzb09da242015-06-16 13:15:13 -0700841weston_desktop_shell_SOURCES = \
842 clients/desktop-shell.c \
843 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800844nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800845 protocol/weston-desktop-shell-client-protocol.h \
846 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800847weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800848weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800849
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900850if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700851weston_ivi_shell_user_interface_SOURCES = \
852 clients/ivi-shell-user-interface.c \
853 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900854nodist_weston_ivi_shell_user_interface_SOURCES = \
855 protocol/ivi-hmi-controller-client-protocol.h \
856 protocol/ivi-hmi-controller-protocol.c \
857 protocol/ivi-application-client-protocol.h \
858 protocol/ivi-application-protocol.c
859weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
860weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
861endif
862
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800863if BUILD_FULL_GL_CLIENTS
864demo_clients += weston-gears
865weston_gears_SOURCES = clients/gears.c
866weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800867weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800868endif
869
870endif
871
872BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800873 protocol/weston-screenshooter-protocol.c \
874 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100875 protocol/text-cursor-position-client-protocol.h \
876 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800877 protocol/text-input-unstable-v1-protocol.c \
878 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800879 protocol/input-method-unstable-v1-protocol.c \
880 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800881 protocol/weston-desktop-shell-client-protocol.h \
882 protocol/weston-desktop-shell-protocol.c \
Pekka Paalanen73511002016-04-15 16:53:41 +0300883 protocol/viewporter-client-protocol.h \
884 protocol/viewporter-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200885 protocol/presentation-time-protocol.c \
886 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800887 protocol/fullscreen-shell-unstable-v1-protocol.c \
888 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800889 protocol/xdg-shell-unstable-v6-protocol.c \
890 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900891 protocol/ivi-hmi-controller-protocol.c \
892 protocol/ivi-hmi-controller-client-protocol.h \
893 protocol/ivi-application-protocol.c \
Bryce Harrington6303d3b2016-08-30 12:04:05 -0700894 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800895
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800896westondatadir = $(datadir)/weston
897dist_westondata_DATA = \
898 data/wayland.svg \
899 data/wayland.png \
900 data/pattern.png \
901 data/terminal.png \
902 data/border.png \
Bryce Harrington6bc52542016-03-24 17:57:39 -0700903 data/icon_editor.png \
904 data/icon_flower.png \
905 data/icon_terminal.png \
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800906 data/icon_window.png \
907 data/sign_close.png \
908 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100909 data/sign_minimize.png
910
911if ENABLE_IVI_SHELL
912dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900913 data/background.png \
914 data/tiling.png \
915 data/fullscreen.png \
916 data/panel.png \
917 data/random.png \
918 data/sidebyside.png \
919 data/home.png \
920 data/icon_ivi_clickdot.png \
921 data/icon_ivi_flower.png \
922 data/icon_ivi_simple-egl.png \
923 data/icon_ivi_simple-shm.png \
924 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100925endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800926
927
928if BUILD_WCAP_TOOLS
929bin_PROGRAMS += wcap-decode
930
931wcap_decode_SOURCES = \
932 wcap/main.c \
933 wcap/wcap-decode.c \
934 wcap/wcap-decode.h
935
Derek Foreman4ff38742015-06-18 11:43:11 -0500936wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800937wcap_decode_LDADD = $(WCAP_LIBS)
938endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800939
940
941if ENABLE_DESKTOP_SHELL
942
943module_LTLIBRARIES += desktop-shell.la
944
945desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100946 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800947 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300948 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100949 -I$(top_srcdir)/libweston \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800950 -I$(top_builddir)/desktop-shell \
951 -DDATADIR='"$(datadir)"' \
952 -DMODULEDIR='"$(moduledir)"' \
953 -DLIBEXECDIR='"$(libexecdir)"' \
954 -DIN_WESTON
955
956desktop_shell_la_LDFLAGS = -module -avoid-version
Quentin Glidic8f9d90a2016-08-12 10:41:36 +0200957desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500958desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800959desktop_shell_la_SOURCES = \
960 desktop-shell/shell.h \
961 desktop-shell/shell.c \
962 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700963 desktop-shell/input-panel.c \
964 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800965nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800966 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahl5ac91a12016-08-15 17:31:02 +0800967 protocol/weston-desktop-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800968
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800969BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800970endif
971
Jason Ekstrand946a9482014-04-02 19:53:47 -0500972if ENABLE_FULLSCREEN_SHELL
973
974module_LTLIBRARIES += fullscreen-shell.la
975
976fullscreen_shell_la_CPPFLAGS = \
977 -I$(top_builddir)/protocol \
978 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300979 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100980 -I$(top_srcdir)/libweston \
Jason Ekstrand946a9482014-04-02 19:53:47 -0500981 -DIN_WESTON
982
983fullscreen_shell_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200984fullscreen_shell_la_LIBADD = \
985 libweston-@LIBWESTON_MAJOR@.la \
986 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500987fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500988fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700989 fullscreen-shell/fullscreen-shell.c \
990 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500991nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800992 protocol/fullscreen-shell-unstable-v1-protocol.c \
993 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500994
995BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
996endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800997
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900998if ENABLE_IVI_SHELL
999
1000module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +09001001 $(ivi_shell) \
1002 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +09001003
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +09001004ivi_shell = ivi-shell.la
1005ivi_shell_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001006ivi_shell_la_LIBADD = \
1007 libshared.la \
1008 libweston-@LIBWESTON_MAJOR@.la \
1009 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -05001010ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +09001011ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +09001012 ivi-shell/ivi-layout-export.h \
1013 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +02001014 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +09001015 ivi-shell/ivi-layout.c \
1016 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +09001017 ivi-shell/ivi-shell.h \
1018 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001019 ivi-shell/input-panel-ivi.c \
1020 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +09001021nodist_ivi_shell_la_SOURCES = \
1022 protocol/ivi-application-protocol.c \
1023 protocol/ivi-application-server-protocol.h
1024
1025BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
1026
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +09001027hmi_controller = hmi-controller.la
1028hmi_controller_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001029hmi_controller_la_LIBADD = \
1030 libshared.la \
1031 libweston-@LIBWESTON_MAJOR@.la \
1032 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -05001033hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +09001034hmi_controller_la_SOURCES = \
1035 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001036 ivi-shell/hmi-controller.c \
1037 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +09001038nodist_hmi_controller_la_SOURCES = \
1039 protocol/ivi-hmi-controller-protocol.c \
1040 protocol/ivi-hmi-controller-server-protocol.h
1041
1042BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
1043
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +09001044endif
1045
1046
Jason Ekstrand47928d82014-04-02 19:54:01 -05001047if ENABLE_SCREEN_SHARING
1048
1049module_LTLIBRARIES += screen-share.la
1050
1051screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
1052screen_share_la_LDFLAGS = -module -avoid-version
1053screen_share_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001054 libshared-cairo.la \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001055 libweston-@LIBWESTON_MAJOR@.la \
Jason Ekstrand47928d82014-04-02 19:54:01 -05001056 $(COMPOSITOR_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +01001057 $(SCREEN_SHARE_LIBS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001058screen_share_la_CFLAGS = \
1059 $(COMPOSITOR_CFLAGS) \
1060 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -05001061 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001062screen_share_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +03001063 compositor/screen-share.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001064 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001065nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +08001066 protocol/fullscreen-shell-unstable-v1-protocol.c \
1067 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001068
1069endif
1070
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001071if ENABLE_XWAYLAND
1072
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001073libweston_module_LTLIBRARIES += xwayland.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001074
1075xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001076 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001077 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001078 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +01001079 -I$(top_srcdir)/libweston \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001080 -I$(top_builddir)/xwayland \
1081 -DDATADIR='"$(datadir)"' \
1082 -DMODULEDIR='"$(moduledir)"' \
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001083 -DLIBEXECDIR='"$(libexecdir)"'
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001084
1085xwayland_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001086xwayland_la_LIBADD = \
1087 libshared-cairo.la \
1088 libweston-@LIBWESTON_MAJOR@.la \
Emil Velikov67351452016-07-22 14:52:42 +01001089 $(XWAYLAND_LIBS)
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001090xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -05001091 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001092 $(COMPOSITOR_CFLAGS) \
1093 $(PIXMAN_CFLAGS) \
1094 $(CAIRO_CFLAGS)
1095xwayland_la_SOURCES = \
1096 xwayland/xwayland.h \
Quentin Glidic955cec02016-08-12 10:41:35 +02001097 xwayland/xwayland-internal-interface.h \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001098 xwayland/window-manager.c \
1099 xwayland/selection.c \
1100 xwayland/dnd.c \
1101 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001102 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001103 xwayland/hash.h \
1104 shared/helpers.h
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001105
1106libwestoninclude_HEADERS += xwayland/xwayland-api.h
1107
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001108endif
1109
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001110
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001111#
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001112# Shared utilities
1113#
1114
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001115noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1116 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001117
Derek Foreman4ff38742015-06-18 11:43:11 -05001118libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001119
1120libshared_la_SOURCES = \
1121 shared/config-parser.c \
1122 shared/option-parser.c \
1123 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001124 shared/file-util.c \
1125 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001126 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001127 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001128 shared/os-compatibility.h \
1129 shared/xalloc.c \
1130 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001131
1132libshared_cairo_la_CFLAGS = \
1133 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001134 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001135 $(COMPOSITOR_CFLAGS) \
1136 $(PIXMAN_CFLAGS) \
1137 $(CAIRO_CFLAGS) \
1138 $(PNG_CFLAGS) \
1139 $(WEBP_CFLAGS)
1140
1141libshared_cairo_la_LIBADD = \
1142 $(PIXMAN_LIBS) \
1143 $(CAIRO_LIBS) \
1144 $(PNG_LIBS) \
1145 $(WEBP_LIBS) \
1146 $(JPEG_LIBS)
1147
1148libshared_cairo_la_SOURCES = \
1149 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001150 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001151 shared/image-loader.c \
1152 shared/image-loader.h \
1153 shared/cairo-util.c \
1154 shared/frame.c \
1155 shared/cairo-util.h
1156
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001157libzunitc_la_SOURCES = \
1158 tools/zunitc/inc/zunitc/zunitc.h \
1159 tools/zunitc/inc/zunitc/zunitc_impl.h \
1160 tools/zunitc/src/zuc_base_logger.c \
1161 tools/zunitc/src/zuc_base_logger.h \
1162 tools/zunitc/src/zuc_collector.c \
1163 tools/zunitc/src/zuc_collector.h \
1164 tools/zunitc/src/zuc_context.h \
1165 tools/zunitc/src/zuc_event.h \
1166 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001167 tools/zunitc/src/zuc_junit_reporter.c \
1168 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001169 tools/zunitc/src/zuc_types.h \
1170 tools/zunitc/src/zunitc_impl.c \
1171 shared/helpers.h
1172
1173libzunitc_la_CFLAGS = \
1174 $(AM_CFLAGS) \
1175 -I$(top_srcdir)/tools/zunitc/inc
1176
1177libzunitc_la_LIBADD = \
Gustavo Zacarias57c83f62016-04-22 10:54:35 -03001178 libshared.la \
1179 $(CLOCK_GETTIME_LIBS)
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001180
Jon A. Cruz646aef52015-07-15 19:22:41 -07001181if ENABLE_JUNIT_XML
1182libzunitc_la_CFLAGS += \
1183 $(LIBXML2_CFLAGS)
1184libzunitc_la_LIBADD += \
1185 $(LIBXML2_LIBS)
1186endif
1187
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001188libzunitcmain_la_SOURCES = \
1189 tools/zunitc/src/main.c
1190
1191libzunitcmain_la_CFLAGS = \
1192 $(AM_CFLAGS) \
1193 -I$(top_srcdir)/tools/zunitc/inc
1194
1195libzunitcmain_la_LIBADD = \
1196 libzunitc.la \
1197 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001198
1199#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001200# tests subdirectory
1201#
1202
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001203TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1204
1205internal_tests = \
1206 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001207
1208shared_tests = \
1209 config-parser.test \
Daniel Stone5ae7e842017-03-01 11:34:00 +00001210 timespec.test \
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001211 string.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001212 vertex-clip.test \
1213 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001214
1215module_tests = \
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001216 plugin-registry-test.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001217 surface-test.la \
1218 surface-global-test.la
1219
1220weston_tests = \
1221 bad_buffer.weston \
1222 keyboard.weston \
1223 event.weston \
1224 button.weston \
1225 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001226 presentation.weston \
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001227 viewporter.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001228 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001229 subsurface.weston \
Pekka Paalanene7c6aa62017-01-27 17:30:28 +01001230 subsurface-shot.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001231 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001232
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001233ivi_tests =
1234
1235$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001236
1237AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001238 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1239 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001240
1241TEST_EXTENSIONS = .la .weston
1242LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1243WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1244
1245clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001246 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001247 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001248
1249# To remove when automake 1.11 support is dropped
1250export abs_builddir
1251
1252noinst_LTLIBRARIES += \
1253 weston-test.la \
Quentin Glidic642bcaf2017-01-27 17:30:23 +01001254 weston-test-desktop-shell.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001255 $(module_tests) \
1256 libtest-runner.la \
1257 libtest-client.la
1258
1259noinst_PROGRAMS += \
1260 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001261 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001262 $(shared_tests) \
1263 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001264 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001265 matrix-test
1266
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001267test_module_ldflags = -module -avoid-version -rpath $(libdir)
1268test_module_libadd = \
1269 libweston-@LIBWESTON_MAJOR@.la \
1270 $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001271
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001272plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001273plugin_registry_test_la_LIBADD = $(test_module_libadd)
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001274plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1275plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1276
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001277surface_global_test_la_SOURCES = tests/surface-global-test.c
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001278surface_global_test_la_LIBADD = $(test_module_libadd)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001279surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001280surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001281
1282surface_test_la_SOURCES = tests/surface-test.c
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001283surface_test_la_LIBADD = $(test_module_libadd)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001284surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001285surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001286
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001287weston_test_la_LIBADD = libshared.la $(test_module_libadd)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001288weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001289weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001290weston_test_la_SOURCES = \
1291 tests/weston-test.c \
1292 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001293nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001294 protocol/weston-test-protocol.c \
1295 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001296
Quentin Glidic642bcaf2017-01-27 17:30:23 +01001297weston_test_desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
1298weston_test_desktop_shell_la_LDFLAGS = $(test_module_ldflags)
1299weston_test_desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1300weston_test_desktop_shell_la_SOURCES = \
1301 tests/weston-test-desktop-shell.c \
1302 shared/helpers.h
1303
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001304if ENABLE_EGL
1305weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1306weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1307endif
1308
1309libtest_runner_la_SOURCES = \
1310 tests/weston-test-runner.c \
1311 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001312libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001313
1314config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001315config_parser_test_LDADD = \
1316 libshared.la \
1317 $(COMPOSITOR_LIBS) \
1318 libzunitc.la \
1319 libzunitcmain.la
1320config_parser_test_CFLAGS = \
1321 $(AM_CFLAGS) \
1322 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001323
Daniel Stone5ae7e842017-03-01 11:34:00 +00001324timespec_test_SOURCES = tests/timespec-test.c
1325timespec_test_LDADD = \
1326 libshared.la \
1327 libzunitc.la \
1328 libzunitcmain.la
1329timespec_test_CFLAGS = \
1330 $(AM_CFLAGS) \
1331 -I$(top_srcdir)/tools/zunitc/inc
1332
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001333string_test_SOURCES = \
1334 tests/string-test.c \
1335 shared/string-helpers.h
1336string_test_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1337string_test_LDADD = libtest-client.la
1338
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001339vertex_clip_test_SOURCES = \
1340 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001341 shared/helpers.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001342 libweston/vertex-clipping.c \
1343 libweston/vertex-clipping.h
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001344vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001345
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001346libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001347 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001348 tests/weston-test-client-helper.h
1349nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001350 protocol/weston-test-protocol.c \
1351 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001352libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +01001353libtest_client_la_LIBADD = libshared.la libtest-runner.la $(TEST_CLIENT_LIBS) $(CAIRO_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001354
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001355
1356#
1357# Internal tests - tests functionality of the testsuite itself
1358#
1359
1360internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001361internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1362internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001363
1364
1365#
1366# Weston Tests
1367#
1368
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001369bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001370bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001371bad_buffer_weston_LDADD = libtest-client.la
1372
1373keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001374keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001375keyboard_weston_LDADD = libtest-client.la
1376
1377event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001378event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001379event_weston_LDADD = libtest-client.la
1380
1381button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001382button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001383button_weston_LDADD = libtest-client.la
1384
Marek Chalupa5fd81402015-03-30 09:21:29 -04001385devices_weston_SOURCES = tests/devices-test.c
1386devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1387devices_weston_LDADD = libtest-client.la
1388
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001389text_weston_SOURCES = tests/text-test.c
1390nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001391 protocol/text-input-unstable-v1-protocol.c \
1392 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001393text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001394text_weston_LDADD = libtest-client.la
1395
1396subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001397subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001398subsurface_weston_LDADD = libtest-client.la
1399
Pekka Paalanene7c6aa62017-01-27 17:30:28 +01001400subsurface_shot_weston_SOURCES = tests/subsurface-shot-test.c
1401subsurface_shot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1402subsurface_shot_weston_LDADD = libtest-client.la
1403
Jon A. Cruzb09da242015-06-16 13:15:13 -07001404presentation_weston_SOURCES = \
1405 tests/presentation-test.c \
1406 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001407nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001408 protocol/presentation-time-protocol.c \
1409 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001410presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1411presentation_weston_LDADD = libtest-client.la
1412
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001413roles_weston_SOURCES = tests/roles-test.c
1414roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1415roles_weston_LDADD = libtest-client.la
1416
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001417viewporter_weston_SOURCES = \
1418 tests/viewporter-test.c \
1419 shared/helpers.h
1420nodist_viewporter_weston_SOURCES = \
1421 protocol/viewporter-protocol.c \
1422 protocol/viewporter-client-protocol.h
1423viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1424viewporter_weston_LDADD = libtest-client.la
1425
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001426if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001427weston_tests += xwayland-test.weston
1428xwayland_test_weston_SOURCES = tests/xwayland-test.c
Daniel Stone2295a622016-11-29 11:05:49 +00001429xwayland_test_weston_CFLAGS = \
1430 $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS) -DXSERVER_PATH='"@XSERVER_PATH@"'
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001431xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001432endif
1433
1434matrix_test_SOURCES = \
1435 tests/matrix-test.c \
1436 shared/matrix.c \
1437 shared/matrix.h
1438matrix_test_CPPFLAGS = -DUNIT_TEST
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001439matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001440
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001441if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001442module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001443 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001444 ivi-layout-test.la
1445
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001446ivi_layout_internal_test_la_LIBADD = $(test_module_libadd)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001447ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001448ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001449ivi_layout_internal_test_la_SOURCES = \
1450 tests/ivi_layout-internal-test.c
1451
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001452ivi_layout_test_la_LIBADD = $(test_module_libadd)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001453ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001454ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001455ivi_layout_test_la_SOURCES = \
1456 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001457 tests/ivi-test.h \
1458 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001459nodist_ivi_layout_test_la_SOURCES = \
1460 protocol/weston-test-protocol.c \
1461 protocol/weston-test-server-protocol.h
1462
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001463ivi_tests += \
1464 ivi-shell-app.weston
1465
1466ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1467nodist_ivi_shell_app_weston_SOURCES = \
1468 protocol/ivi-application-protocol.c \
1469 protocol/ivi-application-client-protocol.h
1470ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1471ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001472
1473noinst_PROGRAMS += ivi-layout.ivi
1474
1475ivi_layout_ivi_SOURCES = \
1476 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001477 tests/ivi-test.h \
1478 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001479nodist_ivi_layout_ivi_SOURCES = \
1480 protocol/ivi-application-protocol.c \
1481 protocol/ivi-application-client-protocol.h
1482ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1483ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001484endif
1485
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001486if BUILD_SETBACKLIGHT
1487noinst_PROGRAMS += setbacklight
1488setbacklight_SOURCES = \
1489 tests/setbacklight.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001490 libweston/libbacklight.c \
1491 libweston/libbacklight.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001492setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1493setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1494endif
1495
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001496all-local: zuctest$(EXEEXT)
1497
1498noinst_PROGRAMS += zuctest$(EXEEXT)
1499
1500zuctest_LDADD = \
1501 libzunitc.la \
1502 libzunitcmain.la
1503
1504zuctest_CFLAGS = \
1505 $(AM_CFLAGS) \
1506 -I$(top_srcdir)/tools/zunitc/inc
1507
1508zuctest_SOURCES = \
1509 tools/zunitc/test/fixtures_test.c \
1510 tools/zunitc/test/zunitc_test.c
1511
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001512EXTRA_DIST += \
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001513 tests/internal-screenshot.ini \
1514 tests/reference/internal-screenshot-bad-00.png \
Pekka Paalanene7c6aa62017-01-27 17:30:28 +01001515 tests/reference/internal-screenshot-good-00.png \
1516 tests/reference/subsurface_z_order-00.png \
1517 tests/reference/subsurface_z_order-01.png \
1518 tests/reference/subsurface_z_order-02.png \
1519 tests/reference/subsurface_z_order-03.png \
1520 tests/reference/subsurface_z_order-04.png \
1521 tests/weston-tests-env
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001522
1523BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001524 protocol/weston-test-protocol.c \
1525 protocol/weston-test-server-protocol.h \
1526 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001527 protocol/text-input-unstable-v1-protocol.c \
1528 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001529
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001530EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001531 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001532 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001533 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001534 protocol/weston-test.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001535 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001536 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001537
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001538#
1539# manual test modules in tests subdirectory
1540#
1541
1542noinst_LTLIBRARIES += \
1543 surface-screenshot.la
1544
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001545surface_screenshot_la_LIBADD = libshared.la $(test_module_libadd)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001546surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001547surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001548surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1549
1550
1551#
1552# Documentation
1553#
1554
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001555man_MANS = weston.1 weston.ini.5
1556
1557if ENABLE_DRM_COMPOSITOR
1558man_MANS += weston-drm.7
1559endif
1560
1561MAN_SUBSTS = \
1562 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1563 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1564 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1565 -e 's|__version__|$(PACKAGE_VERSION)|g'
1566
1567SUFFIXES = .1 .5 .7 .man
1568
1569%.1 %.5 %.7 : man/%.man
1570 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1571
1572EXTRA_DIST += \
1573 man/weston.man \
1574 man/weston-drm.man \
1575 man/weston.ini.man
1576
1577CLEANFILES += $(man_MANS)
1578
Jon A. Cruz179c1862015-07-15 19:22:43 -07001579if ENABLE_DEVDOCS
1580DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1581
1582docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1583 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1584
1585docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1586 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1587endif
1588
1589DOCDIRS = \
1590 docs/developer \
1591 docs/tools
1592
1593$(DOCDIRS):
1594 $(MKDIR_P) $@
1595
1596.PHONY: doc $(DOXYGEN_INDICES)
1597
1598doc: $(DOXYGEN_INDICES)
1599
Jonas Ådahl496adb32015-11-17 16:00:27 +08001600.SECONDEXPANSION:
1601
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001602define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001603$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001604endef
1605
1606define protoname
1607$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1608endef
1609
1610protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001611 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1612
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001613protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001614 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1615
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001616protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001617 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1618
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001619protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1620 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001621
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001622protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1623 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001624
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001625protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1626 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@