blob: 9d99c6949fbd40aaab53c32c30ebcd989f31027d [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) \
Arnaud Vracd6d97da2017-08-05 13:58:59 +020077 $(DL_LIBS) -lm $(CLOCK_GETTIME_LIBS) \
Giulio Camuffo8aedf7b2016-06-02 21:48:12 +030078 $(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) \
Arnaud Vracd6d97da2017-08-05 13:58:59 +0200197 $(DL_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 \
Alexandros Frantzise39eb8f2017-09-27 15:09:15 +0300337 libweston/weston-sync-file.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700338 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800339endif
340
341if ENABLE_X11_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300342libweston_module_LTLIBRARIES += x11-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800343x11_backend_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200344x11_backend_la_LIBADD = \
345 libshared-cairo.la \
346 libweston-@LIBWESTON_MAJOR@.la \
347 $(X11_COMPOSITOR_LIBS) \
348 $(COMPOSITOR_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800349x11_backend_la_CFLAGS = \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200350 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800351 $(COMPOSITOR_CFLAGS) \
352 $(EGL_CFLAGS) \
353 $(PIXMAN_CFLAGS) \
354 $(CAIRO_CFLAGS) \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200355 $(X11_COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700356x11_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300357 libweston/compositor-x11.c \
358 libweston/compositor-x11.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700359 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800360endif
361
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100362INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000363INPUT_BACKEND_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300364 libweston/libinput-seat.c \
365 libweston/libinput-seat.h \
366 libweston/libinput-device.c \
367 libweston/libinput-device.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700368 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100369
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800370if ENABLE_DRM_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300371libweston_module_LTLIBRARIES += drm-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800372drm_backend_la_LDFLAGS = -module -avoid-version
373drm_backend_la_LIBADD = \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200374 libsession-helper.la \
375 libweston-@LIBWESTON_MAJOR@.la \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800376 $(COMPOSITOR_LIBS) \
377 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100378 $(INPUT_BACKEND_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300379 libshared.la \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200380 $(CLOCK_GETTIME_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800381drm_backend_la_CFLAGS = \
382 $(COMPOSITOR_CFLAGS) \
383 $(EGL_CFLAGS) \
384 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500385 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800386drm_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300387 libweston/compositor-drm.c \
388 libweston/compositor-drm.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100389 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700390 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200391 shared/timespec-util.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300392 libweston/libbacklight.c \
393 libweston/libbacklight.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800394
395if ENABLE_VAAPI_RECORDER
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300396drm_backend_la_SOURCES += libweston/vaapi-recorder.c libweston/vaapi-recorder.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800397drm_backend_la_LIBADD += $(LIBVA_LIBS)
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200398drm_backend_la_LDFLAGS += -pthread
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800399drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
400endif
401endif
402
403if ENABLE_WAYLAND_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300404libweston_module_LTLIBRARIES += wayland-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800405wayland_backend_la_LDFLAGS = -module -avoid-version
406wayland_backend_la_LIBADD = \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200407 libshared-cairo.la \
408 libweston-@LIBWESTON_MAJOR@.la \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800409 $(COMPOSITOR_LIBS) \
Armin Krezovićb08e1a52016-12-09 22:58:27 +0100410 $(WAYLAND_COMPOSITOR_EGL_LIBS) \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200411 $(WAYLAND_COMPOSITOR_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800412wayland_backend_la_CFLAGS = \
413 $(COMPOSITOR_CFLAGS) \
414 $(EGL_CFLAGS) \
415 $(PIXMAN_CFLAGS) \
416 $(CAIRO_CFLAGS) \
417 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500418 $(AM_CFLAGS)
Armin Krezović34476192016-11-21 18:42:42 +0100419wayland_backend_la_SOURCES = \
420 libweston/compositor-wayland.c \
421 libweston/compositor-wayland.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700422 shared/helpers.h
Pekka Paalanen9f3d95e2016-11-23 11:46:57 +0200423nodist_wayland_backend_la_SOURCES = \
424 protocol/fullscreen-shell-unstable-v1-protocol.c \
425 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
426 protocol/xdg-shell-unstable-v6-protocol.c \
427 protocol/xdg-shell-unstable-v6-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800428endif
429
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800430if ENABLE_HEADLESS_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300431libweston_module_LTLIBRARIES += headless-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800432headless_backend_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200433headless_backend_la_LIBADD = \
434 libshared.la \
435 libweston-@LIBWESTON_MAJOR@.la \
436 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500437headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700438headless_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300439 libweston/compositor-headless.c \
440 libweston/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700441 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800442endif
443
444if ENABLE_FBDEV_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300445libweston_module_LTLIBRARIES += fbdev-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800446fbdev_backend_la_LDFLAGS = -module -avoid-version
447fbdev_backend_la_LIBADD = \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200448 libshared.la \
449 libsession-helper.la \
450 libweston-@LIBWESTON_MAJOR@.la \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800451 $(COMPOSITOR_LIBS) \
452 $(FBDEV_COMPOSITOR_LIBS) \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200453 $(INPUT_BACKEND_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800454fbdev_backend_la_CFLAGS = \
455 $(COMPOSITOR_CFLAGS) \
456 $(EGL_CFLAGS) \
457 $(FBDEV_COMPOSITOR_CFLAGS) \
458 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500459 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800460fbdev_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300461 libweston/compositor-fbdev.c \
462 libweston/compositor-fbdev.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700463 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100464 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800465endif
466
467if ENABLE_RDP_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300468libweston_module_LTLIBRARIES += rdp-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800469rdp_backend_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200470rdp_backend_la_LIBADD = \
471 libshared.la \
472 libweston-@LIBWESTON_MAJOR@.la \
473 $(COMPOSITOR_LIBS) \
474 $(RDP_COMPOSITOR_LIBS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800475rdp_backend_la_CFLAGS = \
476 $(COMPOSITOR_CFLAGS) \
477 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500478 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700479rdp_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300480 libweston/compositor-rdp.c \
481 libweston/compositor-rdp.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700482 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800483endif
484
485if HAVE_LCMS
486module_LTLIBRARIES += cms-static.la
487cms_static_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200488cms_static_la_LIBADD = \
489 libshared.la \
490 libweston-@LIBWESTON_MAJOR@.la \
491 $(LCMS_LIBS) \
492 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500493cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800494cms_static_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300495 compositor/cms-static.c \
496 compositor/cms-helper.c \
497 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700498 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800499if ENABLE_COLORD
500module_LTLIBRARIES += cms-colord.la
501cms_colord_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200502cms_colord_la_LIBADD = \
503 libshared.la \
504 libweston-@LIBWESTON_MAJOR@.la \
505 $(COLORD_LIBS) \
506 $(LCMS_LIBS) \
507 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500508cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800509cms_colord_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300510 compositor/cms-colord.c \
511 compositor/cms-helper.c \
512 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700513 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800514endif
515endif
516
517noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500518spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800519spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
520spring_tool_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300521 libweston/spring-tool.c \
522 libweston/animation.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800523 shared/matrix.c \
524 shared/matrix.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300525 libweston/compositor.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800526
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800527if BUILD_CLIENTS
528
529bin_PROGRAMS += weston-terminal weston-info
530
531libexec_PROGRAMS += \
532 weston-desktop-shell \
533 weston-screenshooter \
534 weston-keyboard \
535 weston-simple-im
536
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900537if ENABLE_IVI_SHELL
538libexec_PROGRAMS += \
539 weston-ivi-shell-user-interface
540endif
541
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800542demo_clients = \
543 weston-flower \
544 weston-image \
545 weston-cliptest \
546 weston-dnd \
547 weston-smoke \
548 weston-resizor \
549 weston-eventdemo \
550 weston-clickdot \
Jonas Ådahl61831f42016-03-15 18:14:00 +0800551 weston-confine \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800552 weston-transformed \
553 weston-fullscreen \
554 weston-stacking \
555 weston-calibrator \
556 weston-scaler
557
558if INSTALL_DEMO_CLIENTS
559bin_PROGRAMS += $(demo_clients)
560else
561noinst_PROGRAMS += $(demo_clients)
562endif
563
564
565if BUILD_SIMPLE_CLIENTS
566demo_clients += \
567 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500568 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800569 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400570 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800571 weston-multi-resource
572
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800573weston_simple_shm_SOURCES = clients/simple-shm.c
574nodist_weston_simple_shm_SOURCES = \
Jonas Ådahle023cbc2016-08-11 23:29:38 +0800575 protocol/xdg-shell-unstable-v6-protocol.c \
576 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800577 protocol/fullscreen-shell-unstable-v1-protocol.c \
578 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900579 protocol/ivi-application-protocol.c \
580 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800581weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800582weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800583
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500584weston_simple_damage_SOURCES = clients/simple-damage.c
585nodist_weston_simple_damage_SOURCES = \
Pekka Paalanen7b69d6c2016-04-15 17:00:21 +0300586 protocol/viewporter-protocol.c \
587 protocol/viewporter-client-protocol.h \
Jonas Ådahla74eff92016-08-11 23:39:31 +0800588 protocol/xdg-shell-unstable-v6-protocol.c \
589 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800590 protocol/fullscreen-shell-unstable-v1-protocol.c \
591 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500592weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
593weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
594
Jon A. Cruzb09da242015-06-16 13:15:13 -0700595weston_simple_touch_SOURCES = \
596 clients/simple-touch.c \
597 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800598weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800599weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800600
Jon A. Cruzb09da242015-06-16 13:15:13 -0700601weston_presentation_shm_SOURCES = \
602 clients/presentation-shm.c \
603 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400604nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200605 protocol/presentation-time-protocol.c \
606 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400607weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300608weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400609
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800610weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800611weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300612weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800613endif
614
615if BUILD_SIMPLE_EGL_CLIENTS
616demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800617weston_simple_egl_SOURCES = clients/simple-egl.c
618nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl83630022016-08-11 23:13:20 +0800619 protocol/xdg-shell-unstable-v6-protocol.c \
620 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900621 protocol/ivi-application-protocol.c \
622 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800623weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800624weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
625endif
626
Varad Gautamf9dec672016-11-17 17:25:59 +0530627if BUILD_SIMPLE_DMABUF_DRM_CLIENT
628demo_clients += weston-simple-dmabuf-drm
Varad Gautamee589112016-11-23 14:03:21 +0530629weston_simple_dmabuf_drm_SOURCES = \
630 clients/simple-dmabuf-drm.c \
631 clients/simple-dmabuf-drm-data.h
Varad Gautamf9dec672016-11-17 17:25:59 +0530632nodist_weston_simple_dmabuf_drm_SOURCES = \
Jonas Ådahl42682622016-08-11 23:44:41 +0800633 protocol/xdg-shell-unstable-v6-protocol.c \
634 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800635 protocol/fullscreen-shell-unstable-v1-protocol.c \
636 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800637 protocol/linux-dmabuf-unstable-v1-protocol.c \
638 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Varad Gautamf9dec672016-11-17 17:25:59 +0530639weston_simple_dmabuf_drm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_DRM_CLIENT_CFLAGS)
Varad Gautamf7b3a392017-04-26 19:17:18 +0530640weston_simple_dmabuf_drm_LDADD = $(SIMPLE_DMABUF_DRM_CLIENT_LIBS) $(LIBDRM_PLATFORM_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800641BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200642endif
643
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000644if BUILD_SIMPLE_DMABUF_V4L_CLIENT
645demo_clients += weston-simple-dmabuf-v4l
646weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
647nodist_weston_simple_dmabuf_v4l_SOURCES = \
Jonas Ådahl6ccd2862016-08-12 10:01:29 +0800648 protocol/xdg-shell-unstable-v6-protocol.c \
649 protocol/xdg-shell-unstable-v6-client-protocol.h \
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000650 protocol/fullscreen-shell-unstable-v1-protocol.c \
651 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
652 protocol/linux-dmabuf-unstable-v1-protocol.c \
653 protocol/linux-dmabuf-unstable-v1-client-protocol.h
654weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
655weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
656BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
657endif
658
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800659noinst_LTLIBRARIES += libtoytoolkit.la
660
661libtoytoolkit_la_SOURCES = \
662 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700663 clients/window.h \
664 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800665
666nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100667 protocol/text-cursor-position-protocol.c \
668 protocol/text-cursor-position-client-protocol.h \
Pekka Paalanen73511002016-04-15 16:53:41 +0300669 protocol/viewporter-protocol.c \
670 protocol/viewporter-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800671 protocol/xdg-shell-unstable-v6-protocol.c \
672 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900673 protocol/ivi-application-protocol.c \
Jonas Ådahle5a1bb42014-11-25 10:25:27 +0800674 protocol/ivi-application-client-protocol.h \
675 protocol/pointer-constraints-unstable-v1-protocol.c \
676 protocol/pointer-constraints-unstable-v1-client-protocol.h \
677 protocol/relative-pointer-unstable-v1-protocol.c \
678 protocol/relative-pointer-unstable-v1-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500679
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800680BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
681
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800682
683libtoytoolkit_la_LIBADD = \
684 $(CLIENT_LIBS) \
685 $(CAIRO_EGL_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300686 libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800687libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800688
689weston_flower_SOURCES = clients/flower.c
690weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800691weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800692
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100693weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800694 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800695nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800696 protocol/weston-screenshooter-protocol.c \
697 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800698weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800699weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800700
Jon A. Cruzb09da242015-06-16 13:15:13 -0700701weston_terminal_SOURCES = \
702 clients/terminal.c \
703 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800704weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800705weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800706
707weston_image_SOURCES = clients/image.c
708weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800709weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800710
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300711weston_cliptest_SOURCES = \
712 clients/cliptest.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300713 libweston/vertex-clipping.c \
714 libweston/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800715weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800716weston_cliptest_LDADD = libtoytoolkit.la
717
Jon A. Cruzb09da242015-06-16 13:15:13 -0700718weston_dnd_SOURCES = \
719 clients/dnd.c \
720 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800721weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800722weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800723
724weston_smoke_SOURCES = clients/smoke.c
725weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800726weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800727
728weston_resizor_SOURCES = clients/resizor.c
729weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800730weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800731
732weston_scaler_SOURCES = clients/scaler.c
733weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800734weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800735
736if HAVE_CAIRO_GLESV2
737demo_clients += weston-nested weston-nested-client
738
Jon A. Cruzb09da242015-06-16 13:15:13 -0700739weston_nested_SOURCES = \
740 clients/nested.c \
741 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800742weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800743weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800744
745weston_nested_client_SOURCES = clients/nested-client.c
746weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800747weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800748endif
749
Jon A. Cruzb09da242015-06-16 13:15:13 -0700750weston_eventdemo_SOURCES = \
751 clients/eventdemo.c \
752 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800753weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800754weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800755
Jon A. Cruzb09da242015-06-16 13:15:13 -0700756weston_clickdot_SOURCES = \
757 clients/clickdot.c \
758 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800759weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800760weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800761
Jonas Ådahl61831f42016-03-15 18:14:00 +0800762weston_confine_SOURCES = \
763 clients/confine.c \
764 shared/helpers.h
765weston_confine_LDADD = libtoytoolkit.la
766weston_confine_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
767
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800768weston_transformed_SOURCES = clients/transformed.c
769weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800770weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800771
772weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500773nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800774 protocol/fullscreen-shell-unstable-v1-protocol.c \
775 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800776weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800777weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800778
Jon A. Cruzb09da242015-06-16 13:15:13 -0700779weston_stacking_SOURCES = \
780 clients/stacking.c \
781 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800782weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800783weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800784
Jon A. Cruzb09da242015-06-16 13:15:13 -0700785weston_calibrator_SOURCES = \
786 clients/calibrator.c \
787 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800788 shared/matrix.c \
789 shared/matrix.h
790weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800791weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800792
793if BUILD_SUBSURFACES_CLIENT
794demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700795weston_subsurfaces_SOURCES = \
796 clients/subsurfaces.c \
797 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800798weston_subsurfaces_CFLAGS = \
799 $(AM_CFLAGS) \
800 $(SIMPLE_EGL_CLIENT_CFLAGS) \
801 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800802weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
803endif
804
805if HAVE_PANGO
806demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700807weston_editor_SOURCES = \
808 clients/editor.c \
809 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800810nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800811 protocol/text-input-unstable-v1-protocol.c \
812 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800813weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800814weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800815endif
816
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800817weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800818nodist_weston_keyboard_SOURCES = \
819 protocol/weston-desktop-shell-client-protocol.h \
820 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800821 protocol/input-method-unstable-v1-protocol.c \
822 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800823weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800824weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800825
Bryce Harringtonc6a899d2016-10-11 16:24:05 -0700826weston_simple_im_SOURCES = clients/simple-im.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800827nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800828 protocol/input-method-unstable-v1-protocol.c \
829 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800830weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800831weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800832
Jon A. Cruzb09da242015-06-16 13:15:13 -0700833weston_info_SOURCES = \
834 clients/weston-info.c \
835 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400836nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200837 protocol/presentation-time-protocol.c \
838 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800839weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200840weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800841
Jon A. Cruzb09da242015-06-16 13:15:13 -0700842weston_desktop_shell_SOURCES = \
843 clients/desktop-shell.c \
844 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800845nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800846 protocol/weston-desktop-shell-client-protocol.h \
847 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800848weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800849weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800850
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900851if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700852weston_ivi_shell_user_interface_SOURCES = \
853 clients/ivi-shell-user-interface.c \
854 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900855nodist_weston_ivi_shell_user_interface_SOURCES = \
856 protocol/ivi-hmi-controller-client-protocol.h \
857 protocol/ivi-hmi-controller-protocol.c \
858 protocol/ivi-application-client-protocol.h \
859 protocol/ivi-application-protocol.c
860weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
861weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
862endif
863
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800864if BUILD_FULL_GL_CLIENTS
865demo_clients += weston-gears
866weston_gears_SOURCES = clients/gears.c
867weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800868weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800869endif
870
871endif
872
873BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800874 protocol/weston-screenshooter-protocol.c \
875 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100876 protocol/text-cursor-position-client-protocol.h \
877 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800878 protocol/text-input-unstable-v1-protocol.c \
879 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800880 protocol/input-method-unstable-v1-protocol.c \
881 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800882 protocol/weston-desktop-shell-client-protocol.h \
883 protocol/weston-desktop-shell-protocol.c \
Pekka Paalanen73511002016-04-15 16:53:41 +0300884 protocol/viewporter-client-protocol.h \
885 protocol/viewporter-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200886 protocol/presentation-time-protocol.c \
887 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800888 protocol/fullscreen-shell-unstable-v1-protocol.c \
889 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800890 protocol/xdg-shell-unstable-v6-protocol.c \
891 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900892 protocol/ivi-hmi-controller-protocol.c \
893 protocol/ivi-hmi-controller-client-protocol.h \
894 protocol/ivi-application-protocol.c \
Bryce Harrington6303d3b2016-08-30 12:04:05 -0700895 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800896
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800897westondatadir = $(datadir)/weston
898dist_westondata_DATA = \
899 data/wayland.svg \
900 data/wayland.png \
901 data/pattern.png \
902 data/terminal.png \
903 data/border.png \
Bryce Harrington6bc52542016-03-24 17:57:39 -0700904 data/icon_editor.png \
905 data/icon_flower.png \
906 data/icon_terminal.png \
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800907 data/icon_window.png \
908 data/sign_close.png \
909 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100910 data/sign_minimize.png
911
912if ENABLE_IVI_SHELL
913dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900914 data/background.png \
915 data/tiling.png \
916 data/fullscreen.png \
917 data/panel.png \
918 data/random.png \
919 data/sidebyside.png \
920 data/home.png \
921 data/icon_ivi_clickdot.png \
922 data/icon_ivi_flower.png \
923 data/icon_ivi_simple-egl.png \
924 data/icon_ivi_simple-shm.png \
925 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100926endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800927
928
929if BUILD_WCAP_TOOLS
930bin_PROGRAMS += wcap-decode
931
932wcap_decode_SOURCES = \
933 wcap/main.c \
934 wcap/wcap-decode.c \
935 wcap/wcap-decode.h
936
Derek Foreman4ff38742015-06-18 11:43:11 -0500937wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800938wcap_decode_LDADD = $(WCAP_LIBS)
939endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800940
941
942if ENABLE_DESKTOP_SHELL
943
944module_LTLIBRARIES += desktop-shell.la
945
946desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100947 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800948 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300949 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100950 -I$(top_srcdir)/libweston \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800951 -I$(top_builddir)/desktop-shell \
952 -DDATADIR='"$(datadir)"' \
953 -DMODULEDIR='"$(moduledir)"' \
954 -DLIBEXECDIR='"$(libexecdir)"' \
955 -DIN_WESTON
956
957desktop_shell_la_LDFLAGS = -module -avoid-version
Quentin Glidic8f9d90a2016-08-12 10:41:36 +0200958desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500959desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800960desktop_shell_la_SOURCES = \
961 desktop-shell/shell.h \
962 desktop-shell/shell.c \
963 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700964 desktop-shell/input-panel.c \
965 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800966nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800967 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahl5ac91a12016-08-15 17:31:02 +0800968 protocol/weston-desktop-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800969
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800970BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800971endif
972
Jason Ekstrand946a9482014-04-02 19:53:47 -0500973if ENABLE_FULLSCREEN_SHELL
974
975module_LTLIBRARIES += fullscreen-shell.la
976
977fullscreen_shell_la_CPPFLAGS = \
978 -I$(top_builddir)/protocol \
979 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300980 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100981 -I$(top_srcdir)/libweston \
Jason Ekstrand946a9482014-04-02 19:53:47 -0500982 -DIN_WESTON
983
984fullscreen_shell_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +0200985fullscreen_shell_la_LIBADD = \
986 libweston-@LIBWESTON_MAJOR@.la \
987 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500988fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500989fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700990 fullscreen-shell/fullscreen-shell.c \
991 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500992nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800993 protocol/fullscreen-shell-unstable-v1-protocol.c \
994 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500995
996BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
997endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800998
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900999if ENABLE_IVI_SHELL
1000
1001module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +09001002 $(ivi_shell) \
1003 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +09001004
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +09001005ivi_shell = ivi-shell.la
1006ivi_shell_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001007ivi_shell_la_LIBADD = \
1008 libshared.la \
1009 libweston-@LIBWESTON_MAJOR@.la \
1010 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -05001011ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +09001012ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +09001013 ivi-shell/ivi-layout-export.h \
1014 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +02001015 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +09001016 ivi-shell/ivi-layout.c \
1017 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +09001018 ivi-shell/ivi-shell.h \
1019 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001020 ivi-shell/input-panel-ivi.c \
1021 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +09001022nodist_ivi_shell_la_SOURCES = \
1023 protocol/ivi-application-protocol.c \
1024 protocol/ivi-application-server-protocol.h
1025
1026BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
1027
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +09001028hmi_controller = hmi-controller.la
1029hmi_controller_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001030hmi_controller_la_LIBADD = \
1031 libshared.la \
1032 libweston-@LIBWESTON_MAJOR@.la \
1033 $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -05001034hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +09001035hmi_controller_la_SOURCES = \
1036 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001037 ivi-shell/hmi-controller.c \
1038 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +09001039nodist_hmi_controller_la_SOURCES = \
1040 protocol/ivi-hmi-controller-protocol.c \
1041 protocol/ivi-hmi-controller-server-protocol.h
1042
1043BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
1044
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +09001045endif
1046
1047
Jason Ekstrand47928d82014-04-02 19:54:01 -05001048if ENABLE_SCREEN_SHARING
1049
1050module_LTLIBRARIES += screen-share.la
1051
1052screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
1053screen_share_la_LDFLAGS = -module -avoid-version
1054screen_share_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001055 libshared-cairo.la \
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001056 libweston-@LIBWESTON_MAJOR@.la \
Jason Ekstrand47928d82014-04-02 19:54:01 -05001057 $(COMPOSITOR_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +01001058 $(SCREEN_SHARE_LIBS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001059screen_share_la_CFLAGS = \
1060 $(COMPOSITOR_CFLAGS) \
1061 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -05001062 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001063screen_share_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +03001064 compositor/screen-share.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001065 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001066nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +08001067 protocol/fullscreen-shell-unstable-v1-protocol.c \
1068 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001069
1070endif
1071
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001072if ENABLE_XWAYLAND
1073
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001074libweston_module_LTLIBRARIES += xwayland.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001075
1076xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001077 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001078 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001079 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +01001080 -I$(top_srcdir)/libweston \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001081 -I$(top_builddir)/xwayland \
1082 -DDATADIR='"$(datadir)"' \
1083 -DMODULEDIR='"$(moduledir)"' \
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001084 -DLIBEXECDIR='"$(libexecdir)"'
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001085
1086xwayland_la_LDFLAGS = -module -avoid-version
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001087xwayland_la_LIBADD = \
1088 libshared-cairo.la \
1089 libweston-@LIBWESTON_MAJOR@.la \
Emil Velikov67351452016-07-22 14:52:42 +01001090 $(XWAYLAND_LIBS)
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001091xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -05001092 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001093 $(COMPOSITOR_CFLAGS) \
1094 $(PIXMAN_CFLAGS) \
1095 $(CAIRO_CFLAGS)
1096xwayland_la_SOURCES = \
1097 xwayland/xwayland.h \
Quentin Glidic955cec02016-08-12 10:41:35 +02001098 xwayland/xwayland-internal-interface.h \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001099 xwayland/window-manager.c \
1100 xwayland/selection.c \
1101 xwayland/dnd.c \
1102 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001103 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001104 xwayland/hash.h \
1105 shared/helpers.h
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001106
1107libwestoninclude_HEADERS += xwayland/xwayland-api.h
1108
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001109endif
1110
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001111
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001112#
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001113# Shared utilities
1114#
1115
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001116noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1117 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001118
Derek Foreman4ff38742015-06-18 11:43:11 -05001119libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001120
1121libshared_la_SOURCES = \
1122 shared/config-parser.c \
1123 shared/option-parser.c \
1124 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001125 shared/file-util.c \
1126 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001127 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001128 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001129 shared/os-compatibility.h \
1130 shared/xalloc.c \
1131 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001132
1133libshared_cairo_la_CFLAGS = \
1134 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001135 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001136 $(COMPOSITOR_CFLAGS) \
1137 $(PIXMAN_CFLAGS) \
1138 $(CAIRO_CFLAGS) \
1139 $(PNG_CFLAGS) \
1140 $(WEBP_CFLAGS)
1141
1142libshared_cairo_la_LIBADD = \
1143 $(PIXMAN_LIBS) \
1144 $(CAIRO_LIBS) \
1145 $(PNG_LIBS) \
1146 $(WEBP_LIBS) \
1147 $(JPEG_LIBS)
1148
1149libshared_cairo_la_SOURCES = \
1150 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001151 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001152 shared/image-loader.c \
1153 shared/image-loader.h \
1154 shared/cairo-util.c \
1155 shared/frame.c \
1156 shared/cairo-util.h
1157
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001158libzunitc_la_SOURCES = \
1159 tools/zunitc/inc/zunitc/zunitc.h \
1160 tools/zunitc/inc/zunitc/zunitc_impl.h \
1161 tools/zunitc/src/zuc_base_logger.c \
1162 tools/zunitc/src/zuc_base_logger.h \
1163 tools/zunitc/src/zuc_collector.c \
1164 tools/zunitc/src/zuc_collector.h \
1165 tools/zunitc/src/zuc_context.h \
1166 tools/zunitc/src/zuc_event.h \
1167 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001168 tools/zunitc/src/zuc_junit_reporter.c \
1169 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001170 tools/zunitc/src/zuc_types.h \
1171 tools/zunitc/src/zunitc_impl.c \
1172 shared/helpers.h
1173
1174libzunitc_la_CFLAGS = \
1175 $(AM_CFLAGS) \
1176 -I$(top_srcdir)/tools/zunitc/inc
1177
1178libzunitc_la_LIBADD = \
Gustavo Zacarias57c83f62016-04-22 10:54:35 -03001179 libshared.la \
1180 $(CLOCK_GETTIME_LIBS)
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001181
Jon A. Cruz646aef52015-07-15 19:22:41 -07001182if ENABLE_JUNIT_XML
1183libzunitc_la_CFLAGS += \
1184 $(LIBXML2_CFLAGS)
1185libzunitc_la_LIBADD += \
1186 $(LIBXML2_LIBS)
1187endif
1188
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001189libzunitcmain_la_SOURCES = \
1190 tools/zunitc/src/main.c
1191
1192libzunitcmain_la_CFLAGS = \
1193 $(AM_CFLAGS) \
1194 -I$(top_srcdir)/tools/zunitc/inc
1195
1196libzunitcmain_la_LIBADD = \
1197 libzunitc.la \
1198 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001199
1200#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001201# tests subdirectory
1202#
1203
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001204TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1205
1206internal_tests = \
1207 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001208
1209shared_tests = \
1210 config-parser.test \
Daniel Stone5ae7e842017-03-01 11:34:00 +00001211 timespec.test \
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001212 string.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001213 vertex-clip.test \
1214 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001215
1216module_tests = \
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001217 plugin-registry-test.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001218 surface-test.la \
1219 surface-global-test.la
1220
1221weston_tests = \
1222 bad_buffer.weston \
1223 keyboard.weston \
1224 event.weston \
1225 button.weston \
1226 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001227 presentation.weston \
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001228 viewporter.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001229 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001230 subsurface.weston \
Pekka Paalanene7c6aa62017-01-27 17:30:28 +01001231 subsurface-shot.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001232 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001233
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001234ivi_tests =
1235
1236$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001237
1238AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001239 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1240 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001241
1242TEST_EXTENSIONS = .la .weston
1243LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1244WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1245
1246clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001247 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001248 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001249
1250# To remove when automake 1.11 support is dropped
1251export abs_builddir
1252
1253noinst_LTLIBRARIES += \
1254 weston-test.la \
Quentin Glidic642bcaf2017-01-27 17:30:23 +01001255 weston-test-desktop-shell.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001256 $(module_tests) \
1257 libtest-runner.la \
1258 libtest-client.la
1259
1260noinst_PROGRAMS += \
1261 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001262 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001263 $(shared_tests) \
1264 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001265 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001266 matrix-test
1267
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001268test_module_ldflags = -module -avoid-version -rpath $(libdir)
1269test_module_libadd = \
1270 libweston-@LIBWESTON_MAJOR@.la \
1271 $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001272
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001273plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001274plugin_registry_test_la_LIBADD = $(test_module_libadd)
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001275plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1276plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1277
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001278surface_global_test_la_SOURCES = tests/surface-global-test.c
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001279surface_global_test_la_LIBADD = $(test_module_libadd)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001280surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001281surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001282
1283surface_test_la_SOURCES = tests/surface-test.c
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001284surface_test_la_LIBADD = $(test_module_libadd)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001285surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001286surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001287
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001288weston_test_la_LIBADD = libshared.la $(test_module_libadd)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001289weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001290weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001291weston_test_la_SOURCES = \
1292 tests/weston-test.c \
1293 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001294nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001295 protocol/weston-test-protocol.c \
1296 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001297
Quentin Glidic642bcaf2017-01-27 17:30:23 +01001298weston_test_desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
1299weston_test_desktop_shell_la_LDFLAGS = $(test_module_ldflags)
1300weston_test_desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1301weston_test_desktop_shell_la_SOURCES = \
1302 tests/weston-test-desktop-shell.c \
1303 shared/helpers.h
1304
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001305if ENABLE_EGL
1306weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1307weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1308endif
1309
1310libtest_runner_la_SOURCES = \
1311 tests/weston-test-runner.c \
1312 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001313libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001314
1315config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001316config_parser_test_LDADD = \
1317 libshared.la \
1318 $(COMPOSITOR_LIBS) \
1319 libzunitc.la \
1320 libzunitcmain.la
1321config_parser_test_CFLAGS = \
1322 $(AM_CFLAGS) \
1323 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001324
Daniel Stone5ae7e842017-03-01 11:34:00 +00001325timespec_test_SOURCES = tests/timespec-test.c
1326timespec_test_LDADD = \
1327 libshared.la \
1328 libzunitc.la \
1329 libzunitcmain.la
1330timespec_test_CFLAGS = \
1331 $(AM_CFLAGS) \
1332 -I$(top_srcdir)/tools/zunitc/inc
1333
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001334string_test_SOURCES = \
1335 tests/string-test.c \
1336 shared/string-helpers.h
1337string_test_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1338string_test_LDADD = libtest-client.la
1339
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001340vertex_clip_test_SOURCES = \
1341 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001342 shared/helpers.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001343 libweston/vertex-clipping.c \
1344 libweston/vertex-clipping.h
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001345vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001346
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001347libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001348 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001349 tests/weston-test-client-helper.h
1350nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001351 protocol/weston-test-protocol.c \
1352 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001353libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +01001354libtest_client_la_LIBADD = libshared.la libtest-runner.la $(TEST_CLIENT_LIBS) $(CAIRO_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001355
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001356
1357#
1358# Internal tests - tests functionality of the testsuite itself
1359#
1360
1361internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001362internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1363internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001364
1365
1366#
1367# Weston Tests
1368#
1369
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001370bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001371bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001372bad_buffer_weston_LDADD = libtest-client.la
1373
1374keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001375keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001376keyboard_weston_LDADD = libtest-client.la
1377
1378event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001379event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001380event_weston_LDADD = libtest-client.la
1381
1382button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001383button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001384button_weston_LDADD = libtest-client.la
1385
Marek Chalupa5fd81402015-03-30 09:21:29 -04001386devices_weston_SOURCES = tests/devices-test.c
1387devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1388devices_weston_LDADD = libtest-client.la
1389
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001390text_weston_SOURCES = tests/text-test.c
1391nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001392 protocol/text-input-unstable-v1-protocol.c \
1393 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001394text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001395text_weston_LDADD = libtest-client.la
1396
1397subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001398subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001399subsurface_weston_LDADD = libtest-client.la
1400
Pekka Paalanene7c6aa62017-01-27 17:30:28 +01001401subsurface_shot_weston_SOURCES = tests/subsurface-shot-test.c
1402subsurface_shot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1403subsurface_shot_weston_LDADD = libtest-client.la
1404
Jon A. Cruzb09da242015-06-16 13:15:13 -07001405presentation_weston_SOURCES = \
1406 tests/presentation-test.c \
1407 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001408nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001409 protocol/presentation-time-protocol.c \
1410 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001411presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1412presentation_weston_LDADD = libtest-client.la
1413
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001414roles_weston_SOURCES = tests/roles-test.c
1415roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1416roles_weston_LDADD = libtest-client.la
1417
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001418viewporter_weston_SOURCES = \
1419 tests/viewporter-test.c \
1420 shared/helpers.h
1421nodist_viewporter_weston_SOURCES = \
1422 protocol/viewporter-protocol.c \
1423 protocol/viewporter-client-protocol.h
1424viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1425viewporter_weston_LDADD = libtest-client.la
1426
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001427if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001428weston_tests += xwayland-test.weston
1429xwayland_test_weston_SOURCES = tests/xwayland-test.c
Daniel Stone2295a622016-11-29 11:05:49 +00001430xwayland_test_weston_CFLAGS = \
1431 $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS) -DXSERVER_PATH='"@XSERVER_PATH@"'
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001432xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001433endif
1434
1435matrix_test_SOURCES = \
1436 tests/matrix-test.c \
1437 shared/matrix.c \
1438 shared/matrix.h
1439matrix_test_CPPFLAGS = -DUNIT_TEST
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001440matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001441
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001442if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001443module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001444 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001445 ivi-layout-test.la
1446
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001447ivi_layout_internal_test_la_LIBADD = $(test_module_libadd)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001448ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001449ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001450ivi_layout_internal_test_la_SOURCES = \
1451 tests/ivi_layout-internal-test.c
1452
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001453ivi_layout_test_la_LIBADD = $(test_module_libadd)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001454ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001455ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001456ivi_layout_test_la_SOURCES = \
1457 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001458 tests/ivi-test.h \
1459 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001460nodist_ivi_layout_test_la_SOURCES = \
1461 protocol/weston-test-protocol.c \
1462 protocol/weston-test-server-protocol.h
1463
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001464ivi_tests += \
1465 ivi-shell-app.weston
1466
1467ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1468nodist_ivi_shell_app_weston_SOURCES = \
1469 protocol/ivi-application-protocol.c \
1470 protocol/ivi-application-client-protocol.h
1471ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1472ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001473
1474noinst_PROGRAMS += ivi-layout.ivi
1475
1476ivi_layout_ivi_SOURCES = \
1477 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001478 tests/ivi-test.h \
1479 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001480nodist_ivi_layout_ivi_SOURCES = \
1481 protocol/ivi-application-protocol.c \
1482 protocol/ivi-application-client-protocol.h
1483ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1484ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001485endif
1486
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001487if BUILD_SETBACKLIGHT
1488noinst_PROGRAMS += setbacklight
1489setbacklight_SOURCES = \
1490 tests/setbacklight.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001491 libweston/libbacklight.c \
1492 libweston/libbacklight.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001493setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1494setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1495endif
1496
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001497all-local: zuctest$(EXEEXT)
1498
1499noinst_PROGRAMS += zuctest$(EXEEXT)
1500
1501zuctest_LDADD = \
1502 libzunitc.la \
1503 libzunitcmain.la
1504
1505zuctest_CFLAGS = \
1506 $(AM_CFLAGS) \
1507 -I$(top_srcdir)/tools/zunitc/inc
1508
1509zuctest_SOURCES = \
1510 tools/zunitc/test/fixtures_test.c \
1511 tools/zunitc/test/zunitc_test.c
1512
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001513EXTRA_DIST += \
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001514 tests/internal-screenshot.ini \
1515 tests/reference/internal-screenshot-bad-00.png \
Pekka Paalanene7c6aa62017-01-27 17:30:28 +01001516 tests/reference/internal-screenshot-good-00.png \
1517 tests/reference/subsurface_z_order-00.png \
1518 tests/reference/subsurface_z_order-01.png \
1519 tests/reference/subsurface_z_order-02.png \
1520 tests/reference/subsurface_z_order-03.png \
1521 tests/reference/subsurface_z_order-04.png \
1522 tests/weston-tests-env
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001523
1524BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001525 protocol/weston-test-protocol.c \
1526 protocol/weston-test-server-protocol.h \
1527 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001528 protocol/text-input-unstable-v1-protocol.c \
1529 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001530
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001531EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001532 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001533 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001534 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001535 protocol/weston-test.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001536 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001537 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001538
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001539#
1540# manual test modules in tests subdirectory
1541#
1542
1543noinst_LTLIBRARIES += \
1544 surface-screenshot.la
1545
Quentin Glidicb2f32ab2016-08-18 10:58:58 +02001546surface_screenshot_la_LIBADD = libshared.la $(test_module_libadd)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001547surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001548surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001549surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1550
1551
1552#
1553# Documentation
1554#
1555
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001556man_MANS = weston.1 weston.ini.5
1557
1558if ENABLE_DRM_COMPOSITOR
1559man_MANS += weston-drm.7
1560endif
1561
1562MAN_SUBSTS = \
1563 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1564 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1565 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1566 -e 's|__version__|$(PACKAGE_VERSION)|g'
1567
1568SUFFIXES = .1 .5 .7 .man
1569
1570%.1 %.5 %.7 : man/%.man
1571 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1572
1573EXTRA_DIST += \
1574 man/weston.man \
1575 man/weston-drm.man \
1576 man/weston.ini.man
1577
1578CLEANFILES += $(man_MANS)
1579
Jon A. Cruz179c1862015-07-15 19:22:43 -07001580if ENABLE_DEVDOCS
1581DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1582
1583docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1584 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1585
1586docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1587 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1588endif
1589
1590DOCDIRS = \
1591 docs/developer \
1592 docs/tools
1593
1594$(DOCDIRS):
1595 $(MKDIR_P) $@
1596
1597.PHONY: doc $(DOXYGEN_INDICES)
1598
1599doc: $(DOXYGEN_INDICES)
1600
Jonas Ådahl496adb32015-11-17 16:00:27 +08001601.SECONDEXPANSION:
1602
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001603define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001604$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001605endef
1606
1607define protoname
1608$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1609endef
1610
1611protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001612 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1613
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001614protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001615 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1616
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001617protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001618 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1619
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001620protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1621 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001622
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001623protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1624 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001625
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001626protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1627 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@