blob: 1d66cc042b10cb72e8c0c995006ca2ee3c242d6e [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 = \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800130 src/launcher-util.c \
Jasper St. Pierre72dea062015-09-23 10:46:47 -0700131 src/launcher-util.h \
Derek Foremancb156202015-09-24 09:26:48 -0500132 src/launcher-impl.h \
Jasper St. Pierre72dea062015-09-23 10:46:47 -0700133 src/weston-launch.h \
134 src/launcher-weston-launch.c \
135 src/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500136libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800137libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
138
139if ENABLE_DBUS
140if HAVE_SYSTEMD_LOGIN
141libsession_helper_la_SOURCES += \
142 src/dbus.h \
143 src/dbus.c \
Jasper St. Pierre30bcf352015-09-23 10:46:46 -0700144 src/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800145libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
146libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
147endif
148endif
149
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800150if HAVE_GIT_REPO
151src/git-version.h : $(top_srcdir)/.git/logs/HEAD
152 $(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 -0800153else
154src/git-version.h :
155 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
156
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800157endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800158
159.FORCE :
160
161if BUILD_WESTON_LAUNCH
162bin_PROGRAMS += weston-launch
163weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
164weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
165weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500166 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800167 $(PAM_CFLAGS) \
168 $(SYSTEMD_LOGIN_CFLAGS) \
169 $(LIBDRM_CFLAGS)
170weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
171
172if ENABLE_SETUID_INSTALL
173install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700174 can_suid_files=no; \
175 chown root $(DESTDIR)$(bindir)/weston-launch \
176 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
177 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500178 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700179 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
180 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
181 false; \
182 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800183endif
184
185endif # BUILD_WESTON_LAUNCH
186
187pkgconfigdir = $(libdir)/pkgconfig
188pkgconfig_DATA = src/weston.pc
189
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100190wayland_sessiondir = $(datadir)/wayland-sessions
Ross Burton315476f2015-07-16 20:56:32 +0100191dist_wayland_session_DATA = src/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100192
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800193westonincludedir = $(includedir)/weston
194westoninclude_HEADERS = \
195 src/version.h \
196 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200197 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800198 shared/matrix.h \
199 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100200 shared/zalloc.h \
201 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800202
203if ENABLE_EGL
204module_LTLIBRARIES += gl-renderer.la
205gl_renderer_la_LDFLAGS = -module -avoid-version
206gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
207gl_renderer_la_CFLAGS = \
208 $(COMPOSITOR_CFLAGS) \
209 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300210 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500211 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800212gl_renderer_la_SOURCES = \
213 src/gl-renderer.h \
214 src/gl-renderer.c \
215 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700216 src/vertex-clipping.h \
217 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800218endif
219
220if ENABLE_X11_COMPOSITOR
221module_LTLIBRARIES += x11-backend.la
222x11_backend_la_LDFLAGS = -module -avoid-version
223x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800224 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800225x11_backend_la_CFLAGS = \
226 $(COMPOSITOR_CFLAGS) \
227 $(EGL_CFLAGS) \
228 $(PIXMAN_CFLAGS) \
229 $(CAIRO_CFLAGS) \
230 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500231 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700232x11_backend_la_SOURCES = \
233 src/compositor-x11.c \
234 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800235endif
236
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100237INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000238INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100239 src/libinput-seat.c \
240 src/libinput-seat.h \
241 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700242 src/libinput-device.h \
243 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100244
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800245if ENABLE_DRM_COMPOSITOR
246module_LTLIBRARIES += drm-backend.la
247drm_backend_la_LDFLAGS = -module -avoid-version
248drm_backend_la_LIBADD = \
249 $(COMPOSITOR_LIBS) \
250 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100251 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100252 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800253 libsession-helper.la
254drm_backend_la_CFLAGS = \
255 $(COMPOSITOR_CFLAGS) \
256 $(EGL_CFLAGS) \
257 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500258 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800259drm_backend_la_SOURCES = \
260 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100261 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700262 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200263 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800264 src/libbacklight.c \
265 src/libbacklight.h
266
267if ENABLE_VAAPI_RECORDER
268drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
269drm_backend_la_LIBADD += $(LIBVA_LIBS)
270drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
271endif
272endif
273
274if ENABLE_WAYLAND_COMPOSITOR
275module_LTLIBRARIES += wayland-backend.la
276wayland_backend_la_LDFLAGS = -module -avoid-version
277wayland_backend_la_LIBADD = \
278 $(COMPOSITOR_LIBS) \
279 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800280 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800281wayland_backend_la_CFLAGS = \
282 $(COMPOSITOR_CFLAGS) \
283 $(EGL_CFLAGS) \
284 $(PIXMAN_CFLAGS) \
285 $(CAIRO_CFLAGS) \
286 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500287 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700288wayland_backend_la_SOURCES = \
289 src/compositor-wayland.c \
290 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500291nodist_wayland_backend_la_SOURCES = \
292 protocol/fullscreen-shell-protocol.c \
293 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800294endif
295
296if ENABLE_RPI_COMPOSITOR
297if INSTALL_RPI_COMPOSITOR
298module_LTLIBRARIES += rpi-backend.la
299else
300noinst_LTLIBRARIES += rpi-backend.la
301endif
302
303rpi_backend_la_LDFLAGS = -module -avoid-version
304rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
305 $(RPI_COMPOSITOR_LIBS) \
306 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100307 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800308 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800309 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800310rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500311 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800312 $(COMPOSITOR_CFLAGS) \
313 $(RPI_COMPOSITOR_CFLAGS) \
314 $(RPI_BCM_HOST_CFLAGS)
315rpi_backend_la_SOURCES = \
316 src/compositor-rpi.c \
317 src/rpi-renderer.c \
318 src/rpi-renderer.h \
319 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700320 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100321 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800322
323if ENABLE_EGL
324rpi_backend_la_LIBADD += $(EGL_LIBS)
325rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
326endif
327
328endif
329
330if ENABLE_HEADLESS_COMPOSITOR
331module_LTLIBRARIES += headless-backend.la
332headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800333headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500334headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700335headless_backend_la_SOURCES = \
336 src/compositor-headless.c \
337 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800338endif
339
340if ENABLE_FBDEV_COMPOSITOR
341module_LTLIBRARIES += fbdev-backend.la
342fbdev_backend_la_LDFLAGS = -module -avoid-version
343fbdev_backend_la_LIBADD = \
344 $(COMPOSITOR_LIBS) \
345 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100346 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800347 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800348 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800349fbdev_backend_la_CFLAGS = \
350 $(COMPOSITOR_CFLAGS) \
351 $(EGL_CFLAGS) \
352 $(FBDEV_COMPOSITOR_CFLAGS) \
353 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500354 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800355fbdev_backend_la_SOURCES = \
356 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700357 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100358 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800359endif
360
361if ENABLE_RDP_COMPOSITOR
362module_LTLIBRARIES += rdp-backend.la
363rdp_backend_la_LDFLAGS = -module -avoid-version
364rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
365 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800366 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800367rdp_backend_la_CFLAGS = \
368 $(COMPOSITOR_CFLAGS) \
369 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500370 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700371rdp_backend_la_SOURCES = \
372 src/compositor-rdp.c \
373 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800374endif
375
376if HAVE_LCMS
377module_LTLIBRARIES += cms-static.la
378cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800379cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500380cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800381cms_static_la_SOURCES = \
382 src/cms-static.c \
383 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700384 src/cms-helper.h \
385 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800386if ENABLE_COLORD
387module_LTLIBRARIES += cms-colord.la
388cms_colord_la_LDFLAGS = -module -avoid-version
389cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500390cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800391cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100392 src/cms-colord.c \
393 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700394 src/cms-helper.h \
395 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800396endif
397endif
398
399noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500400spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800401spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
402spring_tool_SOURCES = \
403 src/spring-tool.c \
404 src/animation.c \
405 shared/matrix.c \
406 shared/matrix.h \
407 src/compositor.h
408
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800409if BUILD_CLIENTS
410
411bin_PROGRAMS += weston-terminal weston-info
412
413libexec_PROGRAMS += \
414 weston-desktop-shell \
415 weston-screenshooter \
416 weston-keyboard \
417 weston-simple-im
418
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900419if ENABLE_IVI_SHELL
420libexec_PROGRAMS += \
421 weston-ivi-shell-user-interface
422endif
423
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800424demo_clients = \
425 weston-flower \
426 weston-image \
427 weston-cliptest \
428 weston-dnd \
429 weston-smoke \
430 weston-resizor \
431 weston-eventdemo \
432 weston-clickdot \
433 weston-transformed \
434 weston-fullscreen \
435 weston-stacking \
436 weston-calibrator \
437 weston-scaler
438
439if INSTALL_DEMO_CLIENTS
440bin_PROGRAMS += $(demo_clients)
441else
442noinst_PROGRAMS += $(demo_clients)
443endif
444
445
446if BUILD_SIMPLE_CLIENTS
447demo_clients += \
448 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500449 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800450 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400451 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800452 weston-multi-resource
453
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800454weston_simple_shm_SOURCES = clients/simple-shm.c
455nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800456 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500457 protocol/xdg-shell-client-protocol.h \
458 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900459 protocol/fullscreen-shell-client-protocol.h \
460 protocol/ivi-application-protocol.c \
461 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800462weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800463weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800464
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500465weston_simple_damage_SOURCES = clients/simple-damage.c
466nodist_weston_simple_damage_SOURCES = \
467 protocol/scaler-protocol.c \
468 protocol/scaler-client-protocol.h \
469 protocol/xdg-shell-protocol.c \
470 protocol/xdg-shell-client-protocol.h \
471 protocol/fullscreen-shell-protocol.c \
472 protocol/fullscreen-shell-client-protocol.h
473weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
474weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
475
Jon A. Cruzb09da242015-06-16 13:15:13 -0700476weston_simple_touch_SOURCES = \
477 clients/simple-touch.c \
478 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800479weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800480weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800481
Jon A. Cruzb09da242015-06-16 13:15:13 -0700482weston_presentation_shm_SOURCES = \
483 clients/presentation-shm.c \
484 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400485nodist_weston_presentation_shm_SOURCES = \
486 protocol/presentation_timing-protocol.c \
487 protocol/presentation_timing-client-protocol.h
488weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
489weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
490
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800491weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800492weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000493weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800494endif
495
496if BUILD_SIMPLE_EGL_CLIENTS
497demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800498weston_simple_egl_SOURCES = clients/simple-egl.c
499nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800500 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900501 protocol/xdg-shell-client-protocol.h \
502 protocol/ivi-application-protocol.c \
503 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800504weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800505weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
506endif
507
George Kiagiadakis53868982014-06-12 16:26:49 +0200508if BUILD_SIMPLE_INTEL_DMABUF_CLIENT
509demo_clients += weston-simple-dmabuf
510weston_simple_dmabuf_SOURCES = clients/simple-dmabuf.c
511nodist_weston_simple_dmabuf_SOURCES = \
512 protocol/xdg-shell-protocol.c \
513 protocol/xdg-shell-client-protocol.h \
514 protocol/fullscreen-shell-protocol.c \
515 protocol/fullscreen-shell-client-protocol.h \
516 protocol/linux-dmabuf-protocol.c \
517 protocol/linux-dmabuf-client-protocol.h
518weston_simple_dmabuf_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_CLIENT_CFLAGS)
519weston_simple_dmabuf_LDADD = $(SIMPLE_DMABUF_CLIENT_LIBS) libshared.la
520BUILT_SOURCES += protocol/linux-dmabuf-client-protocol.h
521endif
522
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800523noinst_LTLIBRARIES += libtoytoolkit.la
524
525libtoytoolkit_la_SOURCES = \
526 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700527 clients/window.h \
528 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800529
530nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100531 protocol/text-cursor-position-protocol.c \
532 protocol/text-cursor-position-client-protocol.h \
533 protocol/scaler-protocol.c \
534 protocol/scaler-client-protocol.h \
535 protocol/workspaces-protocol.c \
536 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400537 protocol/presentation_timing-protocol.c \
538 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100539 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900540 protocol/xdg-shell-client-protocol.h \
541 protocol/ivi-application-protocol.c \
542 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500543
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800544BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
545
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800546
547libtoytoolkit_la_LIBADD = \
548 $(CLIENT_LIBS) \
549 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800550 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800551libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800552
553weston_flower_SOURCES = clients/flower.c
554weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800555weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800556
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100557weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800558 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800559nodist_weston_screenshooter_SOURCES = \
560 protocol/screenshooter-protocol.c \
561 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800562weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800563weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800564
Jon A. Cruzb09da242015-06-16 13:15:13 -0700565weston_terminal_SOURCES = \
566 clients/terminal.c \
567 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800568weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800569weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800570
571weston_image_SOURCES = clients/image.c
572weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800573weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800574
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300575weston_cliptest_SOURCES = \
576 clients/cliptest.c \
577 src/vertex-clipping.c \
578 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800579weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800580weston_cliptest_LDADD = libtoytoolkit.la
581
Jon A. Cruzb09da242015-06-16 13:15:13 -0700582weston_dnd_SOURCES = \
583 clients/dnd.c \
584 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800585weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800586weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800587
588weston_smoke_SOURCES = clients/smoke.c
589weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800590weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800591
592weston_resizor_SOURCES = clients/resizor.c
593weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800594weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800595
596weston_scaler_SOURCES = clients/scaler.c
597weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800598weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800599
600if HAVE_CAIRO_GLESV2
601demo_clients += weston-nested weston-nested-client
602
Jon A. Cruzb09da242015-06-16 13:15:13 -0700603weston_nested_SOURCES = \
604 clients/nested.c \
605 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800606weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800607weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800608
609weston_nested_client_SOURCES = clients/nested-client.c
610weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800611weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800612endif
613
Jon A. Cruzb09da242015-06-16 13:15:13 -0700614weston_eventdemo_SOURCES = \
615 clients/eventdemo.c \
616 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800617weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800618weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800619
Jon A. Cruzb09da242015-06-16 13:15:13 -0700620weston_clickdot_SOURCES = \
621 clients/clickdot.c \
622 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800623weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800624weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800625
626weston_transformed_SOURCES = clients/transformed.c
627weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800628weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800629
630weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500631nodist_weston_fullscreen_SOURCES = \
632 protocol/fullscreen-shell-protocol.c \
633 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800634weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800635weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800636
Jon A. Cruzb09da242015-06-16 13:15:13 -0700637weston_stacking_SOURCES = \
638 clients/stacking.c \
639 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800640weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800641weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800642
Jon A. Cruzb09da242015-06-16 13:15:13 -0700643weston_calibrator_SOURCES = \
644 clients/calibrator.c \
645 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800646 shared/matrix.c \
647 shared/matrix.h
648weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800649weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800650
651if BUILD_SUBSURFACES_CLIENT
652demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700653weston_subsurfaces_SOURCES = \
654 clients/subsurfaces.c \
655 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800656weston_subsurfaces_CFLAGS = \
657 $(AM_CFLAGS) \
658 $(SIMPLE_EGL_CLIENT_CFLAGS) \
659 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800660weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
661endif
662
663if HAVE_PANGO
664demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700665weston_editor_SOURCES = \
666 clients/editor.c \
667 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800668nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100669 protocol/text-protocol.c \
670 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800671weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800672weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800673endif
674
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800675weston_keyboard_SOURCES = clients/keyboard.c
676nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100677 protocol/desktop-shell-client-protocol.h \
678 protocol/desktop-shell-protocol.c \
679 protocol/input-method-protocol.c \
680 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800681weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800682weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800683
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800684weston_simple_im_SOURCES = clients/weston-simple-im.c
685nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100686 protocol/input-method-protocol.c \
687 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800688weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800689weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800690
Jon A. Cruzb09da242015-06-16 13:15:13 -0700691weston_info_SOURCES = \
692 clients/weston-info.c \
693 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400694nodist_weston_info_SOURCES = \
695 protocol/presentation_timing-protocol.c \
696 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800697weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200698weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800699
Jon A. Cruzb09da242015-06-16 13:15:13 -0700700weston_desktop_shell_SOURCES = \
701 clients/desktop-shell.c \
702 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800703nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100704 protocol/desktop-shell-client-protocol.h \
705 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800706weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800707weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800708
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900709if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700710weston_ivi_shell_user_interface_SOURCES = \
711 clients/ivi-shell-user-interface.c \
712 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900713nodist_weston_ivi_shell_user_interface_SOURCES = \
714 protocol/ivi-hmi-controller-client-protocol.h \
715 protocol/ivi-hmi-controller-protocol.c \
716 protocol/ivi-application-client-protocol.h \
717 protocol/ivi-application-protocol.c
718weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
719weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
720endif
721
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800722if BUILD_FULL_GL_CLIENTS
723demo_clients += weston-gears
724weston_gears_SOURCES = clients/gears.c
725weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800726weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800727endif
728
729endif
730
731BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100732 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800733 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100734 protocol/text-cursor-position-client-protocol.h \
735 protocol/text-cursor-position-protocol.c \
736 protocol/text-protocol.c \
737 protocol/text-client-protocol.h \
738 protocol/input-method-protocol.c \
739 protocol/input-method-client-protocol.h \
740 protocol/desktop-shell-client-protocol.h \
741 protocol/desktop-shell-protocol.c \
742 protocol/scaler-client-protocol.h \
743 protocol/scaler-protocol.c \
744 protocol/workspaces-client-protocol.h \
745 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500746 protocol/fullscreen-shell-protocol.c \
747 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100748 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900749 protocol/xdg-shell-client-protocol.h \
750 protocol/ivi-hmi-controller-protocol.c \
751 protocol/ivi-hmi-controller-client-protocol.h \
752 protocol/ivi-application-protocol.c \
753 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800754
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800755westondatadir = $(datadir)/weston
756dist_westondata_DATA = \
757 data/wayland.svg \
758 data/wayland.png \
759 data/pattern.png \
760 data/terminal.png \
761 data/border.png \
762 data/icon_window.png \
763 data/sign_close.png \
764 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100765 data/sign_minimize.png
766
767if ENABLE_IVI_SHELL
768dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900769 data/background.png \
770 data/tiling.png \
771 data/fullscreen.png \
772 data/panel.png \
773 data/random.png \
774 data/sidebyside.png \
775 data/home.png \
776 data/icon_ivi_clickdot.png \
777 data/icon_ivi_flower.png \
778 data/icon_ivi_simple-egl.png \
779 data/icon_ivi_simple-shm.png \
780 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100781endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800782
783
784if BUILD_WCAP_TOOLS
785bin_PROGRAMS += wcap-decode
786
787wcap_decode_SOURCES = \
788 wcap/main.c \
789 wcap/wcap-decode.c \
790 wcap/wcap-decode.h
791
Derek Foreman4ff38742015-06-18 11:43:11 -0500792wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800793wcap_decode_LDADD = $(WCAP_LIBS)
794endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800795
796
797if ENABLE_DESKTOP_SHELL
798
799module_LTLIBRARIES += desktop-shell.la
800
801desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100802 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800803 -I$(top_srcdir)/shared \
804 -I$(top_srcdir)/src \
805 -I$(top_builddir)/src \
806 -I$(top_builddir)/desktop-shell \
807 -DDATADIR='"$(datadir)"' \
808 -DMODULEDIR='"$(moduledir)"' \
809 -DLIBEXECDIR='"$(libexecdir)"' \
810 -DIN_WESTON
811
812desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800813desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500814desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800815desktop_shell_la_SOURCES = \
816 desktop-shell/shell.h \
817 desktop-shell/shell.c \
818 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700819 desktop-shell/input-panel.c \
820 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800821nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100822 protocol/desktop-shell-protocol.c \
823 protocol/desktop-shell-server-protocol.h \
824 protocol/xdg-shell-protocol.c \
825 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800826
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800827BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800828endif
829
Jason Ekstrand946a9482014-04-02 19:53:47 -0500830if ENABLE_FULLSCREEN_SHELL
831
832module_LTLIBRARIES += fullscreen-shell.la
833
834fullscreen_shell_la_CPPFLAGS = \
835 -I$(top_builddir)/protocol \
836 -I$(top_srcdir)/shared \
837 -I$(top_srcdir)/src \
838 -I$(top_builddir)/src \
839 -DIN_WESTON
840
841fullscreen_shell_la_LDFLAGS = -module -avoid-version
842fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500843fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500844fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700845 fullscreen-shell/fullscreen-shell.c \
846 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500847nodist_fullscreen_shell_la_SOURCES = \
848 protocol/fullscreen-shell-protocol.c \
849 protocol/fullscreen-shell-server-protocol.h
850
851BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
852endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800853
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900854if ENABLE_IVI_SHELL
855
856module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900857 $(ivi_shell) \
858 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900859
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900860ivi_shell = ivi-shell.la
861ivi_shell_la_LDFLAGS = -module -avoid-version
862ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500863ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900864ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900865 ivi-shell/ivi-layout-export.h \
866 ivi-shell/ivi-layout-private.h \
867 ivi-shell/ivi-layout.c \
868 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900869 ivi-shell/ivi-shell.h \
870 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700871 ivi-shell/input-panel-ivi.c \
872 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900873nodist_ivi_shell_la_SOURCES = \
874 protocol/ivi-application-protocol.c \
875 protocol/ivi-application-server-protocol.h
876
877BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
878
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900879hmi_controller = hmi-controller.la
880hmi_controller_la_LDFLAGS = -module -avoid-version
881hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500882hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900883hmi_controller_la_SOURCES = \
884 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700885 ivi-shell/hmi-controller.c \
886 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900887nodist_hmi_controller_la_SOURCES = \
888 protocol/ivi-hmi-controller-protocol.c \
889 protocol/ivi-hmi-controller-server-protocol.h
890
891BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
892
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900893endif
894
895
Jason Ekstrand47928d82014-04-02 19:54:01 -0500896if ENABLE_SCREEN_SHARING
897
898module_LTLIBRARIES += screen-share.la
899
900screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
901screen_share_la_LDFLAGS = -module -avoid-version
902screen_share_la_LIBADD = \
903 $(COMPOSITOR_LIBS) \
904 $(SCREEN_SHARE_LIBS) \
905 libshared-cairo.la
906screen_share_la_CFLAGS = \
907 $(COMPOSITOR_CFLAGS) \
908 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500909 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500910screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700911 src/screen-share.c \
912 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500913nodist_screen_share_la_SOURCES = \
914 protocol/fullscreen-shell-protocol.c \
915 protocol/fullscreen-shell-client-protocol.h
916
917endif
918
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800919if ENABLE_XWAYLAND
920
921module_LTLIBRARIES += xwayland.la
922
923xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100924 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800925 -I$(top_srcdir)/shared \
926 -I$(top_srcdir)/src \
927 -I$(top_builddir)/src \
928 -I$(top_builddir)/xwayland \
929 -DDATADIR='"$(datadir)"' \
930 -DMODULEDIR='"$(moduledir)"' \
931 -DLIBEXECDIR='"$(libexecdir)"' \
932 -DXSERVER_PATH='"@XSERVER_PATH@"'
933
934xwayland_la_LDFLAGS = -module -avoid-version
935xwayland_la_LIBADD = \
936 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800937 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800938xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500939 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800940 $(COMPOSITOR_CFLAGS) \
941 $(PIXMAN_CFLAGS) \
942 $(CAIRO_CFLAGS)
943xwayland_la_SOURCES = \
944 xwayland/xwayland.h \
945 xwayland/window-manager.c \
946 xwayland/selection.c \
947 xwayland/dnd.c \
948 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800949 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700950 xwayland/hash.h \
951 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800952endif
953
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800954
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800955#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800956# Shared utilities
957#
958
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700959noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
960 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800961
Derek Foreman4ff38742015-06-18 11:43:11 -0500962libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800963
964libshared_la_SOURCES = \
965 shared/config-parser.c \
966 shared/option-parser.c \
967 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200968 shared/file-util.c \
969 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700970 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800971 shared/os-compatibility.c \
972 shared/os-compatibility.h
973
974libshared_cairo_la_CFLAGS = \
975 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -0500976 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800977 $(COMPOSITOR_CFLAGS) \
978 $(PIXMAN_CFLAGS) \
979 $(CAIRO_CFLAGS) \
980 $(PNG_CFLAGS) \
981 $(WEBP_CFLAGS)
982
983libshared_cairo_la_LIBADD = \
984 $(PIXMAN_LIBS) \
985 $(CAIRO_LIBS) \
986 $(PNG_LIBS) \
987 $(WEBP_LIBS) \
988 $(JPEG_LIBS)
989
990libshared_cairo_la_SOURCES = \
991 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700992 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800993 shared/image-loader.c \
994 shared/image-loader.h \
995 shared/cairo-util.c \
996 shared/frame.c \
997 shared/cairo-util.h
998
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700999libzunitc_la_SOURCES = \
1000 tools/zunitc/inc/zunitc/zunitc.h \
1001 tools/zunitc/inc/zunitc/zunitc_impl.h \
1002 tools/zunitc/src/zuc_base_logger.c \
1003 tools/zunitc/src/zuc_base_logger.h \
1004 tools/zunitc/src/zuc_collector.c \
1005 tools/zunitc/src/zuc_collector.h \
1006 tools/zunitc/src/zuc_context.h \
1007 tools/zunitc/src/zuc_event.h \
1008 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001009 tools/zunitc/src/zuc_junit_reporter.c \
1010 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001011 tools/zunitc/src/zuc_types.h \
1012 tools/zunitc/src/zunitc_impl.c \
1013 shared/helpers.h
1014
1015libzunitc_la_CFLAGS = \
1016 $(AM_CFLAGS) \
1017 -I$(top_srcdir)/tools/zunitc/inc
1018
1019libzunitc_la_LIBADD = \
1020 libshared.la
1021
Jon A. Cruz646aef52015-07-15 19:22:41 -07001022if ENABLE_JUNIT_XML
1023libzunitc_la_CFLAGS += \
1024 $(LIBXML2_CFLAGS)
1025libzunitc_la_LIBADD += \
1026 $(LIBXML2_LIBS)
1027endif
1028
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001029libzunitcmain_la_SOURCES = \
1030 tools/zunitc/src/main.c
1031
1032libzunitcmain_la_CFLAGS = \
1033 $(AM_CFLAGS) \
1034 -I$(top_srcdir)/tools/zunitc/inc
1035
1036libzunitcmain_la_LIBADD = \
1037 libzunitc.la \
1038 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001039
1040#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001041# tests subdirectory
1042#
1043
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001044TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1045
1046internal_tests = \
1047 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001048
1049shared_tests = \
1050 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001051 vertex-clip.test \
1052 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001053
1054module_tests = \
1055 surface-test.la \
1056 surface-global-test.la
1057
1058weston_tests = \
1059 bad_buffer.weston \
1060 keyboard.weston \
1061 event.weston \
1062 button.weston \
1063 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001064 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001065 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001066 subsurface.weston \
1067 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001068
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001069ivi_tests =
1070
1071$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001072
1073AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001074 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1075 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001076
1077TEST_EXTENSIONS = .la .weston
1078LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1079WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1080
1081clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001082 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001083 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001084
1085# To remove when automake 1.11 support is dropped
1086export abs_builddir
1087
1088noinst_LTLIBRARIES += \
1089 weston-test.la \
1090 $(module_tests) \
1091 libtest-runner.la \
1092 libtest-client.la
1093
1094noinst_PROGRAMS += \
1095 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001096 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001097 $(shared_tests) \
1098 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001099 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001100 matrix-test
1101
1102test_module_ldflags = \
1103 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1104
1105surface_global_test_la_SOURCES = tests/surface-global-test.c
1106surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001107surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001108
1109surface_test_la_SOURCES = tests/surface-test.c
1110surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001111surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001112
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001113weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001114weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001115weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001116weston_test_la_SOURCES = \
1117 tests/weston-test.c \
1118 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001119nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001120 protocol/weston-test-protocol.c \
1121 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001122
1123if ENABLE_EGL
1124weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1125weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1126endif
1127
1128libtest_runner_la_SOURCES = \
1129 tests/weston-test-runner.c \
1130 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001131libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001132
1133config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001134config_parser_test_LDADD = \
1135 libshared.la \
1136 $(COMPOSITOR_LIBS) \
1137 libzunitc.la \
1138 libzunitcmain.la
1139config_parser_test_CFLAGS = \
1140 $(AM_CFLAGS) \
1141 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001142
1143vertex_clip_test_SOURCES = \
1144 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001145 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001146 src/vertex-clipping.c \
1147 src/vertex-clipping.h
1148vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1149
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001150libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001151 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001152 tests/weston-test-client-helper.h
1153nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001154 protocol/weston-test-protocol.c \
1155 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001156libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001157libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001158
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001159
1160#
1161# Internal tests - tests functionality of the testsuite itself
1162#
1163
1164internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1165internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1166internal_screenshot_weston_LDADD = libtest-client.la $(CAIRO_LIBS)
1167
1168
1169#
1170# Weston Tests
1171#
1172
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001173bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001174bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001175bad_buffer_weston_LDADD = libtest-client.la
1176
1177keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001178keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001179keyboard_weston_LDADD = libtest-client.la
1180
1181event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001182event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001183event_weston_LDADD = libtest-client.la
1184
1185button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001186button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001187button_weston_LDADD = libtest-client.la
1188
Marek Chalupa5fd81402015-03-30 09:21:29 -04001189devices_weston_SOURCES = tests/devices-test.c
1190devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1191devices_weston_LDADD = libtest-client.la
1192
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001193text_weston_SOURCES = tests/text-test.c
1194nodist_text_weston_SOURCES = \
1195 protocol/text-protocol.c \
1196 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001197text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001198text_weston_LDADD = libtest-client.la
1199
1200subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001201subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001202subsurface_weston_LDADD = libtest-client.la
1203
Jon A. Cruzb09da242015-06-16 13:15:13 -07001204presentation_weston_SOURCES = \
1205 tests/presentation-test.c \
1206 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001207nodist_presentation_weston_SOURCES = \
1208 protocol/presentation_timing-protocol.c \
1209 protocol/presentation_timing-client-protocol.h
1210presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1211presentation_weston_LDADD = libtest-client.la
1212
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001213roles_weston_SOURCES = tests/roles-test.c
1214roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1215roles_weston_LDADD = libtest-client.la
1216
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001217if ENABLE_EGL
1218weston_tests += buffer-count.weston
1219buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001220buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001221buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1222endif
1223
1224if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001225weston_tests += xwayland-test.weston
1226xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001227xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001228xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001229endif
1230
1231matrix_test_SOURCES = \
1232 tests/matrix-test.c \
1233 shared/matrix.c \
1234 shared/matrix.h
1235matrix_test_CPPFLAGS = -DUNIT_TEST
1236matrix_test_LDADD = -lm -lrt
1237
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001238if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001239module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001240 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001241 ivi-layout-test.la
1242
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001243ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1244ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001245ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001246ivi_layout_internal_test_la_SOURCES = \
1247 tests/ivi_layout-internal-test.c
1248
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001249ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1250ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001251ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001252ivi_layout_test_la_SOURCES = \
1253 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001254 tests/ivi-test.h \
1255 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001256nodist_ivi_layout_test_la_SOURCES = \
1257 protocol/weston-test-protocol.c \
1258 protocol/weston-test-server-protocol.h
1259
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001260ivi_tests += \
1261 ivi-shell-app.weston
1262
1263ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1264nodist_ivi_shell_app_weston_SOURCES = \
1265 protocol/ivi-application-protocol.c \
1266 protocol/ivi-application-client-protocol.h
1267ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1268ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001269
1270noinst_PROGRAMS += ivi-layout.ivi
1271
1272ivi_layout_ivi_SOURCES = \
1273 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001274 tests/ivi-test.h \
1275 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001276nodist_ivi_layout_ivi_SOURCES = \
1277 protocol/ivi-application-protocol.c \
1278 protocol/ivi-application-client-protocol.h
1279ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1280ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001281endif
1282
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001283if BUILD_SETBACKLIGHT
1284noinst_PROGRAMS += setbacklight
1285setbacklight_SOURCES = \
1286 tests/setbacklight.c \
1287 src/libbacklight.c \
1288 src/libbacklight.h
1289setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1290setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1291endif
1292
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001293all-local: zuctest$(EXEEXT)
1294
1295noinst_PROGRAMS += zuctest$(EXEEXT)
1296
1297zuctest_LDADD = \
1298 libzunitc.la \
1299 libzunitcmain.la
1300
1301zuctest_CFLAGS = \
1302 $(AM_CFLAGS) \
1303 -I$(top_srcdir)/tools/zunitc/inc
1304
1305zuctest_SOURCES = \
1306 tools/zunitc/test/fixtures_test.c \
1307 tools/zunitc/test/zunitc_test.c
1308
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001309EXTRA_DIST += \
1310 tests/weston-tests-env \
1311 tests/internal-screenshot.ini \
1312 tests/reference/internal-screenshot-bad-00.png \
1313 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001314
1315BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001316 protocol/weston-test-protocol.c \
1317 protocol/weston-test-server-protocol.h \
1318 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001319 protocol/text-protocol.c \
1320 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001321
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001322EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001323 protocol/desktop-shell.xml \
1324 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001325 protocol/text.xml \
1326 protocol/input-method.xml \
1327 protocol/workspaces.xml \
1328 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001329 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001330 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001331 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001332 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001333 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001334 protocol/ivi-application.xml \
Pekka Paalanen23ab7152014-09-29 14:08:29 -04001335 protocol/ivi-hmi-controller.xml \
1336 protocol/linux-dmabuf.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001337
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001338#
1339# manual test modules in tests subdirectory
1340#
1341
1342noinst_LTLIBRARIES += \
1343 surface-screenshot.la
1344
1345surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1346surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001347surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001348surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1349
1350
1351#
1352# Documentation
1353#
1354
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001355man_MANS = weston.1 weston.ini.5
1356
1357if ENABLE_DRM_COMPOSITOR
1358man_MANS += weston-drm.7
1359endif
1360
1361MAN_SUBSTS = \
1362 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1363 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1364 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1365 -e 's|__version__|$(PACKAGE_VERSION)|g'
1366
1367SUFFIXES = .1 .5 .7 .man
1368
1369%.1 %.5 %.7 : man/%.man
1370 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1371
1372EXTRA_DIST += \
1373 man/weston.man \
1374 man/weston-drm.man \
1375 man/weston.ini.man
1376
1377CLEANFILES += $(man_MANS)
1378
Jon A. Cruz179c1862015-07-15 19:22:43 -07001379if ENABLE_DEVDOCS
1380DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1381
1382docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1383 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1384
1385docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1386 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1387endif
1388
1389DOCDIRS = \
1390 docs/developer \
1391 docs/tools
1392
1393$(DOCDIRS):
1394 $(MKDIR_P) $@
1395
1396.PHONY: doc $(DOXYGEN_INDICES)
1397
1398doc: $(DOXYGEN_INDICES)
1399
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001400protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1401 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001402
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001403protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1404 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001405
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001406protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1407 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@