blob: 64a8bf4e62e0da720a21f01ed1493f80a4a2e6e3 [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 =
Giulio Camuffo179fcda2016-06-02 21:48:14 +03008libweston_moduledir = $(libdir)/libweston-${LIBWESTON_ABI_VERSION}
9libweston_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_srcdir)/libweston \
48 -I$(top_builddir)/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
Giulio Camuffo9e445982016-06-02 21:48:15 +030064lib_LTLIBRARIES = libweston.la
65libweston_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
66libweston_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
67libweston_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Giulio Camuffo8aedf7b2016-06-02 21:48:12 +030068 $(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) \
69 $(LIBINPUT_BACKEND_LIBS) libshared.la
Giulio Camuffo9e445982016-06-02 21:48:15 +030070libweston_la_LDFLAGS = -release ${LIBWESTON_ABI_VERSION}
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080071
Giulio Camuffo9e445982016-06-02 21:48:15 +030072libweston_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +030073 libweston/git-version.h \
74 libweston/log.c \
75 libweston/compositor.c \
76 libweston/compositor.h \
77 libweston/compositor-drm.h \
78 libweston/compositor-fbdev.h \
79 libweston/compositor-headless.h \
80 libweston/compositor-rdp.h \
81 libweston/compositor-wayland.h \
82 libweston/compositor-x11.h \
83 libweston/input.c \
84 libweston/data-device.c \
85 libweston/screenshooter.c \
86 libweston/clipboard.c \
87 libweston/zoom.c \
88 libweston/bindings.c \
89 libweston/animation.c \
90 libweston/noop-renderer.c \
91 libweston/pixman-renderer.c \
92 libweston/pixman-renderer.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +020093 libweston/plugin-registry.c \
94 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +030095 libweston/timeline.c \
96 libweston/timeline.h \
97 libweston/timeline-object.h \
98 libweston/linux-dmabuf.c \
99 libweston/linux-dmabuf.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700100 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800101 shared/matrix.c \
102 shared/matrix.h \
Pekka Paalanenaa21f622015-07-03 15:44:50 +0300103 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800104 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100105 shared/platform.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300106 libweston/weston-egl-ext.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300107
108if SYSTEMD_NOTIFY_SUPPORT
109module_LTLIBRARIES += systemd-notify.la
110systemd_notify_la_LDFLAGS = -module -avoid-version
111systemd_notify_la_LIBADD = $(SYSTEMD_DAEMON_LIBS)
112systemd_notify_la_CFLAGS = \
Pekka Paalanenaff703e2016-04-05 14:08:11 +0300113 $(COMPOSITOR_CFLAGS) \
114 $(SYSTEMD_DAEMON_CFLAGS) \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300115 $(PIXMAN_CFLAGS) \
116 $(AM_CFLAGS)
117systemd_notify_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300118 compositor/systemd-notify.c \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300119 shared/helpers.h \
120 shared/zalloc.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300121 libweston/compositor.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300122endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800123
Giulio Camuffo9e445982016-06-02 21:48:15 +0300124nodist_libweston_la_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800125 protocol/weston-screenshooter-protocol.c \
126 protocol/weston-screenshooter-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800127 protocol/text-cursor-position-protocol.c \
128 protocol/text-cursor-position-server-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800129 protocol/text-input-unstable-v1-protocol.c \
130 protocol/text-input-unstable-v1-server-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800131 protocol/input-method-unstable-v1-protocol.c \
132 protocol/input-method-unstable-v1-server-protocol.h \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200133 protocol/presentation-time-protocol.c \
134 protocol/presentation-time-server-protocol.h \
Pekka Paalanene95ad5c2016-04-15 14:47:08 +0300135 protocol/viewporter-protocol.c \
136 protocol/viewporter-server-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800137 protocol/linux-dmabuf-unstable-v1-protocol.c \
138 protocol/linux-dmabuf-unstable-v1-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800139
Giulio Camuffo9e445982016-06-02 21:48:15 +0300140BUILT_SOURCES += $(nodist_libweston_la_SOURCES)
141
142bin_PROGRAMS += weston
143
144weston_LDFLAGS = -export-dynamic
145weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200146 -DMODULEDIR='"$(moduledir)"' \
147 -DXSERVER_PATH='"@XSERVER_PATH@"'
Giulio Camuffo9e445982016-06-02 21:48:15 +0300148weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
149weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
150 $(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \
151 -lm libshared.la libweston.la
152
153weston_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300154 compositor/main.c \
155 compositor/weston-screenshooter.c \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200156 compositor/text-backend.c \
157 compositor/xwayland.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800158
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800159# Track this dependency explicitly instead of using BUILT_SOURCES. We
160# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
161# in case we're building from tarballs.
162
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300163libweston/compositor.c : $(top_builddir)/libweston/git-version.h
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800164
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800165noinst_LTLIBRARIES += \
166 libsession-helper.la
167
168libsession_helper_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300169 libweston/launcher-util.c \
170 libweston/launcher-util.h \
171 libweston/launcher-impl.h \
172 libweston/weston-launch.h \
173 libweston/launcher-weston-launch.c \
174 libweston/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500175libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800176libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
177
178if ENABLE_DBUS
179if HAVE_SYSTEMD_LOGIN
180libsession_helper_la_SOURCES += \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300181 libweston/dbus.h \
182 libweston/dbus.c \
183 libweston/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800184libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
185libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
186endif
187endif
188
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800189if HAVE_GIT_REPO
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300190libweston/git-version.h : $(top_srcdir)/.git/logs/HEAD
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800191 $(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 -0800192else
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300193libweston/git-version.h :
Kristian Høgsberg1d2dd072014-02-03 10:55:51 -0800194 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
195
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800196endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800197
198.FORCE :
199
200if BUILD_WESTON_LAUNCH
201bin_PROGRAMS += weston-launch
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300202weston_launch_SOURCES = libweston/weston-launch.c libweston/weston-launch.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800203weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
204weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500205 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800206 $(PAM_CFLAGS) \
207 $(SYSTEMD_LOGIN_CFLAGS) \
208 $(LIBDRM_CFLAGS)
209weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
210
211if ENABLE_SETUID_INSTALL
212install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700213 can_suid_files=no; \
214 chown root $(DESTDIR)$(bindir)/weston-launch \
215 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
216 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500217 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700218 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
219 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
220 false; \
221 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800222endif
223
224endif # BUILD_WESTON_LAUNCH
225
226pkgconfigdir = $(libdir)/pkgconfig
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300227pkgconfig_DATA = compositor/weston.pc libweston/libweston-${LIBWESTON_ABI_VERSION}.pc
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800228
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100229wayland_sessiondir = $(datadir)/wayland-sessions
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300230dist_wayland_session_DATA = compositor/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100231
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300232libwestonincludedir = $(includedir)/libweston-${LIBWESTON_ABI_VERSION}
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300233libwestoninclude_HEADERS = \
234 libweston/version.h \
235 libweston/compositor.h \
236 libweston/compositor-drm.h \
237 libweston/compositor-fbdev.h \
238 libweston/compositor-headless.h \
239 libweston/compositor-rdp.h \
240 libweston/compositor-wayland.h \
241 libweston/compositor-x11.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +0200242 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300243 libweston/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800244 shared/matrix.h \
245 shared/config-parser.h \
Emil Velikovcbcf5452016-07-04 15:34:17 +0100246 shared/zalloc.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800247
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300248westonincludedir = $(includedir)/weston
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300249westoninclude_HEADERS = compositor/weston.h
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300250
Ucan, Emre \(ADITG/SW1\)ae2541d2015-10-15 14:51:43 +0000251if ENABLE_IVI_SHELL
252westoninclude_HEADERS += \
253 ivi-shell/ivi-layout-export.h
254endif
255
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800256if ENABLE_EGL
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300257libweston_module_LTLIBRARIES += gl-renderer.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800258gl_renderer_la_LDFLAGS = -module -avoid-version
259gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
260gl_renderer_la_CFLAGS = \
261 $(COMPOSITOR_CFLAGS) \
262 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300263 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500264 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800265gl_renderer_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300266 libweston/gl-renderer.h \
267 libweston/gl-renderer.c \
268 libweston/vertex-clipping.c \
269 libweston/vertex-clipping.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700270 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800271endif
272
273if ENABLE_X11_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300274libweston_module_LTLIBRARIES += x11-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800275x11_backend_la_LDFLAGS = -module -avoid-version
276x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800277 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800278x11_backend_la_CFLAGS = \
279 $(COMPOSITOR_CFLAGS) \
280 $(EGL_CFLAGS) \
281 $(PIXMAN_CFLAGS) \
282 $(CAIRO_CFLAGS) \
283 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500284 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700285x11_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300286 libweston/compositor-x11.c \
287 libweston/compositor-x11.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700288 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800289endif
290
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100291INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000292INPUT_BACKEND_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300293 libweston/libinput-seat.c \
294 libweston/libinput-seat.h \
295 libweston/libinput-device.c \
296 libweston/libinput-device.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700297 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100298
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800299if ENABLE_DRM_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300300libweston_module_LTLIBRARIES += drm-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800301drm_backend_la_LDFLAGS = -module -avoid-version
302drm_backend_la_LIBADD = \
303 $(COMPOSITOR_LIBS) \
304 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100305 $(INPUT_BACKEND_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300306 libshared.la \
307 $(CLOCK_GETTIME_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800308 libsession-helper.la
309drm_backend_la_CFLAGS = \
310 $(COMPOSITOR_CFLAGS) \
311 $(EGL_CFLAGS) \
312 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500313 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800314drm_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300315 libweston/compositor-drm.c \
316 libweston/compositor-drm.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100317 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700318 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200319 shared/timespec-util.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300320 libweston/libbacklight.c \
321 libweston/libbacklight.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800322
323if ENABLE_VAAPI_RECORDER
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300324drm_backend_la_SOURCES += libweston/vaapi-recorder.c libweston/vaapi-recorder.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800325drm_backend_la_LIBADD += $(LIBVA_LIBS)
326drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
327endif
328endif
329
330if ENABLE_WAYLAND_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300331libweston_module_LTLIBRARIES += wayland-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800332wayland_backend_la_LDFLAGS = -module -avoid-version
333wayland_backend_la_LIBADD = \
334 $(COMPOSITOR_LIBS) \
335 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800336 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800337wayland_backend_la_CFLAGS = \
338 $(COMPOSITOR_CFLAGS) \
339 $(EGL_CFLAGS) \
340 $(PIXMAN_CFLAGS) \
341 $(CAIRO_CFLAGS) \
342 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500343 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700344wayland_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300345 libweston/compositor-wayland.c \
346 libweston/compositor-wayland.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700347 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500348nodist_wayland_backend_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800349 protocol/fullscreen-shell-unstable-v1-protocol.c \
350 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800351endif
352
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800353if ENABLE_HEADLESS_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300354libweston_module_LTLIBRARIES += headless-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800355headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800356headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500357headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700358headless_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300359 libweston/compositor-headless.c \
360 libweston/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700361 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800362endif
363
364if ENABLE_FBDEV_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300365libweston_module_LTLIBRARIES += fbdev-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800366fbdev_backend_la_LDFLAGS = -module -avoid-version
367fbdev_backend_la_LIBADD = \
368 $(COMPOSITOR_LIBS) \
369 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100370 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800371 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800372 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800373fbdev_backend_la_CFLAGS = \
374 $(COMPOSITOR_CFLAGS) \
375 $(EGL_CFLAGS) \
376 $(FBDEV_COMPOSITOR_CFLAGS) \
377 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500378 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800379fbdev_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300380 libweston/compositor-fbdev.c \
381 libweston/compositor-fbdev.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700382 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100383 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800384endif
385
386if ENABLE_RDP_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300387libweston_module_LTLIBRARIES += rdp-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800388rdp_backend_la_LDFLAGS = -module -avoid-version
389rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
390 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800391 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800392rdp_backend_la_CFLAGS = \
393 $(COMPOSITOR_CFLAGS) \
394 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500395 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700396rdp_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300397 libweston/compositor-rdp.c \
398 libweston/compositor-rdp.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700399 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800400endif
401
402if HAVE_LCMS
403module_LTLIBRARIES += cms-static.la
404cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800405cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500406cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800407cms_static_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300408 compositor/cms-static.c \
409 compositor/cms-helper.c \
410 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700411 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800412if ENABLE_COLORD
413module_LTLIBRARIES += cms-colord.la
414cms_colord_la_LDFLAGS = -module -avoid-version
415cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500416cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800417cms_colord_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300418 compositor/cms-colord.c \
419 compositor/cms-helper.c \
420 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700421 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800422endif
423endif
424
425noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500426spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800427spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
428spring_tool_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300429 libweston/spring-tool.c \
430 libweston/animation.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800431 shared/matrix.c \
432 shared/matrix.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300433 libweston/compositor.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800434
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800435if BUILD_CLIENTS
436
437bin_PROGRAMS += weston-terminal weston-info
438
439libexec_PROGRAMS += \
440 weston-desktop-shell \
441 weston-screenshooter \
442 weston-keyboard \
443 weston-simple-im
444
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900445if ENABLE_IVI_SHELL
446libexec_PROGRAMS += \
447 weston-ivi-shell-user-interface
448endif
449
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800450demo_clients = \
451 weston-flower \
452 weston-image \
453 weston-cliptest \
454 weston-dnd \
455 weston-smoke \
456 weston-resizor \
457 weston-eventdemo \
458 weston-clickdot \
459 weston-transformed \
460 weston-fullscreen \
461 weston-stacking \
462 weston-calibrator \
463 weston-scaler
464
465if INSTALL_DEMO_CLIENTS
466bin_PROGRAMS += $(demo_clients)
467else
468noinst_PROGRAMS += $(demo_clients)
469endif
470
471
472if BUILD_SIMPLE_CLIENTS
473demo_clients += \
474 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500475 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800476 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400477 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800478 weston-multi-resource
479
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800480weston_simple_shm_SOURCES = clients/simple-shm.c
481nodist_weston_simple_shm_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800482 protocol/xdg-shell-unstable-v5-protocol.c \
483 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800484 protocol/fullscreen-shell-unstable-v1-protocol.c \
485 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900486 protocol/ivi-application-protocol.c \
487 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800488weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800489weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800490
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500491weston_simple_damage_SOURCES = clients/simple-damage.c
492nodist_weston_simple_damage_SOURCES = \
Pekka Paalanen7b69d6c2016-04-15 17:00:21 +0300493 protocol/viewporter-protocol.c \
494 protocol/viewporter-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800495 protocol/xdg-shell-unstable-v5-protocol.c \
496 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800497 protocol/fullscreen-shell-unstable-v1-protocol.c \
498 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500499weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
500weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
501
Jon A. Cruzb09da242015-06-16 13:15:13 -0700502weston_simple_touch_SOURCES = \
503 clients/simple-touch.c \
504 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800505weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800506weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800507
Jon A. Cruzb09da242015-06-16 13:15:13 -0700508weston_presentation_shm_SOURCES = \
509 clients/presentation-shm.c \
510 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400511nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200512 protocol/presentation-time-protocol.c \
513 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400514weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300515weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400516
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800517weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800518weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300519weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800520endif
521
522if BUILD_SIMPLE_EGL_CLIENTS
523demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800524weston_simple_egl_SOURCES = clients/simple-egl.c
525nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800526 protocol/xdg-shell-unstable-v5-protocol.c \
527 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900528 protocol/ivi-application-protocol.c \
529 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800530weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800531weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
532endif
533
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000534if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
535demo_clients += weston-simple-dmabuf-intel
536weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
537nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800538 protocol/xdg-shell-unstable-v5-protocol.c \
539 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800540 protocol/fullscreen-shell-unstable-v1-protocol.c \
541 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800542 protocol/linux-dmabuf-unstable-v1-protocol.c \
543 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000544weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
545weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800546BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200547endif
548
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000549if BUILD_SIMPLE_DMABUF_V4L_CLIENT
550demo_clients += weston-simple-dmabuf-v4l
551weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
552nodist_weston_simple_dmabuf_v4l_SOURCES = \
553 protocol/xdg-shell-unstable-v5-protocol.c \
554 protocol/xdg-shell-unstable-v5-client-protocol.h \
555 protocol/fullscreen-shell-unstable-v1-protocol.c \
556 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
557 protocol/linux-dmabuf-unstable-v1-protocol.c \
558 protocol/linux-dmabuf-unstable-v1-client-protocol.h
559weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
560weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
561BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
562endif
563
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800564noinst_LTLIBRARIES += libtoytoolkit.la
565
566libtoytoolkit_la_SOURCES = \
567 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700568 clients/window.h \
569 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800570
571nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100572 protocol/text-cursor-position-protocol.c \
573 protocol/text-cursor-position-client-protocol.h \
Pekka Paalanen73511002016-04-15 16:53:41 +0300574 protocol/viewporter-protocol.c \
575 protocol/viewporter-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800576 protocol/xdg-shell-unstable-v5-protocol.c \
577 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900578 protocol/ivi-application-protocol.c \
579 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500580
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800581BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
582
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800583
584libtoytoolkit_la_LIBADD = \
585 $(CLIENT_LIBS) \
586 $(CAIRO_EGL_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300587 libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800588libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800589
590weston_flower_SOURCES = clients/flower.c
591weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800592weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800593
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100594weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800595 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800596nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800597 protocol/weston-screenshooter-protocol.c \
598 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800599weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800600weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800601
Jon A. Cruzb09da242015-06-16 13:15:13 -0700602weston_terminal_SOURCES = \
603 clients/terminal.c \
604 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800605weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800606weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800607
608weston_image_SOURCES = clients/image.c
609weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800610weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800611
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300612weston_cliptest_SOURCES = \
613 clients/cliptest.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300614 libweston/vertex-clipping.c \
615 libweston/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800616weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800617weston_cliptest_LDADD = libtoytoolkit.la
618
Jon A. Cruzb09da242015-06-16 13:15:13 -0700619weston_dnd_SOURCES = \
620 clients/dnd.c \
621 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800622weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800623weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800624
625weston_smoke_SOURCES = clients/smoke.c
626weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800627weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800628
629weston_resizor_SOURCES = clients/resizor.c
630weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800631weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800632
633weston_scaler_SOURCES = clients/scaler.c
634weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800635weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800636
637if HAVE_CAIRO_GLESV2
638demo_clients += weston-nested weston-nested-client
639
Jon A. Cruzb09da242015-06-16 13:15:13 -0700640weston_nested_SOURCES = \
641 clients/nested.c \
642 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800643weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800644weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800645
646weston_nested_client_SOURCES = clients/nested-client.c
647weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800648weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800649endif
650
Jon A. Cruzb09da242015-06-16 13:15:13 -0700651weston_eventdemo_SOURCES = \
652 clients/eventdemo.c \
653 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800654weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800655weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800656
Jon A. Cruzb09da242015-06-16 13:15:13 -0700657weston_clickdot_SOURCES = \
658 clients/clickdot.c \
659 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800660weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800661weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800662
663weston_transformed_SOURCES = clients/transformed.c
664weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800665weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800666
667weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500668nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800669 protocol/fullscreen-shell-unstable-v1-protocol.c \
670 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800671weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800672weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800673
Jon A. Cruzb09da242015-06-16 13:15:13 -0700674weston_stacking_SOURCES = \
675 clients/stacking.c \
676 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800677weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800678weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800679
Jon A. Cruzb09da242015-06-16 13:15:13 -0700680weston_calibrator_SOURCES = \
681 clients/calibrator.c \
682 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800683 shared/matrix.c \
684 shared/matrix.h
685weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800686weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800687
688if BUILD_SUBSURFACES_CLIENT
689demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700690weston_subsurfaces_SOURCES = \
691 clients/subsurfaces.c \
692 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800693weston_subsurfaces_CFLAGS = \
694 $(AM_CFLAGS) \
695 $(SIMPLE_EGL_CLIENT_CFLAGS) \
696 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800697weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
698endif
699
700if HAVE_PANGO
701demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700702weston_editor_SOURCES = \
703 clients/editor.c \
704 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800705nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800706 protocol/text-input-unstable-v1-protocol.c \
707 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800708weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800709weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800710endif
711
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800712weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800713nodist_weston_keyboard_SOURCES = \
714 protocol/weston-desktop-shell-client-protocol.h \
715 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800716 protocol/input-method-unstable-v1-protocol.c \
717 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800718weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800719weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800720
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800721weston_simple_im_SOURCES = clients/weston-simple-im.c
722nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800723 protocol/input-method-unstable-v1-protocol.c \
724 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800725weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800726weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800727
Jon A. Cruzb09da242015-06-16 13:15:13 -0700728weston_info_SOURCES = \
729 clients/weston-info.c \
730 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400731nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200732 protocol/presentation-time-protocol.c \
733 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800734weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200735weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800736
Jon A. Cruzb09da242015-06-16 13:15:13 -0700737weston_desktop_shell_SOURCES = \
738 clients/desktop-shell.c \
739 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800740nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800741 protocol/weston-desktop-shell-client-protocol.h \
742 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800743weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800744weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800745
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900746if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700747weston_ivi_shell_user_interface_SOURCES = \
748 clients/ivi-shell-user-interface.c \
749 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900750nodist_weston_ivi_shell_user_interface_SOURCES = \
751 protocol/ivi-hmi-controller-client-protocol.h \
752 protocol/ivi-hmi-controller-protocol.c \
753 protocol/ivi-application-client-protocol.h \
754 protocol/ivi-application-protocol.c
755weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
756weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
757endif
758
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800759if BUILD_FULL_GL_CLIENTS
760demo_clients += weston-gears
761weston_gears_SOURCES = clients/gears.c
762weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800763weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800764endif
765
766endif
767
768BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800769 protocol/weston-screenshooter-protocol.c \
770 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100771 protocol/text-cursor-position-client-protocol.h \
772 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800773 protocol/text-input-unstable-v1-protocol.c \
774 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800775 protocol/input-method-unstable-v1-protocol.c \
776 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800777 protocol/weston-desktop-shell-client-protocol.h \
778 protocol/weston-desktop-shell-protocol.c \
Pekka Paalanen73511002016-04-15 16:53:41 +0300779 protocol/viewporter-client-protocol.h \
780 protocol/viewporter-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200781 protocol/presentation-time-protocol.c \
782 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800783 protocol/fullscreen-shell-unstable-v1-protocol.c \
784 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800785 protocol/xdg-shell-unstable-v5-protocol.c \
786 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900787 protocol/ivi-hmi-controller-protocol.c \
788 protocol/ivi-hmi-controller-client-protocol.h \
789 protocol/ivi-application-protocol.c \
790 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800791
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800792westondatadir = $(datadir)/weston
793dist_westondata_DATA = \
794 data/wayland.svg \
795 data/wayland.png \
796 data/pattern.png \
797 data/terminal.png \
798 data/border.png \
Bryce Harrington6bc52542016-03-24 17:57:39 -0700799 data/icon_editor.png \
800 data/icon_flower.png \
801 data/icon_terminal.png \
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800802 data/icon_window.png \
803 data/sign_close.png \
804 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100805 data/sign_minimize.png
806
807if ENABLE_IVI_SHELL
808dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900809 data/background.png \
810 data/tiling.png \
811 data/fullscreen.png \
812 data/panel.png \
813 data/random.png \
814 data/sidebyside.png \
815 data/home.png \
816 data/icon_ivi_clickdot.png \
817 data/icon_ivi_flower.png \
818 data/icon_ivi_simple-egl.png \
819 data/icon_ivi_simple-shm.png \
820 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100821endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800822
823
824if BUILD_WCAP_TOOLS
825bin_PROGRAMS += wcap-decode
826
827wcap_decode_SOURCES = \
828 wcap/main.c \
829 wcap/wcap-decode.c \
830 wcap/wcap-decode.h
831
Derek Foreman4ff38742015-06-18 11:43:11 -0500832wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800833wcap_decode_LDADD = $(WCAP_LIBS)
834endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800835
836
837if ENABLE_DESKTOP_SHELL
838
839module_LTLIBRARIES += desktop-shell.la
840
841desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100842 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800843 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300844 -I$(top_srcdir)/libweston \
845 -I$(top_builddir)/libweston \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800846 -I$(top_builddir)/desktop-shell \
847 -DDATADIR='"$(datadir)"' \
848 -DMODULEDIR='"$(moduledir)"' \
849 -DLIBEXECDIR='"$(libexecdir)"' \
850 -DIN_WESTON
851
852desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800853desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500854desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800855desktop_shell_la_SOURCES = \
856 desktop-shell/shell.h \
857 desktop-shell/shell.c \
858 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700859 desktop-shell/input-panel.c \
860 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800861nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800862 protocol/weston-desktop-shell-protocol.c \
863 protocol/weston-desktop-shell-server-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800864 protocol/xdg-shell-unstable-v5-protocol.c \
865 protocol/xdg-shell-unstable-v5-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800866
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800867BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800868endif
869
Jason Ekstrand946a9482014-04-02 19:53:47 -0500870if ENABLE_FULLSCREEN_SHELL
871
872module_LTLIBRARIES += fullscreen-shell.la
873
874fullscreen_shell_la_CPPFLAGS = \
875 -I$(top_builddir)/protocol \
876 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300877 -I$(top_srcdir)/libweston \
878 -I$(top_builddir)/libweston \
Jason Ekstrand946a9482014-04-02 19:53:47 -0500879 -DIN_WESTON
880
881fullscreen_shell_la_LDFLAGS = -module -avoid-version
882fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500883fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500884fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700885 fullscreen-shell/fullscreen-shell.c \
886 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500887nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800888 protocol/fullscreen-shell-unstable-v1-protocol.c \
889 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500890
891BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
892endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800893
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900894if ENABLE_IVI_SHELL
895
896module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900897 $(ivi_shell) \
898 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900899
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900900ivi_shell = ivi-shell.la
901ivi_shell_la_LDFLAGS = -module -avoid-version
902ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500903ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900904ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900905 ivi-shell/ivi-layout-export.h \
906 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +0200907 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900908 ivi-shell/ivi-layout.c \
909 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900910 ivi-shell/ivi-shell.h \
911 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700912 ivi-shell/input-panel-ivi.c \
913 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900914nodist_ivi_shell_la_SOURCES = \
915 protocol/ivi-application-protocol.c \
916 protocol/ivi-application-server-protocol.h
917
918BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
919
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900920hmi_controller = hmi-controller.la
921hmi_controller_la_LDFLAGS = -module -avoid-version
922hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500923hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900924hmi_controller_la_SOURCES = \
925 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700926 ivi-shell/hmi-controller.c \
927 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900928nodist_hmi_controller_la_SOURCES = \
929 protocol/ivi-hmi-controller-protocol.c \
930 protocol/ivi-hmi-controller-server-protocol.h
931
932BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
933
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900934endif
935
936
Jason Ekstrand47928d82014-04-02 19:54:01 -0500937if ENABLE_SCREEN_SHARING
938
939module_LTLIBRARIES += screen-share.la
940
941screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
942screen_share_la_LDFLAGS = -module -avoid-version
943screen_share_la_LIBADD = \
944 $(COMPOSITOR_LIBS) \
945 $(SCREEN_SHARE_LIBS) \
946 libshared-cairo.la
947screen_share_la_CFLAGS = \
948 $(COMPOSITOR_CFLAGS) \
949 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500950 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500951screen_share_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300952 compositor/screen-share.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700953 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500954nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800955 protocol/fullscreen-shell-unstable-v1-protocol.c \
956 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500957
958endif
959
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800960if ENABLE_XWAYLAND
961
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200962libweston_module_LTLIBRARIES += xwayland.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800963
964xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100965 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800966 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300967 -I$(top_srcdir)/libweston \
968 -I$(top_builddir)/libweston \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800969 -I$(top_builddir)/xwayland \
970 -DDATADIR='"$(datadir)"' \
971 -DMODULEDIR='"$(moduledir)"' \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200972 -DLIBEXECDIR='"$(libexecdir)"'
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800973
974xwayland_la_LDFLAGS = -module -avoid-version
975xwayland_la_LIBADD = \
976 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800977 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800978xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500979 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800980 $(COMPOSITOR_CFLAGS) \
981 $(PIXMAN_CFLAGS) \
982 $(CAIRO_CFLAGS)
983xwayland_la_SOURCES = \
984 xwayland/xwayland.h \
985 xwayland/window-manager.c \
986 xwayland/selection.c \
987 xwayland/dnd.c \
988 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800989 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700990 xwayland/hash.h \
991 shared/helpers.h
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200992
993libwestoninclude_HEADERS += xwayland/xwayland-api.h
994
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800995endif
996
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800997
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800998#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800999# Shared utilities
1000#
1001
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001002noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1003 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001004
Derek Foreman4ff38742015-06-18 11:43:11 -05001005libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001006
1007libshared_la_SOURCES = \
1008 shared/config-parser.c \
1009 shared/option-parser.c \
1010 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001011 shared/file-util.c \
1012 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001013 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001014 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001015 shared/os-compatibility.h \
1016 shared/xalloc.c \
1017 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001018
1019libshared_cairo_la_CFLAGS = \
1020 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001021 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001022 $(COMPOSITOR_CFLAGS) \
1023 $(PIXMAN_CFLAGS) \
1024 $(CAIRO_CFLAGS) \
1025 $(PNG_CFLAGS) \
1026 $(WEBP_CFLAGS)
1027
1028libshared_cairo_la_LIBADD = \
1029 $(PIXMAN_LIBS) \
1030 $(CAIRO_LIBS) \
1031 $(PNG_LIBS) \
1032 $(WEBP_LIBS) \
1033 $(JPEG_LIBS)
1034
1035libshared_cairo_la_SOURCES = \
1036 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001037 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001038 shared/image-loader.c \
1039 shared/image-loader.h \
1040 shared/cairo-util.c \
1041 shared/frame.c \
1042 shared/cairo-util.h
1043
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001044libzunitc_la_SOURCES = \
1045 tools/zunitc/inc/zunitc/zunitc.h \
1046 tools/zunitc/inc/zunitc/zunitc_impl.h \
1047 tools/zunitc/src/zuc_base_logger.c \
1048 tools/zunitc/src/zuc_base_logger.h \
1049 tools/zunitc/src/zuc_collector.c \
1050 tools/zunitc/src/zuc_collector.h \
1051 tools/zunitc/src/zuc_context.h \
1052 tools/zunitc/src/zuc_event.h \
1053 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001054 tools/zunitc/src/zuc_junit_reporter.c \
1055 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001056 tools/zunitc/src/zuc_types.h \
1057 tools/zunitc/src/zunitc_impl.c \
1058 shared/helpers.h
1059
1060libzunitc_la_CFLAGS = \
1061 $(AM_CFLAGS) \
1062 -I$(top_srcdir)/tools/zunitc/inc
1063
1064libzunitc_la_LIBADD = \
Gustavo Zacarias57c83f62016-04-22 10:54:35 -03001065 libshared.la \
1066 $(CLOCK_GETTIME_LIBS)
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001067
Jon A. Cruz646aef52015-07-15 19:22:41 -07001068if ENABLE_JUNIT_XML
1069libzunitc_la_CFLAGS += \
1070 $(LIBXML2_CFLAGS)
1071libzunitc_la_LIBADD += \
1072 $(LIBXML2_LIBS)
1073endif
1074
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001075libzunitcmain_la_SOURCES = \
1076 tools/zunitc/src/main.c
1077
1078libzunitcmain_la_CFLAGS = \
1079 $(AM_CFLAGS) \
1080 -I$(top_srcdir)/tools/zunitc/inc
1081
1082libzunitcmain_la_LIBADD = \
1083 libzunitc.la \
1084 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001085
1086#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001087# tests subdirectory
1088#
1089
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001090TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1091
1092internal_tests = \
1093 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001094
1095shared_tests = \
1096 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001097 vertex-clip.test \
1098 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001099
1100module_tests = \
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001101 plugin-registry-test.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001102 surface-test.la \
1103 surface-global-test.la
1104
1105weston_tests = \
1106 bad_buffer.weston \
1107 keyboard.weston \
1108 event.weston \
1109 button.weston \
1110 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001111 presentation.weston \
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001112 viewporter.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001113 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001114 subsurface.weston \
1115 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001116
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001117ivi_tests =
1118
1119$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001120
1121AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001122 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1123 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001124
1125TEST_EXTENSIONS = .la .weston
1126LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1127WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1128
1129clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001130 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001131 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001132
1133# To remove when automake 1.11 support is dropped
1134export abs_builddir
1135
1136noinst_LTLIBRARIES += \
1137 weston-test.la \
1138 $(module_tests) \
1139 libtest-runner.la \
1140 libtest-client.la
1141
1142noinst_PROGRAMS += \
1143 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001144 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001145 $(shared_tests) \
1146 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001147 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001148 matrix-test
1149
1150test_module_ldflags = \
1151 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1152
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001153plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
1154plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1155plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1156
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001157surface_global_test_la_SOURCES = tests/surface-global-test.c
1158surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001159surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001160
1161surface_test_la_SOURCES = tests/surface-test.c
1162surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001163surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001164
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001165weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001166weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001167weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001168weston_test_la_SOURCES = \
1169 tests/weston-test.c \
1170 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001171nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001172 protocol/weston-test-protocol.c \
1173 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001174
1175if ENABLE_EGL
1176weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1177weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1178endif
1179
1180libtest_runner_la_SOURCES = \
1181 tests/weston-test-runner.c \
1182 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001183libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001184
1185config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001186config_parser_test_LDADD = \
1187 libshared.la \
1188 $(COMPOSITOR_LIBS) \
1189 libzunitc.la \
1190 libzunitcmain.la
1191config_parser_test_CFLAGS = \
1192 $(AM_CFLAGS) \
1193 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001194
1195vertex_clip_test_SOURCES = \
1196 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001197 shared/helpers.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001198 libweston/vertex-clipping.c \
1199 libweston/vertex-clipping.h
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001200vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001201
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001202libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001203 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001204 tests/weston-test-client-helper.h
1205nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001206 protocol/weston-test-protocol.c \
1207 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001208libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1209libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) $(CAIRO_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001210
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001211
1212#
1213# Internal tests - tests functionality of the testsuite itself
1214#
1215
1216internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001217internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1218internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001219
1220
1221#
1222# Weston Tests
1223#
1224
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001225bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001226bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001227bad_buffer_weston_LDADD = libtest-client.la
1228
1229keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001230keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001231keyboard_weston_LDADD = libtest-client.la
1232
1233event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001234event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001235event_weston_LDADD = libtest-client.la
1236
1237button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001238button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001239button_weston_LDADD = libtest-client.la
1240
Marek Chalupa5fd81402015-03-30 09:21:29 -04001241devices_weston_SOURCES = tests/devices-test.c
1242devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1243devices_weston_LDADD = libtest-client.la
1244
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001245text_weston_SOURCES = tests/text-test.c
1246nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001247 protocol/text-input-unstable-v1-protocol.c \
1248 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001249text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001250text_weston_LDADD = libtest-client.la
1251
1252subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001253subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001254subsurface_weston_LDADD = libtest-client.la
1255
Jon A. Cruzb09da242015-06-16 13:15:13 -07001256presentation_weston_SOURCES = \
1257 tests/presentation-test.c \
1258 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001259nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001260 protocol/presentation-time-protocol.c \
1261 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001262presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1263presentation_weston_LDADD = libtest-client.la
1264
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001265roles_weston_SOURCES = tests/roles-test.c
1266roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1267roles_weston_LDADD = libtest-client.la
1268
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001269viewporter_weston_SOURCES = \
1270 tests/viewporter-test.c \
1271 shared/helpers.h
1272nodist_viewporter_weston_SOURCES = \
1273 protocol/viewporter-protocol.c \
1274 protocol/viewporter-client-protocol.h
1275viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1276viewporter_weston_LDADD = libtest-client.la
1277
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001278if ENABLE_EGL
1279weston_tests += buffer-count.weston
1280buffer_count_weston_SOURCES = tests/buffer-count-test.c
Pekka Paalanen924cd942016-05-20 17:25:38 +03001281buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001282buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1283endif
1284
1285if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001286weston_tests += xwayland-test.weston
1287xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001288xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001289xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001290endif
1291
1292matrix_test_SOURCES = \
1293 tests/matrix-test.c \
1294 shared/matrix.c \
1295 shared/matrix.h
1296matrix_test_CPPFLAGS = -DUNIT_TEST
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001297matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001298
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001299if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001300module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001301 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001302 ivi-layout-test.la
1303
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001304ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1305ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001306ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001307ivi_layout_internal_test_la_SOURCES = \
1308 tests/ivi_layout-internal-test.c
1309
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001310ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1311ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001312ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001313ivi_layout_test_la_SOURCES = \
1314 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001315 tests/ivi-test.h \
1316 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001317nodist_ivi_layout_test_la_SOURCES = \
1318 protocol/weston-test-protocol.c \
1319 protocol/weston-test-server-protocol.h
1320
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001321ivi_tests += \
1322 ivi-shell-app.weston
1323
1324ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1325nodist_ivi_shell_app_weston_SOURCES = \
1326 protocol/ivi-application-protocol.c \
1327 protocol/ivi-application-client-protocol.h
1328ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1329ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001330
1331noinst_PROGRAMS += ivi-layout.ivi
1332
1333ivi_layout_ivi_SOURCES = \
1334 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001335 tests/ivi-test.h \
1336 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001337nodist_ivi_layout_ivi_SOURCES = \
1338 protocol/ivi-application-protocol.c \
1339 protocol/ivi-application-client-protocol.h
1340ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1341ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001342endif
1343
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001344if BUILD_SETBACKLIGHT
1345noinst_PROGRAMS += setbacklight
1346setbacklight_SOURCES = \
1347 tests/setbacklight.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001348 libweston/libbacklight.c \
1349 libweston/libbacklight.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001350setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1351setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1352endif
1353
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001354all-local: zuctest$(EXEEXT)
1355
1356noinst_PROGRAMS += zuctest$(EXEEXT)
1357
1358zuctest_LDADD = \
1359 libzunitc.la \
1360 libzunitcmain.la
1361
1362zuctest_CFLAGS = \
1363 $(AM_CFLAGS) \
1364 -I$(top_srcdir)/tools/zunitc/inc
1365
1366zuctest_SOURCES = \
1367 tools/zunitc/test/fixtures_test.c \
1368 tools/zunitc/test/zunitc_test.c
1369
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001370EXTRA_DIST += \
1371 tests/weston-tests-env \
1372 tests/internal-screenshot.ini \
1373 tests/reference/internal-screenshot-bad-00.png \
1374 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001375
1376BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001377 protocol/weston-test-protocol.c \
1378 protocol/weston-test-server-protocol.h \
1379 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001380 protocol/text-input-unstable-v1-protocol.c \
1381 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001382
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001383EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001384 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001385 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001386 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001387 protocol/weston-test.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001388 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001389 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001390
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001391#
1392# manual test modules in tests subdirectory
1393#
1394
1395noinst_LTLIBRARIES += \
1396 surface-screenshot.la
1397
1398surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1399surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001400surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001401surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1402
1403
1404#
1405# Documentation
1406#
1407
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001408man_MANS = weston.1 weston.ini.5
1409
1410if ENABLE_DRM_COMPOSITOR
1411man_MANS += weston-drm.7
1412endif
1413
1414MAN_SUBSTS = \
1415 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1416 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1417 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1418 -e 's|__version__|$(PACKAGE_VERSION)|g'
1419
1420SUFFIXES = .1 .5 .7 .man
1421
1422%.1 %.5 %.7 : man/%.man
1423 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1424
1425EXTRA_DIST += \
1426 man/weston.man \
1427 man/weston-drm.man \
1428 man/weston.ini.man
1429
1430CLEANFILES += $(man_MANS)
1431
Jon A. Cruz179c1862015-07-15 19:22:43 -07001432if ENABLE_DEVDOCS
1433DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1434
1435docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1436 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1437
1438docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1439 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1440endif
1441
1442DOCDIRS = \
1443 docs/developer \
1444 docs/tools
1445
1446$(DOCDIRS):
1447 $(MKDIR_P) $@
1448
1449.PHONY: doc $(DOXYGEN_INDICES)
1450
1451doc: $(DOXYGEN_INDICES)
1452
Jonas Ådahl496adb32015-11-17 16:00:27 +08001453.SECONDEXPANSION:
1454
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001455define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001456$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001457endef
1458
1459define protoname
1460$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1461endef
1462
1463protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001464 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1465
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001466protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001467 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1468
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001469protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001470 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1471
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001472protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1473 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001474
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001475protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1476 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001477
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001478protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1479 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@