blob: c94c211eb0e3aabb7b2ff4d2cc758fac2c5110d4 [file] [log] [blame]
Thierry Reding0e6d9a72014-05-27 09:07:54 +02001ACLOCAL_AMFLAGS = -I m4
2
Kristian Høgsberge895f142014-01-27 21:46:30 -08003bin_PROGRAMS =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08004noinst_PROGRAMS =
Kristian Høgsberge73eccd2014-01-31 16:15:11 -08005libexec_PROGRAMS =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08006moduledir = $(libdir)/weston
7module_LTLIBRARIES =
Emil Velikov7fe47f32016-07-22 14:51:51 +01008libweston_moduledir = $(libdir)/libweston-$(LIBWESTON_MAJOR)
Giulio Camuffo179fcda2016-06-02 21:48:14 +03009libweston_module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080010noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080011BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -080012
Derek Foreman2ef9e812015-02-09 09:57:29 -060013AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050014
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090015EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000016
17weston.ini : $(srcdir)/weston.ini.in
18 $(AM_V_GEN)$(SED) \
19 -e 's|@bindir[@]|$(bindir)|g' \
20 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
21 -e 's|@libexecdir[@]|$(libexecdir)|g' \
22 $< > $@
23
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090024ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
Ross Burton2eff22b2015-07-17 12:33:45 +010025 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090026 -e 's|@bindir[@]|$(bindir)|g' \
27 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020028 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090029 -e 's|@libexecdir[@]|$(libexecdir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020030 -e 's|@plugin_prefix[@]||g' \
31 $< > $@
32
33tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in
Ross Burton2eff22b2015-07-17 12:33:45 +010034 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020035 -e 's|@bindir[@]|$(bindir)|g' \
36 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020037 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Derek Foremanbbdd9bc2015-06-16 13:30:35 -050038 -e 's|@libexecdir[@]|$(abs_builddir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020039 -e 's|@plugin_prefix[@]|$(abs_top_builddir)/.libs/|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090040 $< > $@
41
42all-local : weston.ini ivi-shell/weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080043
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080044AM_CFLAGS = $(GCC_CFLAGS)
45
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080046AM_CPPFLAGS = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +030047 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +010048 -I$(top_srcdir)/libweston \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080049 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080050 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080051 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010052 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080053 -DDATADIR='"$(datadir)"' \
Giulio Camuffo179fcda2016-06-02 21:48:14 +030054 -DLIBWESTON_MODULEDIR='"$(libweston_moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080055 -DLIBEXECDIR='"$(libexecdir)"' \
56 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080057
Pekka Paalanenf3a34532015-03-24 13:51:05 +020058CLEANFILES = weston.ini \
59 ivi-shell/weston.ini \
60 tests/weston-ivi.ini \
Derek Foreman1ce2ef52015-05-26 10:21:03 -050061 internal-screenshot-00.png \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020062 $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080063
Quentin Glidic154c5d22016-08-15 17:29:09 +020064# Libtool race fix
65# libweston-desktop depends on libweston, and desktop-shell depends on both.
66# This leads to a libtool race at installation, because libtool re-links
67# everything.
68# If you add more fixes, you may need a workaround to keep automake generated
69# targets. See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328
70install-libweston_moduleLTLIBRARIES install-moduleLTLIBRARIES: install-libLTLIBRARIES
71
Emil Velikov7fe47f32016-07-22 14:51:51 +010072lib_LTLIBRARIES = libweston-@LIBWESTON_MAJOR@.la
73libweston_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
74libweston_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
75libweston_@LIBWESTON_MAJOR@_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Giulio Camuffo8aedf7b2016-06-02 21:48:12 +030076 $(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) \
77 $(LIBINPUT_BACKEND_LIBS) libshared.la
Emil Velikov7fe47f32016-07-22 14:51:51 +010078libweston_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080079
Emil Velikov7fe47f32016-07-22 14:51:51 +010080libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +030081 libweston/git-version.h \
82 libweston/log.c \
83 libweston/compositor.c \
84 libweston/compositor.h \
85 libweston/compositor-drm.h \
86 libweston/compositor-fbdev.h \
87 libweston/compositor-headless.h \
88 libweston/compositor-rdp.h \
89 libweston/compositor-wayland.h \
90 libweston/compositor-x11.h \
91 libweston/input.c \
92 libweston/data-device.c \
93 libweston/screenshooter.c \
94 libweston/clipboard.c \
95 libweston/zoom.c \
96 libweston/bindings.c \
97 libweston/animation.c \
98 libweston/noop-renderer.c \
99 libweston/pixman-renderer.c \
100 libweston/pixman-renderer.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +0200101 libweston/plugin-registry.c \
102 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300103 libweston/timeline.c \
104 libweston/timeline.h \
105 libweston/timeline-object.h \
106 libweston/linux-dmabuf.c \
107 libweston/linux-dmabuf.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700108 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800109 shared/matrix.c \
110 shared/matrix.h \
Pekka Paalanenaa21f622015-07-03 15:44:50 +0300111 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800112 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100113 shared/platform.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300114 libweston/weston-egl-ext.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300115
Quentin Glidic248dd102016-08-12 10:41:34 +0200116lib_LTLIBRARIES += libweston-desktop-@LIBWESTON_MAJOR@.la
117libweston_desktop_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
118libweston_desktop_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
119libweston_desktop_@LIBWESTON_MAJOR@_la_LIBADD = libweston-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
120libweston_desktop_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
121
122libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \
123 libweston-desktop/client.c \
124 libweston-desktop/internal.h \
125 libweston-desktop/libweston-desktop.c \
126 libweston-desktop/libweston-desktop.h \
127 libweston-desktop/seat.c \
128 libweston-desktop/surface.c \
129 libweston-desktop/wl-shell.c \
Quentin Glidic9c5dd7e2016-08-12 10:41:37 +0200130 libweston-desktop/xdg-shell-v6.c \
Quentin Glidic248dd102016-08-12 10:41:34 +0200131 libweston-desktop/xdg-shell-v5.c \
132 libweston-desktop/xwayland.c
133
134nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \
Quentin Glidic9c5dd7e2016-08-12 10:41:37 +0200135 protocol/xdg-shell-unstable-v6-protocol.c \
136 protocol/xdg-shell-unstable-v6-server-protocol.h \
Quentin Glidic248dd102016-08-12 10:41:34 +0200137 protocol/xdg-shell-unstable-v5-protocol.c \
138 protocol/xdg-shell-unstable-v5-server-protocol.h
139
Jonas Ådahl5ac91a12016-08-15 17:31:02 +0800140BUILT_SOURCES += $(nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES)
141
Quentin Glidic9c5dd7e2016-08-12 10:41:37 +0200142libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v6.lo: protocol/xdg-shell-unstable-v6-server-protocol.h
Quentin Glidic248dd102016-08-12 10:41:34 +0200143libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v5.lo: protocol/xdg-shell-unstable-v5-server-protocol.h
144
Egor Starkov7ce2e972015-09-25 18:00:27 +0300145if SYSTEMD_NOTIFY_SUPPORT
146module_LTLIBRARIES += systemd-notify.la
147systemd_notify_la_LDFLAGS = -module -avoid-version
148systemd_notify_la_LIBADD = $(SYSTEMD_DAEMON_LIBS)
149systemd_notify_la_CFLAGS = \
Pekka Paalanenaff703e2016-04-05 14:08:11 +0300150 $(COMPOSITOR_CFLAGS) \
151 $(SYSTEMD_DAEMON_CFLAGS) \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300152 $(PIXMAN_CFLAGS) \
153 $(AM_CFLAGS)
154systemd_notify_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300155 compositor/systemd-notify.c \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300156 shared/helpers.h \
157 shared/zalloc.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300158 libweston/compositor.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300159endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800160
Emil Velikov7fe47f32016-07-22 14:51:51 +0100161nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800162 protocol/weston-screenshooter-protocol.c \
163 protocol/weston-screenshooter-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800164 protocol/text-cursor-position-protocol.c \
165 protocol/text-cursor-position-server-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800166 protocol/text-input-unstable-v1-protocol.c \
167 protocol/text-input-unstable-v1-server-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800168 protocol/input-method-unstable-v1-protocol.c \
169 protocol/input-method-unstable-v1-server-protocol.h \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200170 protocol/presentation-time-protocol.c \
171 protocol/presentation-time-server-protocol.h \
Pekka Paalanene95ad5c2016-04-15 14:47:08 +0300172 protocol/viewporter-protocol.c \
173 protocol/viewporter-server-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800174 protocol/linux-dmabuf-unstable-v1-protocol.c \
Jonas Ådahl30d61d82014-10-22 21:21:17 +0200175 protocol/linux-dmabuf-unstable-v1-server-protocol.h \
176 protocol/relative-pointer-unstable-v1-protocol.c \
Jonas Ådahld3414f22016-07-22 17:56:31 +0800177 protocol/relative-pointer-unstable-v1-server-protocol.h \
178 protocol/pointer-constraints-unstable-v1-protocol.c \
Bryce Harrington873a3f82016-08-30 12:05:01 -0700179 protocol/pointer-constraints-unstable-v1-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800180
Emil Velikov7fe47f32016-07-22 14:51:51 +0100181BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES)
Giulio Camuffo9e445982016-06-02 21:48:15 +0300182
183bin_PROGRAMS += weston
184
185weston_LDFLAGS = -export-dynamic
186weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200187 -DMODULEDIR='"$(moduledir)"' \
188 -DXSERVER_PATH='"@XSERVER_PATH@"'
Giulio Camuffo9e445982016-06-02 21:48:15 +0300189weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +0100190weston_LDADD = libshared.la libweston-@LIBWESTON_MAJOR@.la \
191 $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Giulio Camuffo9e445982016-06-02 21:48:15 +0300192 $(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +0100193 -lm
Giulio Camuffo9e445982016-06-02 21:48:15 +0300194
195weston_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300196 compositor/main.c \
197 compositor/weston-screenshooter.c \
Giulio Camuffo9c764df2016-06-29 11:54:27 +0200198 compositor/text-backend.c \
199 compositor/xwayland.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800200
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800201# Track this dependency explicitly instead of using BUILT_SOURCES. We
202# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
203# in case we're building from tarballs.
204
Emil Velikova8840242016-07-04 14:57:12 +0100205compositor/main.c : $(top_builddir)/libweston/git-version.h
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300206libweston/compositor.c : $(top_builddir)/libweston/git-version.h
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800207
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800208noinst_LTLIBRARIES += \
209 libsession-helper.la
210
211libsession_helper_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300212 libweston/launcher-util.c \
213 libweston/launcher-util.h \
214 libweston/launcher-impl.h \
215 libweston/weston-launch.h \
216 libweston/launcher-weston-launch.c \
217 libweston/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500218libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800219libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
220
221if ENABLE_DBUS
222if HAVE_SYSTEMD_LOGIN
223libsession_helper_la_SOURCES += \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300224 libweston/dbus.h \
225 libweston/dbus.c \
226 libweston/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800227libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
228libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
229endif
230endif
231
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800232if HAVE_GIT_REPO
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300233libweston/git-version.h : $(top_srcdir)/.git/logs/HEAD
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800234 $(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 -0800235else
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300236libweston/git-version.h :
Kristian Høgsberg1d2dd072014-02-03 10:55:51 -0800237 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
238
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800239endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800240
241.FORCE :
242
243if BUILD_WESTON_LAUNCH
244bin_PROGRAMS += weston-launch
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300245weston_launch_SOURCES = libweston/weston-launch.c libweston/weston-launch.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800246weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
247weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500248 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800249 $(PAM_CFLAGS) \
250 $(SYSTEMD_LOGIN_CFLAGS) \
251 $(LIBDRM_CFLAGS)
252weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
253
254if ENABLE_SETUID_INSTALL
255install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700256 can_suid_files=no; \
257 chown root $(DESTDIR)$(bindir)/weston-launch \
258 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
259 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500260 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700261 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
262 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
263 false; \
264 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800265endif
266
267endif # BUILD_WESTON_LAUNCH
268
269pkgconfigdir = $(libdir)/pkgconfig
Quentin Glidic248dd102016-08-12 10:41:34 +0200270pkgconfig_DATA = \
271 libweston/libweston-${LIBWESTON_MAJOR}.pc \
272 libweston-desktop/libweston-desktop-${LIBWESTON_MAJOR}.pc \
273 compositor/weston.pc
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800274
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100275wayland_sessiondir = $(datadir)/wayland-sessions
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300276dist_wayland_session_DATA = compositor/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100277
Emil Velikov7fe47f32016-07-22 14:51:51 +0100278libwestonincludedir = $(includedir)/libweston-${LIBWESTON_MAJOR}
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300279libwestoninclude_HEADERS = \
280 libweston/version.h \
281 libweston/compositor.h \
282 libweston/compositor-drm.h \
283 libweston/compositor-fbdev.h \
284 libweston/compositor-headless.h \
285 libweston/compositor-rdp.h \
286 libweston/compositor-wayland.h \
287 libweston/compositor-x11.h \
Armin Krezović4690c562016-09-30 14:11:03 +0200288 libweston/windowed-output-api.h \
Pekka Paalanen827b5d22016-06-29 11:54:26 +0200289 libweston/plugin-registry.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300290 libweston/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800291 shared/matrix.h \
292 shared/config-parser.h \
Emil Velikovcbcf5452016-07-04 15:34:17 +0100293 shared/zalloc.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800294
Quentin Glidic248dd102016-08-12 10:41:34 +0200295libwestoninclude_HEADERS += \
296 libweston-desktop/libweston-desktop.h
297
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300298westonincludedir = $(includedir)/weston
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300299westoninclude_HEADERS = compositor/weston.h
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300300
Ucan, Emre \(ADITG/SW1\)ae2541d2015-10-15 14:51:43 +0000301if ENABLE_IVI_SHELL
302westoninclude_HEADERS += \
303 ivi-shell/ivi-layout-export.h
304endif
305
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800306if ENABLE_EGL
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300307libweston_module_LTLIBRARIES += gl-renderer.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800308gl_renderer_la_LDFLAGS = -module -avoid-version
309gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
310gl_renderer_la_CFLAGS = \
311 $(COMPOSITOR_CFLAGS) \
312 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300313 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500314 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800315gl_renderer_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300316 libweston/gl-renderer.h \
317 libweston/gl-renderer.c \
318 libweston/vertex-clipping.c \
319 libweston/vertex-clipping.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700320 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800321endif
322
323if ENABLE_X11_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300324libweston_module_LTLIBRARIES += x11-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800325x11_backend_la_LDFLAGS = -module -avoid-version
326x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800327 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800328x11_backend_la_CFLAGS = \
329 $(COMPOSITOR_CFLAGS) \
330 $(EGL_CFLAGS) \
331 $(PIXMAN_CFLAGS) \
332 $(CAIRO_CFLAGS) \
333 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500334 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700335x11_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300336 libweston/compositor-x11.c \
337 libweston/compositor-x11.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700338 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800339endif
340
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100341INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000342INPUT_BACKEND_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300343 libweston/libinput-seat.c \
344 libweston/libinput-seat.h \
345 libweston/libinput-device.c \
346 libweston/libinput-device.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700347 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100348
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800349if ENABLE_DRM_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300350libweston_module_LTLIBRARIES += drm-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800351drm_backend_la_LDFLAGS = -module -avoid-version
352drm_backend_la_LIBADD = \
353 $(COMPOSITOR_LIBS) \
354 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100355 $(INPUT_BACKEND_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300356 libshared.la \
357 $(CLOCK_GETTIME_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800358 libsession-helper.la
359drm_backend_la_CFLAGS = \
360 $(COMPOSITOR_CFLAGS) \
361 $(EGL_CFLAGS) \
362 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500363 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800364drm_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300365 libweston/compositor-drm.c \
366 libweston/compositor-drm.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100367 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700368 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200369 shared/timespec-util.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300370 libweston/libbacklight.c \
371 libweston/libbacklight.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800372
373if ENABLE_VAAPI_RECORDER
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300374drm_backend_la_SOURCES += libweston/vaapi-recorder.c libweston/vaapi-recorder.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800375drm_backend_la_LIBADD += $(LIBVA_LIBS)
376drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
377endif
378endif
379
380if ENABLE_WAYLAND_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300381libweston_module_LTLIBRARIES += wayland-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800382wayland_backend_la_LDFLAGS = -module -avoid-version
383wayland_backend_la_LIBADD = \
384 $(COMPOSITOR_LIBS) \
385 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800386 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800387wayland_backend_la_CFLAGS = \
388 $(COMPOSITOR_CFLAGS) \
389 $(EGL_CFLAGS) \
390 $(PIXMAN_CFLAGS) \
391 $(CAIRO_CFLAGS) \
392 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500393 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700394wayland_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300395 libweston/compositor-wayland.c \
396 libweston/compositor-wayland.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700397 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500398nodist_wayland_backend_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800399 protocol/fullscreen-shell-unstable-v1-protocol.c \
400 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800401endif
402
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800403if ENABLE_HEADLESS_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300404libweston_module_LTLIBRARIES += headless-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800405headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800406headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500407headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700408headless_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300409 libweston/compositor-headless.c \
410 libweston/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700411 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800412endif
413
414if ENABLE_FBDEV_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300415libweston_module_LTLIBRARIES += fbdev-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800416fbdev_backend_la_LDFLAGS = -module -avoid-version
417fbdev_backend_la_LIBADD = \
418 $(COMPOSITOR_LIBS) \
419 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100420 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800421 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800422 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800423fbdev_backend_la_CFLAGS = \
424 $(COMPOSITOR_CFLAGS) \
425 $(EGL_CFLAGS) \
426 $(FBDEV_COMPOSITOR_CFLAGS) \
427 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500428 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800429fbdev_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300430 libweston/compositor-fbdev.c \
431 libweston/compositor-fbdev.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700432 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100433 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800434endif
435
436if ENABLE_RDP_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300437libweston_module_LTLIBRARIES += rdp-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800438rdp_backend_la_LDFLAGS = -module -avoid-version
439rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
440 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800441 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800442rdp_backend_la_CFLAGS = \
443 $(COMPOSITOR_CFLAGS) \
444 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500445 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700446rdp_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300447 libweston/compositor-rdp.c \
448 libweston/compositor-rdp.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700449 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800450endif
451
452if HAVE_LCMS
453module_LTLIBRARIES += cms-static.la
454cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800455cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500456cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800457cms_static_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300458 compositor/cms-static.c \
459 compositor/cms-helper.c \
460 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700461 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800462if ENABLE_COLORD
463module_LTLIBRARIES += cms-colord.la
464cms_colord_la_LDFLAGS = -module -avoid-version
465cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500466cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800467cms_colord_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300468 compositor/cms-colord.c \
469 compositor/cms-helper.c \
470 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700471 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800472endif
473endif
474
475noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500476spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800477spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
478spring_tool_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300479 libweston/spring-tool.c \
480 libweston/animation.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800481 shared/matrix.c \
482 shared/matrix.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300483 libweston/compositor.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800484
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800485if BUILD_CLIENTS
486
487bin_PROGRAMS += weston-terminal weston-info
488
489libexec_PROGRAMS += \
490 weston-desktop-shell \
491 weston-screenshooter \
492 weston-keyboard \
493 weston-simple-im
494
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900495if ENABLE_IVI_SHELL
496libexec_PROGRAMS += \
497 weston-ivi-shell-user-interface
498endif
499
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800500demo_clients = \
501 weston-flower \
502 weston-image \
503 weston-cliptest \
504 weston-dnd \
505 weston-smoke \
506 weston-resizor \
507 weston-eventdemo \
508 weston-clickdot \
Jonas Ådahl61831f42016-03-15 18:14:00 +0800509 weston-confine \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800510 weston-transformed \
511 weston-fullscreen \
512 weston-stacking \
513 weston-calibrator \
514 weston-scaler
515
516if INSTALL_DEMO_CLIENTS
517bin_PROGRAMS += $(demo_clients)
518else
519noinst_PROGRAMS += $(demo_clients)
520endif
521
522
523if BUILD_SIMPLE_CLIENTS
524demo_clients += \
525 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500526 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800527 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400528 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800529 weston-multi-resource
530
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800531weston_simple_shm_SOURCES = clients/simple-shm.c
532nodist_weston_simple_shm_SOURCES = \
Jonas Ådahle023cbc2016-08-11 23:29:38 +0800533 protocol/xdg-shell-unstable-v6-protocol.c \
534 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800535 protocol/fullscreen-shell-unstable-v1-protocol.c \
536 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900537 protocol/ivi-application-protocol.c \
538 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800539weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800540weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800541
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500542weston_simple_damage_SOURCES = clients/simple-damage.c
543nodist_weston_simple_damage_SOURCES = \
Pekka Paalanen7b69d6c2016-04-15 17:00:21 +0300544 protocol/viewporter-protocol.c \
545 protocol/viewporter-client-protocol.h \
Jonas Ådahla74eff92016-08-11 23:39:31 +0800546 protocol/xdg-shell-unstable-v6-protocol.c \
547 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800548 protocol/fullscreen-shell-unstable-v1-protocol.c \
549 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500550weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
551weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
552
Jon A. Cruzb09da242015-06-16 13:15:13 -0700553weston_simple_touch_SOURCES = \
554 clients/simple-touch.c \
555 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800556weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800557weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800558
Jon A. Cruzb09da242015-06-16 13:15:13 -0700559weston_presentation_shm_SOURCES = \
560 clients/presentation-shm.c \
561 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400562nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200563 protocol/presentation-time-protocol.c \
564 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400565weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300566weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400567
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800568weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800569weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300570weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800571endif
572
573if BUILD_SIMPLE_EGL_CLIENTS
574demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800575weston_simple_egl_SOURCES = clients/simple-egl.c
576nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl83630022016-08-11 23:13:20 +0800577 protocol/xdg-shell-unstable-v6-protocol.c \
578 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900579 protocol/ivi-application-protocol.c \
580 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800581weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800582weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
583endif
584
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000585if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
586demo_clients += weston-simple-dmabuf-intel
587weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
588nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl42682622016-08-11 23:44:41 +0800589 protocol/xdg-shell-unstable-v6-protocol.c \
590 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800591 protocol/fullscreen-shell-unstable-v1-protocol.c \
592 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800593 protocol/linux-dmabuf-unstable-v1-protocol.c \
594 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000595weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
596weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800597BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200598endif
599
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000600if BUILD_SIMPLE_DMABUF_V4L_CLIENT
601demo_clients += weston-simple-dmabuf-v4l
602weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
603nodist_weston_simple_dmabuf_v4l_SOURCES = \
Jonas Ådahl6ccd2862016-08-12 10:01:29 +0800604 protocol/xdg-shell-unstable-v6-protocol.c \
605 protocol/xdg-shell-unstable-v6-client-protocol.h \
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000606 protocol/fullscreen-shell-unstable-v1-protocol.c \
607 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
608 protocol/linux-dmabuf-unstable-v1-protocol.c \
609 protocol/linux-dmabuf-unstable-v1-client-protocol.h
610weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
611weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
612BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
613endif
614
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800615noinst_LTLIBRARIES += libtoytoolkit.la
616
617libtoytoolkit_la_SOURCES = \
618 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700619 clients/window.h \
620 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800621
622nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100623 protocol/text-cursor-position-protocol.c \
624 protocol/text-cursor-position-client-protocol.h \
Pekka Paalanen73511002016-04-15 16:53:41 +0300625 protocol/viewporter-protocol.c \
626 protocol/viewporter-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800627 protocol/xdg-shell-unstable-v6-protocol.c \
628 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900629 protocol/ivi-application-protocol.c \
Jonas Ådahle5a1bb42014-11-25 10:25:27 +0800630 protocol/ivi-application-client-protocol.h \
631 protocol/pointer-constraints-unstable-v1-protocol.c \
632 protocol/pointer-constraints-unstable-v1-client-protocol.h \
633 protocol/relative-pointer-unstable-v1-protocol.c \
634 protocol/relative-pointer-unstable-v1-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500635
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800636BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
637
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800638
639libtoytoolkit_la_LIBADD = \
640 $(CLIENT_LIBS) \
641 $(CAIRO_EGL_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300642 libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800643libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800644
645weston_flower_SOURCES = clients/flower.c
646weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800647weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800648
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100649weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800650 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800651nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800652 protocol/weston-screenshooter-protocol.c \
653 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800654weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800655weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800656
Jon A. Cruzb09da242015-06-16 13:15:13 -0700657weston_terminal_SOURCES = \
658 clients/terminal.c \
659 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800660weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800661weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800662
663weston_image_SOURCES = clients/image.c
664weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800665weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800666
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300667weston_cliptest_SOURCES = \
668 clients/cliptest.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300669 libweston/vertex-clipping.c \
670 libweston/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800671weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800672weston_cliptest_LDADD = libtoytoolkit.la
673
Jon A. Cruzb09da242015-06-16 13:15:13 -0700674weston_dnd_SOURCES = \
675 clients/dnd.c \
676 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800677weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800678weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800679
680weston_smoke_SOURCES = clients/smoke.c
681weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800682weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800683
684weston_resizor_SOURCES = clients/resizor.c
685weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800686weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800687
688weston_scaler_SOURCES = clients/scaler.c
689weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800690weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800691
692if HAVE_CAIRO_GLESV2
693demo_clients += weston-nested weston-nested-client
694
Jon A. Cruzb09da242015-06-16 13:15:13 -0700695weston_nested_SOURCES = \
696 clients/nested.c \
697 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800698weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800699weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800700
701weston_nested_client_SOURCES = clients/nested-client.c
702weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800703weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800704endif
705
Jon A. Cruzb09da242015-06-16 13:15:13 -0700706weston_eventdemo_SOURCES = \
707 clients/eventdemo.c \
708 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800709weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800710weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800711
Jon A. Cruzb09da242015-06-16 13:15:13 -0700712weston_clickdot_SOURCES = \
713 clients/clickdot.c \
714 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800715weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800716weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800717
Jonas Ådahl61831f42016-03-15 18:14:00 +0800718weston_confine_SOURCES = \
719 clients/confine.c \
720 shared/helpers.h
721weston_confine_LDADD = libtoytoolkit.la
722weston_confine_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
723
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800724weston_transformed_SOURCES = clients/transformed.c
725weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800726weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800727
728weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500729nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800730 protocol/fullscreen-shell-unstable-v1-protocol.c \
731 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800732weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800733weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800734
Jon A. Cruzb09da242015-06-16 13:15:13 -0700735weston_stacking_SOURCES = \
736 clients/stacking.c \
737 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800738weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800739weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800740
Jon A. Cruzb09da242015-06-16 13:15:13 -0700741weston_calibrator_SOURCES = \
742 clients/calibrator.c \
743 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800744 shared/matrix.c \
745 shared/matrix.h
746weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800747weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800748
749if BUILD_SUBSURFACES_CLIENT
750demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700751weston_subsurfaces_SOURCES = \
752 clients/subsurfaces.c \
753 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800754weston_subsurfaces_CFLAGS = \
755 $(AM_CFLAGS) \
756 $(SIMPLE_EGL_CLIENT_CFLAGS) \
757 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800758weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
759endif
760
761if HAVE_PANGO
762demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700763weston_editor_SOURCES = \
764 clients/editor.c \
765 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800766nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800767 protocol/text-input-unstable-v1-protocol.c \
768 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800769weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800770weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800771endif
772
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800773weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800774nodist_weston_keyboard_SOURCES = \
775 protocol/weston-desktop-shell-client-protocol.h \
776 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800777 protocol/input-method-unstable-v1-protocol.c \
778 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800779weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800780weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800781
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800782weston_simple_im_SOURCES = clients/weston-simple-im.c
783nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800784 protocol/input-method-unstable-v1-protocol.c \
785 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800786weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800787weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800788
Jon A. Cruzb09da242015-06-16 13:15:13 -0700789weston_info_SOURCES = \
790 clients/weston-info.c \
791 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400792nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200793 protocol/presentation-time-protocol.c \
794 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800795weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200796weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800797
Jon A. Cruzb09da242015-06-16 13:15:13 -0700798weston_desktop_shell_SOURCES = \
799 clients/desktop-shell.c \
800 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800801nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800802 protocol/weston-desktop-shell-client-protocol.h \
803 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800804weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800805weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800806
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900807if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700808weston_ivi_shell_user_interface_SOURCES = \
809 clients/ivi-shell-user-interface.c \
810 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900811nodist_weston_ivi_shell_user_interface_SOURCES = \
812 protocol/ivi-hmi-controller-client-protocol.h \
813 protocol/ivi-hmi-controller-protocol.c \
814 protocol/ivi-application-client-protocol.h \
815 protocol/ivi-application-protocol.c
816weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
817weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
818endif
819
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800820if BUILD_FULL_GL_CLIENTS
821demo_clients += weston-gears
822weston_gears_SOURCES = clients/gears.c
823weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800824weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800825endif
826
827endif
828
829BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800830 protocol/weston-screenshooter-protocol.c \
831 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100832 protocol/text-cursor-position-client-protocol.h \
833 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800834 protocol/text-input-unstable-v1-protocol.c \
835 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800836 protocol/input-method-unstable-v1-protocol.c \
837 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800838 protocol/weston-desktop-shell-client-protocol.h \
839 protocol/weston-desktop-shell-protocol.c \
Pekka Paalanen73511002016-04-15 16:53:41 +0300840 protocol/viewporter-client-protocol.h \
841 protocol/viewporter-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200842 protocol/presentation-time-protocol.c \
843 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800844 protocol/fullscreen-shell-unstable-v1-protocol.c \
845 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800846 protocol/xdg-shell-unstable-v6-protocol.c \
847 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900848 protocol/ivi-hmi-controller-protocol.c \
849 protocol/ivi-hmi-controller-client-protocol.h \
850 protocol/ivi-application-protocol.c \
Bryce Harrington6303d3b2016-08-30 12:04:05 -0700851 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800852
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800853westondatadir = $(datadir)/weston
854dist_westondata_DATA = \
855 data/wayland.svg \
856 data/wayland.png \
857 data/pattern.png \
858 data/terminal.png \
859 data/border.png \
Bryce Harrington6bc52542016-03-24 17:57:39 -0700860 data/icon_editor.png \
861 data/icon_flower.png \
862 data/icon_terminal.png \
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800863 data/icon_window.png \
864 data/sign_close.png \
865 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100866 data/sign_minimize.png
867
868if ENABLE_IVI_SHELL
869dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900870 data/background.png \
871 data/tiling.png \
872 data/fullscreen.png \
873 data/panel.png \
874 data/random.png \
875 data/sidebyside.png \
876 data/home.png \
877 data/icon_ivi_clickdot.png \
878 data/icon_ivi_flower.png \
879 data/icon_ivi_simple-egl.png \
880 data/icon_ivi_simple-shm.png \
881 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100882endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800883
884
885if BUILD_WCAP_TOOLS
886bin_PROGRAMS += wcap-decode
887
888wcap_decode_SOURCES = \
889 wcap/main.c \
890 wcap/wcap-decode.c \
891 wcap/wcap-decode.h
892
Derek Foreman4ff38742015-06-18 11:43:11 -0500893wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800894wcap_decode_LDADD = $(WCAP_LIBS)
895endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800896
897
898if ENABLE_DESKTOP_SHELL
899
900module_LTLIBRARIES += desktop-shell.la
901
902desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100903 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800904 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300905 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100906 -I$(top_srcdir)/libweston \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800907 -I$(top_builddir)/desktop-shell \
908 -DDATADIR='"$(datadir)"' \
909 -DMODULEDIR='"$(moduledir)"' \
910 -DLIBEXECDIR='"$(libexecdir)"' \
911 -DIN_WESTON
912
913desktop_shell_la_LDFLAGS = -module -avoid-version
Quentin Glidic8f9d90a2016-08-12 10:41:36 +0200914desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500915desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800916desktop_shell_la_SOURCES = \
917 desktop-shell/shell.h \
918 desktop-shell/shell.c \
919 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700920 desktop-shell/input-panel.c \
921 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800922nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800923 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahl5ac91a12016-08-15 17:31:02 +0800924 protocol/weston-desktop-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800925
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800926BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800927endif
928
Jason Ekstrand946a9482014-04-02 19:53:47 -0500929if ENABLE_FULLSCREEN_SHELL
930
931module_LTLIBRARIES += fullscreen-shell.la
932
933fullscreen_shell_la_CPPFLAGS = \
934 -I$(top_builddir)/protocol \
935 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300936 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100937 -I$(top_srcdir)/libweston \
Jason Ekstrand946a9482014-04-02 19:53:47 -0500938 -DIN_WESTON
939
940fullscreen_shell_la_LDFLAGS = -module -avoid-version
941fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500942fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500943fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700944 fullscreen-shell/fullscreen-shell.c \
945 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500946nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800947 protocol/fullscreen-shell-unstable-v1-protocol.c \
948 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500949
950BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
951endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800952
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900953if ENABLE_IVI_SHELL
954
955module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900956 $(ivi_shell) \
957 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900958
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900959ivi_shell = ivi-shell.la
960ivi_shell_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100961ivi_shell_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500962ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900963ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900964 ivi-shell/ivi-layout-export.h \
965 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +0200966 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900967 ivi-shell/ivi-layout.c \
968 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900969 ivi-shell/ivi-shell.h \
970 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700971 ivi-shell/input-panel-ivi.c \
972 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900973nodist_ivi_shell_la_SOURCES = \
974 protocol/ivi-application-protocol.c \
975 protocol/ivi-application-server-protocol.h
976
977BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
978
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900979hmi_controller = hmi-controller.la
980hmi_controller_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100981hmi_controller_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500982hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900983hmi_controller_la_SOURCES = \
984 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700985 ivi-shell/hmi-controller.c \
986 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900987nodist_hmi_controller_la_SOURCES = \
988 protocol/ivi-hmi-controller-protocol.c \
989 protocol/ivi-hmi-controller-server-protocol.h
990
991BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
992
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900993endif
994
995
Jason Ekstrand47928d82014-04-02 19:54:01 -0500996if ENABLE_SCREEN_SHARING
997
998module_LTLIBRARIES += screen-share.la
999
1000screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
1001screen_share_la_LDFLAGS = -module -avoid-version
1002screen_share_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001003 libshared-cairo.la \
Jason Ekstrand47928d82014-04-02 19:54:01 -05001004 $(COMPOSITOR_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +01001005 $(SCREEN_SHARE_LIBS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001006screen_share_la_CFLAGS = \
1007 $(COMPOSITOR_CFLAGS) \
1008 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -05001009 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001010screen_share_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +03001011 compositor/screen-share.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001012 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001013nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +08001014 protocol/fullscreen-shell-unstable-v1-protocol.c \
1015 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001016
1017endif
1018
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001019if ENABLE_XWAYLAND
1020
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001021libweston_module_LTLIBRARIES += xwayland.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001022
1023xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001024 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001025 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001026 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +01001027 -I$(top_srcdir)/libweston \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001028 -I$(top_builddir)/xwayland \
1029 -DDATADIR='"$(datadir)"' \
1030 -DMODULEDIR='"$(moduledir)"' \
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001031 -DLIBEXECDIR='"$(libexecdir)"'
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001032
1033xwayland_la_LDFLAGS = -module -avoid-version
1034xwayland_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001035 libshared-cairo.la \
1036 $(XWAYLAND_LIBS)
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001037xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -05001038 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001039 $(COMPOSITOR_CFLAGS) \
1040 $(PIXMAN_CFLAGS) \
1041 $(CAIRO_CFLAGS)
1042xwayland_la_SOURCES = \
1043 xwayland/xwayland.h \
Quentin Glidic955cec02016-08-12 10:41:35 +02001044 xwayland/xwayland-internal-interface.h \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001045 xwayland/window-manager.c \
1046 xwayland/selection.c \
1047 xwayland/dnd.c \
1048 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001049 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001050 xwayland/hash.h \
1051 shared/helpers.h
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001052
1053libwestoninclude_HEADERS += xwayland/xwayland-api.h
1054
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001055endif
1056
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001057
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001058#
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001059# Shared utilities
1060#
1061
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001062noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1063 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001064
Derek Foreman4ff38742015-06-18 11:43:11 -05001065libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001066
1067libshared_la_SOURCES = \
1068 shared/config-parser.c \
1069 shared/option-parser.c \
1070 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001071 shared/file-util.c \
1072 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001073 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001074 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001075 shared/os-compatibility.h \
1076 shared/xalloc.c \
1077 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001078
1079libshared_cairo_la_CFLAGS = \
1080 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001081 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001082 $(COMPOSITOR_CFLAGS) \
1083 $(PIXMAN_CFLAGS) \
1084 $(CAIRO_CFLAGS) \
1085 $(PNG_CFLAGS) \
1086 $(WEBP_CFLAGS)
1087
1088libshared_cairo_la_LIBADD = \
1089 $(PIXMAN_LIBS) \
1090 $(CAIRO_LIBS) \
1091 $(PNG_LIBS) \
1092 $(WEBP_LIBS) \
1093 $(JPEG_LIBS)
1094
1095libshared_cairo_la_SOURCES = \
1096 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001097 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001098 shared/image-loader.c \
1099 shared/image-loader.h \
1100 shared/cairo-util.c \
1101 shared/frame.c \
1102 shared/cairo-util.h
1103
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001104libzunitc_la_SOURCES = \
1105 tools/zunitc/inc/zunitc/zunitc.h \
1106 tools/zunitc/inc/zunitc/zunitc_impl.h \
1107 tools/zunitc/src/zuc_base_logger.c \
1108 tools/zunitc/src/zuc_base_logger.h \
1109 tools/zunitc/src/zuc_collector.c \
1110 tools/zunitc/src/zuc_collector.h \
1111 tools/zunitc/src/zuc_context.h \
1112 tools/zunitc/src/zuc_event.h \
1113 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001114 tools/zunitc/src/zuc_junit_reporter.c \
1115 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001116 tools/zunitc/src/zuc_types.h \
1117 tools/zunitc/src/zunitc_impl.c \
1118 shared/helpers.h
1119
1120libzunitc_la_CFLAGS = \
1121 $(AM_CFLAGS) \
1122 -I$(top_srcdir)/tools/zunitc/inc
1123
1124libzunitc_la_LIBADD = \
Gustavo Zacarias57c83f62016-04-22 10:54:35 -03001125 libshared.la \
1126 $(CLOCK_GETTIME_LIBS)
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001127
Jon A. Cruz646aef52015-07-15 19:22:41 -07001128if ENABLE_JUNIT_XML
1129libzunitc_la_CFLAGS += \
1130 $(LIBXML2_CFLAGS)
1131libzunitc_la_LIBADD += \
1132 $(LIBXML2_LIBS)
1133endif
1134
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001135libzunitcmain_la_SOURCES = \
1136 tools/zunitc/src/main.c
1137
1138libzunitcmain_la_CFLAGS = \
1139 $(AM_CFLAGS) \
1140 -I$(top_srcdir)/tools/zunitc/inc
1141
1142libzunitcmain_la_LIBADD = \
1143 libzunitc.la \
1144 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001145
1146#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001147# tests subdirectory
1148#
1149
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001150TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1151
1152internal_tests = \
1153 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001154
1155shared_tests = \
1156 config-parser.test \
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001157 string.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001158 vertex-clip.test \
1159 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001160
1161module_tests = \
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001162 plugin-registry-test.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001163 surface-test.la \
1164 surface-global-test.la
1165
1166weston_tests = \
1167 bad_buffer.weston \
1168 keyboard.weston \
1169 event.weston \
1170 button.weston \
1171 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001172 presentation.weston \
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001173 viewporter.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001174 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001175 subsurface.weston \
1176 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001177
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001178ivi_tests =
1179
1180$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001181
1182AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001183 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1184 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001185
1186TEST_EXTENSIONS = .la .weston
1187LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1188WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1189
1190clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001191 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001192 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001193
1194# To remove when automake 1.11 support is dropped
1195export abs_builddir
1196
1197noinst_LTLIBRARIES += \
1198 weston-test.la \
1199 $(module_tests) \
1200 libtest-runner.la \
1201 libtest-client.la
1202
1203noinst_PROGRAMS += \
1204 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001205 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001206 $(shared_tests) \
1207 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001208 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001209 matrix-test
1210
1211test_module_ldflags = \
1212 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1213
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001214plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
1215plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1216plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1217
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001218surface_global_test_la_SOURCES = tests/surface-global-test.c
1219surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001220surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001221
1222surface_test_la_SOURCES = tests/surface-test.c
1223surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001224surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001225
Emil Velikov67351452016-07-22 14:52:42 +01001226weston_test_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001227weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001228weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001229weston_test_la_SOURCES = \
1230 tests/weston-test.c \
1231 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001232nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001233 protocol/weston-test-protocol.c \
1234 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001235
1236if ENABLE_EGL
1237weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1238weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1239endif
1240
1241libtest_runner_la_SOURCES = \
1242 tests/weston-test-runner.c \
1243 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001244libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001245
1246config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001247config_parser_test_LDADD = \
1248 libshared.la \
1249 $(COMPOSITOR_LIBS) \
1250 libzunitc.la \
1251 libzunitcmain.la
1252config_parser_test_CFLAGS = \
1253 $(AM_CFLAGS) \
1254 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001255
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001256string_test_SOURCES = \
1257 tests/string-test.c \
1258 shared/string-helpers.h
1259string_test_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1260string_test_LDADD = libtest-client.la
1261
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001262vertex_clip_test_SOURCES = \
1263 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001264 shared/helpers.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001265 libweston/vertex-clipping.c \
1266 libweston/vertex-clipping.h
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001267vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001268
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001269libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001270 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001271 tests/weston-test-client-helper.h
1272nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001273 protocol/weston-test-protocol.c \
1274 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001275libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +01001276libtest_client_la_LIBADD = libshared.la libtest-runner.la $(TEST_CLIENT_LIBS) $(CAIRO_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001277
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001278
1279#
1280# Internal tests - tests functionality of the testsuite itself
1281#
1282
1283internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001284internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1285internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001286
1287
1288#
1289# Weston Tests
1290#
1291
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001292bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001293bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001294bad_buffer_weston_LDADD = libtest-client.la
1295
1296keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001297keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001298keyboard_weston_LDADD = libtest-client.la
1299
1300event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001301event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001302event_weston_LDADD = libtest-client.la
1303
1304button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001305button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001306button_weston_LDADD = libtest-client.la
1307
Marek Chalupa5fd81402015-03-30 09:21:29 -04001308devices_weston_SOURCES = tests/devices-test.c
1309devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1310devices_weston_LDADD = libtest-client.la
1311
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001312text_weston_SOURCES = tests/text-test.c
1313nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001314 protocol/text-input-unstable-v1-protocol.c \
1315 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001316text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001317text_weston_LDADD = libtest-client.la
1318
1319subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001320subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001321subsurface_weston_LDADD = libtest-client.la
1322
Jon A. Cruzb09da242015-06-16 13:15:13 -07001323presentation_weston_SOURCES = \
1324 tests/presentation-test.c \
1325 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001326nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001327 protocol/presentation-time-protocol.c \
1328 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001329presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1330presentation_weston_LDADD = libtest-client.la
1331
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001332roles_weston_SOURCES = tests/roles-test.c
1333roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1334roles_weston_LDADD = libtest-client.la
1335
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001336viewporter_weston_SOURCES = \
1337 tests/viewporter-test.c \
1338 shared/helpers.h
1339nodist_viewporter_weston_SOURCES = \
1340 protocol/viewporter-protocol.c \
1341 protocol/viewporter-client-protocol.h
1342viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1343viewporter_weston_LDADD = libtest-client.la
1344
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001345if ENABLE_EGL
1346weston_tests += buffer-count.weston
1347buffer_count_weston_SOURCES = tests/buffer-count-test.c
Pekka Paalanen924cd942016-05-20 17:25:38 +03001348buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001349buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1350endif
1351
1352if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001353weston_tests += xwayland-test.weston
1354xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001355xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001356xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001357endif
1358
1359matrix_test_SOURCES = \
1360 tests/matrix-test.c \
1361 shared/matrix.c \
1362 shared/matrix.h
1363matrix_test_CPPFLAGS = -DUNIT_TEST
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001364matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001365
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001366if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001367module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001368 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001369 ivi-layout-test.la
1370
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001371ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1372ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001373ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001374ivi_layout_internal_test_la_SOURCES = \
1375 tests/ivi_layout-internal-test.c
1376
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001377ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1378ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001379ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001380ivi_layout_test_la_SOURCES = \
1381 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001382 tests/ivi-test.h \
1383 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001384nodist_ivi_layout_test_la_SOURCES = \
1385 protocol/weston-test-protocol.c \
1386 protocol/weston-test-server-protocol.h
1387
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001388ivi_tests += \
1389 ivi-shell-app.weston
1390
1391ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1392nodist_ivi_shell_app_weston_SOURCES = \
1393 protocol/ivi-application-protocol.c \
1394 protocol/ivi-application-client-protocol.h
1395ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1396ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001397
1398noinst_PROGRAMS += ivi-layout.ivi
1399
1400ivi_layout_ivi_SOURCES = \
1401 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001402 tests/ivi-test.h \
1403 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001404nodist_ivi_layout_ivi_SOURCES = \
1405 protocol/ivi-application-protocol.c \
1406 protocol/ivi-application-client-protocol.h
1407ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1408ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001409endif
1410
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001411if BUILD_SETBACKLIGHT
1412noinst_PROGRAMS += setbacklight
1413setbacklight_SOURCES = \
1414 tests/setbacklight.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001415 libweston/libbacklight.c \
1416 libweston/libbacklight.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001417setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1418setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1419endif
1420
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001421all-local: zuctest$(EXEEXT)
1422
1423noinst_PROGRAMS += zuctest$(EXEEXT)
1424
1425zuctest_LDADD = \
1426 libzunitc.la \
1427 libzunitcmain.la
1428
1429zuctest_CFLAGS = \
1430 $(AM_CFLAGS) \
1431 -I$(top_srcdir)/tools/zunitc/inc
1432
1433zuctest_SOURCES = \
1434 tools/zunitc/test/fixtures_test.c \
1435 tools/zunitc/test/zunitc_test.c
1436
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001437EXTRA_DIST += \
1438 tests/weston-tests-env \
1439 tests/internal-screenshot.ini \
1440 tests/reference/internal-screenshot-bad-00.png \
1441 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001442
1443BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001444 protocol/weston-test-protocol.c \
1445 protocol/weston-test-server-protocol.h \
1446 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001447 protocol/text-input-unstable-v1-protocol.c \
1448 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001449
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001450EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001451 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001452 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001453 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001454 protocol/weston-test.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001455 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001456 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001457
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001458#
1459# manual test modules in tests subdirectory
1460#
1461
1462noinst_LTLIBRARIES += \
1463 surface-screenshot.la
1464
Emil Velikov67351452016-07-22 14:52:42 +01001465surface_screenshot_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001466surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001467surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001468surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1469
1470
1471#
1472# Documentation
1473#
1474
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001475man_MANS = weston.1 weston.ini.5
1476
1477if ENABLE_DRM_COMPOSITOR
1478man_MANS += weston-drm.7
1479endif
1480
1481MAN_SUBSTS = \
1482 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1483 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1484 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1485 -e 's|__version__|$(PACKAGE_VERSION)|g'
1486
1487SUFFIXES = .1 .5 .7 .man
1488
1489%.1 %.5 %.7 : man/%.man
1490 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1491
1492EXTRA_DIST += \
1493 man/weston.man \
1494 man/weston-drm.man \
1495 man/weston.ini.man
1496
1497CLEANFILES += $(man_MANS)
1498
Jon A. Cruz179c1862015-07-15 19:22:43 -07001499if ENABLE_DEVDOCS
1500DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1501
1502docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1503 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1504
1505docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1506 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1507endif
1508
1509DOCDIRS = \
1510 docs/developer \
1511 docs/tools
1512
1513$(DOCDIRS):
1514 $(MKDIR_P) $@
1515
1516.PHONY: doc $(DOXYGEN_INDICES)
1517
1518doc: $(DOXYGEN_INDICES)
1519
Jonas Ådahl496adb32015-11-17 16:00:27 +08001520.SECONDEXPANSION:
1521
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001522define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001523$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001524endef
1525
1526define protoname
1527$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1528endef
1529
1530protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001531 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1532
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001533protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001534 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1535
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001536protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001537 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1538
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001539protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1540 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001541
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001542protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1543 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001544
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001545protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1546 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@