blob: f45a87fbd0e2798f85b91b66d89a8e8f49a84eff [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 \
146 -DMODULEDIR='"$(moduledir)"'
147weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
148weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
149 $(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \
150 -lm libshared.la libweston.la
151
152weston_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300153 compositor/main.c \
154 compositor/weston-screenshooter.c \
155 compositor/text-backend.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800156
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800157# Track this dependency explicitly instead of using BUILT_SOURCES. We
158# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
159# in case we're building from tarballs.
160
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300161libweston/compositor.c : $(top_builddir)/libweston/git-version.h
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800162
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800163noinst_LTLIBRARIES += \
164 libsession-helper.la
165
166libsession_helper_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300167 libweston/launcher-util.c \
168 libweston/launcher-util.h \
169 libweston/launcher-impl.h \
170 libweston/weston-launch.h \
171 libweston/launcher-weston-launch.c \
172 libweston/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500173libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800174libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
175
176if ENABLE_DBUS
177if HAVE_SYSTEMD_LOGIN
178libsession_helper_la_SOURCES += \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300179 libweston/dbus.h \
180 libweston/dbus.c \
181 libweston/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800182libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
183libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
184endif
185endif
186
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800187if HAVE_GIT_REPO
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300188libweston/git-version.h : $(top_srcdir)/.git/logs/HEAD
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800189 $(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 -0800190else
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300191libweston/git-version.h :
Kristian Høgsberg1d2dd072014-02-03 10:55:51 -0800192 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
193
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800194endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800195
196.FORCE :
197
198if BUILD_WESTON_LAUNCH
199bin_PROGRAMS += weston-launch
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300200weston_launch_SOURCES = libweston/weston-launch.c libweston/weston-launch.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800201weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
202weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500203 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800204 $(PAM_CFLAGS) \
205 $(SYSTEMD_LOGIN_CFLAGS) \
206 $(LIBDRM_CFLAGS)
207weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
208
209if ENABLE_SETUID_INSTALL
210install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700211 can_suid_files=no; \
212 chown root $(DESTDIR)$(bindir)/weston-launch \
213 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
214 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500215 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700216 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
217 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
218 false; \
219 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800220endif
221
222endif # BUILD_WESTON_LAUNCH
223
224pkgconfigdir = $(libdir)/pkgconfig
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300225pkgconfig_DATA = compositor/weston.pc libweston/libweston-${LIBWESTON_ABI_VERSION}.pc
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800226
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100227wayland_sessiondir = $(datadir)/wayland-sessions
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300228dist_wayland_session_DATA = compositor/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100229
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300230libwestonincludedir = $(includedir)/libweston-${LIBWESTON_ABI_VERSION}
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300231libwestoninclude_HEADERS = \
232 libweston/version.h \
233 libweston/compositor.h \
234 libweston/compositor-drm.h \
235 libweston/compositor-fbdev.h \
236 libweston/compositor-headless.h \
237 libweston/compositor-rdp.h \
238 libweston/compositor-wayland.h \
239 libweston/compositor-x11.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +0200240 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300241 libweston/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800242 shared/matrix.h \
243 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100244 shared/zalloc.h \
245 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800246
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300247westonincludedir = $(includedir)/weston
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300248westoninclude_HEADERS = compositor/weston.h
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300249
Ucan, Emre \(ADITG/SW1\)ae2541d2015-10-15 14:51:43 +0000250if ENABLE_IVI_SHELL
251westoninclude_HEADERS += \
252 ivi-shell/ivi-layout-export.h
253endif
254
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800255if ENABLE_EGL
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300256libweston_module_LTLIBRARIES += gl-renderer.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800257gl_renderer_la_LDFLAGS = -module -avoid-version
258gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
259gl_renderer_la_CFLAGS = \
260 $(COMPOSITOR_CFLAGS) \
261 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300262 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500263 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800264gl_renderer_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300265 libweston/gl-renderer.h \
266 libweston/gl-renderer.c \
267 libweston/vertex-clipping.c \
268 libweston/vertex-clipping.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700269 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800270endif
271
272if ENABLE_X11_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300273libweston_module_LTLIBRARIES += x11-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800274x11_backend_la_LDFLAGS = -module -avoid-version
275x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800276 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800277x11_backend_la_CFLAGS = \
278 $(COMPOSITOR_CFLAGS) \
279 $(EGL_CFLAGS) \
280 $(PIXMAN_CFLAGS) \
281 $(CAIRO_CFLAGS) \
282 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500283 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700284x11_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300285 libweston/compositor-x11.c \
286 libweston/compositor-x11.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700287 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800288endif
289
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100290INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000291INPUT_BACKEND_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300292 libweston/libinput-seat.c \
293 libweston/libinput-seat.h \
294 libweston/libinput-device.c \
295 libweston/libinput-device.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700296 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100297
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800298if ENABLE_DRM_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300299libweston_module_LTLIBRARIES += drm-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800300drm_backend_la_LDFLAGS = -module -avoid-version
301drm_backend_la_LIBADD = \
302 $(COMPOSITOR_LIBS) \
303 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100304 $(INPUT_BACKEND_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300305 libshared.la \
306 $(CLOCK_GETTIME_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800307 libsession-helper.la
308drm_backend_la_CFLAGS = \
309 $(COMPOSITOR_CFLAGS) \
310 $(EGL_CFLAGS) \
311 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500312 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800313drm_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300314 libweston/compositor-drm.c \
315 libweston/compositor-drm.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100316 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700317 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200318 shared/timespec-util.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300319 libweston/libbacklight.c \
320 libweston/libbacklight.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800321
322if ENABLE_VAAPI_RECORDER
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300323drm_backend_la_SOURCES += libweston/vaapi-recorder.c libweston/vaapi-recorder.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800324drm_backend_la_LIBADD += $(LIBVA_LIBS)
325drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
326endif
327endif
328
329if ENABLE_WAYLAND_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300330libweston_module_LTLIBRARIES += wayland-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800331wayland_backend_la_LDFLAGS = -module -avoid-version
332wayland_backend_la_LIBADD = \
333 $(COMPOSITOR_LIBS) \
334 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800335 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800336wayland_backend_la_CFLAGS = \
337 $(COMPOSITOR_CFLAGS) \
338 $(EGL_CFLAGS) \
339 $(PIXMAN_CFLAGS) \
340 $(CAIRO_CFLAGS) \
341 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500342 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700343wayland_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300344 libweston/compositor-wayland.c \
345 libweston/compositor-wayland.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700346 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500347nodist_wayland_backend_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800348 protocol/fullscreen-shell-unstable-v1-protocol.c \
349 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800350endif
351
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800352if ENABLE_HEADLESS_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300353libweston_module_LTLIBRARIES += headless-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800354headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800355headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500356headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700357headless_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300358 libweston/compositor-headless.c \
359 libweston/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700360 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800361endif
362
363if ENABLE_FBDEV_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300364libweston_module_LTLIBRARIES += fbdev-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800365fbdev_backend_la_LDFLAGS = -module -avoid-version
366fbdev_backend_la_LIBADD = \
367 $(COMPOSITOR_LIBS) \
368 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100369 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800370 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800371 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800372fbdev_backend_la_CFLAGS = \
373 $(COMPOSITOR_CFLAGS) \
374 $(EGL_CFLAGS) \
375 $(FBDEV_COMPOSITOR_CFLAGS) \
376 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500377 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800378fbdev_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300379 libweston/compositor-fbdev.c \
380 libweston/compositor-fbdev.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700381 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100382 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800383endif
384
385if ENABLE_RDP_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300386libweston_module_LTLIBRARIES += rdp-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800387rdp_backend_la_LDFLAGS = -module -avoid-version
388rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
389 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800390 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800391rdp_backend_la_CFLAGS = \
392 $(COMPOSITOR_CFLAGS) \
393 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500394 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700395rdp_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300396 libweston/compositor-rdp.c \
397 libweston/compositor-rdp.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700398 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800399endif
400
401if HAVE_LCMS
402module_LTLIBRARIES += cms-static.la
403cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800404cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500405cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800406cms_static_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300407 compositor/cms-static.c \
408 compositor/cms-helper.c \
409 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700410 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800411if ENABLE_COLORD
412module_LTLIBRARIES += cms-colord.la
413cms_colord_la_LDFLAGS = -module -avoid-version
414cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500415cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800416cms_colord_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300417 compositor/cms-colord.c \
418 compositor/cms-helper.c \
419 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700420 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800421endif
422endif
423
424noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500425spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800426spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
427spring_tool_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300428 libweston/spring-tool.c \
429 libweston/animation.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800430 shared/matrix.c \
431 shared/matrix.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300432 libweston/compositor.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800433
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800434if BUILD_CLIENTS
435
436bin_PROGRAMS += weston-terminal weston-info
437
438libexec_PROGRAMS += \
439 weston-desktop-shell \
440 weston-screenshooter \
441 weston-keyboard \
442 weston-simple-im
443
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900444if ENABLE_IVI_SHELL
445libexec_PROGRAMS += \
446 weston-ivi-shell-user-interface
447endif
448
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800449demo_clients = \
450 weston-flower \
451 weston-image \
452 weston-cliptest \
453 weston-dnd \
454 weston-smoke \
455 weston-resizor \
456 weston-eventdemo \
457 weston-clickdot \
458 weston-transformed \
459 weston-fullscreen \
460 weston-stacking \
461 weston-calibrator \
462 weston-scaler
463
464if INSTALL_DEMO_CLIENTS
465bin_PROGRAMS += $(demo_clients)
466else
467noinst_PROGRAMS += $(demo_clients)
468endif
469
470
471if BUILD_SIMPLE_CLIENTS
472demo_clients += \
473 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500474 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800475 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400476 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800477 weston-multi-resource
478
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800479weston_simple_shm_SOURCES = clients/simple-shm.c
480nodist_weston_simple_shm_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800481 protocol/xdg-shell-unstable-v5-protocol.c \
482 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800483 protocol/fullscreen-shell-unstable-v1-protocol.c \
484 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900485 protocol/ivi-application-protocol.c \
486 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800487weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800488weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800489
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500490weston_simple_damage_SOURCES = clients/simple-damage.c
491nodist_weston_simple_damage_SOURCES = \
Pekka Paalanen7b69d6c2016-04-15 17:00:21 +0300492 protocol/viewporter-protocol.c \
493 protocol/viewporter-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800494 protocol/xdg-shell-unstable-v5-protocol.c \
495 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800496 protocol/fullscreen-shell-unstable-v1-protocol.c \
497 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500498weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
499weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
500
Jon A. Cruzb09da242015-06-16 13:15:13 -0700501weston_simple_touch_SOURCES = \
502 clients/simple-touch.c \
503 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800504weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800505weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800506
Jon A. Cruzb09da242015-06-16 13:15:13 -0700507weston_presentation_shm_SOURCES = \
508 clients/presentation-shm.c \
509 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400510nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200511 protocol/presentation-time-protocol.c \
512 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400513weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300514weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400515
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800516weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800517weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300518weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800519endif
520
521if BUILD_SIMPLE_EGL_CLIENTS
522demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800523weston_simple_egl_SOURCES = clients/simple-egl.c
524nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800525 protocol/xdg-shell-unstable-v5-protocol.c \
526 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900527 protocol/ivi-application-protocol.c \
528 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800529weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800530weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
531endif
532
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000533if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
534demo_clients += weston-simple-dmabuf-intel
535weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
536nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800537 protocol/xdg-shell-unstable-v5-protocol.c \
538 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800539 protocol/fullscreen-shell-unstable-v1-protocol.c \
540 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800541 protocol/linux-dmabuf-unstable-v1-protocol.c \
542 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000543weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
544weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800545BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200546endif
547
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000548if BUILD_SIMPLE_DMABUF_V4L_CLIENT
549demo_clients += weston-simple-dmabuf-v4l
550weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
551nodist_weston_simple_dmabuf_v4l_SOURCES = \
552 protocol/xdg-shell-unstable-v5-protocol.c \
553 protocol/xdg-shell-unstable-v5-client-protocol.h \
554 protocol/fullscreen-shell-unstable-v1-protocol.c \
555 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
556 protocol/linux-dmabuf-unstable-v1-protocol.c \
557 protocol/linux-dmabuf-unstable-v1-client-protocol.h
558weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
559weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
560BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
561endif
562
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800563noinst_LTLIBRARIES += libtoytoolkit.la
564
565libtoytoolkit_la_SOURCES = \
566 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700567 clients/window.h \
568 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800569
570nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100571 protocol/text-cursor-position-protocol.c \
572 protocol/text-cursor-position-client-protocol.h \
Pekka Paalanen73511002016-04-15 16:53:41 +0300573 protocol/viewporter-protocol.c \
574 protocol/viewporter-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800575 protocol/xdg-shell-unstable-v5-protocol.c \
576 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900577 protocol/ivi-application-protocol.c \
578 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500579
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800580BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
581
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800582
583libtoytoolkit_la_LIBADD = \
584 $(CLIENT_LIBS) \
585 $(CAIRO_EGL_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300586 libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800587libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800588
589weston_flower_SOURCES = clients/flower.c
590weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800591weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800592
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100593weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800594 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800595nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800596 protocol/weston-screenshooter-protocol.c \
597 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800598weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800599weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800600
Jon A. Cruzb09da242015-06-16 13:15:13 -0700601weston_terminal_SOURCES = \
602 clients/terminal.c \
603 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800604weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800605weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800606
607weston_image_SOURCES = clients/image.c
608weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800609weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800610
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300611weston_cliptest_SOURCES = \
612 clients/cliptest.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300613 libweston/vertex-clipping.c \
614 libweston/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800615weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800616weston_cliptest_LDADD = libtoytoolkit.la
617
Jon A. Cruzb09da242015-06-16 13:15:13 -0700618weston_dnd_SOURCES = \
619 clients/dnd.c \
620 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800621weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800622weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800623
624weston_smoke_SOURCES = clients/smoke.c
625weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800626weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800627
628weston_resizor_SOURCES = clients/resizor.c
629weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800630weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800631
632weston_scaler_SOURCES = clients/scaler.c
633weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800634weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800635
636if HAVE_CAIRO_GLESV2
637demo_clients += weston-nested weston-nested-client
638
Jon A. Cruzb09da242015-06-16 13:15:13 -0700639weston_nested_SOURCES = \
640 clients/nested.c \
641 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800642weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800643weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800644
645weston_nested_client_SOURCES = clients/nested-client.c
646weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800647weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800648endif
649
Jon A. Cruzb09da242015-06-16 13:15:13 -0700650weston_eventdemo_SOURCES = \
651 clients/eventdemo.c \
652 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800653weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800654weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800655
Jon A. Cruzb09da242015-06-16 13:15:13 -0700656weston_clickdot_SOURCES = \
657 clients/clickdot.c \
658 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800659weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800660weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800661
662weston_transformed_SOURCES = clients/transformed.c
663weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800664weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800665
666weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500667nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800668 protocol/fullscreen-shell-unstable-v1-protocol.c \
669 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800670weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800671weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800672
Jon A. Cruzb09da242015-06-16 13:15:13 -0700673weston_stacking_SOURCES = \
674 clients/stacking.c \
675 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800676weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800677weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800678
Jon A. Cruzb09da242015-06-16 13:15:13 -0700679weston_calibrator_SOURCES = \
680 clients/calibrator.c \
681 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800682 shared/matrix.c \
683 shared/matrix.h
684weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800685weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800686
687if BUILD_SUBSURFACES_CLIENT
688demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700689weston_subsurfaces_SOURCES = \
690 clients/subsurfaces.c \
691 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800692weston_subsurfaces_CFLAGS = \
693 $(AM_CFLAGS) \
694 $(SIMPLE_EGL_CLIENT_CFLAGS) \
695 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800696weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
697endif
698
699if HAVE_PANGO
700demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700701weston_editor_SOURCES = \
702 clients/editor.c \
703 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800704nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800705 protocol/text-input-unstable-v1-protocol.c \
706 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800707weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800708weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800709endif
710
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800711weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800712nodist_weston_keyboard_SOURCES = \
713 protocol/weston-desktop-shell-client-protocol.h \
714 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800715 protocol/input-method-unstable-v1-protocol.c \
716 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800717weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800718weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800719
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800720weston_simple_im_SOURCES = clients/weston-simple-im.c
721nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800722 protocol/input-method-unstable-v1-protocol.c \
723 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800724weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800725weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800726
Jon A. Cruzb09da242015-06-16 13:15:13 -0700727weston_info_SOURCES = \
728 clients/weston-info.c \
729 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400730nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200731 protocol/presentation-time-protocol.c \
732 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800733weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200734weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800735
Jon A. Cruzb09da242015-06-16 13:15:13 -0700736weston_desktop_shell_SOURCES = \
737 clients/desktop-shell.c \
738 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800739nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800740 protocol/weston-desktop-shell-client-protocol.h \
741 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800742weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800743weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800744
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900745if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700746weston_ivi_shell_user_interface_SOURCES = \
747 clients/ivi-shell-user-interface.c \
748 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900749nodist_weston_ivi_shell_user_interface_SOURCES = \
750 protocol/ivi-hmi-controller-client-protocol.h \
751 protocol/ivi-hmi-controller-protocol.c \
752 protocol/ivi-application-client-protocol.h \
753 protocol/ivi-application-protocol.c
754weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
755weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
756endif
757
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800758if BUILD_FULL_GL_CLIENTS
759demo_clients += weston-gears
760weston_gears_SOURCES = clients/gears.c
761weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800762weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800763endif
764
765endif
766
767BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800768 protocol/weston-screenshooter-protocol.c \
769 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100770 protocol/text-cursor-position-client-protocol.h \
771 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800772 protocol/text-input-unstable-v1-protocol.c \
773 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800774 protocol/input-method-unstable-v1-protocol.c \
775 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800776 protocol/weston-desktop-shell-client-protocol.h \
777 protocol/weston-desktop-shell-protocol.c \
Pekka Paalanen73511002016-04-15 16:53:41 +0300778 protocol/viewporter-client-protocol.h \
779 protocol/viewporter-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200780 protocol/presentation-time-protocol.c \
781 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800782 protocol/fullscreen-shell-unstable-v1-protocol.c \
783 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800784 protocol/xdg-shell-unstable-v5-protocol.c \
785 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900786 protocol/ivi-hmi-controller-protocol.c \
787 protocol/ivi-hmi-controller-client-protocol.h \
788 protocol/ivi-application-protocol.c \
789 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800790
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800791westondatadir = $(datadir)/weston
792dist_westondata_DATA = \
793 data/wayland.svg \
794 data/wayland.png \
795 data/pattern.png \
796 data/terminal.png \
797 data/border.png \
Bryce Harrington6bc52542016-03-24 17:57:39 -0700798 data/icon_editor.png \
799 data/icon_flower.png \
800 data/icon_terminal.png \
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800801 data/icon_window.png \
802 data/sign_close.png \
803 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100804 data/sign_minimize.png
805
806if ENABLE_IVI_SHELL
807dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900808 data/background.png \
809 data/tiling.png \
810 data/fullscreen.png \
811 data/panel.png \
812 data/random.png \
813 data/sidebyside.png \
814 data/home.png \
815 data/icon_ivi_clickdot.png \
816 data/icon_ivi_flower.png \
817 data/icon_ivi_simple-egl.png \
818 data/icon_ivi_simple-shm.png \
819 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100820endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800821
822
823if BUILD_WCAP_TOOLS
824bin_PROGRAMS += wcap-decode
825
826wcap_decode_SOURCES = \
827 wcap/main.c \
828 wcap/wcap-decode.c \
829 wcap/wcap-decode.h
830
Derek Foreman4ff38742015-06-18 11:43:11 -0500831wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800832wcap_decode_LDADD = $(WCAP_LIBS)
833endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800834
835
836if ENABLE_DESKTOP_SHELL
837
838module_LTLIBRARIES += desktop-shell.la
839
840desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100841 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800842 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300843 -I$(top_srcdir)/libweston \
844 -I$(top_builddir)/libweston \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800845 -I$(top_builddir)/desktop-shell \
846 -DDATADIR='"$(datadir)"' \
847 -DMODULEDIR='"$(moduledir)"' \
848 -DLIBEXECDIR='"$(libexecdir)"' \
849 -DIN_WESTON
850
851desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800852desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500853desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800854desktop_shell_la_SOURCES = \
855 desktop-shell/shell.h \
856 desktop-shell/shell.c \
857 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700858 desktop-shell/input-panel.c \
859 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800860nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800861 protocol/weston-desktop-shell-protocol.c \
862 protocol/weston-desktop-shell-server-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800863 protocol/xdg-shell-unstable-v5-protocol.c \
864 protocol/xdg-shell-unstable-v5-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800865
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800866BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800867endif
868
Jason Ekstrand946a9482014-04-02 19:53:47 -0500869if ENABLE_FULLSCREEN_SHELL
870
871module_LTLIBRARIES += fullscreen-shell.la
872
873fullscreen_shell_la_CPPFLAGS = \
874 -I$(top_builddir)/protocol \
875 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300876 -I$(top_srcdir)/libweston \
877 -I$(top_builddir)/libweston \
Jason Ekstrand946a9482014-04-02 19:53:47 -0500878 -DIN_WESTON
879
880fullscreen_shell_la_LDFLAGS = -module -avoid-version
881fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500882fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500883fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700884 fullscreen-shell/fullscreen-shell.c \
885 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500886nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800887 protocol/fullscreen-shell-unstable-v1-protocol.c \
888 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500889
890BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
891endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800892
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900893if ENABLE_IVI_SHELL
894
895module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900896 $(ivi_shell) \
897 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900898
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900899ivi_shell = ivi-shell.la
900ivi_shell_la_LDFLAGS = -module -avoid-version
901ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500902ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900903ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900904 ivi-shell/ivi-layout-export.h \
905 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +0200906 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900907 ivi-shell/ivi-layout.c \
908 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900909 ivi-shell/ivi-shell.h \
910 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700911 ivi-shell/input-panel-ivi.c \
912 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900913nodist_ivi_shell_la_SOURCES = \
914 protocol/ivi-application-protocol.c \
915 protocol/ivi-application-server-protocol.h
916
917BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
918
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900919hmi_controller = hmi-controller.la
920hmi_controller_la_LDFLAGS = -module -avoid-version
921hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500922hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900923hmi_controller_la_SOURCES = \
924 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700925 ivi-shell/hmi-controller.c \
926 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900927nodist_hmi_controller_la_SOURCES = \
928 protocol/ivi-hmi-controller-protocol.c \
929 protocol/ivi-hmi-controller-server-protocol.h
930
931BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
932
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900933endif
934
935
Jason Ekstrand47928d82014-04-02 19:54:01 -0500936if ENABLE_SCREEN_SHARING
937
938module_LTLIBRARIES += screen-share.la
939
940screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
941screen_share_la_LDFLAGS = -module -avoid-version
942screen_share_la_LIBADD = \
943 $(COMPOSITOR_LIBS) \
944 $(SCREEN_SHARE_LIBS) \
945 libshared-cairo.la
946screen_share_la_CFLAGS = \
947 $(COMPOSITOR_CFLAGS) \
948 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500949 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500950screen_share_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300951 compositor/screen-share.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700952 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500953nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800954 protocol/fullscreen-shell-unstable-v1-protocol.c \
955 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500956
957endif
958
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800959if ENABLE_XWAYLAND
960
961module_LTLIBRARIES += xwayland.la
962
963xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100964 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800965 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300966 -I$(top_srcdir)/libweston \
967 -I$(top_builddir)/libweston \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800968 -I$(top_builddir)/xwayland \
969 -DDATADIR='"$(datadir)"' \
970 -DMODULEDIR='"$(moduledir)"' \
971 -DLIBEXECDIR='"$(libexecdir)"' \
972 -DXSERVER_PATH='"@XSERVER_PATH@"'
973
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
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800992endif
993
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800994
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800995#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800996# Shared utilities
997#
998
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700999noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1000 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001001
Derek Foreman4ff38742015-06-18 11:43:11 -05001002libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001003
1004libshared_la_SOURCES = \
1005 shared/config-parser.c \
1006 shared/option-parser.c \
1007 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001008 shared/file-util.c \
1009 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001010 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001011 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001012 shared/os-compatibility.h \
1013 shared/xalloc.c \
1014 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001015
1016libshared_cairo_la_CFLAGS = \
1017 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001018 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001019 $(COMPOSITOR_CFLAGS) \
1020 $(PIXMAN_CFLAGS) \
1021 $(CAIRO_CFLAGS) \
1022 $(PNG_CFLAGS) \
1023 $(WEBP_CFLAGS)
1024
1025libshared_cairo_la_LIBADD = \
1026 $(PIXMAN_LIBS) \
1027 $(CAIRO_LIBS) \
1028 $(PNG_LIBS) \
1029 $(WEBP_LIBS) \
1030 $(JPEG_LIBS)
1031
1032libshared_cairo_la_SOURCES = \
1033 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001034 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001035 shared/image-loader.c \
1036 shared/image-loader.h \
1037 shared/cairo-util.c \
1038 shared/frame.c \
1039 shared/cairo-util.h
1040
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001041libzunitc_la_SOURCES = \
1042 tools/zunitc/inc/zunitc/zunitc.h \
1043 tools/zunitc/inc/zunitc/zunitc_impl.h \
1044 tools/zunitc/src/zuc_base_logger.c \
1045 tools/zunitc/src/zuc_base_logger.h \
1046 tools/zunitc/src/zuc_collector.c \
1047 tools/zunitc/src/zuc_collector.h \
1048 tools/zunitc/src/zuc_context.h \
1049 tools/zunitc/src/zuc_event.h \
1050 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001051 tools/zunitc/src/zuc_junit_reporter.c \
1052 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001053 tools/zunitc/src/zuc_types.h \
1054 tools/zunitc/src/zunitc_impl.c \
1055 shared/helpers.h
1056
1057libzunitc_la_CFLAGS = \
1058 $(AM_CFLAGS) \
1059 -I$(top_srcdir)/tools/zunitc/inc
1060
1061libzunitc_la_LIBADD = \
Gustavo Zacarias57c83f62016-04-22 10:54:35 -03001062 libshared.la \
1063 $(CLOCK_GETTIME_LIBS)
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001064
Jon A. Cruz646aef52015-07-15 19:22:41 -07001065if ENABLE_JUNIT_XML
1066libzunitc_la_CFLAGS += \
1067 $(LIBXML2_CFLAGS)
1068libzunitc_la_LIBADD += \
1069 $(LIBXML2_LIBS)
1070endif
1071
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001072libzunitcmain_la_SOURCES = \
1073 tools/zunitc/src/main.c
1074
1075libzunitcmain_la_CFLAGS = \
1076 $(AM_CFLAGS) \
1077 -I$(top_srcdir)/tools/zunitc/inc
1078
1079libzunitcmain_la_LIBADD = \
1080 libzunitc.la \
1081 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001082
1083#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001084# tests subdirectory
1085#
1086
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001087TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1088
1089internal_tests = \
1090 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001091
1092shared_tests = \
1093 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001094 vertex-clip.test \
1095 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001096
1097module_tests = \
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001098 plugin-registry-test.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001099 surface-test.la \
1100 surface-global-test.la
1101
1102weston_tests = \
1103 bad_buffer.weston \
1104 keyboard.weston \
1105 event.weston \
1106 button.weston \
1107 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001108 presentation.weston \
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001109 viewporter.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001110 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001111 subsurface.weston \
1112 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001113
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001114ivi_tests =
1115
1116$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001117
1118AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001119 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1120 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001121
1122TEST_EXTENSIONS = .la .weston
1123LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1124WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1125
1126clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001127 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001128 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001129
1130# To remove when automake 1.11 support is dropped
1131export abs_builddir
1132
1133noinst_LTLIBRARIES += \
1134 weston-test.la \
1135 $(module_tests) \
1136 libtest-runner.la \
1137 libtest-client.la
1138
1139noinst_PROGRAMS += \
1140 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001141 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001142 $(shared_tests) \
1143 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001144 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001145 matrix-test
1146
1147test_module_ldflags = \
1148 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1149
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001150plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
1151plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1152plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1153
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001154surface_global_test_la_SOURCES = tests/surface-global-test.c
1155surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001156surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001157
1158surface_test_la_SOURCES = tests/surface-test.c
1159surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001160surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001161
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001162weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001163weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001164weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001165weston_test_la_SOURCES = \
1166 tests/weston-test.c \
1167 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001168nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001169 protocol/weston-test-protocol.c \
1170 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001171
1172if ENABLE_EGL
1173weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1174weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1175endif
1176
1177libtest_runner_la_SOURCES = \
1178 tests/weston-test-runner.c \
1179 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001180libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001181
1182config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001183config_parser_test_LDADD = \
1184 libshared.la \
1185 $(COMPOSITOR_LIBS) \
1186 libzunitc.la \
1187 libzunitcmain.la
1188config_parser_test_CFLAGS = \
1189 $(AM_CFLAGS) \
1190 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001191
1192vertex_clip_test_SOURCES = \
1193 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001194 shared/helpers.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001195 libweston/vertex-clipping.c \
1196 libweston/vertex-clipping.h
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001197vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001198
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001199libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001200 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001201 tests/weston-test-client-helper.h
1202nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001203 protocol/weston-test-protocol.c \
1204 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001205libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1206libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) $(CAIRO_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001207
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001208
1209#
1210# Internal tests - tests functionality of the testsuite itself
1211#
1212
1213internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001214internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1215internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001216
1217
1218#
1219# Weston Tests
1220#
1221
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001222bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001223bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001224bad_buffer_weston_LDADD = libtest-client.la
1225
1226keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001227keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001228keyboard_weston_LDADD = libtest-client.la
1229
1230event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001231event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001232event_weston_LDADD = libtest-client.la
1233
1234button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001235button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001236button_weston_LDADD = libtest-client.la
1237
Marek Chalupa5fd81402015-03-30 09:21:29 -04001238devices_weston_SOURCES = tests/devices-test.c
1239devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1240devices_weston_LDADD = libtest-client.la
1241
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001242text_weston_SOURCES = tests/text-test.c
1243nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001244 protocol/text-input-unstable-v1-protocol.c \
1245 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001246text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001247text_weston_LDADD = libtest-client.la
1248
1249subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001250subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001251subsurface_weston_LDADD = libtest-client.la
1252
Jon A. Cruzb09da242015-06-16 13:15:13 -07001253presentation_weston_SOURCES = \
1254 tests/presentation-test.c \
1255 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001256nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001257 protocol/presentation-time-protocol.c \
1258 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001259presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1260presentation_weston_LDADD = libtest-client.la
1261
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001262roles_weston_SOURCES = tests/roles-test.c
1263roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1264roles_weston_LDADD = libtest-client.la
1265
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001266viewporter_weston_SOURCES = \
1267 tests/viewporter-test.c \
1268 shared/helpers.h
1269nodist_viewporter_weston_SOURCES = \
1270 protocol/viewporter-protocol.c \
1271 protocol/viewporter-client-protocol.h
1272viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1273viewporter_weston_LDADD = libtest-client.la
1274
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001275if ENABLE_EGL
1276weston_tests += buffer-count.weston
1277buffer_count_weston_SOURCES = tests/buffer-count-test.c
Pekka Paalanen924cd942016-05-20 17:25:38 +03001278buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001279buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1280endif
1281
1282if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001283weston_tests += xwayland-test.weston
1284xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001285xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001286xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001287endif
1288
1289matrix_test_SOURCES = \
1290 tests/matrix-test.c \
1291 shared/matrix.c \
1292 shared/matrix.h
1293matrix_test_CPPFLAGS = -DUNIT_TEST
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001294matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001295
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001296if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001297module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001298 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001299 ivi-layout-test.la
1300
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001301ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1302ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001303ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001304ivi_layout_internal_test_la_SOURCES = \
1305 tests/ivi_layout-internal-test.c
1306
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001307ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1308ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001309ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001310ivi_layout_test_la_SOURCES = \
1311 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001312 tests/ivi-test.h \
1313 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001314nodist_ivi_layout_test_la_SOURCES = \
1315 protocol/weston-test-protocol.c \
1316 protocol/weston-test-server-protocol.h
1317
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001318ivi_tests += \
1319 ivi-shell-app.weston
1320
1321ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1322nodist_ivi_shell_app_weston_SOURCES = \
1323 protocol/ivi-application-protocol.c \
1324 protocol/ivi-application-client-protocol.h
1325ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1326ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001327
1328noinst_PROGRAMS += ivi-layout.ivi
1329
1330ivi_layout_ivi_SOURCES = \
1331 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001332 tests/ivi-test.h \
1333 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001334nodist_ivi_layout_ivi_SOURCES = \
1335 protocol/ivi-application-protocol.c \
1336 protocol/ivi-application-client-protocol.h
1337ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1338ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001339endif
1340
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001341if BUILD_SETBACKLIGHT
1342noinst_PROGRAMS += setbacklight
1343setbacklight_SOURCES = \
1344 tests/setbacklight.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001345 libweston/libbacklight.c \
1346 libweston/libbacklight.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001347setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1348setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1349endif
1350
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001351all-local: zuctest$(EXEEXT)
1352
1353noinst_PROGRAMS += zuctest$(EXEEXT)
1354
1355zuctest_LDADD = \
1356 libzunitc.la \
1357 libzunitcmain.la
1358
1359zuctest_CFLAGS = \
1360 $(AM_CFLAGS) \
1361 -I$(top_srcdir)/tools/zunitc/inc
1362
1363zuctest_SOURCES = \
1364 tools/zunitc/test/fixtures_test.c \
1365 tools/zunitc/test/zunitc_test.c
1366
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001367EXTRA_DIST += \
1368 tests/weston-tests-env \
1369 tests/internal-screenshot.ini \
1370 tests/reference/internal-screenshot-bad-00.png \
1371 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001372
1373BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001374 protocol/weston-test-protocol.c \
1375 protocol/weston-test-server-protocol.h \
1376 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001377 protocol/text-input-unstable-v1-protocol.c \
1378 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001379
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001380EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001381 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001382 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001383 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001384 protocol/weston-test.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001385 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001386 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001387
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001388#
1389# manual test modules in tests subdirectory
1390#
1391
1392noinst_LTLIBRARIES += \
1393 surface-screenshot.la
1394
1395surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1396surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001397surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001398surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1399
1400
1401#
1402# Documentation
1403#
1404
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001405man_MANS = weston.1 weston.ini.5
1406
1407if ENABLE_DRM_COMPOSITOR
1408man_MANS += weston-drm.7
1409endif
1410
1411MAN_SUBSTS = \
1412 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1413 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1414 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1415 -e 's|__version__|$(PACKAGE_VERSION)|g'
1416
1417SUFFIXES = .1 .5 .7 .man
1418
1419%.1 %.5 %.7 : man/%.man
1420 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1421
1422EXTRA_DIST += \
1423 man/weston.man \
1424 man/weston-drm.man \
1425 man/weston.ini.man
1426
1427CLEANFILES += $(man_MANS)
1428
Jon A. Cruz179c1862015-07-15 19:22:43 -07001429if ENABLE_DEVDOCS
1430DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1431
1432docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1433 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1434
1435docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1436 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1437endif
1438
1439DOCDIRS = \
1440 docs/developer \
1441 docs/tools
1442
1443$(DOCDIRS):
1444 $(MKDIR_P) $@
1445
1446.PHONY: doc $(DOXYGEN_INDICES)
1447
1448doc: $(DOXYGEN_INDICES)
1449
Jonas Ådahl496adb32015-11-17 16:00:27 +08001450.SECONDEXPANSION:
1451
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001452define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001453$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001454endef
1455
1456define protoname
1457$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1458endef
1459
1460protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001461 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1462
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001463protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001464 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1465
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001466protocol/%-client-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) client-header < $< > $@
1468
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001469protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1470 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001471
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001472protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1473 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001474
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001475protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1476 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@