blob: 2219e3d532de7c9c636fce7295cc0e14fffc3925 [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)
Armin Krezović34476192016-11-21 18:42:42 +0100394wayland_backend_la_SOURCES = \
395 libweston/compositor-wayland.c \
396 libweston/compositor-wayland.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700397 shared/helpers.h
Pekka Paalanen9f3d95e2016-11-23 11:46:57 +0200398nodist_wayland_backend_la_SOURCES = \
399 protocol/fullscreen-shell-unstable-v1-protocol.c \
400 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
401 protocol/xdg-shell-unstable-v6-protocol.c \
402 protocol/xdg-shell-unstable-v6-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800403endif
404
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800405if ENABLE_HEADLESS_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300406libweston_module_LTLIBRARIES += headless-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800407headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800408headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500409headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700410headless_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300411 libweston/compositor-headless.c \
412 libweston/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700413 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800414endif
415
416if ENABLE_FBDEV_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300417libweston_module_LTLIBRARIES += fbdev-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800418fbdev_backend_la_LDFLAGS = -module -avoid-version
419fbdev_backend_la_LIBADD = \
420 $(COMPOSITOR_LIBS) \
421 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100422 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800423 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800424 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800425fbdev_backend_la_CFLAGS = \
426 $(COMPOSITOR_CFLAGS) \
427 $(EGL_CFLAGS) \
428 $(FBDEV_COMPOSITOR_CFLAGS) \
429 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500430 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800431fbdev_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300432 libweston/compositor-fbdev.c \
433 libweston/compositor-fbdev.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700434 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100435 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800436endif
437
438if ENABLE_RDP_COMPOSITOR
Giulio Camuffo179fcda2016-06-02 21:48:14 +0300439libweston_module_LTLIBRARIES += rdp-backend.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800440rdp_backend_la_LDFLAGS = -module -avoid-version
441rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
442 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800443 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800444rdp_backend_la_CFLAGS = \
445 $(COMPOSITOR_CFLAGS) \
446 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500447 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700448rdp_backend_la_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300449 libweston/compositor-rdp.c \
450 libweston/compositor-rdp.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700451 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800452endif
453
454if HAVE_LCMS
455module_LTLIBRARIES += cms-static.la
456cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800457cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500458cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800459cms_static_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300460 compositor/cms-static.c \
461 compositor/cms-helper.c \
462 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700463 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800464if ENABLE_COLORD
465module_LTLIBRARIES += cms-colord.la
466cms_colord_la_LDFLAGS = -module -avoid-version
467cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500468cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800469cms_colord_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300470 compositor/cms-colord.c \
471 compositor/cms-helper.c \
472 compositor/cms-helper.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700473 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800474endif
475endif
476
477noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500478spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800479spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
480spring_tool_SOURCES = \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300481 libweston/spring-tool.c \
482 libweston/animation.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800483 shared/matrix.c \
484 shared/matrix.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300485 libweston/compositor.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800486
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800487if BUILD_CLIENTS
488
489bin_PROGRAMS += weston-terminal weston-info
490
491libexec_PROGRAMS += \
492 weston-desktop-shell \
493 weston-screenshooter \
494 weston-keyboard \
495 weston-simple-im
496
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900497if ENABLE_IVI_SHELL
498libexec_PROGRAMS += \
499 weston-ivi-shell-user-interface
500endif
501
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800502demo_clients = \
503 weston-flower \
504 weston-image \
505 weston-cliptest \
506 weston-dnd \
507 weston-smoke \
508 weston-resizor \
509 weston-eventdemo \
510 weston-clickdot \
Jonas Ådahl61831f42016-03-15 18:14:00 +0800511 weston-confine \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800512 weston-transformed \
513 weston-fullscreen \
514 weston-stacking \
515 weston-calibrator \
516 weston-scaler
517
518if INSTALL_DEMO_CLIENTS
519bin_PROGRAMS += $(demo_clients)
520else
521noinst_PROGRAMS += $(demo_clients)
522endif
523
524
525if BUILD_SIMPLE_CLIENTS
526demo_clients += \
527 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500528 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800529 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400530 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800531 weston-multi-resource
532
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800533weston_simple_shm_SOURCES = clients/simple-shm.c
534nodist_weston_simple_shm_SOURCES = \
Jonas Ådahle023cbc2016-08-11 23:29:38 +0800535 protocol/xdg-shell-unstable-v6-protocol.c \
536 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800537 protocol/fullscreen-shell-unstable-v1-protocol.c \
538 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900539 protocol/ivi-application-protocol.c \
540 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800541weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800542weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800543
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500544weston_simple_damage_SOURCES = clients/simple-damage.c
545nodist_weston_simple_damage_SOURCES = \
Pekka Paalanen7b69d6c2016-04-15 17:00:21 +0300546 protocol/viewporter-protocol.c \
547 protocol/viewporter-client-protocol.h \
Jonas Ådahla74eff92016-08-11 23:39:31 +0800548 protocol/xdg-shell-unstable-v6-protocol.c \
549 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800550 protocol/fullscreen-shell-unstable-v1-protocol.c \
551 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500552weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
553weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
554
Jon A. Cruzb09da242015-06-16 13:15:13 -0700555weston_simple_touch_SOURCES = \
556 clients/simple-touch.c \
557 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800558weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800559weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800560
Jon A. Cruzb09da242015-06-16 13:15:13 -0700561weston_presentation_shm_SOURCES = \
562 clients/presentation-shm.c \
563 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400564nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200565 protocol/presentation-time-protocol.c \
566 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400567weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300568weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS)
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400569
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800570weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800571weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300572weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800573endif
574
575if BUILD_SIMPLE_EGL_CLIENTS
576demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800577weston_simple_egl_SOURCES = clients/simple-egl.c
578nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl83630022016-08-11 23:13:20 +0800579 protocol/xdg-shell-unstable-v6-protocol.c \
580 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900581 protocol/ivi-application-protocol.c \
582 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800583weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800584weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
585endif
586
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000587if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
588demo_clients += weston-simple-dmabuf-intel
589weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
590nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl42682622016-08-11 23:44:41 +0800591 protocol/xdg-shell-unstable-v6-protocol.c \
592 protocol/xdg-shell-unstable-v6-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800593 protocol/fullscreen-shell-unstable-v1-protocol.c \
594 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800595 protocol/linux-dmabuf-unstable-v1-protocol.c \
596 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000597weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
598weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800599BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200600endif
601
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000602if BUILD_SIMPLE_DMABUF_V4L_CLIENT
603demo_clients += weston-simple-dmabuf-v4l
604weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
605nodist_weston_simple_dmabuf_v4l_SOURCES = \
Jonas Ådahl6ccd2862016-08-12 10:01:29 +0800606 protocol/xdg-shell-unstable-v6-protocol.c \
607 protocol/xdg-shell-unstable-v6-client-protocol.h \
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000608 protocol/fullscreen-shell-unstable-v1-protocol.c \
609 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
610 protocol/linux-dmabuf-unstable-v1-protocol.c \
611 protocol/linux-dmabuf-unstable-v1-client-protocol.h
612weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
613weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
614BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
615endif
616
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800617noinst_LTLIBRARIES += libtoytoolkit.la
618
619libtoytoolkit_la_SOURCES = \
620 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700621 clients/window.h \
622 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800623
624nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100625 protocol/text-cursor-position-protocol.c \
626 protocol/text-cursor-position-client-protocol.h \
Pekka Paalanen73511002016-04-15 16:53:41 +0300627 protocol/viewporter-protocol.c \
628 protocol/viewporter-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800629 protocol/xdg-shell-unstable-v6-protocol.c \
630 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900631 protocol/ivi-application-protocol.c \
Jonas Ådahle5a1bb42014-11-25 10:25:27 +0800632 protocol/ivi-application-client-protocol.h \
633 protocol/pointer-constraints-unstable-v1-protocol.c \
634 protocol/pointer-constraints-unstable-v1-client-protocol.h \
635 protocol/relative-pointer-unstable-v1-protocol.c \
636 protocol/relative-pointer-unstable-v1-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500637
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800638BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
639
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800640
641libtoytoolkit_la_LIBADD = \
642 $(CLIENT_LIBS) \
643 $(CAIRO_EGL_LIBS) \
Gustavo Zacarias34d59852016-04-21 11:18:48 -0300644 libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800645libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800646
647weston_flower_SOURCES = clients/flower.c
648weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800649weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800650
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100651weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800652 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800653nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800654 protocol/weston-screenshooter-protocol.c \
655 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800656weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800657weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800658
Jon A. Cruzb09da242015-06-16 13:15:13 -0700659weston_terminal_SOURCES = \
660 clients/terminal.c \
661 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800662weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800663weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800664
665weston_image_SOURCES = clients/image.c
666weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800667weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800668
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300669weston_cliptest_SOURCES = \
670 clients/cliptest.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300671 libweston/vertex-clipping.c \
672 libweston/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800673weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800674weston_cliptest_LDADD = libtoytoolkit.la
675
Jon A. Cruzb09da242015-06-16 13:15:13 -0700676weston_dnd_SOURCES = \
677 clients/dnd.c \
678 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800679weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800680weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800681
682weston_smoke_SOURCES = clients/smoke.c
683weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800684weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800685
686weston_resizor_SOURCES = clients/resizor.c
687weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800688weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800689
690weston_scaler_SOURCES = clients/scaler.c
691weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800692weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800693
694if HAVE_CAIRO_GLESV2
695demo_clients += weston-nested weston-nested-client
696
Jon A. Cruzb09da242015-06-16 13:15:13 -0700697weston_nested_SOURCES = \
698 clients/nested.c \
699 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800700weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800701weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800702
703weston_nested_client_SOURCES = clients/nested-client.c
704weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800705weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800706endif
707
Jon A. Cruzb09da242015-06-16 13:15:13 -0700708weston_eventdemo_SOURCES = \
709 clients/eventdemo.c \
710 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800711weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800712weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800713
Jon A. Cruzb09da242015-06-16 13:15:13 -0700714weston_clickdot_SOURCES = \
715 clients/clickdot.c \
716 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800717weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800718weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800719
Jonas Ådahl61831f42016-03-15 18:14:00 +0800720weston_confine_SOURCES = \
721 clients/confine.c \
722 shared/helpers.h
723weston_confine_LDADD = libtoytoolkit.la
724weston_confine_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
725
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800726weston_transformed_SOURCES = clients/transformed.c
727weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800728weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800729
730weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500731nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800732 protocol/fullscreen-shell-unstable-v1-protocol.c \
733 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800734weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800735weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800736
Jon A. Cruzb09da242015-06-16 13:15:13 -0700737weston_stacking_SOURCES = \
738 clients/stacking.c \
739 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800740weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800741weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800742
Jon A. Cruzb09da242015-06-16 13:15:13 -0700743weston_calibrator_SOURCES = \
744 clients/calibrator.c \
745 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800746 shared/matrix.c \
747 shared/matrix.h
748weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800749weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800750
751if BUILD_SUBSURFACES_CLIENT
752demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700753weston_subsurfaces_SOURCES = \
754 clients/subsurfaces.c \
755 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800756weston_subsurfaces_CFLAGS = \
757 $(AM_CFLAGS) \
758 $(SIMPLE_EGL_CLIENT_CFLAGS) \
759 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800760weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
761endif
762
763if HAVE_PANGO
764demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700765weston_editor_SOURCES = \
766 clients/editor.c \
767 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800768nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800769 protocol/text-input-unstable-v1-protocol.c \
770 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800771weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800772weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800773endif
774
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800775weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800776nodist_weston_keyboard_SOURCES = \
777 protocol/weston-desktop-shell-client-protocol.h \
778 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800779 protocol/input-method-unstable-v1-protocol.c \
780 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800781weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800782weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800783
Bryce Harringtonc6a899d2016-10-11 16:24:05 -0700784weston_simple_im_SOURCES = clients/simple-im.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800785nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800786 protocol/input-method-unstable-v1-protocol.c \
787 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800788weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800789weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800790
Jon A. Cruzb09da242015-06-16 13:15:13 -0700791weston_info_SOURCES = \
792 clients/weston-info.c \
793 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400794nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200795 protocol/presentation-time-protocol.c \
796 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800797weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200798weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800799
Jon A. Cruzb09da242015-06-16 13:15:13 -0700800weston_desktop_shell_SOURCES = \
801 clients/desktop-shell.c \
802 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800803nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800804 protocol/weston-desktop-shell-client-protocol.h \
805 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800806weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800807weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800808
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900809if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700810weston_ivi_shell_user_interface_SOURCES = \
811 clients/ivi-shell-user-interface.c \
812 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900813nodist_weston_ivi_shell_user_interface_SOURCES = \
814 protocol/ivi-hmi-controller-client-protocol.h \
815 protocol/ivi-hmi-controller-protocol.c \
816 protocol/ivi-application-client-protocol.h \
817 protocol/ivi-application-protocol.c
818weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
819weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
820endif
821
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800822if BUILD_FULL_GL_CLIENTS
823demo_clients += weston-gears
824weston_gears_SOURCES = clients/gears.c
825weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800826weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800827endif
828
829endif
830
831BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800832 protocol/weston-screenshooter-protocol.c \
833 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100834 protocol/text-cursor-position-client-protocol.h \
835 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800836 protocol/text-input-unstable-v1-protocol.c \
837 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800838 protocol/input-method-unstable-v1-protocol.c \
839 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800840 protocol/weston-desktop-shell-client-protocol.h \
841 protocol/weston-desktop-shell-protocol.c \
Pekka Paalanen73511002016-04-15 16:53:41 +0300842 protocol/viewporter-client-protocol.h \
843 protocol/viewporter-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200844 protocol/presentation-time-protocol.c \
845 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800846 protocol/fullscreen-shell-unstable-v1-protocol.c \
847 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahlaf7f98b2016-08-09 18:15:43 +0800848 protocol/xdg-shell-unstable-v6-protocol.c \
849 protocol/xdg-shell-unstable-v6-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900850 protocol/ivi-hmi-controller-protocol.c \
851 protocol/ivi-hmi-controller-client-protocol.h \
852 protocol/ivi-application-protocol.c \
Bryce Harrington6303d3b2016-08-30 12:04:05 -0700853 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800854
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800855westondatadir = $(datadir)/weston
856dist_westondata_DATA = \
857 data/wayland.svg \
858 data/wayland.png \
859 data/pattern.png \
860 data/terminal.png \
861 data/border.png \
Bryce Harrington6bc52542016-03-24 17:57:39 -0700862 data/icon_editor.png \
863 data/icon_flower.png \
864 data/icon_terminal.png \
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800865 data/icon_window.png \
866 data/sign_close.png \
867 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100868 data/sign_minimize.png
869
870if ENABLE_IVI_SHELL
871dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900872 data/background.png \
873 data/tiling.png \
874 data/fullscreen.png \
875 data/panel.png \
876 data/random.png \
877 data/sidebyside.png \
878 data/home.png \
879 data/icon_ivi_clickdot.png \
880 data/icon_ivi_flower.png \
881 data/icon_ivi_simple-egl.png \
882 data/icon_ivi_simple-shm.png \
883 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100884endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800885
886
887if BUILD_WCAP_TOOLS
888bin_PROGRAMS += wcap-decode
889
890wcap_decode_SOURCES = \
891 wcap/main.c \
892 wcap/wcap-decode.c \
893 wcap/wcap-decode.h
894
Derek Foreman4ff38742015-06-18 11:43:11 -0500895wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800896wcap_decode_LDADD = $(WCAP_LIBS)
897endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800898
899
900if ENABLE_DESKTOP_SHELL
901
902module_LTLIBRARIES += desktop-shell.la
903
904desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100905 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800906 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300907 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100908 -I$(top_srcdir)/libweston \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800909 -I$(top_builddir)/desktop-shell \
910 -DDATADIR='"$(datadir)"' \
911 -DMODULEDIR='"$(moduledir)"' \
912 -DLIBEXECDIR='"$(libexecdir)"' \
913 -DIN_WESTON
914
915desktop_shell_la_LDFLAGS = -module -avoid-version
Quentin Glidic8f9d90a2016-08-12 10:41:36 +0200916desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500917desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800918desktop_shell_la_SOURCES = \
919 desktop-shell/shell.h \
920 desktop-shell/shell.c \
921 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700922 desktop-shell/input-panel.c \
923 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800924nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800925 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahl5ac91a12016-08-15 17:31:02 +0800926 protocol/weston-desktop-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800927
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800928BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800929endif
930
Jason Ekstrand946a9482014-04-02 19:53:47 -0500931if ENABLE_FULLSCREEN_SHELL
932
933module_LTLIBRARIES += fullscreen-shell.la
934
935fullscreen_shell_la_CPPFLAGS = \
936 -I$(top_builddir)/protocol \
937 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300938 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +0100939 -I$(top_srcdir)/libweston \
Jason Ekstrand946a9482014-04-02 19:53:47 -0500940 -DIN_WESTON
941
942fullscreen_shell_la_LDFLAGS = -module -avoid-version
943fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500944fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500945fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700946 fullscreen-shell/fullscreen-shell.c \
947 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500948nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800949 protocol/fullscreen-shell-unstable-v1-protocol.c \
950 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500951
952BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
953endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800954
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900955if ENABLE_IVI_SHELL
956
957module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900958 $(ivi_shell) \
959 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900960
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900961ivi_shell = ivi-shell.la
962ivi_shell_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100963ivi_shell_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500964ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900965ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900966 ivi-shell/ivi-layout-export.h \
967 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +0200968 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900969 ivi-shell/ivi-layout.c \
970 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900971 ivi-shell/ivi-shell.h \
972 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700973 ivi-shell/input-panel-ivi.c \
974 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900975nodist_ivi_shell_la_SOURCES = \
976 protocol/ivi-application-protocol.c \
977 protocol/ivi-application-server-protocol.h
978
979BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
980
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900981hmi_controller = hmi-controller.la
982hmi_controller_la_LDFLAGS = -module -avoid-version
Emil Velikov67351452016-07-22 14:52:42 +0100983hmi_controller_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500984hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900985hmi_controller_la_SOURCES = \
986 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700987 ivi-shell/hmi-controller.c \
988 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900989nodist_hmi_controller_la_SOURCES = \
990 protocol/ivi-hmi-controller-protocol.c \
991 protocol/ivi-hmi-controller-server-protocol.h
992
993BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
994
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900995endif
996
997
Jason Ekstrand47928d82014-04-02 19:54:01 -0500998if ENABLE_SCREEN_SHARING
999
1000module_LTLIBRARIES += screen-share.la
1001
1002screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
1003screen_share_la_LDFLAGS = -module -avoid-version
1004screen_share_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001005 libshared-cairo.la \
Jason Ekstrand47928d82014-04-02 19:54:01 -05001006 $(COMPOSITOR_LIBS) \
Emil Velikov67351452016-07-22 14:52:42 +01001007 $(SCREEN_SHARE_LIBS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001008screen_share_la_CFLAGS = \
1009 $(COMPOSITOR_CFLAGS) \
1010 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -05001011 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -05001012screen_share_la_SOURCES = \
Pekka Paalanen58f98c92016-06-03 16:45:21 +03001013 compositor/screen-share.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001014 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001015nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +08001016 protocol/fullscreen-shell-unstable-v1-protocol.c \
1017 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -05001018
1019endif
1020
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001021if ENABLE_XWAYLAND
1022
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001023libweston_module_LTLIBRARIES += xwayland.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001024
1025xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001026 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001027 -I$(top_srcdir)/shared \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001028 -I$(top_builddir)/libweston \
Emil Velikov4ad45ca2016-07-04 14:57:11 +01001029 -I$(top_srcdir)/libweston \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001030 -I$(top_builddir)/xwayland \
1031 -DDATADIR='"$(datadir)"' \
1032 -DMODULEDIR='"$(moduledir)"' \
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001033 -DLIBEXECDIR='"$(libexecdir)"'
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001034
1035xwayland_la_LDFLAGS = -module -avoid-version
1036xwayland_la_LIBADD = \
Emil Velikov67351452016-07-22 14:52:42 +01001037 libshared-cairo.la \
1038 $(XWAYLAND_LIBS)
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001039xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -05001040 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001041 $(COMPOSITOR_CFLAGS) \
1042 $(PIXMAN_CFLAGS) \
1043 $(CAIRO_CFLAGS)
1044xwayland_la_SOURCES = \
1045 xwayland/xwayland.h \
Quentin Glidic955cec02016-08-12 10:41:35 +02001046 xwayland/xwayland-internal-interface.h \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001047 xwayland/window-manager.c \
1048 xwayland/selection.c \
1049 xwayland/dnd.c \
1050 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001051 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001052 xwayland/hash.h \
1053 shared/helpers.h
Giulio Camuffo9c764df2016-06-29 11:54:27 +02001054
1055libwestoninclude_HEADERS += xwayland/xwayland-api.h
1056
Kristian Høgsberg058bd322014-01-27 21:59:55 -08001057endif
1058
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001059
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001060#
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001061# Shared utilities
1062#
1063
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001064noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
1065 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001066
Derek Foreman4ff38742015-06-18 11:43:11 -05001067libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001068
1069libshared_la_SOURCES = \
1070 shared/config-parser.c \
1071 shared/option-parser.c \
1072 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001073 shared/file-util.c \
1074 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001075 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001076 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001077 shared/os-compatibility.h \
1078 shared/xalloc.c \
1079 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001080
1081libshared_cairo_la_CFLAGS = \
1082 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001083 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001084 $(COMPOSITOR_CFLAGS) \
1085 $(PIXMAN_CFLAGS) \
1086 $(CAIRO_CFLAGS) \
1087 $(PNG_CFLAGS) \
1088 $(WEBP_CFLAGS)
1089
1090libshared_cairo_la_LIBADD = \
1091 $(PIXMAN_LIBS) \
1092 $(CAIRO_LIBS) \
1093 $(PNG_LIBS) \
1094 $(WEBP_LIBS) \
1095 $(JPEG_LIBS)
1096
1097libshared_cairo_la_SOURCES = \
1098 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001099 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001100 shared/image-loader.c \
1101 shared/image-loader.h \
1102 shared/cairo-util.c \
1103 shared/frame.c \
1104 shared/cairo-util.h
1105
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001106libzunitc_la_SOURCES = \
1107 tools/zunitc/inc/zunitc/zunitc.h \
1108 tools/zunitc/inc/zunitc/zunitc_impl.h \
1109 tools/zunitc/src/zuc_base_logger.c \
1110 tools/zunitc/src/zuc_base_logger.h \
1111 tools/zunitc/src/zuc_collector.c \
1112 tools/zunitc/src/zuc_collector.h \
1113 tools/zunitc/src/zuc_context.h \
1114 tools/zunitc/src/zuc_event.h \
1115 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001116 tools/zunitc/src/zuc_junit_reporter.c \
1117 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001118 tools/zunitc/src/zuc_types.h \
1119 tools/zunitc/src/zunitc_impl.c \
1120 shared/helpers.h
1121
1122libzunitc_la_CFLAGS = \
1123 $(AM_CFLAGS) \
1124 -I$(top_srcdir)/tools/zunitc/inc
1125
1126libzunitc_la_LIBADD = \
Gustavo Zacarias57c83f62016-04-22 10:54:35 -03001127 libshared.la \
1128 $(CLOCK_GETTIME_LIBS)
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001129
Jon A. Cruz646aef52015-07-15 19:22:41 -07001130if ENABLE_JUNIT_XML
1131libzunitc_la_CFLAGS += \
1132 $(LIBXML2_CFLAGS)
1133libzunitc_la_LIBADD += \
1134 $(LIBXML2_LIBS)
1135endif
1136
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001137libzunitcmain_la_SOURCES = \
1138 tools/zunitc/src/main.c
1139
1140libzunitcmain_la_CFLAGS = \
1141 $(AM_CFLAGS) \
1142 -I$(top_srcdir)/tools/zunitc/inc
1143
1144libzunitcmain_la_LIBADD = \
1145 libzunitc.la \
1146 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001147
1148#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001149# tests subdirectory
1150#
1151
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001152TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1153
1154internal_tests = \
1155 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001156
1157shared_tests = \
1158 config-parser.test \
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001159 string.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001160 vertex-clip.test \
1161 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001162
1163module_tests = \
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001164 plugin-registry-test.la \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001165 surface-test.la \
1166 surface-global-test.la
1167
1168weston_tests = \
1169 bad_buffer.weston \
1170 keyboard.weston \
1171 event.weston \
1172 button.weston \
1173 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001174 presentation.weston \
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001175 viewporter.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001176 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001177 subsurface.weston \
1178 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001179
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001180ivi_tests =
1181
1182$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001183
1184AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001185 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1186 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001187
1188TEST_EXTENSIONS = .la .weston
1189LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1190WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1191
1192clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001193 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001194 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001195
1196# To remove when automake 1.11 support is dropped
1197export abs_builddir
1198
1199noinst_LTLIBRARIES += \
1200 weston-test.la \
1201 $(module_tests) \
1202 libtest-runner.la \
1203 libtest-client.la
1204
1205noinst_PROGRAMS += \
1206 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001207 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001208 $(shared_tests) \
1209 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001210 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001211 matrix-test
1212
1213test_module_ldflags = \
1214 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1215
Pekka Paalanen827b5d22016-06-29 11:54:26 +02001216plugin_registry_test_la_SOURCES = tests/plugin-registry-test.c
1217plugin_registry_test_la_LDFLAGS = $(test_module_ldflags)
1218plugin_registry_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
1219
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001220surface_global_test_la_SOURCES = tests/surface-global-test.c
1221surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001222surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001223
1224surface_test_la_SOURCES = tests/surface-test.c
1225surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001226surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001227
Emil Velikov67351452016-07-22 14:52:42 +01001228weston_test_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001229weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001230weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001231weston_test_la_SOURCES = \
1232 tests/weston-test.c \
1233 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001234nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001235 protocol/weston-test-protocol.c \
1236 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001237
1238if ENABLE_EGL
1239weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1240weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1241endif
1242
1243libtest_runner_la_SOURCES = \
1244 tests/weston-test-runner.c \
1245 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001246libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001247
1248config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001249config_parser_test_LDADD = \
1250 libshared.la \
1251 $(COMPOSITOR_LIBS) \
1252 libzunitc.la \
1253 libzunitcmain.la
1254config_parser_test_CFLAGS = \
1255 $(AM_CFLAGS) \
1256 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001257
Bryce Harrington82b9f2b2016-08-03 17:40:51 -07001258string_test_SOURCES = \
1259 tests/string-test.c \
1260 shared/string-helpers.h
1261string_test_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1262string_test_LDADD = libtest-client.la
1263
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001264vertex_clip_test_SOURCES = \
1265 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001266 shared/helpers.h \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001267 libweston/vertex-clipping.c \
1268 libweston/vertex-clipping.h
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001269vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001270
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001271libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001272 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001273 tests/weston-test-client-helper.h
1274nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001275 protocol/weston-test-protocol.c \
1276 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001277libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
Emil Velikov67351452016-07-22 14:52:42 +01001278libtest_client_la_LIBADD = libshared.la libtest-runner.la $(TEST_CLIENT_LIBS) $(CAIRO_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001279
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001280
1281#
1282# Internal tests - tests functionality of the testsuite itself
1283#
1284
1285internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001286internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1287internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001288
1289
1290#
1291# Weston Tests
1292#
1293
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001294bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001295bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001296bad_buffer_weston_LDADD = libtest-client.la
1297
1298keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001299keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001300keyboard_weston_LDADD = libtest-client.la
1301
1302event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001303event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001304event_weston_LDADD = libtest-client.la
1305
1306button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001307button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001308button_weston_LDADD = libtest-client.la
1309
Marek Chalupa5fd81402015-03-30 09:21:29 -04001310devices_weston_SOURCES = tests/devices-test.c
1311devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1312devices_weston_LDADD = libtest-client.la
1313
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001314text_weston_SOURCES = tests/text-test.c
1315nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001316 protocol/text-input-unstable-v1-protocol.c \
1317 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001318text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001319text_weston_LDADD = libtest-client.la
1320
1321subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001322subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001323subsurface_weston_LDADD = libtest-client.la
1324
Jon A. Cruzb09da242015-06-16 13:15:13 -07001325presentation_weston_SOURCES = \
1326 tests/presentation-test.c \
1327 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001328nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001329 protocol/presentation-time-protocol.c \
1330 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001331presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1332presentation_weston_LDADD = libtest-client.la
1333
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001334roles_weston_SOURCES = tests/roles-test.c
1335roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1336roles_weston_LDADD = libtest-client.la
1337
Pekka Paalanen82d95a62016-04-19 17:20:42 +03001338viewporter_weston_SOURCES = \
1339 tests/viewporter-test.c \
1340 shared/helpers.h
1341nodist_viewporter_weston_SOURCES = \
1342 protocol/viewporter-protocol.c \
1343 protocol/viewporter-client-protocol.h
1344viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1345viewporter_weston_LDADD = libtest-client.la
1346
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001347if ENABLE_EGL
1348weston_tests += buffer-count.weston
1349buffer_count_weston_SOURCES = tests/buffer-count-test.c
Pekka Paalanen924cd942016-05-20 17:25:38 +03001350buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001351buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1352endif
1353
1354if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001355weston_tests += xwayland-test.weston
1356xwayland_test_weston_SOURCES = tests/xwayland-test.c
Daniel Stone2295a622016-11-29 11:05:49 +00001357xwayland_test_weston_CFLAGS = \
1358 $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS) -DXSERVER_PATH='"@XSERVER_PATH@"'
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001359xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001360endif
1361
1362matrix_test_SOURCES = \
1363 tests/matrix-test.c \
1364 shared/matrix.c \
1365 shared/matrix.h
1366matrix_test_CPPFLAGS = -DUNIT_TEST
Gustavo Zacarias34d59852016-04-21 11:18:48 -03001367matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001368
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001369if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001370module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001371 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001372 ivi-layout-test.la
1373
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001374ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1375ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001376ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001377ivi_layout_internal_test_la_SOURCES = \
1378 tests/ivi_layout-internal-test.c
1379
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001380ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1381ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001382ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001383ivi_layout_test_la_SOURCES = \
1384 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001385 tests/ivi-test.h \
1386 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001387nodist_ivi_layout_test_la_SOURCES = \
1388 protocol/weston-test-protocol.c \
1389 protocol/weston-test-server-protocol.h
1390
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001391ivi_tests += \
1392 ivi-shell-app.weston
1393
1394ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1395nodist_ivi_shell_app_weston_SOURCES = \
1396 protocol/ivi-application-protocol.c \
1397 protocol/ivi-application-client-protocol.h
1398ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1399ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001400
1401noinst_PROGRAMS += ivi-layout.ivi
1402
1403ivi_layout_ivi_SOURCES = \
1404 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001405 tests/ivi-test.h \
1406 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001407nodist_ivi_layout_ivi_SOURCES = \
1408 protocol/ivi-application-protocol.c \
1409 protocol/ivi-application-client-protocol.h
1410ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1411ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001412endif
1413
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001414if BUILD_SETBACKLIGHT
1415noinst_PROGRAMS += setbacklight
1416setbacklight_SOURCES = \
1417 tests/setbacklight.c \
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +03001418 libweston/libbacklight.c \
1419 libweston/libbacklight.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001420setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1421setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1422endif
1423
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001424all-local: zuctest$(EXEEXT)
1425
1426noinst_PROGRAMS += zuctest$(EXEEXT)
1427
1428zuctest_LDADD = \
1429 libzunitc.la \
1430 libzunitcmain.la
1431
1432zuctest_CFLAGS = \
1433 $(AM_CFLAGS) \
1434 -I$(top_srcdir)/tools/zunitc/inc
1435
1436zuctest_SOURCES = \
1437 tools/zunitc/test/fixtures_test.c \
1438 tools/zunitc/test/zunitc_test.c
1439
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001440EXTRA_DIST += \
1441 tests/weston-tests-env \
1442 tests/internal-screenshot.ini \
1443 tests/reference/internal-screenshot-bad-00.png \
1444 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001445
1446BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001447 protocol/weston-test-protocol.c \
1448 protocol/weston-test-server-protocol.h \
1449 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001450 protocol/text-input-unstable-v1-protocol.c \
1451 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001452
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001453EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001454 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001455 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001456 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001457 protocol/weston-test.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001458 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001459 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001460
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001461#
1462# manual test modules in tests subdirectory
1463#
1464
1465noinst_LTLIBRARIES += \
1466 surface-screenshot.la
1467
Emil Velikov67351452016-07-22 14:52:42 +01001468surface_screenshot_la_LIBADD = libshared.la $(COMPOSITOR_LIBS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001469surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001470surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001471surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1472
1473
1474#
1475# Documentation
1476#
1477
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001478man_MANS = weston.1 weston.ini.5
1479
1480if ENABLE_DRM_COMPOSITOR
1481man_MANS += weston-drm.7
1482endif
1483
1484MAN_SUBSTS = \
1485 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1486 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1487 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1488 -e 's|__version__|$(PACKAGE_VERSION)|g'
1489
1490SUFFIXES = .1 .5 .7 .man
1491
1492%.1 %.5 %.7 : man/%.man
1493 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1494
1495EXTRA_DIST += \
1496 man/weston.man \
1497 man/weston-drm.man \
1498 man/weston.ini.man
1499
1500CLEANFILES += $(man_MANS)
1501
Jon A. Cruz179c1862015-07-15 19:22:43 -07001502if ENABLE_DEVDOCS
1503DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1504
1505docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1506 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1507
1508docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1509 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1510endif
1511
1512DOCDIRS = \
1513 docs/developer \
1514 docs/tools
1515
1516$(DOCDIRS):
1517 $(MKDIR_P) $@
1518
1519.PHONY: doc $(DOXYGEN_INDICES)
1520
1521doc: $(DOXYGEN_INDICES)
1522
Jonas Ådahl496adb32015-11-17 16:00:27 +08001523.SECONDEXPANSION:
1524
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001525define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001526$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001527endef
1528
1529define protoname
1530$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1531endef
1532
1533protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001534 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1535
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001536protocol/%-server-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) server-header < $< > $@
1538
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001539protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001540 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1541
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001542protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1543 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001544
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001545protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1546 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001547
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001548protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1549 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@