blob: 62719c957c4685e6c72d6a8737d567e2ff0e549e [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
Ross Burton2eff22b2015-07-17 12:33:45 +010023 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090024 -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
Ross Burton2eff22b2015-07-17 12:33:45 +010032 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020033 -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 \
Pekka Paalanen230f3b12014-09-29 14:18:40 -040090 src/linux-dmabuf.c \
91 src/linux-dmabuf.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -070092 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080093 shared/matrix.c \
94 shared/matrix.h \
Pekka Paalanenaa21f622015-07-03 15:44:50 +030095 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080096 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +010097 shared/platform.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080098 src/weston-egl-ext.h
99
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800100nodist_weston_SOURCES = \
101 protocol/screenshooter-protocol.c \
102 protocol/screenshooter-server-protocol.h \
103 protocol/text-cursor-position-protocol.c \
104 protocol/text-cursor-position-server-protocol.h \
105 protocol/text-protocol.c \
106 protocol/text-server-protocol.h \
107 protocol/input-method-protocol.c \
108 protocol/input-method-server-protocol.h \
109 protocol/workspaces-protocol.c \
110 protocol/workspaces-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400111 protocol/presentation_timing-protocol.c \
112 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800113 protocol/scaler-protocol.c \
Pekka Paalanen23ab7152014-09-29 14:08:29 -0400114 protocol/scaler-server-protocol.h \
115 protocol/linux-dmabuf-protocol.c \
116 protocol/linux-dmabuf-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800117
118BUILT_SOURCES += $(nodist_weston_SOURCES)
119
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800120# Track this dependency explicitly instead of using BUILT_SOURCES. We
121# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
122# in case we're building from tarballs.
123
124src/compositor.c : $(top_builddir)/src/git-version.h
125
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800126noinst_LTLIBRARIES += \
127 libsession-helper.la
128
129libsession_helper_la_SOURCES = \
130 src/weston-launch.h \
131 src/launcher-util.c \
132 src/launcher-util.h
Derek Foreman4ff38742015-06-18 11:43:11 -0500133libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800134libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
135
136if ENABLE_DBUS
137if HAVE_SYSTEMD_LOGIN
138libsession_helper_la_SOURCES += \
139 src/dbus.h \
140 src/dbus.c \
141 src/logind-util.h \
142 src/logind-util.c
143libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
144libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
145endif
146endif
147
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800148if HAVE_GIT_REPO
149src/git-version.h : $(top_srcdir)/.git/logs/HEAD
150 $(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 -0800151else
152src/git-version.h :
153 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
154
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800155endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800156
157.FORCE :
158
159if BUILD_WESTON_LAUNCH
160bin_PROGRAMS += weston-launch
161weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
162weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
163weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500164 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800165 $(PAM_CFLAGS) \
166 $(SYSTEMD_LOGIN_CFLAGS) \
167 $(LIBDRM_CFLAGS)
168weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
169
170if ENABLE_SETUID_INSTALL
171install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700172 can_suid_files=no; \
173 chown root $(DESTDIR)$(bindir)/weston-launch \
174 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
175 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500176 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700177 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
178 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
179 false; \
180 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800181endif
182
183endif # BUILD_WESTON_LAUNCH
184
185pkgconfigdir = $(libdir)/pkgconfig
186pkgconfig_DATA = src/weston.pc
187
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100188wayland_sessiondir = $(datadir)/wayland-sessions
Ross Burton315476f2015-07-16 20:56:32 +0100189dist_wayland_session_DATA = src/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100190
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800191westonincludedir = $(includedir)/weston
192westoninclude_HEADERS = \
193 src/version.h \
194 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200195 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800196 shared/matrix.h \
197 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100198 shared/zalloc.h \
199 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800200
201if ENABLE_EGL
202module_LTLIBRARIES += gl-renderer.la
203gl_renderer_la_LDFLAGS = -module -avoid-version
204gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
205gl_renderer_la_CFLAGS = \
206 $(COMPOSITOR_CFLAGS) \
207 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300208 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500209 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800210gl_renderer_la_SOURCES = \
211 src/gl-renderer.h \
212 src/gl-renderer.c \
213 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700214 src/vertex-clipping.h \
215 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800216endif
217
218if ENABLE_X11_COMPOSITOR
219module_LTLIBRARIES += x11-backend.la
220x11_backend_la_LDFLAGS = -module -avoid-version
221x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800222 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800223x11_backend_la_CFLAGS = \
224 $(COMPOSITOR_CFLAGS) \
225 $(EGL_CFLAGS) \
226 $(PIXMAN_CFLAGS) \
227 $(CAIRO_CFLAGS) \
228 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500229 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700230x11_backend_la_SOURCES = \
231 src/compositor-x11.c \
232 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800233endif
234
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100235INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000236INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100237 src/libinput-seat.c \
238 src/libinput-seat.h \
239 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700240 src/libinput-device.h \
241 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100242
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800243if ENABLE_DRM_COMPOSITOR
244module_LTLIBRARIES += drm-backend.la
245drm_backend_la_LDFLAGS = -module -avoid-version
246drm_backend_la_LIBADD = \
247 $(COMPOSITOR_LIBS) \
248 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100249 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100250 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800251 libsession-helper.la
252drm_backend_la_CFLAGS = \
253 $(COMPOSITOR_CFLAGS) \
254 $(EGL_CFLAGS) \
255 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500256 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800257drm_backend_la_SOURCES = \
258 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100259 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700260 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200261 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800262 src/libbacklight.c \
263 src/libbacklight.h
264
265if ENABLE_VAAPI_RECORDER
266drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
267drm_backend_la_LIBADD += $(LIBVA_LIBS)
268drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
269endif
270endif
271
272if ENABLE_WAYLAND_COMPOSITOR
273module_LTLIBRARIES += wayland-backend.la
274wayland_backend_la_LDFLAGS = -module -avoid-version
275wayland_backend_la_LIBADD = \
276 $(COMPOSITOR_LIBS) \
277 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800278 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800279wayland_backend_la_CFLAGS = \
280 $(COMPOSITOR_CFLAGS) \
281 $(EGL_CFLAGS) \
282 $(PIXMAN_CFLAGS) \
283 $(CAIRO_CFLAGS) \
284 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500285 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700286wayland_backend_la_SOURCES = \
287 src/compositor-wayland.c \
288 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500289nodist_wayland_backend_la_SOURCES = \
290 protocol/fullscreen-shell-protocol.c \
291 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800292endif
293
294if ENABLE_RPI_COMPOSITOR
295if INSTALL_RPI_COMPOSITOR
296module_LTLIBRARIES += rpi-backend.la
297else
298noinst_LTLIBRARIES += rpi-backend.la
299endif
300
301rpi_backend_la_LDFLAGS = -module -avoid-version
302rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
303 $(RPI_COMPOSITOR_LIBS) \
304 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100305 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800306 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800307 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800308rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500309 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800310 $(COMPOSITOR_CFLAGS) \
311 $(RPI_COMPOSITOR_CFLAGS) \
312 $(RPI_BCM_HOST_CFLAGS)
313rpi_backend_la_SOURCES = \
314 src/compositor-rpi.c \
315 src/rpi-renderer.c \
316 src/rpi-renderer.h \
317 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700318 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100319 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800320
321if ENABLE_EGL
322rpi_backend_la_LIBADD += $(EGL_LIBS)
323rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
324endif
325
326endif
327
328if ENABLE_HEADLESS_COMPOSITOR
329module_LTLIBRARIES += headless-backend.la
330headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800331headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500332headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700333headless_backend_la_SOURCES = \
334 src/compositor-headless.c \
335 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800336endif
337
338if ENABLE_FBDEV_COMPOSITOR
339module_LTLIBRARIES += fbdev-backend.la
340fbdev_backend_la_LDFLAGS = -module -avoid-version
341fbdev_backend_la_LIBADD = \
342 $(COMPOSITOR_LIBS) \
343 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100344 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800345 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800346 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800347fbdev_backend_la_CFLAGS = \
348 $(COMPOSITOR_CFLAGS) \
349 $(EGL_CFLAGS) \
350 $(FBDEV_COMPOSITOR_CFLAGS) \
351 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500352 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800353fbdev_backend_la_SOURCES = \
354 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700355 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100356 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800357endif
358
359if ENABLE_RDP_COMPOSITOR
360module_LTLIBRARIES += rdp-backend.la
361rdp_backend_la_LDFLAGS = -module -avoid-version
362rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
363 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800364 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800365rdp_backend_la_CFLAGS = \
366 $(COMPOSITOR_CFLAGS) \
367 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500368 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700369rdp_backend_la_SOURCES = \
370 src/compositor-rdp.c \
371 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800372endif
373
374if HAVE_LCMS
375module_LTLIBRARIES += cms-static.la
376cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800377cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500378cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800379cms_static_la_SOURCES = \
380 src/cms-static.c \
381 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700382 src/cms-helper.h \
383 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800384if ENABLE_COLORD
385module_LTLIBRARIES += cms-colord.la
386cms_colord_la_LDFLAGS = -module -avoid-version
387cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500388cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800389cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100390 src/cms-colord.c \
391 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700392 src/cms-helper.h \
393 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800394endif
395endif
396
397noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500398spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800399spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
400spring_tool_SOURCES = \
401 src/spring-tool.c \
402 src/animation.c \
403 shared/matrix.c \
404 shared/matrix.h \
405 src/compositor.h
406
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800407if BUILD_CLIENTS
408
409bin_PROGRAMS += weston-terminal weston-info
410
411libexec_PROGRAMS += \
412 weston-desktop-shell \
413 weston-screenshooter \
414 weston-keyboard \
415 weston-simple-im
416
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900417if ENABLE_IVI_SHELL
418libexec_PROGRAMS += \
419 weston-ivi-shell-user-interface
420endif
421
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800422demo_clients = \
423 weston-flower \
424 weston-image \
425 weston-cliptest \
426 weston-dnd \
427 weston-smoke \
428 weston-resizor \
429 weston-eventdemo \
430 weston-clickdot \
431 weston-transformed \
432 weston-fullscreen \
433 weston-stacking \
434 weston-calibrator \
435 weston-scaler
436
437if INSTALL_DEMO_CLIENTS
438bin_PROGRAMS += $(demo_clients)
439else
440noinst_PROGRAMS += $(demo_clients)
441endif
442
443
444if BUILD_SIMPLE_CLIENTS
445demo_clients += \
446 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500447 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800448 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400449 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800450 weston-multi-resource
451
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800452weston_simple_shm_SOURCES = clients/simple-shm.c
453nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800454 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500455 protocol/xdg-shell-client-protocol.h \
456 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900457 protocol/fullscreen-shell-client-protocol.h \
458 protocol/ivi-application-protocol.c \
459 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800460weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800461weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800462
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500463weston_simple_damage_SOURCES = clients/simple-damage.c
464nodist_weston_simple_damage_SOURCES = \
465 protocol/scaler-protocol.c \
466 protocol/scaler-client-protocol.h \
467 protocol/xdg-shell-protocol.c \
468 protocol/xdg-shell-client-protocol.h \
469 protocol/fullscreen-shell-protocol.c \
470 protocol/fullscreen-shell-client-protocol.h
471weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
472weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
473
Jon A. Cruzb09da242015-06-16 13:15:13 -0700474weston_simple_touch_SOURCES = \
475 clients/simple-touch.c \
476 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800477weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800478weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800479
Jon A. Cruzb09da242015-06-16 13:15:13 -0700480weston_presentation_shm_SOURCES = \
481 clients/presentation-shm.c \
482 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400483nodist_weston_presentation_shm_SOURCES = \
484 protocol/presentation_timing-protocol.c \
485 protocol/presentation_timing-client-protocol.h
486weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
487weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
488
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800489weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800490weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000491weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800492endif
493
494if BUILD_SIMPLE_EGL_CLIENTS
495demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800496weston_simple_egl_SOURCES = clients/simple-egl.c
497nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800498 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900499 protocol/xdg-shell-client-protocol.h \
500 protocol/ivi-application-protocol.c \
501 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800502weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800503weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
504endif
505
George Kiagiadakis53868982014-06-12 16:26:49 +0200506if BUILD_SIMPLE_INTEL_DMABUF_CLIENT
507demo_clients += weston-simple-dmabuf
508weston_simple_dmabuf_SOURCES = clients/simple-dmabuf.c
509nodist_weston_simple_dmabuf_SOURCES = \
510 protocol/xdg-shell-protocol.c \
511 protocol/xdg-shell-client-protocol.h \
512 protocol/fullscreen-shell-protocol.c \
513 protocol/fullscreen-shell-client-protocol.h \
514 protocol/linux-dmabuf-protocol.c \
515 protocol/linux-dmabuf-client-protocol.h
516weston_simple_dmabuf_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_CLIENT_CFLAGS)
517weston_simple_dmabuf_LDADD = $(SIMPLE_DMABUF_CLIENT_LIBS) libshared.la
518BUILT_SOURCES += protocol/linux-dmabuf-client-protocol.h
519endif
520
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800521noinst_LTLIBRARIES += libtoytoolkit.la
522
523libtoytoolkit_la_SOURCES = \
524 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700525 clients/window.h \
526 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800527
528nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100529 protocol/text-cursor-position-protocol.c \
530 protocol/text-cursor-position-client-protocol.h \
531 protocol/scaler-protocol.c \
532 protocol/scaler-client-protocol.h \
533 protocol/workspaces-protocol.c \
534 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400535 protocol/presentation_timing-protocol.c \
536 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100537 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900538 protocol/xdg-shell-client-protocol.h \
539 protocol/ivi-application-protocol.c \
540 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500541
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800542BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
543
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800544
545libtoytoolkit_la_LIBADD = \
546 $(CLIENT_LIBS) \
547 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800548 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800549libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800550
551weston_flower_SOURCES = clients/flower.c
552weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800553weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800554
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100555weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800556 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800557nodist_weston_screenshooter_SOURCES = \
558 protocol/screenshooter-protocol.c \
559 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800560weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800561weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800562
Jon A. Cruzb09da242015-06-16 13:15:13 -0700563weston_terminal_SOURCES = \
564 clients/terminal.c \
565 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800566weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800567weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800568
569weston_image_SOURCES = clients/image.c
570weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800571weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800572
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300573weston_cliptest_SOURCES = \
574 clients/cliptest.c \
575 src/vertex-clipping.c \
576 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800577weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800578weston_cliptest_LDADD = libtoytoolkit.la
579
Jon A. Cruzb09da242015-06-16 13:15:13 -0700580weston_dnd_SOURCES = \
581 clients/dnd.c \
582 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800583weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800584weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800585
586weston_smoke_SOURCES = clients/smoke.c
587weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800588weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800589
590weston_resizor_SOURCES = clients/resizor.c
591weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800592weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800593
594weston_scaler_SOURCES = clients/scaler.c
595weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800596weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800597
598if HAVE_CAIRO_GLESV2
599demo_clients += weston-nested weston-nested-client
600
Jon A. Cruzb09da242015-06-16 13:15:13 -0700601weston_nested_SOURCES = \
602 clients/nested.c \
603 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800604weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800605weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800606
607weston_nested_client_SOURCES = clients/nested-client.c
608weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800609weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800610endif
611
Jon A. Cruzb09da242015-06-16 13:15:13 -0700612weston_eventdemo_SOURCES = \
613 clients/eventdemo.c \
614 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800615weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800616weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800617
Jon A. Cruzb09da242015-06-16 13:15:13 -0700618weston_clickdot_SOURCES = \
619 clients/clickdot.c \
620 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800621weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800622weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800623
624weston_transformed_SOURCES = clients/transformed.c
625weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800626weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800627
628weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500629nodist_weston_fullscreen_SOURCES = \
630 protocol/fullscreen-shell-protocol.c \
631 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800632weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800633weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800634
Jon A. Cruzb09da242015-06-16 13:15:13 -0700635weston_stacking_SOURCES = \
636 clients/stacking.c \
637 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800638weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800639weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800640
Jon A. Cruzb09da242015-06-16 13:15:13 -0700641weston_calibrator_SOURCES = \
642 clients/calibrator.c \
643 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800644 shared/matrix.c \
645 shared/matrix.h
646weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800647weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800648
649if BUILD_SUBSURFACES_CLIENT
650demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700651weston_subsurfaces_SOURCES = \
652 clients/subsurfaces.c \
653 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800654weston_subsurfaces_CFLAGS = \
655 $(AM_CFLAGS) \
656 $(SIMPLE_EGL_CLIENT_CFLAGS) \
657 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800658weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
659endif
660
661if HAVE_PANGO
662demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700663weston_editor_SOURCES = \
664 clients/editor.c \
665 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800666nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100667 protocol/text-protocol.c \
668 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800669weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800670weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800671endif
672
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800673weston_keyboard_SOURCES = clients/keyboard.c
674nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100675 protocol/desktop-shell-client-protocol.h \
676 protocol/desktop-shell-protocol.c \
677 protocol/input-method-protocol.c \
678 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800679weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800680weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800681
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800682weston_simple_im_SOURCES = clients/weston-simple-im.c
683nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100684 protocol/input-method-protocol.c \
685 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800686weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800687weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800688
Jon A. Cruzb09da242015-06-16 13:15:13 -0700689weston_info_SOURCES = \
690 clients/weston-info.c \
691 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400692nodist_weston_info_SOURCES = \
693 protocol/presentation_timing-protocol.c \
694 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800695weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200696weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800697
Jon A. Cruzb09da242015-06-16 13:15:13 -0700698weston_desktop_shell_SOURCES = \
699 clients/desktop-shell.c \
700 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800701nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100702 protocol/desktop-shell-client-protocol.h \
703 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800704weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800705weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800706
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900707if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700708weston_ivi_shell_user_interface_SOURCES = \
709 clients/ivi-shell-user-interface.c \
710 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900711nodist_weston_ivi_shell_user_interface_SOURCES = \
712 protocol/ivi-hmi-controller-client-protocol.h \
713 protocol/ivi-hmi-controller-protocol.c \
714 protocol/ivi-application-client-protocol.h \
715 protocol/ivi-application-protocol.c
716weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
717weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
718endif
719
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800720if BUILD_FULL_GL_CLIENTS
721demo_clients += weston-gears
722weston_gears_SOURCES = clients/gears.c
723weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800724weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800725endif
726
727endif
728
729BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100730 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800731 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100732 protocol/text-cursor-position-client-protocol.h \
733 protocol/text-cursor-position-protocol.c \
734 protocol/text-protocol.c \
735 protocol/text-client-protocol.h \
736 protocol/input-method-protocol.c \
737 protocol/input-method-client-protocol.h \
738 protocol/desktop-shell-client-protocol.h \
739 protocol/desktop-shell-protocol.c \
740 protocol/scaler-client-protocol.h \
741 protocol/scaler-protocol.c \
742 protocol/workspaces-client-protocol.h \
743 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500744 protocol/fullscreen-shell-protocol.c \
745 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100746 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900747 protocol/xdg-shell-client-protocol.h \
748 protocol/ivi-hmi-controller-protocol.c \
749 protocol/ivi-hmi-controller-client-protocol.h \
750 protocol/ivi-application-protocol.c \
751 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800752
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800753westondatadir = $(datadir)/weston
754dist_westondata_DATA = \
755 data/wayland.svg \
756 data/wayland.png \
757 data/pattern.png \
758 data/terminal.png \
759 data/border.png \
760 data/icon_window.png \
761 data/sign_close.png \
762 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100763 data/sign_minimize.png
764
765if ENABLE_IVI_SHELL
766dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900767 data/background.png \
768 data/tiling.png \
769 data/fullscreen.png \
770 data/panel.png \
771 data/random.png \
772 data/sidebyside.png \
773 data/home.png \
774 data/icon_ivi_clickdot.png \
775 data/icon_ivi_flower.png \
776 data/icon_ivi_simple-egl.png \
777 data/icon_ivi_simple-shm.png \
778 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100779endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800780
781
782if BUILD_WCAP_TOOLS
783bin_PROGRAMS += wcap-decode
784
785wcap_decode_SOURCES = \
786 wcap/main.c \
787 wcap/wcap-decode.c \
788 wcap/wcap-decode.h
789
Derek Foreman4ff38742015-06-18 11:43:11 -0500790wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800791wcap_decode_LDADD = $(WCAP_LIBS)
792endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800793
794
795if ENABLE_DESKTOP_SHELL
796
797module_LTLIBRARIES += desktop-shell.la
798
799desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100800 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800801 -I$(top_srcdir)/shared \
802 -I$(top_srcdir)/src \
803 -I$(top_builddir)/src \
804 -I$(top_builddir)/desktop-shell \
805 -DDATADIR='"$(datadir)"' \
806 -DMODULEDIR='"$(moduledir)"' \
807 -DLIBEXECDIR='"$(libexecdir)"' \
808 -DIN_WESTON
809
810desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800811desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500812desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800813desktop_shell_la_SOURCES = \
814 desktop-shell/shell.h \
815 desktop-shell/shell.c \
816 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700817 desktop-shell/input-panel.c \
818 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800819nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100820 protocol/desktop-shell-protocol.c \
821 protocol/desktop-shell-server-protocol.h \
822 protocol/xdg-shell-protocol.c \
823 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800824
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800825BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800826endif
827
Jason Ekstrand946a9482014-04-02 19:53:47 -0500828if ENABLE_FULLSCREEN_SHELL
829
830module_LTLIBRARIES += fullscreen-shell.la
831
832fullscreen_shell_la_CPPFLAGS = \
833 -I$(top_builddir)/protocol \
834 -I$(top_srcdir)/shared \
835 -I$(top_srcdir)/src \
836 -I$(top_builddir)/src \
837 -DIN_WESTON
838
839fullscreen_shell_la_LDFLAGS = -module -avoid-version
840fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500841fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500842fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700843 fullscreen-shell/fullscreen-shell.c \
844 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500845nodist_fullscreen_shell_la_SOURCES = \
846 protocol/fullscreen-shell-protocol.c \
847 protocol/fullscreen-shell-server-protocol.h
848
849BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
850endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800851
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900852if ENABLE_IVI_SHELL
853
854module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900855 $(ivi_shell) \
856 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900857
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900858ivi_shell = ivi-shell.la
859ivi_shell_la_LDFLAGS = -module -avoid-version
860ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500861ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900862ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900863 ivi-shell/ivi-layout-export.h \
864 ivi-shell/ivi-layout-private.h \
865 ivi-shell/ivi-layout.c \
866 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900867 ivi-shell/ivi-shell.h \
868 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700869 ivi-shell/input-panel-ivi.c \
870 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900871nodist_ivi_shell_la_SOURCES = \
872 protocol/ivi-application-protocol.c \
873 protocol/ivi-application-server-protocol.h
874
875BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
876
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900877hmi_controller = hmi-controller.la
878hmi_controller_la_LDFLAGS = -module -avoid-version
879hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500880hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900881hmi_controller_la_SOURCES = \
882 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700883 ivi-shell/hmi-controller.c \
884 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900885nodist_hmi_controller_la_SOURCES = \
886 protocol/ivi-hmi-controller-protocol.c \
887 protocol/ivi-hmi-controller-server-protocol.h
888
889BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
890
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900891endif
892
893
Jason Ekstrand47928d82014-04-02 19:54:01 -0500894if ENABLE_SCREEN_SHARING
895
896module_LTLIBRARIES += screen-share.la
897
898screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
899screen_share_la_LDFLAGS = -module -avoid-version
900screen_share_la_LIBADD = \
901 $(COMPOSITOR_LIBS) \
902 $(SCREEN_SHARE_LIBS) \
903 libshared-cairo.la
904screen_share_la_CFLAGS = \
905 $(COMPOSITOR_CFLAGS) \
906 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500907 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500908screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700909 src/screen-share.c \
910 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500911nodist_screen_share_la_SOURCES = \
912 protocol/fullscreen-shell-protocol.c \
913 protocol/fullscreen-shell-client-protocol.h
914
915endif
916
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800917if ENABLE_XWAYLAND
918
919module_LTLIBRARIES += xwayland.la
920
921xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100922 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800923 -I$(top_srcdir)/shared \
924 -I$(top_srcdir)/src \
925 -I$(top_builddir)/src \
926 -I$(top_builddir)/xwayland \
927 -DDATADIR='"$(datadir)"' \
928 -DMODULEDIR='"$(moduledir)"' \
929 -DLIBEXECDIR='"$(libexecdir)"' \
930 -DXSERVER_PATH='"@XSERVER_PATH@"'
931
932xwayland_la_LDFLAGS = -module -avoid-version
933xwayland_la_LIBADD = \
934 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800935 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800936xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500937 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800938 $(COMPOSITOR_CFLAGS) \
939 $(PIXMAN_CFLAGS) \
940 $(CAIRO_CFLAGS)
941xwayland_la_SOURCES = \
942 xwayland/xwayland.h \
943 xwayland/window-manager.c \
944 xwayland/selection.c \
945 xwayland/dnd.c \
946 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800947 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700948 xwayland/hash.h \
949 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800950endif
951
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800952
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800953#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800954# Shared utilities
955#
956
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700957noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
958 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800959
Derek Foreman4ff38742015-06-18 11:43:11 -0500960libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800961
962libshared_la_SOURCES = \
963 shared/config-parser.c \
964 shared/option-parser.c \
965 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200966 shared/file-util.c \
967 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700968 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800969 shared/os-compatibility.c \
970 shared/os-compatibility.h
971
972libshared_cairo_la_CFLAGS = \
973 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -0500974 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800975 $(COMPOSITOR_CFLAGS) \
976 $(PIXMAN_CFLAGS) \
977 $(CAIRO_CFLAGS) \
978 $(PNG_CFLAGS) \
979 $(WEBP_CFLAGS)
980
981libshared_cairo_la_LIBADD = \
982 $(PIXMAN_LIBS) \
983 $(CAIRO_LIBS) \
984 $(PNG_LIBS) \
985 $(WEBP_LIBS) \
986 $(JPEG_LIBS)
987
988libshared_cairo_la_SOURCES = \
989 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700990 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800991 shared/image-loader.c \
992 shared/image-loader.h \
993 shared/cairo-util.c \
994 shared/frame.c \
995 shared/cairo-util.h
996
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700997libzunitc_la_SOURCES = \
998 tools/zunitc/inc/zunitc/zunitc.h \
999 tools/zunitc/inc/zunitc/zunitc_impl.h \
1000 tools/zunitc/src/zuc_base_logger.c \
1001 tools/zunitc/src/zuc_base_logger.h \
1002 tools/zunitc/src/zuc_collector.c \
1003 tools/zunitc/src/zuc_collector.h \
1004 tools/zunitc/src/zuc_context.h \
1005 tools/zunitc/src/zuc_event.h \
1006 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001007 tools/zunitc/src/zuc_junit_reporter.c \
1008 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001009 tools/zunitc/src/zuc_types.h \
1010 tools/zunitc/src/zunitc_impl.c \
1011 shared/helpers.h
1012
1013libzunitc_la_CFLAGS = \
1014 $(AM_CFLAGS) \
1015 -I$(top_srcdir)/tools/zunitc/inc
1016
1017libzunitc_la_LIBADD = \
1018 libshared.la
1019
Jon A. Cruz646aef52015-07-15 19:22:41 -07001020if ENABLE_JUNIT_XML
1021libzunitc_la_CFLAGS += \
1022 $(LIBXML2_CFLAGS)
1023libzunitc_la_LIBADD += \
1024 $(LIBXML2_LIBS)
1025endif
1026
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001027libzunitcmain_la_SOURCES = \
1028 tools/zunitc/src/main.c
1029
1030libzunitcmain_la_CFLAGS = \
1031 $(AM_CFLAGS) \
1032 -I$(top_srcdir)/tools/zunitc/inc
1033
1034libzunitcmain_la_LIBADD = \
1035 libzunitc.la \
1036 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001037
1038#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001039# tests subdirectory
1040#
1041
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001042TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1043
1044internal_tests = \
1045 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001046
1047shared_tests = \
1048 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001049 vertex-clip.test \
1050 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001051
1052module_tests = \
1053 surface-test.la \
1054 surface-global-test.la
1055
1056weston_tests = \
1057 bad_buffer.weston \
1058 keyboard.weston \
1059 event.weston \
1060 button.weston \
1061 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001062 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001063 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001064 subsurface.weston \
1065 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001066
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001067ivi_tests =
1068
1069$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001070
1071AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001072 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1073 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001074
1075TEST_EXTENSIONS = .la .weston
1076LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1077WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1078
1079clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001080 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001081 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001082
1083# To remove when automake 1.11 support is dropped
1084export abs_builddir
1085
1086noinst_LTLIBRARIES += \
1087 weston-test.la \
1088 $(module_tests) \
1089 libtest-runner.la \
1090 libtest-client.la
1091
1092noinst_PROGRAMS += \
1093 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001094 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001095 $(shared_tests) \
1096 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001097 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001098 matrix-test
1099
1100test_module_ldflags = \
1101 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1102
1103surface_global_test_la_SOURCES = tests/surface-global-test.c
1104surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001105surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001106
1107surface_test_la_SOURCES = tests/surface-test.c
1108surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001109surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001110
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001111weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001112weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001113weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001114weston_test_la_SOURCES = \
1115 tests/weston-test.c \
1116 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001117nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001118 protocol/weston-test-protocol.c \
1119 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001120
1121if ENABLE_EGL
1122weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1123weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1124endif
1125
1126libtest_runner_la_SOURCES = \
1127 tests/weston-test-runner.c \
1128 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001129libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001130
1131config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001132config_parser_test_LDADD = \
1133 libshared.la \
1134 $(COMPOSITOR_LIBS) \
1135 libzunitc.la \
1136 libzunitcmain.la
1137config_parser_test_CFLAGS = \
1138 $(AM_CFLAGS) \
1139 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001140
1141vertex_clip_test_SOURCES = \
1142 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001143 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001144 src/vertex-clipping.c \
1145 src/vertex-clipping.h
1146vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1147
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001148libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001149 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001150 tests/weston-test-client-helper.h
1151nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001152 protocol/weston-test-protocol.c \
1153 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001154libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001155libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001156
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001157
1158#
1159# Internal tests - tests functionality of the testsuite itself
1160#
1161
1162internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1163internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1164internal_screenshot_weston_LDADD = libtest-client.la $(CAIRO_LIBS)
1165
1166
1167#
1168# Weston Tests
1169#
1170
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001171bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001172bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001173bad_buffer_weston_LDADD = libtest-client.la
1174
1175keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001176keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001177keyboard_weston_LDADD = libtest-client.la
1178
1179event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001180event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001181event_weston_LDADD = libtest-client.la
1182
1183button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001184button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001185button_weston_LDADD = libtest-client.la
1186
Marek Chalupa5fd81402015-03-30 09:21:29 -04001187devices_weston_SOURCES = tests/devices-test.c
1188devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1189devices_weston_LDADD = libtest-client.la
1190
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001191text_weston_SOURCES = tests/text-test.c
1192nodist_text_weston_SOURCES = \
1193 protocol/text-protocol.c \
1194 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001195text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001196text_weston_LDADD = libtest-client.la
1197
1198subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001199subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001200subsurface_weston_LDADD = libtest-client.la
1201
Jon A. Cruzb09da242015-06-16 13:15:13 -07001202presentation_weston_SOURCES = \
1203 tests/presentation-test.c \
1204 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001205nodist_presentation_weston_SOURCES = \
1206 protocol/presentation_timing-protocol.c \
1207 protocol/presentation_timing-client-protocol.h
1208presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1209presentation_weston_LDADD = libtest-client.la
1210
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001211roles_weston_SOURCES = tests/roles-test.c
1212roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1213roles_weston_LDADD = libtest-client.la
1214
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001215if ENABLE_EGL
1216weston_tests += buffer-count.weston
1217buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001218buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001219buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1220endif
1221
1222if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001223weston_tests += xwayland-test.weston
1224xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001225xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001226xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001227endif
1228
1229matrix_test_SOURCES = \
1230 tests/matrix-test.c \
1231 shared/matrix.c \
1232 shared/matrix.h
1233matrix_test_CPPFLAGS = -DUNIT_TEST
1234matrix_test_LDADD = -lm -lrt
1235
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001236if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001237module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001238 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001239 ivi-layout-test.la
1240
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001241ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1242ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001243ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001244ivi_layout_internal_test_la_SOURCES = \
1245 tests/ivi_layout-internal-test.c
1246
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001247ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1248ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001249ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001250ivi_layout_test_la_SOURCES = \
1251 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001252 tests/ivi-test.h \
1253 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001254nodist_ivi_layout_test_la_SOURCES = \
1255 protocol/weston-test-protocol.c \
1256 protocol/weston-test-server-protocol.h
1257
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001258ivi_tests += \
1259 ivi-shell-app.weston
1260
1261ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1262nodist_ivi_shell_app_weston_SOURCES = \
1263 protocol/ivi-application-protocol.c \
1264 protocol/ivi-application-client-protocol.h
1265ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1266ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001267
1268noinst_PROGRAMS += ivi-layout.ivi
1269
1270ivi_layout_ivi_SOURCES = \
1271 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001272 tests/ivi-test.h \
1273 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001274nodist_ivi_layout_ivi_SOURCES = \
1275 protocol/ivi-application-protocol.c \
1276 protocol/ivi-application-client-protocol.h
1277ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1278ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001279endif
1280
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001281if BUILD_SETBACKLIGHT
1282noinst_PROGRAMS += setbacklight
1283setbacklight_SOURCES = \
1284 tests/setbacklight.c \
1285 src/libbacklight.c \
1286 src/libbacklight.h
1287setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1288setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1289endif
1290
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001291all-local: zuctest$(EXEEXT)
1292
1293noinst_PROGRAMS += zuctest$(EXEEXT)
1294
1295zuctest_LDADD = \
1296 libzunitc.la \
1297 libzunitcmain.la
1298
1299zuctest_CFLAGS = \
1300 $(AM_CFLAGS) \
1301 -I$(top_srcdir)/tools/zunitc/inc
1302
1303zuctest_SOURCES = \
1304 tools/zunitc/test/fixtures_test.c \
1305 tools/zunitc/test/zunitc_test.c
1306
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001307EXTRA_DIST += \
1308 tests/weston-tests-env \
1309 tests/internal-screenshot.ini \
1310 tests/reference/internal-screenshot-bad-00.png \
1311 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001312
1313BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001314 protocol/weston-test-protocol.c \
1315 protocol/weston-test-server-protocol.h \
1316 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001317 protocol/text-protocol.c \
1318 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001319
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001320EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001321 protocol/desktop-shell.xml \
1322 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001323 protocol/text.xml \
1324 protocol/input-method.xml \
1325 protocol/workspaces.xml \
1326 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001327 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001328 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001329 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001330 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001331 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001332 protocol/ivi-application.xml \
Pekka Paalanen23ab7152014-09-29 14:08:29 -04001333 protocol/ivi-hmi-controller.xml \
1334 protocol/linux-dmabuf.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001335
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001336#
1337# manual test modules in tests subdirectory
1338#
1339
1340noinst_LTLIBRARIES += \
1341 surface-screenshot.la
1342
1343surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1344surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001345surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001346surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1347
1348
1349#
1350# Documentation
1351#
1352
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001353man_MANS = weston.1 weston.ini.5
1354
1355if ENABLE_DRM_COMPOSITOR
1356man_MANS += weston-drm.7
1357endif
1358
1359MAN_SUBSTS = \
1360 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1361 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1362 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1363 -e 's|__version__|$(PACKAGE_VERSION)|g'
1364
1365SUFFIXES = .1 .5 .7 .man
1366
1367%.1 %.5 %.7 : man/%.man
1368 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1369
1370EXTRA_DIST += \
1371 man/weston.man \
1372 man/weston-drm.man \
1373 man/weston.ini.man
1374
1375CLEANFILES += $(man_MANS)
1376
Jon A. Cruz179c1862015-07-15 19:22:43 -07001377if ENABLE_DEVDOCS
1378DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1379
1380docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1381 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1382
1383docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1384 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1385endif
1386
1387DOCDIRS = \
1388 docs/developer \
1389 docs/tools
1390
1391$(DOCDIRS):
1392 $(MKDIR_P) $@
1393
1394.PHONY: doc $(DOXYGEN_INDICES)
1395
1396doc: $(DOXYGEN_INDICES)
1397
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001398protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1399 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001400
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001401protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1402 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001403
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001404protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1405 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@