blob: f71587f527c4fe5eb47d99ee6504ccc36aa3b8df [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 =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08008noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08009BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -080010
Derek Foreman2ef9e812015-02-09 09:57:29 -060011AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050012
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090013EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000014
15weston.ini : $(srcdir)/weston.ini.in
16 $(AM_V_GEN)$(SED) \
17 -e 's|@bindir[@]|$(bindir)|g' \
18 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
19 -e 's|@libexecdir[@]|$(libexecdir)|g' \
20 $< > $@
21
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090022ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
23 $(AM_V_GEN)$(SED) \
24 -e 's|@bindir[@]|$(bindir)|g' \
25 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020026 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090027 -e 's|@libexecdir[@]|$(libexecdir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020028 -e 's|@plugin_prefix[@]||g' \
29 $< > $@
30
31tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in
32 $(AM_V_GEN)$(SED) \
33 -e 's|@bindir[@]|$(bindir)|g' \
34 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020035 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Derek Foremanbbdd9bc2015-06-16 13:30:35 -050036 -e 's|@libexecdir[@]|$(abs_builddir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020037 -e 's|@plugin_prefix[@]|$(abs_top_builddir)/.libs/|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090038 $< > $@
39
40all-local : weston.ini ivi-shell/weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080041
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080042AM_CFLAGS = $(GCC_CFLAGS)
43
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080044AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080045 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080046 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080047 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080048 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080049 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010050 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080051 -DDATADIR='"$(datadir)"' \
52 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080053 -DLIBEXECDIR='"$(libexecdir)"' \
54 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080055
Pekka Paalanenf3a34532015-03-24 13:51:05 +020056CLEANFILES = weston.ini \
57 ivi-shell/weston.ini \
58 tests/weston-ivi.ini \
Derek Foreman1ce2ef52015-05-26 10:21:03 -050059 internal-screenshot-00.png \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020060 $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080061
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080062bin_PROGRAMS += weston
63
64weston_LDFLAGS = -export-dynamic
65weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
Derek Foreman4ff38742015-06-18 11:43:11 -050066weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080067weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080068 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080069
70weston_SOURCES = \
71 src/git-version.h \
72 src/log.c \
73 src/compositor.c \
74 src/compositor.h \
75 src/input.c \
76 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080077 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080078 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080079 src/zoom.c \
80 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080081 src/bindings.c \
82 src/animation.c \
83 src/noop-renderer.c \
84 src/pixman-renderer.c \
85 src/pixman-renderer.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +020086 src/timeline.c \
87 src/timeline.h \
88 src/timeline-object.h \
Giulio Camuffobab996e2014-10-12 00:24:25 +030089 src/main.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -070090 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080091 shared/matrix.c \
92 shared/matrix.h \
Pekka Paalanenaa21f622015-07-03 15:44:50 +030093 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080094 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +010095 shared/platform.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080096 src/weston-egl-ext.h
97
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080098nodist_weston_SOURCES = \
99 protocol/screenshooter-protocol.c \
100 protocol/screenshooter-server-protocol.h \
101 protocol/text-cursor-position-protocol.c \
102 protocol/text-cursor-position-server-protocol.h \
103 protocol/text-protocol.c \
104 protocol/text-server-protocol.h \
105 protocol/input-method-protocol.c \
106 protocol/input-method-server-protocol.h \
107 protocol/workspaces-protocol.c \
108 protocol/workspaces-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400109 protocol/presentation_timing-protocol.c \
110 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800111 protocol/scaler-protocol.c \
112 protocol/scaler-server-protocol.h
113
114BUILT_SOURCES += $(nodist_weston_SOURCES)
115
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800116# Track this dependency explicitly instead of using BUILT_SOURCES. We
117# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
118# in case we're building from tarballs.
119
120src/compositor.c : $(top_builddir)/src/git-version.h
121
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800122noinst_LTLIBRARIES += \
123 libsession-helper.la
124
125libsession_helper_la_SOURCES = \
126 src/weston-launch.h \
127 src/launcher-util.c \
128 src/launcher-util.h
Derek Foreman4ff38742015-06-18 11:43:11 -0500129libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800130libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
131
132if ENABLE_DBUS
133if HAVE_SYSTEMD_LOGIN
134libsession_helper_la_SOURCES += \
135 src/dbus.h \
136 src/dbus.c \
137 src/logind-util.h \
138 src/logind-util.c
139libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
140libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
141endif
142endif
143
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800144if HAVE_GIT_REPO
145src/git-version.h : $(top_srcdir)/.git/logs/HEAD
146 $(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 -0800147else
148src/git-version.h :
149 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
150
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800151endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800152
153.FORCE :
154
155if BUILD_WESTON_LAUNCH
156bin_PROGRAMS += weston-launch
157weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
158weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
159weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500160 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800161 $(PAM_CFLAGS) \
162 $(SYSTEMD_LOGIN_CFLAGS) \
163 $(LIBDRM_CFLAGS)
164weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
165
166if ENABLE_SETUID_INSTALL
167install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700168 can_suid_files=no; \
169 chown root $(DESTDIR)$(bindir)/weston-launch \
170 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
171 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500172 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700173 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
174 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
175 false; \
176 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800177endif
178
179endif # BUILD_WESTON_LAUNCH
180
181pkgconfigdir = $(libdir)/pkgconfig
182pkgconfig_DATA = src/weston.pc
183
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100184wayland_sessiondir = $(datadir)/wayland-sessions
185wayland_session_DATA = src/weston.desktop
Marek Chalupa194ca2b2015-01-22 10:03:03 +0100186dist_wayland_session_DATA = $(wayland_session_DATA)
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100187
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800188westonincludedir = $(includedir)/weston
189westoninclude_HEADERS = \
190 src/version.h \
191 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200192 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800193 shared/matrix.h \
194 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100195 shared/zalloc.h \
196 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800197
198if ENABLE_EGL
199module_LTLIBRARIES += gl-renderer.la
200gl_renderer_la_LDFLAGS = -module -avoid-version
201gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
202gl_renderer_la_CFLAGS = \
203 $(COMPOSITOR_CFLAGS) \
204 $(EGL_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500205 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800206gl_renderer_la_SOURCES = \
207 src/gl-renderer.h \
208 src/gl-renderer.c \
209 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700210 src/vertex-clipping.h \
211 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800212endif
213
214if ENABLE_X11_COMPOSITOR
215module_LTLIBRARIES += x11-backend.la
216x11_backend_la_LDFLAGS = -module -avoid-version
217x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800218 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800219x11_backend_la_CFLAGS = \
220 $(COMPOSITOR_CFLAGS) \
221 $(EGL_CFLAGS) \
222 $(PIXMAN_CFLAGS) \
223 $(CAIRO_CFLAGS) \
224 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500225 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700226x11_backend_la_SOURCES = \
227 src/compositor-x11.c \
228 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800229endif
230
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100231INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000232INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100233 src/libinput-seat.c \
234 src/libinput-seat.h \
235 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700236 src/libinput-device.h \
237 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100238
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800239if ENABLE_DRM_COMPOSITOR
240module_LTLIBRARIES += drm-backend.la
241drm_backend_la_LDFLAGS = -module -avoid-version
242drm_backend_la_LIBADD = \
243 $(COMPOSITOR_LIBS) \
244 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100245 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100246 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800247 libsession-helper.la
248drm_backend_la_CFLAGS = \
249 $(COMPOSITOR_CFLAGS) \
250 $(EGL_CFLAGS) \
251 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500252 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800253drm_backend_la_SOURCES = \
254 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100255 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700256 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200257 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800258 src/libbacklight.c \
259 src/libbacklight.h
260
261if ENABLE_VAAPI_RECORDER
262drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
263drm_backend_la_LIBADD += $(LIBVA_LIBS)
264drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
265endif
266endif
267
268if ENABLE_WAYLAND_COMPOSITOR
269module_LTLIBRARIES += wayland-backend.la
270wayland_backend_la_LDFLAGS = -module -avoid-version
271wayland_backend_la_LIBADD = \
272 $(COMPOSITOR_LIBS) \
273 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800274 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800275wayland_backend_la_CFLAGS = \
276 $(COMPOSITOR_CFLAGS) \
277 $(EGL_CFLAGS) \
278 $(PIXMAN_CFLAGS) \
279 $(CAIRO_CFLAGS) \
280 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500281 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700282wayland_backend_la_SOURCES = \
283 src/compositor-wayland.c \
284 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500285nodist_wayland_backend_la_SOURCES = \
286 protocol/fullscreen-shell-protocol.c \
287 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800288endif
289
290if ENABLE_RPI_COMPOSITOR
291if INSTALL_RPI_COMPOSITOR
292module_LTLIBRARIES += rpi-backend.la
293else
294noinst_LTLIBRARIES += rpi-backend.la
295endif
296
297rpi_backend_la_LDFLAGS = -module -avoid-version
298rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
299 $(RPI_COMPOSITOR_LIBS) \
300 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100301 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800302 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800303 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800304rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500305 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800306 $(COMPOSITOR_CFLAGS) \
307 $(RPI_COMPOSITOR_CFLAGS) \
308 $(RPI_BCM_HOST_CFLAGS)
309rpi_backend_la_SOURCES = \
310 src/compositor-rpi.c \
311 src/rpi-renderer.c \
312 src/rpi-renderer.h \
313 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700314 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100315 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800316
317if ENABLE_EGL
318rpi_backend_la_LIBADD += $(EGL_LIBS)
319rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
320endif
321
322endif
323
324if ENABLE_HEADLESS_COMPOSITOR
325module_LTLIBRARIES += headless-backend.la
326headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800327headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500328headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700329headless_backend_la_SOURCES = \
330 src/compositor-headless.c \
331 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800332endif
333
334if ENABLE_FBDEV_COMPOSITOR
335module_LTLIBRARIES += fbdev-backend.la
336fbdev_backend_la_LDFLAGS = -module -avoid-version
337fbdev_backend_la_LIBADD = \
338 $(COMPOSITOR_LIBS) \
339 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100340 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800341 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800342 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800343fbdev_backend_la_CFLAGS = \
344 $(COMPOSITOR_CFLAGS) \
345 $(EGL_CFLAGS) \
346 $(FBDEV_COMPOSITOR_CFLAGS) \
347 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500348 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800349fbdev_backend_la_SOURCES = \
350 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700351 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100352 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800353endif
354
355if ENABLE_RDP_COMPOSITOR
356module_LTLIBRARIES += rdp-backend.la
357rdp_backend_la_LDFLAGS = -module -avoid-version
358rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
359 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800360 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800361rdp_backend_la_CFLAGS = \
362 $(COMPOSITOR_CFLAGS) \
363 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500364 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700365rdp_backend_la_SOURCES = \
366 src/compositor-rdp.c \
367 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800368endif
369
370if HAVE_LCMS
371module_LTLIBRARIES += cms-static.la
372cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800373cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500374cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800375cms_static_la_SOURCES = \
376 src/cms-static.c \
377 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700378 src/cms-helper.h \
379 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800380if ENABLE_COLORD
381module_LTLIBRARIES += cms-colord.la
382cms_colord_la_LDFLAGS = -module -avoid-version
383cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500384cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800385cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100386 src/cms-colord.c \
387 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700388 src/cms-helper.h \
389 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800390endif
391endif
392
393noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500394spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800395spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
396spring_tool_SOURCES = \
397 src/spring-tool.c \
398 src/animation.c \
399 shared/matrix.c \
400 shared/matrix.h \
401 src/compositor.h
402
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800403if BUILD_CLIENTS
404
405bin_PROGRAMS += weston-terminal weston-info
406
407libexec_PROGRAMS += \
408 weston-desktop-shell \
409 weston-screenshooter \
410 weston-keyboard \
411 weston-simple-im
412
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900413if ENABLE_IVI_SHELL
414libexec_PROGRAMS += \
415 weston-ivi-shell-user-interface
416endif
417
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800418demo_clients = \
419 weston-flower \
420 weston-image \
421 weston-cliptest \
422 weston-dnd \
423 weston-smoke \
424 weston-resizor \
425 weston-eventdemo \
426 weston-clickdot \
427 weston-transformed \
428 weston-fullscreen \
429 weston-stacking \
430 weston-calibrator \
431 weston-scaler
432
433if INSTALL_DEMO_CLIENTS
434bin_PROGRAMS += $(demo_clients)
435else
436noinst_PROGRAMS += $(demo_clients)
437endif
438
439
440if BUILD_SIMPLE_CLIENTS
441demo_clients += \
442 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500443 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800444 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400445 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800446 weston-multi-resource
447
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800448weston_simple_shm_SOURCES = clients/simple-shm.c
449nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800450 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500451 protocol/xdg-shell-client-protocol.h \
452 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900453 protocol/fullscreen-shell-client-protocol.h \
454 protocol/ivi-application-protocol.c \
455 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800456weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800457weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800458
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500459weston_simple_damage_SOURCES = clients/simple-damage.c
460nodist_weston_simple_damage_SOURCES = \
461 protocol/scaler-protocol.c \
462 protocol/scaler-client-protocol.h \
463 protocol/xdg-shell-protocol.c \
464 protocol/xdg-shell-client-protocol.h \
465 protocol/fullscreen-shell-protocol.c \
466 protocol/fullscreen-shell-client-protocol.h
467weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
468weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
469
Jon A. Cruzb09da242015-06-16 13:15:13 -0700470weston_simple_touch_SOURCES = \
471 clients/simple-touch.c \
472 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800473weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800474weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800475
Jon A. Cruzb09da242015-06-16 13:15:13 -0700476weston_presentation_shm_SOURCES = \
477 clients/presentation-shm.c \
478 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400479nodist_weston_presentation_shm_SOURCES = \
480 protocol/presentation_timing-protocol.c \
481 protocol/presentation_timing-client-protocol.h
482weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
483weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
484
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800485weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800486weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000487weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800488endif
489
490if BUILD_SIMPLE_EGL_CLIENTS
491demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800492weston_simple_egl_SOURCES = clients/simple-egl.c
493nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800494 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900495 protocol/xdg-shell-client-protocol.h \
496 protocol/ivi-application-protocol.c \
497 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800498weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800499weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
500endif
501
502noinst_LTLIBRARIES += libtoytoolkit.la
503
504libtoytoolkit_la_SOURCES = \
505 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700506 clients/window.h \
507 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800508
509nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100510 protocol/text-cursor-position-protocol.c \
511 protocol/text-cursor-position-client-protocol.h \
512 protocol/scaler-protocol.c \
513 protocol/scaler-client-protocol.h \
514 protocol/workspaces-protocol.c \
515 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400516 protocol/presentation_timing-protocol.c \
517 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100518 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900519 protocol/xdg-shell-client-protocol.h \
520 protocol/ivi-application-protocol.c \
521 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500522
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800523BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
524
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800525
526libtoytoolkit_la_LIBADD = \
527 $(CLIENT_LIBS) \
528 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800529 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800530libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800531
532weston_flower_SOURCES = clients/flower.c
533weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800534weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800535
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100536weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800537 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800538nodist_weston_screenshooter_SOURCES = \
539 protocol/screenshooter-protocol.c \
540 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800541weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800542weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800543
Jon A. Cruzb09da242015-06-16 13:15:13 -0700544weston_terminal_SOURCES = \
545 clients/terminal.c \
546 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800547weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800548weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800549
550weston_image_SOURCES = clients/image.c
551weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800552weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800553
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300554weston_cliptest_SOURCES = \
555 clients/cliptest.c \
556 src/vertex-clipping.c \
557 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800558weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800559weston_cliptest_LDADD = libtoytoolkit.la
560
Jon A. Cruzb09da242015-06-16 13:15:13 -0700561weston_dnd_SOURCES = \
562 clients/dnd.c \
563 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800564weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800565weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800566
567weston_smoke_SOURCES = clients/smoke.c
568weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800569weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800570
571weston_resizor_SOURCES = clients/resizor.c
572weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800573weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800574
575weston_scaler_SOURCES = clients/scaler.c
576weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800577weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800578
579if HAVE_CAIRO_GLESV2
580demo_clients += weston-nested weston-nested-client
581
Jon A. Cruzb09da242015-06-16 13:15:13 -0700582weston_nested_SOURCES = \
583 clients/nested.c \
584 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800585weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800586weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800587
588weston_nested_client_SOURCES = clients/nested-client.c
589weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800590weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800591endif
592
Jon A. Cruzb09da242015-06-16 13:15:13 -0700593weston_eventdemo_SOURCES = \
594 clients/eventdemo.c \
595 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800596weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800597weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800598
Jon A. Cruzb09da242015-06-16 13:15:13 -0700599weston_clickdot_SOURCES = \
600 clients/clickdot.c \
601 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800602weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800603weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800604
605weston_transformed_SOURCES = clients/transformed.c
606weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800607weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800608
609weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500610nodist_weston_fullscreen_SOURCES = \
611 protocol/fullscreen-shell-protocol.c \
612 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800613weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800614weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800615
Jon A. Cruzb09da242015-06-16 13:15:13 -0700616weston_stacking_SOURCES = \
617 clients/stacking.c \
618 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800619weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800620weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800621
Jon A. Cruzb09da242015-06-16 13:15:13 -0700622weston_calibrator_SOURCES = \
623 clients/calibrator.c \
624 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800625 shared/matrix.c \
626 shared/matrix.h
627weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800628weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800629
630if BUILD_SUBSURFACES_CLIENT
631demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700632weston_subsurfaces_SOURCES = \
633 clients/subsurfaces.c \
634 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800635weston_subsurfaces_CFLAGS = \
636 $(AM_CFLAGS) \
637 $(SIMPLE_EGL_CLIENT_CFLAGS) \
638 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800639weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
640endif
641
642if HAVE_PANGO
643demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700644weston_editor_SOURCES = \
645 clients/editor.c \
646 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800647nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100648 protocol/text-protocol.c \
649 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800650weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800651weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800652endif
653
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800654weston_keyboard_SOURCES = clients/keyboard.c
655nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100656 protocol/desktop-shell-client-protocol.h \
657 protocol/desktop-shell-protocol.c \
658 protocol/input-method-protocol.c \
659 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800660weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800661weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800662
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800663weston_simple_im_SOURCES = clients/weston-simple-im.c
664nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100665 protocol/input-method-protocol.c \
666 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800667weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800668weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800669
Jon A. Cruzb09da242015-06-16 13:15:13 -0700670weston_info_SOURCES = \
671 clients/weston-info.c \
672 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400673nodist_weston_info_SOURCES = \
674 protocol/presentation_timing-protocol.c \
675 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800676weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200677weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800678
Jon A. Cruzb09da242015-06-16 13:15:13 -0700679weston_desktop_shell_SOURCES = \
680 clients/desktop-shell.c \
681 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800682nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100683 protocol/desktop-shell-client-protocol.h \
684 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800685weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800686weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800687
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900688if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700689weston_ivi_shell_user_interface_SOURCES = \
690 clients/ivi-shell-user-interface.c \
691 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900692nodist_weston_ivi_shell_user_interface_SOURCES = \
693 protocol/ivi-hmi-controller-client-protocol.h \
694 protocol/ivi-hmi-controller-protocol.c \
695 protocol/ivi-application-client-protocol.h \
696 protocol/ivi-application-protocol.c
697weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
698weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
699endif
700
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800701if BUILD_FULL_GL_CLIENTS
702demo_clients += weston-gears
703weston_gears_SOURCES = clients/gears.c
704weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800705weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800706endif
707
708endif
709
710BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100711 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800712 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100713 protocol/text-cursor-position-client-protocol.h \
714 protocol/text-cursor-position-protocol.c \
715 protocol/text-protocol.c \
716 protocol/text-client-protocol.h \
717 protocol/input-method-protocol.c \
718 protocol/input-method-client-protocol.h \
719 protocol/desktop-shell-client-protocol.h \
720 protocol/desktop-shell-protocol.c \
721 protocol/scaler-client-protocol.h \
722 protocol/scaler-protocol.c \
723 protocol/workspaces-client-protocol.h \
724 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500725 protocol/fullscreen-shell-protocol.c \
726 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100727 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900728 protocol/xdg-shell-client-protocol.h \
729 protocol/ivi-hmi-controller-protocol.c \
730 protocol/ivi-hmi-controller-client-protocol.h \
731 protocol/ivi-application-protocol.c \
732 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800733
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800734westondatadir = $(datadir)/weston
735dist_westondata_DATA = \
736 data/wayland.svg \
737 data/wayland.png \
738 data/pattern.png \
739 data/terminal.png \
740 data/border.png \
741 data/icon_window.png \
742 data/sign_close.png \
743 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100744 data/sign_minimize.png
745
746if ENABLE_IVI_SHELL
747dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900748 data/background.png \
749 data/tiling.png \
750 data/fullscreen.png \
751 data/panel.png \
752 data/random.png \
753 data/sidebyside.png \
754 data/home.png \
755 data/icon_ivi_clickdot.png \
756 data/icon_ivi_flower.png \
757 data/icon_ivi_simple-egl.png \
758 data/icon_ivi_simple-shm.png \
759 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100760endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800761
762
763if BUILD_WCAP_TOOLS
764bin_PROGRAMS += wcap-decode
765
766wcap_decode_SOURCES = \
767 wcap/main.c \
768 wcap/wcap-decode.c \
769 wcap/wcap-decode.h
770
Derek Foreman4ff38742015-06-18 11:43:11 -0500771wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800772wcap_decode_LDADD = $(WCAP_LIBS)
773endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800774
775
776if ENABLE_DESKTOP_SHELL
777
778module_LTLIBRARIES += desktop-shell.la
779
780desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100781 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800782 -I$(top_srcdir)/shared \
783 -I$(top_srcdir)/src \
784 -I$(top_builddir)/src \
785 -I$(top_builddir)/desktop-shell \
786 -DDATADIR='"$(datadir)"' \
787 -DMODULEDIR='"$(moduledir)"' \
788 -DLIBEXECDIR='"$(libexecdir)"' \
789 -DIN_WESTON
790
791desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800792desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500793desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800794desktop_shell_la_SOURCES = \
795 desktop-shell/shell.h \
796 desktop-shell/shell.c \
797 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700798 desktop-shell/input-panel.c \
799 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800800nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100801 protocol/desktop-shell-protocol.c \
802 protocol/desktop-shell-server-protocol.h \
803 protocol/xdg-shell-protocol.c \
804 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800805
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800806BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800807endif
808
Jason Ekstrand946a9482014-04-02 19:53:47 -0500809if ENABLE_FULLSCREEN_SHELL
810
811module_LTLIBRARIES += fullscreen-shell.la
812
813fullscreen_shell_la_CPPFLAGS = \
814 -I$(top_builddir)/protocol \
815 -I$(top_srcdir)/shared \
816 -I$(top_srcdir)/src \
817 -I$(top_builddir)/src \
818 -DIN_WESTON
819
820fullscreen_shell_la_LDFLAGS = -module -avoid-version
821fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500822fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500823fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700824 fullscreen-shell/fullscreen-shell.c \
825 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500826nodist_fullscreen_shell_la_SOURCES = \
827 protocol/fullscreen-shell-protocol.c \
828 protocol/fullscreen-shell-server-protocol.h
829
830BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
831endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800832
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900833if ENABLE_IVI_SHELL
834
835module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900836 $(ivi_shell) \
837 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900838
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900839ivi_shell = ivi-shell.la
840ivi_shell_la_LDFLAGS = -module -avoid-version
841ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500842ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900843ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900844 ivi-shell/ivi-layout-export.h \
845 ivi-shell/ivi-layout-private.h \
846 ivi-shell/ivi-layout.c \
847 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900848 ivi-shell/ivi-shell.h \
849 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700850 ivi-shell/input-panel-ivi.c \
851 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900852nodist_ivi_shell_la_SOURCES = \
853 protocol/ivi-application-protocol.c \
854 protocol/ivi-application-server-protocol.h
855
856BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
857
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900858hmi_controller = hmi-controller.la
859hmi_controller_la_LDFLAGS = -module -avoid-version
860hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500861hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900862hmi_controller_la_SOURCES = \
863 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700864 ivi-shell/hmi-controller.c \
865 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900866nodist_hmi_controller_la_SOURCES = \
867 protocol/ivi-hmi-controller-protocol.c \
868 protocol/ivi-hmi-controller-server-protocol.h
869
870BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
871
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900872endif
873
874
Jason Ekstrand47928d82014-04-02 19:54:01 -0500875if ENABLE_SCREEN_SHARING
876
877module_LTLIBRARIES += screen-share.la
878
879screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
880screen_share_la_LDFLAGS = -module -avoid-version
881screen_share_la_LIBADD = \
882 $(COMPOSITOR_LIBS) \
883 $(SCREEN_SHARE_LIBS) \
884 libshared-cairo.la
885screen_share_la_CFLAGS = \
886 $(COMPOSITOR_CFLAGS) \
887 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500888 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500889screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700890 src/screen-share.c \
891 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500892nodist_screen_share_la_SOURCES = \
893 protocol/fullscreen-shell-protocol.c \
894 protocol/fullscreen-shell-client-protocol.h
895
896endif
897
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800898if ENABLE_XWAYLAND
899
900module_LTLIBRARIES += xwayland.la
901
902xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100903 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800904 -I$(top_srcdir)/shared \
905 -I$(top_srcdir)/src \
906 -I$(top_builddir)/src \
907 -I$(top_builddir)/xwayland \
908 -DDATADIR='"$(datadir)"' \
909 -DMODULEDIR='"$(moduledir)"' \
910 -DLIBEXECDIR='"$(libexecdir)"' \
911 -DXSERVER_PATH='"@XSERVER_PATH@"'
912
913xwayland_la_LDFLAGS = -module -avoid-version
914xwayland_la_LIBADD = \
915 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800916 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800917xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500918 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800919 $(COMPOSITOR_CFLAGS) \
920 $(PIXMAN_CFLAGS) \
921 $(CAIRO_CFLAGS)
922xwayland_la_SOURCES = \
923 xwayland/xwayland.h \
924 xwayland/window-manager.c \
925 xwayland/selection.c \
926 xwayland/dnd.c \
927 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800928 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700929 xwayland/hash.h \
930 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800931endif
932
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800933
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800934#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800935# Shared utilities
936#
937
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700938noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
939 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800940
Derek Foreman4ff38742015-06-18 11:43:11 -0500941libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800942
943libshared_la_SOURCES = \
944 shared/config-parser.c \
945 shared/option-parser.c \
946 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200947 shared/file-util.c \
948 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700949 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800950 shared/os-compatibility.c \
951 shared/os-compatibility.h
952
953libshared_cairo_la_CFLAGS = \
954 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -0500955 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800956 $(COMPOSITOR_CFLAGS) \
957 $(PIXMAN_CFLAGS) \
958 $(CAIRO_CFLAGS) \
959 $(PNG_CFLAGS) \
960 $(WEBP_CFLAGS)
961
962libshared_cairo_la_LIBADD = \
963 $(PIXMAN_LIBS) \
964 $(CAIRO_LIBS) \
965 $(PNG_LIBS) \
966 $(WEBP_LIBS) \
967 $(JPEG_LIBS)
968
969libshared_cairo_la_SOURCES = \
970 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700971 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800972 shared/image-loader.c \
973 shared/image-loader.h \
974 shared/cairo-util.c \
975 shared/frame.c \
976 shared/cairo-util.h
977
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700978libzunitc_la_SOURCES = \
979 tools/zunitc/inc/zunitc/zunitc.h \
980 tools/zunitc/inc/zunitc/zunitc_impl.h \
981 tools/zunitc/src/zuc_base_logger.c \
982 tools/zunitc/src/zuc_base_logger.h \
983 tools/zunitc/src/zuc_collector.c \
984 tools/zunitc/src/zuc_collector.h \
985 tools/zunitc/src/zuc_context.h \
986 tools/zunitc/src/zuc_event.h \
987 tools/zunitc/src/zuc_event_listener.h \
988 tools/zunitc/src/zuc_types.h \
989 tools/zunitc/src/zunitc_impl.c \
990 shared/helpers.h
991
992libzunitc_la_CFLAGS = \
993 $(AM_CFLAGS) \
994 -I$(top_srcdir)/tools/zunitc/inc
995
996libzunitc_la_LIBADD = \
997 libshared.la
998
999libzunitcmain_la_SOURCES = \
1000 tools/zunitc/src/main.c
1001
1002libzunitcmain_la_CFLAGS = \
1003 $(AM_CFLAGS) \
1004 -I$(top_srcdir)/tools/zunitc/inc
1005
1006libzunitcmain_la_LIBADD = \
1007 libzunitc.la \
1008 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001009
1010#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001011# tests subdirectory
1012#
1013
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001014TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1015
1016internal_tests = \
1017 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001018
1019shared_tests = \
1020 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001021 vertex-clip.test \
1022 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001023
1024module_tests = \
1025 surface-test.la \
1026 surface-global-test.la
1027
1028weston_tests = \
1029 bad_buffer.weston \
1030 keyboard.weston \
1031 event.weston \
1032 button.weston \
1033 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001034 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001035 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001036 subsurface.weston \
1037 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001038
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001039ivi_tests =
1040
1041$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001042
1043AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001044 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1045 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001046
1047TEST_EXTENSIONS = .la .weston
1048LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1049WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1050
1051clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001052 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001053
1054# To remove when automake 1.11 support is dropped
1055export abs_builddir
1056
1057noinst_LTLIBRARIES += \
1058 weston-test.la \
1059 $(module_tests) \
1060 libtest-runner.la \
1061 libtest-client.la
1062
1063noinst_PROGRAMS += \
1064 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001065 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001066 $(shared_tests) \
1067 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001068 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001069 matrix-test
1070
1071test_module_ldflags = \
1072 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1073
1074surface_global_test_la_SOURCES = tests/surface-global-test.c
1075surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001076surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001077
1078surface_test_la_SOURCES = tests/surface-test.c
1079surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001080surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001081
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001082weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001083weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001084weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001085weston_test_la_SOURCES = \
1086 tests/weston-test.c \
1087 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001088nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001089 protocol/weston-test-protocol.c \
1090 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001091
1092if ENABLE_EGL
1093weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1094weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1095endif
1096
1097libtest_runner_la_SOURCES = \
1098 tests/weston-test-runner.c \
1099 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001100libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001101
1102config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001103config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001104
1105vertex_clip_test_SOURCES = \
1106 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001107 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001108 src/vertex-clipping.c \
1109 src/vertex-clipping.h
1110vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1111
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001112libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001113 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001114 tests/weston-test-client-helper.h
1115nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001116 protocol/weston-test-protocol.c \
1117 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001118libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001119libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001120
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001121
1122#
1123# Internal tests - tests functionality of the testsuite itself
1124#
1125
1126internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1127internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1128internal_screenshot_weston_LDADD = libtest-client.la $(CAIRO_LIBS)
1129
1130
1131#
1132# Weston Tests
1133#
1134
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001135bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001136bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001137bad_buffer_weston_LDADD = libtest-client.la
1138
1139keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001140keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001141keyboard_weston_LDADD = libtest-client.la
1142
1143event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001144event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001145event_weston_LDADD = libtest-client.la
1146
1147button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001148button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001149button_weston_LDADD = libtest-client.la
1150
Marek Chalupa5fd81402015-03-30 09:21:29 -04001151devices_weston_SOURCES = tests/devices-test.c
1152devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1153devices_weston_LDADD = libtest-client.la
1154
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001155text_weston_SOURCES = tests/text-test.c
1156nodist_text_weston_SOURCES = \
1157 protocol/text-protocol.c \
1158 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001159text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001160text_weston_LDADD = libtest-client.la
1161
1162subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001163subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001164subsurface_weston_LDADD = libtest-client.la
1165
Jon A. Cruzb09da242015-06-16 13:15:13 -07001166presentation_weston_SOURCES = \
1167 tests/presentation-test.c \
1168 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001169nodist_presentation_weston_SOURCES = \
1170 protocol/presentation_timing-protocol.c \
1171 protocol/presentation_timing-client-protocol.h
1172presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1173presentation_weston_LDADD = libtest-client.la
1174
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001175roles_weston_SOURCES = tests/roles-test.c
1176roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1177roles_weston_LDADD = libtest-client.la
1178
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001179if ENABLE_EGL
1180weston_tests += buffer-count.weston
1181buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001182buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001183buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1184endif
1185
1186if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001187weston_tests += xwayland-test.weston
1188xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001189xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001190xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001191endif
1192
1193matrix_test_SOURCES = \
1194 tests/matrix-test.c \
1195 shared/matrix.c \
1196 shared/matrix.h
1197matrix_test_CPPFLAGS = -DUNIT_TEST
1198matrix_test_LDADD = -lm -lrt
1199
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001200if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001201module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001202 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001203 ivi-layout-test.la
1204
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001205ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1206ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001207ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001208ivi_layout_internal_test_la_SOURCES = \
1209 tests/ivi_layout-internal-test.c
1210
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001211ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1212ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001213ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001214ivi_layout_test_la_SOURCES = \
1215 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001216 tests/ivi-test.h \
1217 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001218nodist_ivi_layout_test_la_SOURCES = \
1219 protocol/weston-test-protocol.c \
1220 protocol/weston-test-server-protocol.h
1221
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001222ivi_tests += \
1223 ivi-shell-app.weston
1224
1225ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1226nodist_ivi_shell_app_weston_SOURCES = \
1227 protocol/ivi-application-protocol.c \
1228 protocol/ivi-application-client-protocol.h
1229ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1230ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001231
1232noinst_PROGRAMS += ivi-layout.ivi
1233
1234ivi_layout_ivi_SOURCES = \
1235 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001236 tests/ivi-test.h \
1237 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001238nodist_ivi_layout_ivi_SOURCES = \
1239 protocol/ivi-application-protocol.c \
1240 protocol/ivi-application-client-protocol.h
1241ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1242ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001243endif
1244
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001245if BUILD_SETBACKLIGHT
1246noinst_PROGRAMS += setbacklight
1247setbacklight_SOURCES = \
1248 tests/setbacklight.c \
1249 src/libbacklight.c \
1250 src/libbacklight.h
1251setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1252setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1253endif
1254
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001255all-local: zuctest$(EXEEXT)
1256
1257noinst_PROGRAMS += zuctest$(EXEEXT)
1258
1259zuctest_LDADD = \
1260 libzunitc.la \
1261 libzunitcmain.la
1262
1263zuctest_CFLAGS = \
1264 $(AM_CFLAGS) \
1265 -I$(top_srcdir)/tools/zunitc/inc
1266
1267zuctest_SOURCES = \
1268 tools/zunitc/test/fixtures_test.c \
1269 tools/zunitc/test/zunitc_test.c
1270
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001271EXTRA_DIST += \
1272 tests/weston-tests-env \
1273 tests/internal-screenshot.ini \
1274 tests/reference/internal-screenshot-bad-00.png \
1275 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001276
1277BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001278 protocol/weston-test-protocol.c \
1279 protocol/weston-test-server-protocol.h \
1280 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001281 protocol/text-protocol.c \
1282 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001283
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001284EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001285 protocol/desktop-shell.xml \
1286 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001287 protocol/text.xml \
1288 protocol/input-method.xml \
1289 protocol/workspaces.xml \
1290 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001291 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001292 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001293 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001294 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001295 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001296 protocol/ivi-application.xml \
1297 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001298
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001299#
1300# manual test modules in tests subdirectory
1301#
1302
1303noinst_LTLIBRARIES += \
1304 surface-screenshot.la
1305
1306surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1307surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001308surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001309surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1310
1311
1312#
1313# Documentation
1314#
1315
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001316man_MANS = weston.1 weston.ini.5
1317
1318if ENABLE_DRM_COMPOSITOR
1319man_MANS += weston-drm.7
1320endif
1321
1322MAN_SUBSTS = \
1323 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1324 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1325 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1326 -e 's|__version__|$(PACKAGE_VERSION)|g'
1327
1328SUFFIXES = .1 .5 .7 .man
1329
1330%.1 %.5 %.7 : man/%.man
1331 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1332
1333EXTRA_DIST += \
1334 man/weston.man \
1335 man/weston-drm.man \
1336 man/weston.ini.man
1337
1338CLEANFILES += $(man_MANS)
1339
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001340protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1341 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001342
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001343protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1344 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001345
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001346protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1347 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@