blob: 9c1cf25851fccad38d944f4cca5902ed386afdc7 [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) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500208 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800209gl_renderer_la_SOURCES = \
210 src/gl-renderer.h \
211 src/gl-renderer.c \
212 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700213 src/vertex-clipping.h \
214 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800215endif
216
217if ENABLE_X11_COMPOSITOR
218module_LTLIBRARIES += x11-backend.la
219x11_backend_la_LDFLAGS = -module -avoid-version
220x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800221 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800222x11_backend_la_CFLAGS = \
223 $(COMPOSITOR_CFLAGS) \
224 $(EGL_CFLAGS) \
225 $(PIXMAN_CFLAGS) \
226 $(CAIRO_CFLAGS) \
227 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500228 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700229x11_backend_la_SOURCES = \
230 src/compositor-x11.c \
231 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800232endif
233
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100234INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000235INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100236 src/libinput-seat.c \
237 src/libinput-seat.h \
238 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700239 src/libinput-device.h \
240 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100241
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800242if ENABLE_DRM_COMPOSITOR
243module_LTLIBRARIES += drm-backend.la
244drm_backend_la_LDFLAGS = -module -avoid-version
245drm_backend_la_LIBADD = \
246 $(COMPOSITOR_LIBS) \
247 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100248 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100249 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800250 libsession-helper.la
251drm_backend_la_CFLAGS = \
252 $(COMPOSITOR_CFLAGS) \
253 $(EGL_CFLAGS) \
254 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500255 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800256drm_backend_la_SOURCES = \
257 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100258 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700259 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200260 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800261 src/libbacklight.c \
262 src/libbacklight.h
263
264if ENABLE_VAAPI_RECORDER
265drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
266drm_backend_la_LIBADD += $(LIBVA_LIBS)
267drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
268endif
269endif
270
271if ENABLE_WAYLAND_COMPOSITOR
272module_LTLIBRARIES += wayland-backend.la
273wayland_backend_la_LDFLAGS = -module -avoid-version
274wayland_backend_la_LIBADD = \
275 $(COMPOSITOR_LIBS) \
276 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800277 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800278wayland_backend_la_CFLAGS = \
279 $(COMPOSITOR_CFLAGS) \
280 $(EGL_CFLAGS) \
281 $(PIXMAN_CFLAGS) \
282 $(CAIRO_CFLAGS) \
283 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500284 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700285wayland_backend_la_SOURCES = \
286 src/compositor-wayland.c \
287 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500288nodist_wayland_backend_la_SOURCES = \
289 protocol/fullscreen-shell-protocol.c \
290 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800291endif
292
293if ENABLE_RPI_COMPOSITOR
294if INSTALL_RPI_COMPOSITOR
295module_LTLIBRARIES += rpi-backend.la
296else
297noinst_LTLIBRARIES += rpi-backend.la
298endif
299
300rpi_backend_la_LDFLAGS = -module -avoid-version
301rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
302 $(RPI_COMPOSITOR_LIBS) \
303 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100304 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800305 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800306 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800307rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500308 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800309 $(COMPOSITOR_CFLAGS) \
310 $(RPI_COMPOSITOR_CFLAGS) \
311 $(RPI_BCM_HOST_CFLAGS)
312rpi_backend_la_SOURCES = \
313 src/compositor-rpi.c \
314 src/rpi-renderer.c \
315 src/rpi-renderer.h \
316 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700317 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100318 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800319
320if ENABLE_EGL
321rpi_backend_la_LIBADD += $(EGL_LIBS)
322rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
323endif
324
325endif
326
327if ENABLE_HEADLESS_COMPOSITOR
328module_LTLIBRARIES += headless-backend.la
329headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800330headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500331headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700332headless_backend_la_SOURCES = \
333 src/compositor-headless.c \
334 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800335endif
336
337if ENABLE_FBDEV_COMPOSITOR
338module_LTLIBRARIES += fbdev-backend.la
339fbdev_backend_la_LDFLAGS = -module -avoid-version
340fbdev_backend_la_LIBADD = \
341 $(COMPOSITOR_LIBS) \
342 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100343 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800344 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800345 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800346fbdev_backend_la_CFLAGS = \
347 $(COMPOSITOR_CFLAGS) \
348 $(EGL_CFLAGS) \
349 $(FBDEV_COMPOSITOR_CFLAGS) \
350 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500351 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800352fbdev_backend_la_SOURCES = \
353 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700354 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100355 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800356endif
357
358if ENABLE_RDP_COMPOSITOR
359module_LTLIBRARIES += rdp-backend.la
360rdp_backend_la_LDFLAGS = -module -avoid-version
361rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
362 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800363 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800364rdp_backend_la_CFLAGS = \
365 $(COMPOSITOR_CFLAGS) \
366 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500367 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700368rdp_backend_la_SOURCES = \
369 src/compositor-rdp.c \
370 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800371endif
372
373if HAVE_LCMS
374module_LTLIBRARIES += cms-static.la
375cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800376cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500377cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800378cms_static_la_SOURCES = \
379 src/cms-static.c \
380 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700381 src/cms-helper.h \
382 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800383if ENABLE_COLORD
384module_LTLIBRARIES += cms-colord.la
385cms_colord_la_LDFLAGS = -module -avoid-version
386cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500387cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800388cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100389 src/cms-colord.c \
390 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700391 src/cms-helper.h \
392 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800393endif
394endif
395
396noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500397spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800398spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
399spring_tool_SOURCES = \
400 src/spring-tool.c \
401 src/animation.c \
402 shared/matrix.c \
403 shared/matrix.h \
404 src/compositor.h
405
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800406if BUILD_CLIENTS
407
408bin_PROGRAMS += weston-terminal weston-info
409
410libexec_PROGRAMS += \
411 weston-desktop-shell \
412 weston-screenshooter \
413 weston-keyboard \
414 weston-simple-im
415
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900416if ENABLE_IVI_SHELL
417libexec_PROGRAMS += \
418 weston-ivi-shell-user-interface
419endif
420
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800421demo_clients = \
422 weston-flower \
423 weston-image \
424 weston-cliptest \
425 weston-dnd \
426 weston-smoke \
427 weston-resizor \
428 weston-eventdemo \
429 weston-clickdot \
430 weston-transformed \
431 weston-fullscreen \
432 weston-stacking \
433 weston-calibrator \
434 weston-scaler
435
436if INSTALL_DEMO_CLIENTS
437bin_PROGRAMS += $(demo_clients)
438else
439noinst_PROGRAMS += $(demo_clients)
440endif
441
442
443if BUILD_SIMPLE_CLIENTS
444demo_clients += \
445 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500446 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800447 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400448 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800449 weston-multi-resource
450
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800451weston_simple_shm_SOURCES = clients/simple-shm.c
452nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800453 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500454 protocol/xdg-shell-client-protocol.h \
455 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900456 protocol/fullscreen-shell-client-protocol.h \
457 protocol/ivi-application-protocol.c \
458 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800459weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800460weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800461
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500462weston_simple_damage_SOURCES = clients/simple-damage.c
463nodist_weston_simple_damage_SOURCES = \
464 protocol/scaler-protocol.c \
465 protocol/scaler-client-protocol.h \
466 protocol/xdg-shell-protocol.c \
467 protocol/xdg-shell-client-protocol.h \
468 protocol/fullscreen-shell-protocol.c \
469 protocol/fullscreen-shell-client-protocol.h
470weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
471weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
472
Jon A. Cruzb09da242015-06-16 13:15:13 -0700473weston_simple_touch_SOURCES = \
474 clients/simple-touch.c \
475 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800476weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800477weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800478
Jon A. Cruzb09da242015-06-16 13:15:13 -0700479weston_presentation_shm_SOURCES = \
480 clients/presentation-shm.c \
481 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400482nodist_weston_presentation_shm_SOURCES = \
483 protocol/presentation_timing-protocol.c \
484 protocol/presentation_timing-client-protocol.h
485weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
486weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
487
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800488weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800489weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000490weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800491endif
492
493if BUILD_SIMPLE_EGL_CLIENTS
494demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800495weston_simple_egl_SOURCES = clients/simple-egl.c
496nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800497 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900498 protocol/xdg-shell-client-protocol.h \
499 protocol/ivi-application-protocol.c \
500 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800501weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800502weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
503endif
504
505noinst_LTLIBRARIES += libtoytoolkit.la
506
507libtoytoolkit_la_SOURCES = \
508 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700509 clients/window.h \
510 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800511
512nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100513 protocol/text-cursor-position-protocol.c \
514 protocol/text-cursor-position-client-protocol.h \
515 protocol/scaler-protocol.c \
516 protocol/scaler-client-protocol.h \
517 protocol/workspaces-protocol.c \
518 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400519 protocol/presentation_timing-protocol.c \
520 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100521 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900522 protocol/xdg-shell-client-protocol.h \
523 protocol/ivi-application-protocol.c \
524 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500525
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800526BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
527
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800528
529libtoytoolkit_la_LIBADD = \
530 $(CLIENT_LIBS) \
531 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800532 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800533libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800534
535weston_flower_SOURCES = clients/flower.c
536weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800537weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800538
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100539weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800540 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800541nodist_weston_screenshooter_SOURCES = \
542 protocol/screenshooter-protocol.c \
543 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800544weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800545weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800546
Jon A. Cruzb09da242015-06-16 13:15:13 -0700547weston_terminal_SOURCES = \
548 clients/terminal.c \
549 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800550weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800551weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800552
553weston_image_SOURCES = clients/image.c
554weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800555weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800556
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300557weston_cliptest_SOURCES = \
558 clients/cliptest.c \
559 src/vertex-clipping.c \
560 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800561weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800562weston_cliptest_LDADD = libtoytoolkit.la
563
Jon A. Cruzb09da242015-06-16 13:15:13 -0700564weston_dnd_SOURCES = \
565 clients/dnd.c \
566 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800567weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800568weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800569
570weston_smoke_SOURCES = clients/smoke.c
571weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800572weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800573
574weston_resizor_SOURCES = clients/resizor.c
575weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800576weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800577
578weston_scaler_SOURCES = clients/scaler.c
579weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800580weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800581
582if HAVE_CAIRO_GLESV2
583demo_clients += weston-nested weston-nested-client
584
Jon A. Cruzb09da242015-06-16 13:15:13 -0700585weston_nested_SOURCES = \
586 clients/nested.c \
587 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800588weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800589weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800590
591weston_nested_client_SOURCES = clients/nested-client.c
592weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800593weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800594endif
595
Jon A. Cruzb09da242015-06-16 13:15:13 -0700596weston_eventdemo_SOURCES = \
597 clients/eventdemo.c \
598 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800599weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800600weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800601
Jon A. Cruzb09da242015-06-16 13:15:13 -0700602weston_clickdot_SOURCES = \
603 clients/clickdot.c \
604 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800605weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800606weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800607
608weston_transformed_SOURCES = clients/transformed.c
609weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800610weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800611
612weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500613nodist_weston_fullscreen_SOURCES = \
614 protocol/fullscreen-shell-protocol.c \
615 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800616weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800617weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800618
Jon A. Cruzb09da242015-06-16 13:15:13 -0700619weston_stacking_SOURCES = \
620 clients/stacking.c \
621 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800622weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800623weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800624
Jon A. Cruzb09da242015-06-16 13:15:13 -0700625weston_calibrator_SOURCES = \
626 clients/calibrator.c \
627 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800628 shared/matrix.c \
629 shared/matrix.h
630weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800631weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800632
633if BUILD_SUBSURFACES_CLIENT
634demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700635weston_subsurfaces_SOURCES = \
636 clients/subsurfaces.c \
637 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800638weston_subsurfaces_CFLAGS = \
639 $(AM_CFLAGS) \
640 $(SIMPLE_EGL_CLIENT_CFLAGS) \
641 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800642weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
643endif
644
645if HAVE_PANGO
646demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700647weston_editor_SOURCES = \
648 clients/editor.c \
649 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800650nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100651 protocol/text-protocol.c \
652 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800653weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800654weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800655endif
656
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800657weston_keyboard_SOURCES = clients/keyboard.c
658nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100659 protocol/desktop-shell-client-protocol.h \
660 protocol/desktop-shell-protocol.c \
661 protocol/input-method-protocol.c \
662 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800663weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800664weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800665
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800666weston_simple_im_SOURCES = clients/weston-simple-im.c
667nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100668 protocol/input-method-protocol.c \
669 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800670weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800671weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800672
Jon A. Cruzb09da242015-06-16 13:15:13 -0700673weston_info_SOURCES = \
674 clients/weston-info.c \
675 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400676nodist_weston_info_SOURCES = \
677 protocol/presentation_timing-protocol.c \
678 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800679weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200680weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800681
Jon A. Cruzb09da242015-06-16 13:15:13 -0700682weston_desktop_shell_SOURCES = \
683 clients/desktop-shell.c \
684 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800685nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100686 protocol/desktop-shell-client-protocol.h \
687 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800688weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800689weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800690
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900691if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700692weston_ivi_shell_user_interface_SOURCES = \
693 clients/ivi-shell-user-interface.c \
694 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900695nodist_weston_ivi_shell_user_interface_SOURCES = \
696 protocol/ivi-hmi-controller-client-protocol.h \
697 protocol/ivi-hmi-controller-protocol.c \
698 protocol/ivi-application-client-protocol.h \
699 protocol/ivi-application-protocol.c
700weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
701weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
702endif
703
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800704if BUILD_FULL_GL_CLIENTS
705demo_clients += weston-gears
706weston_gears_SOURCES = clients/gears.c
707weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800708weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800709endif
710
711endif
712
713BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100714 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800715 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100716 protocol/text-cursor-position-client-protocol.h \
717 protocol/text-cursor-position-protocol.c \
718 protocol/text-protocol.c \
719 protocol/text-client-protocol.h \
720 protocol/input-method-protocol.c \
721 protocol/input-method-client-protocol.h \
722 protocol/desktop-shell-client-protocol.h \
723 protocol/desktop-shell-protocol.c \
724 protocol/scaler-client-protocol.h \
725 protocol/scaler-protocol.c \
726 protocol/workspaces-client-protocol.h \
727 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500728 protocol/fullscreen-shell-protocol.c \
729 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100730 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900731 protocol/xdg-shell-client-protocol.h \
732 protocol/ivi-hmi-controller-protocol.c \
733 protocol/ivi-hmi-controller-client-protocol.h \
734 protocol/ivi-application-protocol.c \
735 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800736
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800737westondatadir = $(datadir)/weston
738dist_westondata_DATA = \
739 data/wayland.svg \
740 data/wayland.png \
741 data/pattern.png \
742 data/terminal.png \
743 data/border.png \
744 data/icon_window.png \
745 data/sign_close.png \
746 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100747 data/sign_minimize.png
748
749if ENABLE_IVI_SHELL
750dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900751 data/background.png \
752 data/tiling.png \
753 data/fullscreen.png \
754 data/panel.png \
755 data/random.png \
756 data/sidebyside.png \
757 data/home.png \
758 data/icon_ivi_clickdot.png \
759 data/icon_ivi_flower.png \
760 data/icon_ivi_simple-egl.png \
761 data/icon_ivi_simple-shm.png \
762 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100763endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800764
765
766if BUILD_WCAP_TOOLS
767bin_PROGRAMS += wcap-decode
768
769wcap_decode_SOURCES = \
770 wcap/main.c \
771 wcap/wcap-decode.c \
772 wcap/wcap-decode.h
773
Derek Foreman4ff38742015-06-18 11:43:11 -0500774wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800775wcap_decode_LDADD = $(WCAP_LIBS)
776endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800777
778
779if ENABLE_DESKTOP_SHELL
780
781module_LTLIBRARIES += desktop-shell.la
782
783desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100784 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800785 -I$(top_srcdir)/shared \
786 -I$(top_srcdir)/src \
787 -I$(top_builddir)/src \
788 -I$(top_builddir)/desktop-shell \
789 -DDATADIR='"$(datadir)"' \
790 -DMODULEDIR='"$(moduledir)"' \
791 -DLIBEXECDIR='"$(libexecdir)"' \
792 -DIN_WESTON
793
794desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800795desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500796desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800797desktop_shell_la_SOURCES = \
798 desktop-shell/shell.h \
799 desktop-shell/shell.c \
800 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700801 desktop-shell/input-panel.c \
802 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800803nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100804 protocol/desktop-shell-protocol.c \
805 protocol/desktop-shell-server-protocol.h \
806 protocol/xdg-shell-protocol.c \
807 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800808
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800809BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800810endif
811
Jason Ekstrand946a9482014-04-02 19:53:47 -0500812if ENABLE_FULLSCREEN_SHELL
813
814module_LTLIBRARIES += fullscreen-shell.la
815
816fullscreen_shell_la_CPPFLAGS = \
817 -I$(top_builddir)/protocol \
818 -I$(top_srcdir)/shared \
819 -I$(top_srcdir)/src \
820 -I$(top_builddir)/src \
821 -DIN_WESTON
822
823fullscreen_shell_la_LDFLAGS = -module -avoid-version
824fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500825fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500826fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700827 fullscreen-shell/fullscreen-shell.c \
828 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500829nodist_fullscreen_shell_la_SOURCES = \
830 protocol/fullscreen-shell-protocol.c \
831 protocol/fullscreen-shell-server-protocol.h
832
833BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
834endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800835
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900836if ENABLE_IVI_SHELL
837
838module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900839 $(ivi_shell) \
840 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900841
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900842ivi_shell = ivi-shell.la
843ivi_shell_la_LDFLAGS = -module -avoid-version
844ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500845ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900846ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900847 ivi-shell/ivi-layout-export.h \
848 ivi-shell/ivi-layout-private.h \
849 ivi-shell/ivi-layout.c \
850 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900851 ivi-shell/ivi-shell.h \
852 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700853 ivi-shell/input-panel-ivi.c \
854 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900855nodist_ivi_shell_la_SOURCES = \
856 protocol/ivi-application-protocol.c \
857 protocol/ivi-application-server-protocol.h
858
859BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
860
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900861hmi_controller = hmi-controller.la
862hmi_controller_la_LDFLAGS = -module -avoid-version
863hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500864hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900865hmi_controller_la_SOURCES = \
866 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700867 ivi-shell/hmi-controller.c \
868 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900869nodist_hmi_controller_la_SOURCES = \
870 protocol/ivi-hmi-controller-protocol.c \
871 protocol/ivi-hmi-controller-server-protocol.h
872
873BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
874
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900875endif
876
877
Jason Ekstrand47928d82014-04-02 19:54:01 -0500878if ENABLE_SCREEN_SHARING
879
880module_LTLIBRARIES += screen-share.la
881
882screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
883screen_share_la_LDFLAGS = -module -avoid-version
884screen_share_la_LIBADD = \
885 $(COMPOSITOR_LIBS) \
886 $(SCREEN_SHARE_LIBS) \
887 libshared-cairo.la
888screen_share_la_CFLAGS = \
889 $(COMPOSITOR_CFLAGS) \
890 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500891 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500892screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700893 src/screen-share.c \
894 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500895nodist_screen_share_la_SOURCES = \
896 protocol/fullscreen-shell-protocol.c \
897 protocol/fullscreen-shell-client-protocol.h
898
899endif
900
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800901if ENABLE_XWAYLAND
902
903module_LTLIBRARIES += xwayland.la
904
905xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100906 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800907 -I$(top_srcdir)/shared \
908 -I$(top_srcdir)/src \
909 -I$(top_builddir)/src \
910 -I$(top_builddir)/xwayland \
911 -DDATADIR='"$(datadir)"' \
912 -DMODULEDIR='"$(moduledir)"' \
913 -DLIBEXECDIR='"$(libexecdir)"' \
914 -DXSERVER_PATH='"@XSERVER_PATH@"'
915
916xwayland_la_LDFLAGS = -module -avoid-version
917xwayland_la_LIBADD = \
918 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800919 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800920xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500921 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800922 $(COMPOSITOR_CFLAGS) \
923 $(PIXMAN_CFLAGS) \
924 $(CAIRO_CFLAGS)
925xwayland_la_SOURCES = \
926 xwayland/xwayland.h \
927 xwayland/window-manager.c \
928 xwayland/selection.c \
929 xwayland/dnd.c \
930 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800931 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700932 xwayland/hash.h \
933 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800934endif
935
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800936
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800937#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800938# Shared utilities
939#
940
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700941noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
942 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800943
Derek Foreman4ff38742015-06-18 11:43:11 -0500944libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800945
946libshared_la_SOURCES = \
947 shared/config-parser.c \
948 shared/option-parser.c \
949 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200950 shared/file-util.c \
951 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700952 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800953 shared/os-compatibility.c \
954 shared/os-compatibility.h
955
956libshared_cairo_la_CFLAGS = \
957 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -0500958 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800959 $(COMPOSITOR_CFLAGS) \
960 $(PIXMAN_CFLAGS) \
961 $(CAIRO_CFLAGS) \
962 $(PNG_CFLAGS) \
963 $(WEBP_CFLAGS)
964
965libshared_cairo_la_LIBADD = \
966 $(PIXMAN_LIBS) \
967 $(CAIRO_LIBS) \
968 $(PNG_LIBS) \
969 $(WEBP_LIBS) \
970 $(JPEG_LIBS)
971
972libshared_cairo_la_SOURCES = \
973 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700974 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800975 shared/image-loader.c \
976 shared/image-loader.h \
977 shared/cairo-util.c \
978 shared/frame.c \
979 shared/cairo-util.h
980
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700981libzunitc_la_SOURCES = \
982 tools/zunitc/inc/zunitc/zunitc.h \
983 tools/zunitc/inc/zunitc/zunitc_impl.h \
984 tools/zunitc/src/zuc_base_logger.c \
985 tools/zunitc/src/zuc_base_logger.h \
986 tools/zunitc/src/zuc_collector.c \
987 tools/zunitc/src/zuc_collector.h \
988 tools/zunitc/src/zuc_context.h \
989 tools/zunitc/src/zuc_event.h \
990 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -0700991 tools/zunitc/src/zuc_junit_reporter.c \
992 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700993 tools/zunitc/src/zuc_types.h \
994 tools/zunitc/src/zunitc_impl.c \
995 shared/helpers.h
996
997libzunitc_la_CFLAGS = \
998 $(AM_CFLAGS) \
999 -I$(top_srcdir)/tools/zunitc/inc
1000
1001libzunitc_la_LIBADD = \
1002 libshared.la
1003
Jon A. Cruz646aef52015-07-15 19:22:41 -07001004if ENABLE_JUNIT_XML
1005libzunitc_la_CFLAGS += \
1006 $(LIBXML2_CFLAGS)
1007libzunitc_la_LIBADD += \
1008 $(LIBXML2_LIBS)
1009endif
1010
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001011libzunitcmain_la_SOURCES = \
1012 tools/zunitc/src/main.c
1013
1014libzunitcmain_la_CFLAGS = \
1015 $(AM_CFLAGS) \
1016 -I$(top_srcdir)/tools/zunitc/inc
1017
1018libzunitcmain_la_LIBADD = \
1019 libzunitc.la \
1020 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001021
1022#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001023# tests subdirectory
1024#
1025
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001026TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1027
1028internal_tests = \
1029 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001030
1031shared_tests = \
1032 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001033 vertex-clip.test \
1034 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001035
1036module_tests = \
1037 surface-test.la \
1038 surface-global-test.la
1039
1040weston_tests = \
1041 bad_buffer.weston \
1042 keyboard.weston \
1043 event.weston \
1044 button.weston \
1045 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001046 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001047 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001048 subsurface.weston \
1049 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001050
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001051ivi_tests =
1052
1053$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001054
1055AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001056 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1057 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001058
1059TEST_EXTENSIONS = .la .weston
1060LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1061WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1062
1063clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001064 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001065 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001066
1067# To remove when automake 1.11 support is dropped
1068export abs_builddir
1069
1070noinst_LTLIBRARIES += \
1071 weston-test.la \
1072 $(module_tests) \
1073 libtest-runner.la \
1074 libtest-client.la
1075
1076noinst_PROGRAMS += \
1077 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001078 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001079 $(shared_tests) \
1080 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001081 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001082 matrix-test
1083
1084test_module_ldflags = \
1085 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1086
1087surface_global_test_la_SOURCES = tests/surface-global-test.c
1088surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001089surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001090
1091surface_test_la_SOURCES = tests/surface-test.c
1092surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001093surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001094
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001095weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001096weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001097weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001098weston_test_la_SOURCES = \
1099 tests/weston-test.c \
1100 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001101nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001102 protocol/weston-test-protocol.c \
1103 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001104
1105if ENABLE_EGL
1106weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1107weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1108endif
1109
1110libtest_runner_la_SOURCES = \
1111 tests/weston-test-runner.c \
1112 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001113libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001114
1115config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001116config_parser_test_LDADD = \
1117 libshared.la \
1118 $(COMPOSITOR_LIBS) \
1119 libzunitc.la \
1120 libzunitcmain.la
1121config_parser_test_CFLAGS = \
1122 $(AM_CFLAGS) \
1123 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001124
1125vertex_clip_test_SOURCES = \
1126 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001127 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001128 src/vertex-clipping.c \
1129 src/vertex-clipping.h
1130vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1131
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001132libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001133 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001134 tests/weston-test-client-helper.h
1135nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001136 protocol/weston-test-protocol.c \
1137 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001138libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001139libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001140
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001141
1142#
1143# Internal tests - tests functionality of the testsuite itself
1144#
1145
1146internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1147internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1148internal_screenshot_weston_LDADD = libtest-client.la $(CAIRO_LIBS)
1149
1150
1151#
1152# Weston Tests
1153#
1154
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001155bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001156bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001157bad_buffer_weston_LDADD = libtest-client.la
1158
1159keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001160keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001161keyboard_weston_LDADD = libtest-client.la
1162
1163event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001164event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001165event_weston_LDADD = libtest-client.la
1166
1167button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001168button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001169button_weston_LDADD = libtest-client.la
1170
Marek Chalupa5fd81402015-03-30 09:21:29 -04001171devices_weston_SOURCES = tests/devices-test.c
1172devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1173devices_weston_LDADD = libtest-client.la
1174
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001175text_weston_SOURCES = tests/text-test.c
1176nodist_text_weston_SOURCES = \
1177 protocol/text-protocol.c \
1178 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001179text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001180text_weston_LDADD = libtest-client.la
1181
1182subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001183subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001184subsurface_weston_LDADD = libtest-client.la
1185
Jon A. Cruzb09da242015-06-16 13:15:13 -07001186presentation_weston_SOURCES = \
1187 tests/presentation-test.c \
1188 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001189nodist_presentation_weston_SOURCES = \
1190 protocol/presentation_timing-protocol.c \
1191 protocol/presentation_timing-client-protocol.h
1192presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1193presentation_weston_LDADD = libtest-client.la
1194
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001195roles_weston_SOURCES = tests/roles-test.c
1196roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1197roles_weston_LDADD = libtest-client.la
1198
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001199if ENABLE_EGL
1200weston_tests += buffer-count.weston
1201buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001202buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001203buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1204endif
1205
1206if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001207weston_tests += xwayland-test.weston
1208xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001209xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001210xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001211endif
1212
1213matrix_test_SOURCES = \
1214 tests/matrix-test.c \
1215 shared/matrix.c \
1216 shared/matrix.h
1217matrix_test_CPPFLAGS = -DUNIT_TEST
1218matrix_test_LDADD = -lm -lrt
1219
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001220if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001221module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001222 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001223 ivi-layout-test.la
1224
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001225ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1226ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001227ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001228ivi_layout_internal_test_la_SOURCES = \
1229 tests/ivi_layout-internal-test.c
1230
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001231ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1232ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001233ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001234ivi_layout_test_la_SOURCES = \
1235 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001236 tests/ivi-test.h \
1237 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001238nodist_ivi_layout_test_la_SOURCES = \
1239 protocol/weston-test-protocol.c \
1240 protocol/weston-test-server-protocol.h
1241
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001242ivi_tests += \
1243 ivi-shell-app.weston
1244
1245ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1246nodist_ivi_shell_app_weston_SOURCES = \
1247 protocol/ivi-application-protocol.c \
1248 protocol/ivi-application-client-protocol.h
1249ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1250ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001251
1252noinst_PROGRAMS += ivi-layout.ivi
1253
1254ivi_layout_ivi_SOURCES = \
1255 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001256 tests/ivi-test.h \
1257 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001258nodist_ivi_layout_ivi_SOURCES = \
1259 protocol/ivi-application-protocol.c \
1260 protocol/ivi-application-client-protocol.h
1261ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1262ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001263endif
1264
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001265if BUILD_SETBACKLIGHT
1266noinst_PROGRAMS += setbacklight
1267setbacklight_SOURCES = \
1268 tests/setbacklight.c \
1269 src/libbacklight.c \
1270 src/libbacklight.h
1271setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1272setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1273endif
1274
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001275all-local: zuctest$(EXEEXT)
1276
1277noinst_PROGRAMS += zuctest$(EXEEXT)
1278
1279zuctest_LDADD = \
1280 libzunitc.la \
1281 libzunitcmain.la
1282
1283zuctest_CFLAGS = \
1284 $(AM_CFLAGS) \
1285 -I$(top_srcdir)/tools/zunitc/inc
1286
1287zuctest_SOURCES = \
1288 tools/zunitc/test/fixtures_test.c \
1289 tools/zunitc/test/zunitc_test.c
1290
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001291EXTRA_DIST += \
1292 tests/weston-tests-env \
1293 tests/internal-screenshot.ini \
1294 tests/reference/internal-screenshot-bad-00.png \
1295 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001296
1297BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001298 protocol/weston-test-protocol.c \
1299 protocol/weston-test-server-protocol.h \
1300 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001301 protocol/text-protocol.c \
1302 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001303
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001304EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001305 protocol/desktop-shell.xml \
1306 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001307 protocol/text.xml \
1308 protocol/input-method.xml \
1309 protocol/workspaces.xml \
1310 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001311 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001312 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001313 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001314 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001315 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001316 protocol/ivi-application.xml \
Pekka Paalanen23ab7152014-09-29 14:08:29 -04001317 protocol/ivi-hmi-controller.xml \
1318 protocol/linux-dmabuf.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001319
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001320#
1321# manual test modules in tests subdirectory
1322#
1323
1324noinst_LTLIBRARIES += \
1325 surface-screenshot.la
1326
1327surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1328surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001329surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001330surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1331
1332
1333#
1334# Documentation
1335#
1336
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001337man_MANS = weston.1 weston.ini.5
1338
1339if ENABLE_DRM_COMPOSITOR
1340man_MANS += weston-drm.7
1341endif
1342
1343MAN_SUBSTS = \
1344 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1345 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1346 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1347 -e 's|__version__|$(PACKAGE_VERSION)|g'
1348
1349SUFFIXES = .1 .5 .7 .man
1350
1351%.1 %.5 %.7 : man/%.man
1352 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1353
1354EXTRA_DIST += \
1355 man/weston.man \
1356 man/weston-drm.man \
1357 man/weston.ini.man
1358
1359CLEANFILES += $(man_MANS)
1360
Jon A. Cruz179c1862015-07-15 19:22:43 -07001361if ENABLE_DEVDOCS
1362DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1363
1364docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1365 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1366
1367docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1368 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1369endif
1370
1371DOCDIRS = \
1372 docs/developer \
1373 docs/tools
1374
1375$(DOCDIRS):
1376 $(MKDIR_P) $@
1377
1378.PHONY: doc $(DOXYGEN_INDICES)
1379
1380doc: $(DOXYGEN_INDICES)
1381
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001382protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1383 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001384
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001385protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1386 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001387
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001388protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1389 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@