blob: 39f1f8c28ddc0e4cd7462598550ebb762ab2554f [file] [log] [blame]
Thierry Reding0e6d9a72014-05-27 09:07:54 +02001ACLOCAL_AMFLAGS = -I m4
2
Kristian Høgsberge895f142014-01-27 21:46:30 -08003bin_PROGRAMS =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08004noinst_PROGRAMS =
Kristian Høgsberge73eccd2014-01-31 16:15:11 -08005libexec_PROGRAMS =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08006moduledir = $(libdir)/weston
7module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08008noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08009BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -080010
Derek Foreman2ef9e812015-02-09 09:57:29 -060011AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050012
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090013EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000014
15weston.ini : $(srcdir)/weston.ini.in
16 $(AM_V_GEN)$(SED) \
17 -e 's|@bindir[@]|$(bindir)|g' \
18 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
19 -e 's|@libexecdir[@]|$(libexecdir)|g' \
20 $< > $@
21
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090022ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
23 $(AM_V_GEN)$(SED) \
24 -e 's|@bindir[@]|$(bindir)|g' \
25 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020026 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090027 -e 's|@libexecdir[@]|$(libexecdir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020028 -e 's|@plugin_prefix[@]||g' \
29 $< > $@
30
31tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in
32 $(AM_V_GEN)$(SED) \
33 -e 's|@bindir[@]|$(bindir)|g' \
34 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020035 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Derek Foremanbbdd9bc2015-06-16 13:30:35 -050036 -e 's|@libexecdir[@]|$(abs_builddir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020037 -e 's|@plugin_prefix[@]|$(abs_top_builddir)/.libs/|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090038 $< > $@
39
40all-local : weston.ini ivi-shell/weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080041
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080042AM_CFLAGS = $(GCC_CFLAGS)
43
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080044AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080045 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080046 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080047 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080048 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080049 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010050 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080051 -DDATADIR='"$(datadir)"' \
52 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080053 -DLIBEXECDIR='"$(libexecdir)"' \
54 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080055
Pekka Paalanenf3a34532015-03-24 13:51:05 +020056CLEANFILES = weston.ini \
57 ivi-shell/weston.ini \
58 tests/weston-ivi.ini \
Derek Foreman1ce2ef52015-05-26 10:21:03 -050059 internal-screenshot-00.png \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020060 $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080061
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080062bin_PROGRAMS += weston
63
64weston_LDFLAGS = -export-dynamic
65weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
66weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
67weston_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 \
Jon A. Cruzb09da242015-06-16 13:15:13 -070089 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080090 shared/matrix.c \
91 shared/matrix.h \
92 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +010093 shared/platform.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080094 src/weston-egl-ext.h
95
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080096nodist_weston_SOURCES = \
97 protocol/screenshooter-protocol.c \
98 protocol/screenshooter-server-protocol.h \
99 protocol/text-cursor-position-protocol.c \
100 protocol/text-cursor-position-server-protocol.h \
101 protocol/text-protocol.c \
102 protocol/text-server-protocol.h \
103 protocol/input-method-protocol.c \
104 protocol/input-method-server-protocol.h \
105 protocol/workspaces-protocol.c \
106 protocol/workspaces-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400107 protocol/presentation_timing-protocol.c \
108 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800109 protocol/scaler-protocol.c \
110 protocol/scaler-server-protocol.h
111
112BUILT_SOURCES += $(nodist_weston_SOURCES)
113
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800114# Track this dependency explicitly instead of using BUILT_SOURCES. We
115# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
116# in case we're building from tarballs.
117
118src/compositor.c : $(top_builddir)/src/git-version.h
119
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800120noinst_LTLIBRARIES += \
121 libsession-helper.la
122
123libsession_helper_la_SOURCES = \
124 src/weston-launch.h \
125 src/launcher-util.c \
126 src/launcher-util.h
127libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
128libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
129
130if ENABLE_DBUS
131if HAVE_SYSTEMD_LOGIN
132libsession_helper_la_SOURCES += \
133 src/dbus.h \
134 src/dbus.c \
135 src/logind-util.h \
136 src/logind-util.c
137libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
138libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
139endif
140endif
141
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800142if HAVE_GIT_REPO
143src/git-version.h : $(top_srcdir)/.git/logs/HEAD
144 $(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 -0800145else
146src/git-version.h :
147 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
148
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800149endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800150
151.FORCE :
152
153if BUILD_WESTON_LAUNCH
154bin_PROGRAMS += weston-launch
155weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
156weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
157weston_launch_CFLAGS= \
158 $(GCC_CFLAGS) \
159 $(PAM_CFLAGS) \
160 $(SYSTEMD_LOGIN_CFLAGS) \
161 $(LIBDRM_CFLAGS)
162weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
163
164if ENABLE_SETUID_INSTALL
165install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700166 can_suid_files=no; \
167 chown root $(DESTDIR)$(bindir)/weston-launch \
168 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
169 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500170 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700171 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
172 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
173 false; \
174 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800175endif
176
177endif # BUILD_WESTON_LAUNCH
178
179pkgconfigdir = $(libdir)/pkgconfig
180pkgconfig_DATA = src/weston.pc
181
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100182wayland_sessiondir = $(datadir)/wayland-sessions
183wayland_session_DATA = src/weston.desktop
Marek Chalupa194ca2b2015-01-22 10:03:03 +0100184dist_wayland_session_DATA = $(wayland_session_DATA)
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100185
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800186westonincludedir = $(includedir)/weston
187westoninclude_HEADERS = \
188 src/version.h \
189 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200190 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800191 shared/matrix.h \
192 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100193 shared/zalloc.h \
194 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800195
196if ENABLE_EGL
197module_LTLIBRARIES += gl-renderer.la
198gl_renderer_la_LDFLAGS = -module -avoid-version
199gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
200gl_renderer_la_CFLAGS = \
201 $(COMPOSITOR_CFLAGS) \
202 $(EGL_CFLAGS) \
203 $(GCC_CFLAGS)
204gl_renderer_la_SOURCES = \
205 src/gl-renderer.h \
206 src/gl-renderer.c \
207 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700208 src/vertex-clipping.h \
209 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800210endif
211
212if ENABLE_X11_COMPOSITOR
213module_LTLIBRARIES += x11-backend.la
214x11_backend_la_LDFLAGS = -module -avoid-version
215x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800216 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800217x11_backend_la_CFLAGS = \
218 $(COMPOSITOR_CFLAGS) \
219 $(EGL_CFLAGS) \
220 $(PIXMAN_CFLAGS) \
221 $(CAIRO_CFLAGS) \
222 $(X11_COMPOSITOR_CFLAGS) \
223 $(GCC_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700224x11_backend_la_SOURCES = \
225 src/compositor-x11.c \
226 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800227endif
228
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100229INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000230INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100231 src/libinput-seat.c \
232 src/libinput-seat.h \
233 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700234 src/libinput-device.h \
235 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100236
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800237if ENABLE_DRM_COMPOSITOR
238module_LTLIBRARIES += drm-backend.la
239drm_backend_la_LDFLAGS = -module -avoid-version
240drm_backend_la_LIBADD = \
241 $(COMPOSITOR_LIBS) \
242 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100243 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100244 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800245 libsession-helper.la
246drm_backend_la_CFLAGS = \
247 $(COMPOSITOR_CFLAGS) \
248 $(EGL_CFLAGS) \
249 $(DRM_COMPOSITOR_CFLAGS) \
250 $(GCC_CFLAGS)
251drm_backend_la_SOURCES = \
252 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100253 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700254 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800255 src/libbacklight.c \
256 src/libbacklight.h
257
258if ENABLE_VAAPI_RECORDER
259drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
260drm_backend_la_LIBADD += $(LIBVA_LIBS)
261drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
262endif
263endif
264
265if ENABLE_WAYLAND_COMPOSITOR
266module_LTLIBRARIES += wayland-backend.la
267wayland_backend_la_LDFLAGS = -module -avoid-version
268wayland_backend_la_LIBADD = \
269 $(COMPOSITOR_LIBS) \
270 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800271 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800272wayland_backend_la_CFLAGS = \
273 $(COMPOSITOR_CFLAGS) \
274 $(EGL_CFLAGS) \
275 $(PIXMAN_CFLAGS) \
276 $(CAIRO_CFLAGS) \
277 $(WAYLAND_COMPOSITOR_CFLAGS) \
278 $(GCC_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700279wayland_backend_la_SOURCES = \
280 src/compositor-wayland.c \
281 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500282nodist_wayland_backend_la_SOURCES = \
283 protocol/fullscreen-shell-protocol.c \
284 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800285endif
286
287if ENABLE_RPI_COMPOSITOR
288if INSTALL_RPI_COMPOSITOR
289module_LTLIBRARIES += rpi-backend.la
290else
291noinst_LTLIBRARIES += rpi-backend.la
292endif
293
294rpi_backend_la_LDFLAGS = -module -avoid-version
295rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
296 $(RPI_COMPOSITOR_LIBS) \
297 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100298 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800299 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800300 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800301rpi_backend_la_CFLAGS = \
302 $(GCC_CFLAGS) \
303 $(COMPOSITOR_CFLAGS) \
304 $(RPI_COMPOSITOR_CFLAGS) \
305 $(RPI_BCM_HOST_CFLAGS)
306rpi_backend_la_SOURCES = \
307 src/compositor-rpi.c \
308 src/rpi-renderer.c \
309 src/rpi-renderer.h \
310 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700311 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100312 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800313
314if ENABLE_EGL
315rpi_backend_la_LIBADD += $(EGL_LIBS)
316rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
317endif
318
319endif
320
321if ENABLE_HEADLESS_COMPOSITOR
322module_LTLIBRARIES += headless-backend.la
323headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800324headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
325headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700326headless_backend_la_SOURCES = \
327 src/compositor-headless.c \
328 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800329endif
330
331if ENABLE_FBDEV_COMPOSITOR
332module_LTLIBRARIES += fbdev-backend.la
333fbdev_backend_la_LDFLAGS = -module -avoid-version
334fbdev_backend_la_LIBADD = \
335 $(COMPOSITOR_LIBS) \
336 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100337 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800338 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800339 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800340fbdev_backend_la_CFLAGS = \
341 $(COMPOSITOR_CFLAGS) \
342 $(EGL_CFLAGS) \
343 $(FBDEV_COMPOSITOR_CFLAGS) \
344 $(PIXMAN_CFLAGS) \
345 $(GCC_CFLAGS)
346fbdev_backend_la_SOURCES = \
347 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700348 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100349 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800350endif
351
352if ENABLE_RDP_COMPOSITOR
353module_LTLIBRARIES += rdp-backend.la
354rdp_backend_la_LDFLAGS = -module -avoid-version
355rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
356 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800357 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800358rdp_backend_la_CFLAGS = \
359 $(COMPOSITOR_CFLAGS) \
360 $(RDP_COMPOSITOR_CFLAGS) \
361 $(GCC_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700362rdp_backend_la_SOURCES = \
363 src/compositor-rdp.c \
364 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800365endif
366
367if HAVE_LCMS
368module_LTLIBRARIES += cms-static.la
369cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800370cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800371cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
372cms_static_la_SOURCES = \
373 src/cms-static.c \
374 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700375 src/cms-helper.h \
376 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800377if ENABLE_COLORD
378module_LTLIBRARIES += cms-colord.la
379cms_colord_la_LDFLAGS = -module -avoid-version
380cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
381cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
382cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100383 src/cms-colord.c \
384 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700385 src/cms-helper.h \
386 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800387endif
388endif
389
390noinst_PROGRAMS += spring-tool
391spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
392spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
393spring_tool_SOURCES = \
394 src/spring-tool.c \
395 src/animation.c \
396 shared/matrix.c \
397 shared/matrix.h \
398 src/compositor.h
399
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800400if BUILD_CLIENTS
401
402bin_PROGRAMS += weston-terminal weston-info
403
404libexec_PROGRAMS += \
405 weston-desktop-shell \
406 weston-screenshooter \
407 weston-keyboard \
408 weston-simple-im
409
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900410if ENABLE_IVI_SHELL
411libexec_PROGRAMS += \
412 weston-ivi-shell-user-interface
413endif
414
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800415demo_clients = \
416 weston-flower \
417 weston-image \
418 weston-cliptest \
419 weston-dnd \
420 weston-smoke \
421 weston-resizor \
422 weston-eventdemo \
423 weston-clickdot \
424 weston-transformed \
425 weston-fullscreen \
426 weston-stacking \
427 weston-calibrator \
428 weston-scaler
429
430if INSTALL_DEMO_CLIENTS
431bin_PROGRAMS += $(demo_clients)
432else
433noinst_PROGRAMS += $(demo_clients)
434endif
435
436
437if BUILD_SIMPLE_CLIENTS
438demo_clients += \
439 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500440 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800441 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400442 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800443 weston-multi-resource
444
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800445weston_simple_shm_SOURCES = clients/simple-shm.c
446nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800447 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500448 protocol/xdg-shell-client-protocol.h \
449 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900450 protocol/fullscreen-shell-client-protocol.h \
451 protocol/ivi-application-protocol.c \
452 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800453weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800454weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800455
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500456weston_simple_damage_SOURCES = clients/simple-damage.c
457nodist_weston_simple_damage_SOURCES = \
458 protocol/scaler-protocol.c \
459 protocol/scaler-client-protocol.h \
460 protocol/xdg-shell-protocol.c \
461 protocol/xdg-shell-client-protocol.h \
462 protocol/fullscreen-shell-protocol.c \
463 protocol/fullscreen-shell-client-protocol.h
464weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
465weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
466
Jon A. Cruzb09da242015-06-16 13:15:13 -0700467weston_simple_touch_SOURCES = \
468 clients/simple-touch.c \
469 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800470weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800471weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800472
Jon A. Cruzb09da242015-06-16 13:15:13 -0700473weston_presentation_shm_SOURCES = \
474 clients/presentation-shm.c \
475 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400476nodist_weston_presentation_shm_SOURCES = \
477 protocol/presentation_timing-protocol.c \
478 protocol/presentation_timing-client-protocol.h
479weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
480weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
481
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800482weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800483weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000484weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800485endif
486
487if BUILD_SIMPLE_EGL_CLIENTS
488demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800489weston_simple_egl_SOURCES = clients/simple-egl.c
490nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800491 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900492 protocol/xdg-shell-client-protocol.h \
493 protocol/ivi-application-protocol.c \
494 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800495weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800496weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
497endif
498
499noinst_LTLIBRARIES += libtoytoolkit.la
500
501libtoytoolkit_la_SOURCES = \
502 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700503 clients/window.h \
504 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800505
506nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100507 protocol/text-cursor-position-protocol.c \
508 protocol/text-cursor-position-client-protocol.h \
509 protocol/scaler-protocol.c \
510 protocol/scaler-client-protocol.h \
511 protocol/workspaces-protocol.c \
512 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400513 protocol/presentation_timing-protocol.c \
514 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100515 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900516 protocol/xdg-shell-client-protocol.h \
517 protocol/ivi-application-protocol.c \
518 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500519
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800520BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
521
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800522
523libtoytoolkit_la_LIBADD = \
524 $(CLIENT_LIBS) \
525 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800526 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800527libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800528
529weston_flower_SOURCES = clients/flower.c
530weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800531weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800532
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100533weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800534 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800535nodist_weston_screenshooter_SOURCES = \
536 protocol/screenshooter-protocol.c \
537 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800538weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800539weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800540
Jon A. Cruzb09da242015-06-16 13:15:13 -0700541weston_terminal_SOURCES = \
542 clients/terminal.c \
543 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800544weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800545weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800546
547weston_image_SOURCES = clients/image.c
548weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800549weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800550
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300551weston_cliptest_SOURCES = \
552 clients/cliptest.c \
553 src/vertex-clipping.c \
554 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800555weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800556weston_cliptest_LDADD = libtoytoolkit.la
557
Jon A. Cruzb09da242015-06-16 13:15:13 -0700558weston_dnd_SOURCES = \
559 clients/dnd.c \
560 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800561weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800562weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800563
564weston_smoke_SOURCES = clients/smoke.c
565weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800566weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800567
568weston_resizor_SOURCES = clients/resizor.c
569weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800570weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800571
572weston_scaler_SOURCES = clients/scaler.c
573weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800574weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800575
576if HAVE_CAIRO_GLESV2
577demo_clients += weston-nested weston-nested-client
578
Jon A. Cruzb09da242015-06-16 13:15:13 -0700579weston_nested_SOURCES = \
580 clients/nested.c \
581 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800582weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800583weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800584
585weston_nested_client_SOURCES = clients/nested-client.c
586weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800587weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800588endif
589
Jon A. Cruzb09da242015-06-16 13:15:13 -0700590weston_eventdemo_SOURCES = \
591 clients/eventdemo.c \
592 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800593weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800594weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800595
Jon A. Cruzb09da242015-06-16 13:15:13 -0700596weston_clickdot_SOURCES = \
597 clients/clickdot.c \
598 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800599weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800600weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800601
602weston_transformed_SOURCES = clients/transformed.c
603weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800604weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800605
606weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500607nodist_weston_fullscreen_SOURCES = \
608 protocol/fullscreen-shell-protocol.c \
609 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800610weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800611weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800612
Jon A. Cruzb09da242015-06-16 13:15:13 -0700613weston_stacking_SOURCES = \
614 clients/stacking.c \
615 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800616weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800617weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800618
Jon A. Cruzb09da242015-06-16 13:15:13 -0700619weston_calibrator_SOURCES = \
620 clients/calibrator.c \
621 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800622 shared/matrix.c \
623 shared/matrix.h
624weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800625weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800626
627if BUILD_SUBSURFACES_CLIENT
628demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700629weston_subsurfaces_SOURCES = \
630 clients/subsurfaces.c \
631 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800632weston_subsurfaces_CFLAGS = \
633 $(AM_CFLAGS) \
634 $(SIMPLE_EGL_CLIENT_CFLAGS) \
635 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800636weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
637endif
638
639if HAVE_PANGO
640demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700641weston_editor_SOURCES = \
642 clients/editor.c \
643 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800644nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100645 protocol/text-protocol.c \
646 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800647weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800648weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800649endif
650
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800651weston_keyboard_SOURCES = clients/keyboard.c
652nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100653 protocol/desktop-shell-client-protocol.h \
654 protocol/desktop-shell-protocol.c \
655 protocol/input-method-protocol.c \
656 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800657weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800658weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800659
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800660weston_simple_im_SOURCES = clients/weston-simple-im.c
661nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100662 protocol/input-method-protocol.c \
663 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800664weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800665weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800666
Jon A. Cruzb09da242015-06-16 13:15:13 -0700667weston_info_SOURCES = \
668 clients/weston-info.c \
669 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400670nodist_weston_info_SOURCES = \
671 protocol/presentation_timing-protocol.c \
672 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800673weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200674weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800675
Jon A. Cruzb09da242015-06-16 13:15:13 -0700676weston_desktop_shell_SOURCES = \
677 clients/desktop-shell.c \
678 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800679nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100680 protocol/desktop-shell-client-protocol.h \
681 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800682weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800683weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800684
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900685if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700686weston_ivi_shell_user_interface_SOURCES = \
687 clients/ivi-shell-user-interface.c \
688 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900689nodist_weston_ivi_shell_user_interface_SOURCES = \
690 protocol/ivi-hmi-controller-client-protocol.h \
691 protocol/ivi-hmi-controller-protocol.c \
692 protocol/ivi-application-client-protocol.h \
693 protocol/ivi-application-protocol.c
694weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
695weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
696endif
697
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800698if BUILD_FULL_GL_CLIENTS
699demo_clients += weston-gears
700weston_gears_SOURCES = clients/gears.c
701weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800702weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800703endif
704
705endif
706
707BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100708 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800709 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100710 protocol/text-cursor-position-client-protocol.h \
711 protocol/text-cursor-position-protocol.c \
712 protocol/text-protocol.c \
713 protocol/text-client-protocol.h \
714 protocol/input-method-protocol.c \
715 protocol/input-method-client-protocol.h \
716 protocol/desktop-shell-client-protocol.h \
717 protocol/desktop-shell-protocol.c \
718 protocol/scaler-client-protocol.h \
719 protocol/scaler-protocol.c \
720 protocol/workspaces-client-protocol.h \
721 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500722 protocol/fullscreen-shell-protocol.c \
723 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100724 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900725 protocol/xdg-shell-client-protocol.h \
726 protocol/ivi-hmi-controller-protocol.c \
727 protocol/ivi-hmi-controller-client-protocol.h \
728 protocol/ivi-application-protocol.c \
729 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800730
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800731westondatadir = $(datadir)/weston
732dist_westondata_DATA = \
733 data/wayland.svg \
734 data/wayland.png \
735 data/pattern.png \
736 data/terminal.png \
737 data/border.png \
738 data/icon_window.png \
739 data/sign_close.png \
740 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100741 data/sign_minimize.png
742
743if ENABLE_IVI_SHELL
744dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900745 data/background.png \
746 data/tiling.png \
747 data/fullscreen.png \
748 data/panel.png \
749 data/random.png \
750 data/sidebyside.png \
751 data/home.png \
752 data/icon_ivi_clickdot.png \
753 data/icon_ivi_flower.png \
754 data/icon_ivi_simple-egl.png \
755 data/icon_ivi_simple-shm.png \
756 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100757endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800758
759
760if BUILD_WCAP_TOOLS
761bin_PROGRAMS += wcap-decode
762
763wcap_decode_SOURCES = \
764 wcap/main.c \
765 wcap/wcap-decode.c \
766 wcap/wcap-decode.h
767
768wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
769wcap_decode_LDADD = $(WCAP_LIBS)
770endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800771
772
773if ENABLE_DESKTOP_SHELL
774
775module_LTLIBRARIES += desktop-shell.la
776
777desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100778 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800779 -I$(top_srcdir)/shared \
780 -I$(top_srcdir)/src \
781 -I$(top_builddir)/src \
782 -I$(top_builddir)/desktop-shell \
783 -DDATADIR='"$(datadir)"' \
784 -DMODULEDIR='"$(moduledir)"' \
785 -DLIBEXECDIR='"$(libexecdir)"' \
786 -DIN_WESTON
787
788desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800789desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800790desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
791desktop_shell_la_SOURCES = \
792 desktop-shell/shell.h \
793 desktop-shell/shell.c \
794 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700795 desktop-shell/input-panel.c \
796 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800797nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100798 protocol/desktop-shell-protocol.c \
799 protocol/desktop-shell-server-protocol.h \
800 protocol/xdg-shell-protocol.c \
801 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800802
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800803BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800804endif
805
Jason Ekstrand946a9482014-04-02 19:53:47 -0500806if ENABLE_FULLSCREEN_SHELL
807
808module_LTLIBRARIES += fullscreen-shell.la
809
810fullscreen_shell_la_CPPFLAGS = \
811 -I$(top_builddir)/protocol \
812 -I$(top_srcdir)/shared \
813 -I$(top_srcdir)/src \
814 -I$(top_builddir)/src \
815 -DIN_WESTON
816
817fullscreen_shell_la_LDFLAGS = -module -avoid-version
818fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
819fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
820fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700821 fullscreen-shell/fullscreen-shell.c \
822 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500823nodist_fullscreen_shell_la_SOURCES = \
824 protocol/fullscreen-shell-protocol.c \
825 protocol/fullscreen-shell-server-protocol.h
826
827BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
828endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800829
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900830if ENABLE_IVI_SHELL
831
832module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900833 $(ivi_shell) \
834 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900835
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900836ivi_shell = ivi-shell.la
837ivi_shell_la_LDFLAGS = -module -avoid-version
838ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
839ivi_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
840ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900841 ivi-shell/ivi-layout-export.h \
842 ivi-shell/ivi-layout-private.h \
843 ivi-shell/ivi-layout.c \
844 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900845 ivi-shell/ivi-shell.h \
846 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700847 ivi-shell/input-panel-ivi.c \
848 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900849nodist_ivi_shell_la_SOURCES = \
850 protocol/ivi-application-protocol.c \
851 protocol/ivi-application-server-protocol.h
852
853BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
854
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900855hmi_controller = hmi-controller.la
856hmi_controller_la_LDFLAGS = -module -avoid-version
857hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
858hmi_controller_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
859hmi_controller_la_SOURCES = \
860 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700861 ivi-shell/hmi-controller.c \
862 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900863nodist_hmi_controller_la_SOURCES = \
864 protocol/ivi-hmi-controller-protocol.c \
865 protocol/ivi-hmi-controller-server-protocol.h
866
867BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
868
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900869endif
870
871
Jason Ekstrand47928d82014-04-02 19:54:01 -0500872if ENABLE_SCREEN_SHARING
873
874module_LTLIBRARIES += screen-share.la
875
876screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
877screen_share_la_LDFLAGS = -module -avoid-version
878screen_share_la_LIBADD = \
879 $(COMPOSITOR_LIBS) \
880 $(SCREEN_SHARE_LIBS) \
881 libshared-cairo.la
882screen_share_la_CFLAGS = \
883 $(COMPOSITOR_CFLAGS) \
884 $(SCREEN_SHARE_CFLAGS) \
885 $(GCC_CFLAGS)
886screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700887 src/screen-share.c \
888 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500889nodist_screen_share_la_SOURCES = \
890 protocol/fullscreen-shell-protocol.c \
891 protocol/fullscreen-shell-client-protocol.h
892
893endif
894
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800895if ENABLE_XWAYLAND
896
897module_LTLIBRARIES += xwayland.la
898
899xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100900 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800901 -I$(top_srcdir)/shared \
902 -I$(top_srcdir)/src \
903 -I$(top_builddir)/src \
904 -I$(top_builddir)/xwayland \
905 -DDATADIR='"$(datadir)"' \
906 -DMODULEDIR='"$(moduledir)"' \
907 -DLIBEXECDIR='"$(libexecdir)"' \
908 -DXSERVER_PATH='"@XSERVER_PATH@"'
909
910xwayland_la_LDFLAGS = -module -avoid-version
911xwayland_la_LIBADD = \
912 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800913 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800914xwayland_la_CFLAGS = \
915 $(GCC_CFLAGS) \
916 $(COMPOSITOR_CFLAGS) \
917 $(PIXMAN_CFLAGS) \
918 $(CAIRO_CFLAGS)
919xwayland_la_SOURCES = \
920 xwayland/xwayland.h \
921 xwayland/window-manager.c \
922 xwayland/selection.c \
923 xwayland/dnd.c \
924 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800925 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700926 xwayland/hash.h \
927 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800928endif
929
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800930
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800931#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800932# Shared utilities
933#
934
935noinst_LTLIBRARIES += libshared.la libshared-cairo.la
936
937libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
938
939libshared_la_SOURCES = \
940 shared/config-parser.c \
941 shared/option-parser.c \
942 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200943 shared/file-util.c \
944 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700945 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800946 shared/os-compatibility.c \
947 shared/os-compatibility.h
948
949libshared_cairo_la_CFLAGS = \
950 -DDATADIR='"$(datadir)"' \
951 $(GCC_CFLAGS) \
952 $(COMPOSITOR_CFLAGS) \
953 $(PIXMAN_CFLAGS) \
954 $(CAIRO_CFLAGS) \
955 $(PNG_CFLAGS) \
956 $(WEBP_CFLAGS)
957
958libshared_cairo_la_LIBADD = \
959 $(PIXMAN_LIBS) \
960 $(CAIRO_LIBS) \
961 $(PNG_LIBS) \
962 $(WEBP_LIBS) \
963 $(JPEG_LIBS)
964
965libshared_cairo_la_SOURCES = \
966 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700967 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800968 shared/image-loader.c \
969 shared/image-loader.h \
970 shared/cairo-util.c \
971 shared/frame.c \
972 shared/cairo-util.h
973
974
975#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800976# tests subdirectory
977#
978
Bryce Harringtonfb9089d2014-11-04 16:39:38 -0800979TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
980
981internal_tests = \
982 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800983
984shared_tests = \
985 config-parser.test \
986 vertex-clip.test
987
988module_tests = \
989 surface-test.la \
990 surface-global-test.la
991
992weston_tests = \
993 bad_buffer.weston \
994 keyboard.weston \
995 event.weston \
996 button.weston \
997 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -0400998 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +0300999 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001000 subsurface.weston \
1001 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001002
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001003ivi_tests =
1004
1005$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001006
1007AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001008 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1009 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001010
1011TEST_EXTENSIONS = .la .weston
1012LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1013WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1014
1015clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001016 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001017
1018# To remove when automake 1.11 support is dropped
1019export abs_builddir
1020
1021noinst_LTLIBRARIES += \
1022 weston-test.la \
1023 $(module_tests) \
1024 libtest-runner.la \
1025 libtest-client.la
1026
1027noinst_PROGRAMS += \
1028 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001029 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001030 $(shared_tests) \
1031 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001032 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001033 matrix-test
1034
1035test_module_ldflags = \
1036 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1037
1038surface_global_test_la_SOURCES = tests/surface-global-test.c
1039surface_global_test_la_LDFLAGS = $(test_module_ldflags)
1040surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1041
1042surface_test_la_SOURCES = tests/surface-test.c
1043surface_test_la_LDFLAGS = $(test_module_ldflags)
1044surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1045
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001046weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001047weston_test_la_LDFLAGS = $(test_module_ldflags)
1048weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001049weston_test_la_SOURCES = \
1050 tests/weston-test.c \
1051 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001052nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001053 protocol/weston-test-protocol.c \
1054 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001055
1056if ENABLE_EGL
1057weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1058weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1059endif
1060
1061libtest_runner_la_SOURCES = \
1062 tests/weston-test-runner.c \
1063 tests/weston-test-runner.h
1064libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1065
1066config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001067config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001068
1069vertex_clip_test_SOURCES = \
1070 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001071 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001072 src/vertex-clipping.c \
1073 src/vertex-clipping.h
1074vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1075
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001076libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001077 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001078 tests/weston-test-client-helper.h
1079nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001080 protocol/weston-test-protocol.c \
1081 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001082libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001083libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001084
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001085
1086#
1087# Internal tests - tests functionality of the testsuite itself
1088#
1089
1090internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1091internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1092internal_screenshot_weston_LDADD = libtest-client.la $(CAIRO_LIBS)
1093
1094
1095#
1096# Weston Tests
1097#
1098
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001099bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001100bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001101bad_buffer_weston_LDADD = libtest-client.la
1102
1103keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001104keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001105keyboard_weston_LDADD = libtest-client.la
1106
1107event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001108event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001109event_weston_LDADD = libtest-client.la
1110
1111button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001112button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001113button_weston_LDADD = libtest-client.la
1114
Marek Chalupa5fd81402015-03-30 09:21:29 -04001115devices_weston_SOURCES = tests/devices-test.c
1116devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1117devices_weston_LDADD = libtest-client.la
1118
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001119text_weston_SOURCES = tests/text-test.c
1120nodist_text_weston_SOURCES = \
1121 protocol/text-protocol.c \
1122 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001123text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001124text_weston_LDADD = libtest-client.la
1125
1126subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001127subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001128subsurface_weston_LDADD = libtest-client.la
1129
Jon A. Cruzb09da242015-06-16 13:15:13 -07001130presentation_weston_SOURCES = \
1131 tests/presentation-test.c \
1132 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001133nodist_presentation_weston_SOURCES = \
1134 protocol/presentation_timing-protocol.c \
1135 protocol/presentation_timing-client-protocol.h
1136presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1137presentation_weston_LDADD = libtest-client.la
1138
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001139roles_weston_SOURCES = tests/roles-test.c
1140roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1141roles_weston_LDADD = libtest-client.la
1142
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001143if ENABLE_EGL
1144weston_tests += buffer-count.weston
1145buffer_count_weston_SOURCES = tests/buffer-count-test.c
1146buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
1147buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1148endif
1149
1150if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001151weston_tests += xwayland-test.weston
1152xwayland_test_weston_SOURCES = tests/xwayland-test.c
1153xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
1154xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001155endif
1156
1157matrix_test_SOURCES = \
1158 tests/matrix-test.c \
1159 shared/matrix.c \
1160 shared/matrix.h
1161matrix_test_CPPFLAGS = -DUNIT_TEST
1162matrix_test_LDADD = -lm -lrt
1163
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001164if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001165module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001166 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001167 ivi-layout-test.la
1168
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001169ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1170ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
1171ivi_layout_internal_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1172ivi_layout_internal_test_la_SOURCES = \
1173 tests/ivi_layout-internal-test.c
1174
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001175ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1176ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
1177ivi_layout_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1178ivi_layout_test_la_SOURCES = \
1179 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001180 tests/ivi-test.h \
1181 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001182nodist_ivi_layout_test_la_SOURCES = \
1183 protocol/weston-test-protocol.c \
1184 protocol/weston-test-server-protocol.h
1185
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001186ivi_tests += \
1187 ivi-shell-app.weston
1188
1189ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1190nodist_ivi_shell_app_weston_SOURCES = \
1191 protocol/ivi-application-protocol.c \
1192 protocol/ivi-application-client-protocol.h
1193ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1194ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001195
1196noinst_PROGRAMS += ivi-layout.ivi
1197
1198ivi_layout_ivi_SOURCES = \
1199 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001200 tests/ivi-test.h \
1201 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001202nodist_ivi_layout_ivi_SOURCES = \
1203 protocol/ivi-application-protocol.c \
1204 protocol/ivi-application-client-protocol.h
1205ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1206ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001207endif
1208
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001209if BUILD_SETBACKLIGHT
1210noinst_PROGRAMS += setbacklight
1211setbacklight_SOURCES = \
1212 tests/setbacklight.c \
1213 src/libbacklight.c \
1214 src/libbacklight.h
1215setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1216setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1217endif
1218
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001219EXTRA_DIST += \
1220 tests/weston-tests-env \
1221 tests/internal-screenshot.ini \
1222 tests/reference/internal-screenshot-bad-00.png \
1223 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001224
1225BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001226 protocol/weston-test-protocol.c \
1227 protocol/weston-test-server-protocol.h \
1228 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001229 protocol/text-protocol.c \
1230 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001231
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001232EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001233 protocol/desktop-shell.xml \
1234 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001235 protocol/text.xml \
1236 protocol/input-method.xml \
1237 protocol/workspaces.xml \
1238 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001239 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001240 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001241 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001242 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001243 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001244 protocol/ivi-application.xml \
1245 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001246
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001247#
1248# manual test modules in tests subdirectory
1249#
1250
1251noinst_LTLIBRARIES += \
1252 surface-screenshot.la
1253
1254surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1255surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
1256surface_screenshot_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1257surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1258
1259
1260#
1261# Documentation
1262#
1263
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001264man_MANS = weston.1 weston.ini.5
1265
1266if ENABLE_DRM_COMPOSITOR
1267man_MANS += weston-drm.7
1268endif
1269
1270MAN_SUBSTS = \
1271 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1272 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1273 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1274 -e 's|__version__|$(PACKAGE_VERSION)|g'
1275
1276SUFFIXES = .1 .5 .7 .man
1277
1278%.1 %.5 %.7 : man/%.man
1279 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1280
1281EXTRA_DIST += \
1282 man/weston.man \
1283 man/weston-drm.man \
1284 man/weston.ini.man
1285
1286CLEANFILES += $(man_MANS)
1287
1288
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001289protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1290 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001291
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001292protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1293 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001294
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001295protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1296 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@