blob: e8b76c2672e4f2ef8f7ab9b4d01d45440793f757 [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
Ross Burton315476f2015-07-16 20:56:32 +0100185dist_wayland_session_DATA = src/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100186
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800187westonincludedir = $(includedir)/weston
188westoninclude_HEADERS = \
189 src/version.h \
190 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200191 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800192 shared/matrix.h \
193 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100194 shared/zalloc.h \
195 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800196
197if ENABLE_EGL
198module_LTLIBRARIES += gl-renderer.la
199gl_renderer_la_LDFLAGS = -module -avoid-version
200gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
201gl_renderer_la_CFLAGS = \
202 $(COMPOSITOR_CFLAGS) \
203 $(EGL_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500204 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800205gl_renderer_la_SOURCES = \
206 src/gl-renderer.h \
207 src/gl-renderer.c \
208 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700209 src/vertex-clipping.h \
210 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800211endif
212
213if ENABLE_X11_COMPOSITOR
214module_LTLIBRARIES += x11-backend.la
215x11_backend_la_LDFLAGS = -module -avoid-version
216x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800217 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800218x11_backend_la_CFLAGS = \
219 $(COMPOSITOR_CFLAGS) \
220 $(EGL_CFLAGS) \
221 $(PIXMAN_CFLAGS) \
222 $(CAIRO_CFLAGS) \
223 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500224 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700225x11_backend_la_SOURCES = \
226 src/compositor-x11.c \
227 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800228endif
229
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100230INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000231INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100232 src/libinput-seat.c \
233 src/libinput-seat.h \
234 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700235 src/libinput-device.h \
236 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100237
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800238if ENABLE_DRM_COMPOSITOR
239module_LTLIBRARIES += drm-backend.la
240drm_backend_la_LDFLAGS = -module -avoid-version
241drm_backend_la_LIBADD = \
242 $(COMPOSITOR_LIBS) \
243 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100244 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100245 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800246 libsession-helper.la
247drm_backend_la_CFLAGS = \
248 $(COMPOSITOR_CFLAGS) \
249 $(EGL_CFLAGS) \
250 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500251 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800252drm_backend_la_SOURCES = \
253 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100254 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700255 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200256 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800257 src/libbacklight.c \
258 src/libbacklight.h
259
260if ENABLE_VAAPI_RECORDER
261drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
262drm_backend_la_LIBADD += $(LIBVA_LIBS)
263drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
264endif
265endif
266
267if ENABLE_WAYLAND_COMPOSITOR
268module_LTLIBRARIES += wayland-backend.la
269wayland_backend_la_LDFLAGS = -module -avoid-version
270wayland_backend_la_LIBADD = \
271 $(COMPOSITOR_LIBS) \
272 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800273 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800274wayland_backend_la_CFLAGS = \
275 $(COMPOSITOR_CFLAGS) \
276 $(EGL_CFLAGS) \
277 $(PIXMAN_CFLAGS) \
278 $(CAIRO_CFLAGS) \
279 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500280 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700281wayland_backend_la_SOURCES = \
282 src/compositor-wayland.c \
283 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500284nodist_wayland_backend_la_SOURCES = \
285 protocol/fullscreen-shell-protocol.c \
286 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800287endif
288
289if ENABLE_RPI_COMPOSITOR
290if INSTALL_RPI_COMPOSITOR
291module_LTLIBRARIES += rpi-backend.la
292else
293noinst_LTLIBRARIES += rpi-backend.la
294endif
295
296rpi_backend_la_LDFLAGS = -module -avoid-version
297rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
298 $(RPI_COMPOSITOR_LIBS) \
299 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100300 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800301 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800302 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800303rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500304 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800305 $(COMPOSITOR_CFLAGS) \
306 $(RPI_COMPOSITOR_CFLAGS) \
307 $(RPI_BCM_HOST_CFLAGS)
308rpi_backend_la_SOURCES = \
309 src/compositor-rpi.c \
310 src/rpi-renderer.c \
311 src/rpi-renderer.h \
312 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700313 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100314 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800315
316if ENABLE_EGL
317rpi_backend_la_LIBADD += $(EGL_LIBS)
318rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
319endif
320
321endif
322
323if ENABLE_HEADLESS_COMPOSITOR
324module_LTLIBRARIES += headless-backend.la
325headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800326headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500327headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700328headless_backend_la_SOURCES = \
329 src/compositor-headless.c \
330 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800331endif
332
333if ENABLE_FBDEV_COMPOSITOR
334module_LTLIBRARIES += fbdev-backend.la
335fbdev_backend_la_LDFLAGS = -module -avoid-version
336fbdev_backend_la_LIBADD = \
337 $(COMPOSITOR_LIBS) \
338 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100339 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800340 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800341 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800342fbdev_backend_la_CFLAGS = \
343 $(COMPOSITOR_CFLAGS) \
344 $(EGL_CFLAGS) \
345 $(FBDEV_COMPOSITOR_CFLAGS) \
346 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500347 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800348fbdev_backend_la_SOURCES = \
349 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700350 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100351 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800352endif
353
354if ENABLE_RDP_COMPOSITOR
355module_LTLIBRARIES += rdp-backend.la
356rdp_backend_la_LDFLAGS = -module -avoid-version
357rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
358 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800359 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800360rdp_backend_la_CFLAGS = \
361 $(COMPOSITOR_CFLAGS) \
362 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500363 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700364rdp_backend_la_SOURCES = \
365 src/compositor-rdp.c \
366 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800367endif
368
369if HAVE_LCMS
370module_LTLIBRARIES += cms-static.la
371cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800372cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500373cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800374cms_static_la_SOURCES = \
375 src/cms-static.c \
376 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700377 src/cms-helper.h \
378 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800379if ENABLE_COLORD
380module_LTLIBRARIES += cms-colord.la
381cms_colord_la_LDFLAGS = -module -avoid-version
382cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500383cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800384cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100385 src/cms-colord.c \
386 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700387 src/cms-helper.h \
388 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800389endif
390endif
391
392noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500393spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800394spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
395spring_tool_SOURCES = \
396 src/spring-tool.c \
397 src/animation.c \
398 shared/matrix.c \
399 shared/matrix.h \
400 src/compositor.h
401
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800402if BUILD_CLIENTS
403
404bin_PROGRAMS += weston-terminal weston-info
405
406libexec_PROGRAMS += \
407 weston-desktop-shell \
408 weston-screenshooter \
409 weston-keyboard \
410 weston-simple-im
411
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900412if ENABLE_IVI_SHELL
413libexec_PROGRAMS += \
414 weston-ivi-shell-user-interface
415endif
416
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800417demo_clients = \
418 weston-flower \
419 weston-image \
420 weston-cliptest \
421 weston-dnd \
422 weston-smoke \
423 weston-resizor \
424 weston-eventdemo \
425 weston-clickdot \
426 weston-transformed \
427 weston-fullscreen \
428 weston-stacking \
429 weston-calibrator \
430 weston-scaler
431
432if INSTALL_DEMO_CLIENTS
433bin_PROGRAMS += $(demo_clients)
434else
435noinst_PROGRAMS += $(demo_clients)
436endif
437
438
439if BUILD_SIMPLE_CLIENTS
440demo_clients += \
441 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500442 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800443 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400444 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800445 weston-multi-resource
446
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800447weston_simple_shm_SOURCES = clients/simple-shm.c
448nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800449 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500450 protocol/xdg-shell-client-protocol.h \
451 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900452 protocol/fullscreen-shell-client-protocol.h \
453 protocol/ivi-application-protocol.c \
454 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800455weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800456weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800457
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500458weston_simple_damage_SOURCES = clients/simple-damage.c
459nodist_weston_simple_damage_SOURCES = \
460 protocol/scaler-protocol.c \
461 protocol/scaler-client-protocol.h \
462 protocol/xdg-shell-protocol.c \
463 protocol/xdg-shell-client-protocol.h \
464 protocol/fullscreen-shell-protocol.c \
465 protocol/fullscreen-shell-client-protocol.h
466weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
467weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
468
Jon A. Cruzb09da242015-06-16 13:15:13 -0700469weston_simple_touch_SOURCES = \
470 clients/simple-touch.c \
471 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800472weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800473weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800474
Jon A. Cruzb09da242015-06-16 13:15:13 -0700475weston_presentation_shm_SOURCES = \
476 clients/presentation-shm.c \
477 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400478nodist_weston_presentation_shm_SOURCES = \
479 protocol/presentation_timing-protocol.c \
480 protocol/presentation_timing-client-protocol.h
481weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
482weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
483
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800484weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800485weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000486weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800487endif
488
489if BUILD_SIMPLE_EGL_CLIENTS
490demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800491weston_simple_egl_SOURCES = clients/simple-egl.c
492nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800493 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900494 protocol/xdg-shell-client-protocol.h \
495 protocol/ivi-application-protocol.c \
496 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800497weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800498weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
499endif
500
501noinst_LTLIBRARIES += libtoytoolkit.la
502
503libtoytoolkit_la_SOURCES = \
504 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700505 clients/window.h \
506 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800507
508nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100509 protocol/text-cursor-position-protocol.c \
510 protocol/text-cursor-position-client-protocol.h \
511 protocol/scaler-protocol.c \
512 protocol/scaler-client-protocol.h \
513 protocol/workspaces-protocol.c \
514 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400515 protocol/presentation_timing-protocol.c \
516 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100517 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900518 protocol/xdg-shell-client-protocol.h \
519 protocol/ivi-application-protocol.c \
520 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500521
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800522BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
523
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800524
525libtoytoolkit_la_LIBADD = \
526 $(CLIENT_LIBS) \
527 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800528 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800529libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800530
531weston_flower_SOURCES = clients/flower.c
532weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800533weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800534
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100535weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800536 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800537nodist_weston_screenshooter_SOURCES = \
538 protocol/screenshooter-protocol.c \
539 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800540weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800541weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800542
Jon A. Cruzb09da242015-06-16 13:15:13 -0700543weston_terminal_SOURCES = \
544 clients/terminal.c \
545 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800546weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800547weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800548
549weston_image_SOURCES = clients/image.c
550weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800551weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800552
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300553weston_cliptest_SOURCES = \
554 clients/cliptest.c \
555 src/vertex-clipping.c \
556 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800557weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800558weston_cliptest_LDADD = libtoytoolkit.la
559
Jon A. Cruzb09da242015-06-16 13:15:13 -0700560weston_dnd_SOURCES = \
561 clients/dnd.c \
562 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800563weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800564weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800565
566weston_smoke_SOURCES = clients/smoke.c
567weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800568weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800569
570weston_resizor_SOURCES = clients/resizor.c
571weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800572weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800573
574weston_scaler_SOURCES = clients/scaler.c
575weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800576weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800577
578if HAVE_CAIRO_GLESV2
579demo_clients += weston-nested weston-nested-client
580
Jon A. Cruzb09da242015-06-16 13:15:13 -0700581weston_nested_SOURCES = \
582 clients/nested.c \
583 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800584weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800585weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800586
587weston_nested_client_SOURCES = clients/nested-client.c
588weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800589weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800590endif
591
Jon A. Cruzb09da242015-06-16 13:15:13 -0700592weston_eventdemo_SOURCES = \
593 clients/eventdemo.c \
594 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800595weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800596weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800597
Jon A. Cruzb09da242015-06-16 13:15:13 -0700598weston_clickdot_SOURCES = \
599 clients/clickdot.c \
600 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800601weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800602weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800603
604weston_transformed_SOURCES = clients/transformed.c
605weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800606weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800607
608weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500609nodist_weston_fullscreen_SOURCES = \
610 protocol/fullscreen-shell-protocol.c \
611 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800612weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800613weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800614
Jon A. Cruzb09da242015-06-16 13:15:13 -0700615weston_stacking_SOURCES = \
616 clients/stacking.c \
617 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800618weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800619weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800620
Jon A. Cruzb09da242015-06-16 13:15:13 -0700621weston_calibrator_SOURCES = \
622 clients/calibrator.c \
623 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800624 shared/matrix.c \
625 shared/matrix.h
626weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800627weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800628
629if BUILD_SUBSURFACES_CLIENT
630demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700631weston_subsurfaces_SOURCES = \
632 clients/subsurfaces.c \
633 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800634weston_subsurfaces_CFLAGS = \
635 $(AM_CFLAGS) \
636 $(SIMPLE_EGL_CLIENT_CFLAGS) \
637 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800638weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
639endif
640
641if HAVE_PANGO
642demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700643weston_editor_SOURCES = \
644 clients/editor.c \
645 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800646nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100647 protocol/text-protocol.c \
648 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800649weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800650weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800651endif
652
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800653weston_keyboard_SOURCES = clients/keyboard.c
654nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100655 protocol/desktop-shell-client-protocol.h \
656 protocol/desktop-shell-protocol.c \
657 protocol/input-method-protocol.c \
658 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800659weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800660weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800661
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800662weston_simple_im_SOURCES = clients/weston-simple-im.c
663nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100664 protocol/input-method-protocol.c \
665 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800666weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800667weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800668
Jon A. Cruzb09da242015-06-16 13:15:13 -0700669weston_info_SOURCES = \
670 clients/weston-info.c \
671 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400672nodist_weston_info_SOURCES = \
673 protocol/presentation_timing-protocol.c \
674 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800675weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200676weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800677
Jon A. Cruzb09da242015-06-16 13:15:13 -0700678weston_desktop_shell_SOURCES = \
679 clients/desktop-shell.c \
680 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800681nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100682 protocol/desktop-shell-client-protocol.h \
683 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800684weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800685weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800686
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900687if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700688weston_ivi_shell_user_interface_SOURCES = \
689 clients/ivi-shell-user-interface.c \
690 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900691nodist_weston_ivi_shell_user_interface_SOURCES = \
692 protocol/ivi-hmi-controller-client-protocol.h \
693 protocol/ivi-hmi-controller-protocol.c \
694 protocol/ivi-application-client-protocol.h \
695 protocol/ivi-application-protocol.c
696weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
697weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
698endif
699
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800700if BUILD_FULL_GL_CLIENTS
701demo_clients += weston-gears
702weston_gears_SOURCES = clients/gears.c
703weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800704weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800705endif
706
707endif
708
709BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100710 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800711 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100712 protocol/text-cursor-position-client-protocol.h \
713 protocol/text-cursor-position-protocol.c \
714 protocol/text-protocol.c \
715 protocol/text-client-protocol.h \
716 protocol/input-method-protocol.c \
717 protocol/input-method-client-protocol.h \
718 protocol/desktop-shell-client-protocol.h \
719 protocol/desktop-shell-protocol.c \
720 protocol/scaler-client-protocol.h \
721 protocol/scaler-protocol.c \
722 protocol/workspaces-client-protocol.h \
723 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500724 protocol/fullscreen-shell-protocol.c \
725 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100726 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900727 protocol/xdg-shell-client-protocol.h \
728 protocol/ivi-hmi-controller-protocol.c \
729 protocol/ivi-hmi-controller-client-protocol.h \
730 protocol/ivi-application-protocol.c \
731 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800732
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800733westondatadir = $(datadir)/weston
734dist_westondata_DATA = \
735 data/wayland.svg \
736 data/wayland.png \
737 data/pattern.png \
738 data/terminal.png \
739 data/border.png \
740 data/icon_window.png \
741 data/sign_close.png \
742 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100743 data/sign_minimize.png
744
745if ENABLE_IVI_SHELL
746dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900747 data/background.png \
748 data/tiling.png \
749 data/fullscreen.png \
750 data/panel.png \
751 data/random.png \
752 data/sidebyside.png \
753 data/home.png \
754 data/icon_ivi_clickdot.png \
755 data/icon_ivi_flower.png \
756 data/icon_ivi_simple-egl.png \
757 data/icon_ivi_simple-shm.png \
758 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100759endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800760
761
762if BUILD_WCAP_TOOLS
763bin_PROGRAMS += wcap-decode
764
765wcap_decode_SOURCES = \
766 wcap/main.c \
767 wcap/wcap-decode.c \
768 wcap/wcap-decode.h
769
Derek Foreman4ff38742015-06-18 11:43:11 -0500770wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800771wcap_decode_LDADD = $(WCAP_LIBS)
772endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800773
774
775if ENABLE_DESKTOP_SHELL
776
777module_LTLIBRARIES += desktop-shell.la
778
779desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100780 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800781 -I$(top_srcdir)/shared \
782 -I$(top_srcdir)/src \
783 -I$(top_builddir)/src \
784 -I$(top_builddir)/desktop-shell \
785 -DDATADIR='"$(datadir)"' \
786 -DMODULEDIR='"$(moduledir)"' \
787 -DLIBEXECDIR='"$(libexecdir)"' \
788 -DIN_WESTON
789
790desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800791desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500792desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800793desktop_shell_la_SOURCES = \
794 desktop-shell/shell.h \
795 desktop-shell/shell.c \
796 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700797 desktop-shell/input-panel.c \
798 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800799nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100800 protocol/desktop-shell-protocol.c \
801 protocol/desktop-shell-server-protocol.h \
802 protocol/xdg-shell-protocol.c \
803 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800804
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800805BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800806endif
807
Jason Ekstrand946a9482014-04-02 19:53:47 -0500808if ENABLE_FULLSCREEN_SHELL
809
810module_LTLIBRARIES += fullscreen-shell.la
811
812fullscreen_shell_la_CPPFLAGS = \
813 -I$(top_builddir)/protocol \
814 -I$(top_srcdir)/shared \
815 -I$(top_srcdir)/src \
816 -I$(top_builddir)/src \
817 -DIN_WESTON
818
819fullscreen_shell_la_LDFLAGS = -module -avoid-version
820fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500821fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500822fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700823 fullscreen-shell/fullscreen-shell.c \
824 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500825nodist_fullscreen_shell_la_SOURCES = \
826 protocol/fullscreen-shell-protocol.c \
827 protocol/fullscreen-shell-server-protocol.h
828
829BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
830endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800831
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900832if ENABLE_IVI_SHELL
833
834module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900835 $(ivi_shell) \
836 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900837
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900838ivi_shell = ivi-shell.la
839ivi_shell_la_LDFLAGS = -module -avoid-version
840ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500841ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900842ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900843 ivi-shell/ivi-layout-export.h \
844 ivi-shell/ivi-layout-private.h \
845 ivi-shell/ivi-layout.c \
846 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900847 ivi-shell/ivi-shell.h \
848 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700849 ivi-shell/input-panel-ivi.c \
850 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900851nodist_ivi_shell_la_SOURCES = \
852 protocol/ivi-application-protocol.c \
853 protocol/ivi-application-server-protocol.h
854
855BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
856
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900857hmi_controller = hmi-controller.la
858hmi_controller_la_LDFLAGS = -module -avoid-version
859hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500860hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900861hmi_controller_la_SOURCES = \
862 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700863 ivi-shell/hmi-controller.c \
864 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900865nodist_hmi_controller_la_SOURCES = \
866 protocol/ivi-hmi-controller-protocol.c \
867 protocol/ivi-hmi-controller-server-protocol.h
868
869BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
870
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900871endif
872
873
Jason Ekstrand47928d82014-04-02 19:54:01 -0500874if ENABLE_SCREEN_SHARING
875
876module_LTLIBRARIES += screen-share.la
877
878screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
879screen_share_la_LDFLAGS = -module -avoid-version
880screen_share_la_LIBADD = \
881 $(COMPOSITOR_LIBS) \
882 $(SCREEN_SHARE_LIBS) \
883 libshared-cairo.la
884screen_share_la_CFLAGS = \
885 $(COMPOSITOR_CFLAGS) \
886 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500887 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500888screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700889 src/screen-share.c \
890 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500891nodist_screen_share_la_SOURCES = \
892 protocol/fullscreen-shell-protocol.c \
893 protocol/fullscreen-shell-client-protocol.h
894
895endif
896
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800897if ENABLE_XWAYLAND
898
899module_LTLIBRARIES += xwayland.la
900
901xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100902 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800903 -I$(top_srcdir)/shared \
904 -I$(top_srcdir)/src \
905 -I$(top_builddir)/src \
906 -I$(top_builddir)/xwayland \
907 -DDATADIR='"$(datadir)"' \
908 -DMODULEDIR='"$(moduledir)"' \
909 -DLIBEXECDIR='"$(libexecdir)"' \
910 -DXSERVER_PATH='"@XSERVER_PATH@"'
911
912xwayland_la_LDFLAGS = -module -avoid-version
913xwayland_la_LIBADD = \
914 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800915 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800916xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500917 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800918 $(COMPOSITOR_CFLAGS) \
919 $(PIXMAN_CFLAGS) \
920 $(CAIRO_CFLAGS)
921xwayland_la_SOURCES = \
922 xwayland/xwayland.h \
923 xwayland/window-manager.c \
924 xwayland/selection.c \
925 xwayland/dnd.c \
926 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800927 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700928 xwayland/hash.h \
929 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800930endif
931
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800932
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800933#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800934# Shared utilities
935#
936
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700937noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
938 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800939
Derek Foreman4ff38742015-06-18 11:43:11 -0500940libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800941
942libshared_la_SOURCES = \
943 shared/config-parser.c \
944 shared/option-parser.c \
945 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200946 shared/file-util.c \
947 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700948 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800949 shared/os-compatibility.c \
950 shared/os-compatibility.h
951
952libshared_cairo_la_CFLAGS = \
953 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -0500954 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800955 $(COMPOSITOR_CFLAGS) \
956 $(PIXMAN_CFLAGS) \
957 $(CAIRO_CFLAGS) \
958 $(PNG_CFLAGS) \
959 $(WEBP_CFLAGS)
960
961libshared_cairo_la_LIBADD = \
962 $(PIXMAN_LIBS) \
963 $(CAIRO_LIBS) \
964 $(PNG_LIBS) \
965 $(WEBP_LIBS) \
966 $(JPEG_LIBS)
967
968libshared_cairo_la_SOURCES = \
969 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700970 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800971 shared/image-loader.c \
972 shared/image-loader.h \
973 shared/cairo-util.c \
974 shared/frame.c \
975 shared/cairo-util.h
976
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700977libzunitc_la_SOURCES = \
978 tools/zunitc/inc/zunitc/zunitc.h \
979 tools/zunitc/inc/zunitc/zunitc_impl.h \
980 tools/zunitc/src/zuc_base_logger.c \
981 tools/zunitc/src/zuc_base_logger.h \
982 tools/zunitc/src/zuc_collector.c \
983 tools/zunitc/src/zuc_collector.h \
984 tools/zunitc/src/zuc_context.h \
985 tools/zunitc/src/zuc_event.h \
986 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -0700987 tools/zunitc/src/zuc_junit_reporter.c \
988 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700989 tools/zunitc/src/zuc_types.h \
990 tools/zunitc/src/zunitc_impl.c \
991 shared/helpers.h
992
993libzunitc_la_CFLAGS = \
994 $(AM_CFLAGS) \
995 -I$(top_srcdir)/tools/zunitc/inc
996
997libzunitc_la_LIBADD = \
998 libshared.la
999
Jon A. Cruz646aef52015-07-15 19:22:41 -07001000if ENABLE_JUNIT_XML
1001libzunitc_la_CFLAGS += \
1002 $(LIBXML2_CFLAGS)
1003libzunitc_la_LIBADD += \
1004 $(LIBXML2_LIBS)
1005endif
1006
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001007libzunitcmain_la_SOURCES = \
1008 tools/zunitc/src/main.c
1009
1010libzunitcmain_la_CFLAGS = \
1011 $(AM_CFLAGS) \
1012 -I$(top_srcdir)/tools/zunitc/inc
1013
1014libzunitcmain_la_LIBADD = \
1015 libzunitc.la \
1016 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001017
1018#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001019# tests subdirectory
1020#
1021
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001022TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1023
1024internal_tests = \
1025 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001026
1027shared_tests = \
1028 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001029 vertex-clip.test \
1030 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001031
1032module_tests = \
1033 surface-test.la \
1034 surface-global-test.la
1035
1036weston_tests = \
1037 bad_buffer.weston \
1038 keyboard.weston \
1039 event.weston \
1040 button.weston \
1041 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001042 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001043 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001044 subsurface.weston \
1045 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001046
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001047ivi_tests =
1048
1049$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001050
1051AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001052 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1053 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001054
1055TEST_EXTENSIONS = .la .weston
1056LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1057WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1058
1059clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001060 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001061
1062# To remove when automake 1.11 support is dropped
1063export abs_builddir
1064
1065noinst_LTLIBRARIES += \
1066 weston-test.la \
1067 $(module_tests) \
1068 libtest-runner.la \
1069 libtest-client.la
1070
1071noinst_PROGRAMS += \
1072 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001073 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001074 $(shared_tests) \
1075 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001076 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001077 matrix-test
1078
1079test_module_ldflags = \
1080 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1081
1082surface_global_test_la_SOURCES = tests/surface-global-test.c
1083surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001084surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001085
1086surface_test_la_SOURCES = tests/surface-test.c
1087surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001088surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001089
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001090weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001091weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001092weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001093weston_test_la_SOURCES = \
1094 tests/weston-test.c \
1095 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001096nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001097 protocol/weston-test-protocol.c \
1098 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001099
1100if ENABLE_EGL
1101weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1102weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1103endif
1104
1105libtest_runner_la_SOURCES = \
1106 tests/weston-test-runner.c \
1107 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001108libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001109
1110config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001111config_parser_test_LDADD = \
1112 libshared.la \
1113 $(COMPOSITOR_LIBS) \
1114 libzunitc.la \
1115 libzunitcmain.la
1116config_parser_test_CFLAGS = \
1117 $(AM_CFLAGS) \
1118 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001119
1120vertex_clip_test_SOURCES = \
1121 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001122 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001123 src/vertex-clipping.c \
1124 src/vertex-clipping.h
1125vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1126
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001127libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001128 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001129 tests/weston-test-client-helper.h
1130nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001131 protocol/weston-test-protocol.c \
1132 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001133libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001134libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001135
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001136
1137#
1138# Internal tests - tests functionality of the testsuite itself
1139#
1140
1141internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1142internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1143internal_screenshot_weston_LDADD = libtest-client.la $(CAIRO_LIBS)
1144
1145
1146#
1147# Weston Tests
1148#
1149
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001150bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001151bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001152bad_buffer_weston_LDADD = libtest-client.la
1153
1154keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001155keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001156keyboard_weston_LDADD = libtest-client.la
1157
1158event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001159event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001160event_weston_LDADD = libtest-client.la
1161
1162button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001163button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001164button_weston_LDADD = libtest-client.la
1165
Marek Chalupa5fd81402015-03-30 09:21:29 -04001166devices_weston_SOURCES = tests/devices-test.c
1167devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1168devices_weston_LDADD = libtest-client.la
1169
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001170text_weston_SOURCES = tests/text-test.c
1171nodist_text_weston_SOURCES = \
1172 protocol/text-protocol.c \
1173 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001174text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001175text_weston_LDADD = libtest-client.la
1176
1177subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001178subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001179subsurface_weston_LDADD = libtest-client.la
1180
Jon A. Cruzb09da242015-06-16 13:15:13 -07001181presentation_weston_SOURCES = \
1182 tests/presentation-test.c \
1183 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001184nodist_presentation_weston_SOURCES = \
1185 protocol/presentation_timing-protocol.c \
1186 protocol/presentation_timing-client-protocol.h
1187presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1188presentation_weston_LDADD = libtest-client.la
1189
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001190roles_weston_SOURCES = tests/roles-test.c
1191roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1192roles_weston_LDADD = libtest-client.la
1193
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001194if ENABLE_EGL
1195weston_tests += buffer-count.weston
1196buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001197buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001198buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1199endif
1200
1201if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001202weston_tests += xwayland-test.weston
1203xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001204xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001205xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001206endif
1207
1208matrix_test_SOURCES = \
1209 tests/matrix-test.c \
1210 shared/matrix.c \
1211 shared/matrix.h
1212matrix_test_CPPFLAGS = -DUNIT_TEST
1213matrix_test_LDADD = -lm -lrt
1214
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001215if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001216module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001217 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001218 ivi-layout-test.la
1219
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001220ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1221ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001222ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001223ivi_layout_internal_test_la_SOURCES = \
1224 tests/ivi_layout-internal-test.c
1225
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001226ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1227ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001228ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001229ivi_layout_test_la_SOURCES = \
1230 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001231 tests/ivi-test.h \
1232 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001233nodist_ivi_layout_test_la_SOURCES = \
1234 protocol/weston-test-protocol.c \
1235 protocol/weston-test-server-protocol.h
1236
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001237ivi_tests += \
1238 ivi-shell-app.weston
1239
1240ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1241nodist_ivi_shell_app_weston_SOURCES = \
1242 protocol/ivi-application-protocol.c \
1243 protocol/ivi-application-client-protocol.h
1244ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1245ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001246
1247noinst_PROGRAMS += ivi-layout.ivi
1248
1249ivi_layout_ivi_SOURCES = \
1250 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001251 tests/ivi-test.h \
1252 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001253nodist_ivi_layout_ivi_SOURCES = \
1254 protocol/ivi-application-protocol.c \
1255 protocol/ivi-application-client-protocol.h
1256ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1257ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001258endif
1259
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001260if BUILD_SETBACKLIGHT
1261noinst_PROGRAMS += setbacklight
1262setbacklight_SOURCES = \
1263 tests/setbacklight.c \
1264 src/libbacklight.c \
1265 src/libbacklight.h
1266setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1267setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1268endif
1269
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001270all-local: zuctest$(EXEEXT)
1271
1272noinst_PROGRAMS += zuctest$(EXEEXT)
1273
1274zuctest_LDADD = \
1275 libzunitc.la \
1276 libzunitcmain.la
1277
1278zuctest_CFLAGS = \
1279 $(AM_CFLAGS) \
1280 -I$(top_srcdir)/tools/zunitc/inc
1281
1282zuctest_SOURCES = \
1283 tools/zunitc/test/fixtures_test.c \
1284 tools/zunitc/test/zunitc_test.c
1285
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001286EXTRA_DIST += \
1287 tests/weston-tests-env \
1288 tests/internal-screenshot.ini \
1289 tests/reference/internal-screenshot-bad-00.png \
1290 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001291
1292BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001293 protocol/weston-test-protocol.c \
1294 protocol/weston-test-server-protocol.h \
1295 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001296 protocol/text-protocol.c \
1297 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001298
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001299EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001300 protocol/desktop-shell.xml \
1301 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001302 protocol/text.xml \
1303 protocol/input-method.xml \
1304 protocol/workspaces.xml \
1305 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001306 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001307 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001308 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001309 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001310 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001311 protocol/ivi-application.xml \
1312 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001313
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001314#
1315# manual test modules in tests subdirectory
1316#
1317
1318noinst_LTLIBRARIES += \
1319 surface-screenshot.la
1320
1321surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1322surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001323surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001324surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1325
1326
1327#
1328# Documentation
1329#
1330
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001331man_MANS = weston.1 weston.ini.5
1332
1333if ENABLE_DRM_COMPOSITOR
1334man_MANS += weston-drm.7
1335endif
1336
1337MAN_SUBSTS = \
1338 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1339 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1340 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1341 -e 's|__version__|$(PACKAGE_VERSION)|g'
1342
1343SUFFIXES = .1 .5 .7 .man
1344
1345%.1 %.5 %.7 : man/%.man
1346 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1347
1348EXTRA_DIST += \
1349 man/weston.man \
1350 man/weston-drm.man \
1351 man/weston.ini.man
1352
1353CLEANFILES += $(man_MANS)
1354
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001355protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1356 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001357
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001358protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1359 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001360
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001361protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1362 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@