blob: eeb3cf94e566f0f0f8a47a14f8d7de26dcf216c5 [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 \
Jon Cruz35b2eaa2015-06-15 15:37:08 -0700193 shared/helpers.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100194 shared/zalloc.h \
195 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800196
197if ENABLE_EGL
198module_LTLIBRARIES += gl-renderer.la
199gl_renderer_la_LDFLAGS = -module -avoid-version
200gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
201gl_renderer_la_CFLAGS = \
202 $(COMPOSITOR_CFLAGS) \
203 $(EGL_CFLAGS) \
204 $(GCC_CFLAGS)
205gl_renderer_la_SOURCES = \
206 src/gl-renderer.h \
207 src/gl-renderer.c \
208 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700209 src/vertex-clipping.h \
210 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800211endif
212
213if ENABLE_X11_COMPOSITOR
214module_LTLIBRARIES += x11-backend.la
215x11_backend_la_LDFLAGS = -module -avoid-version
216x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800217 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800218x11_backend_la_CFLAGS = \
219 $(COMPOSITOR_CFLAGS) \
220 $(EGL_CFLAGS) \
221 $(PIXMAN_CFLAGS) \
222 $(CAIRO_CFLAGS) \
223 $(X11_COMPOSITOR_CFLAGS) \
224 $(GCC_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700225x11_backend_la_SOURCES = \
226 src/compositor-x11.c \
227 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800228endif
229
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100230INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000231INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100232 src/libinput-seat.c \
233 src/libinput-seat.h \
234 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700235 src/libinput-device.h \
236 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100237
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800238if ENABLE_DRM_COMPOSITOR
239module_LTLIBRARIES += drm-backend.la
240drm_backend_la_LDFLAGS = -module -avoid-version
241drm_backend_la_LIBADD = \
242 $(COMPOSITOR_LIBS) \
243 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100244 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100245 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800246 libsession-helper.la
247drm_backend_la_CFLAGS = \
248 $(COMPOSITOR_CFLAGS) \
249 $(EGL_CFLAGS) \
250 $(DRM_COMPOSITOR_CFLAGS) \
251 $(GCC_CFLAGS)
252drm_backend_la_SOURCES = \
253 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100254 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700255 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800256 src/libbacklight.c \
257 src/libbacklight.h
258
259if ENABLE_VAAPI_RECORDER
260drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
261drm_backend_la_LIBADD += $(LIBVA_LIBS)
262drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
263endif
264endif
265
266if ENABLE_WAYLAND_COMPOSITOR
267module_LTLIBRARIES += wayland-backend.la
268wayland_backend_la_LDFLAGS = -module -avoid-version
269wayland_backend_la_LIBADD = \
270 $(COMPOSITOR_LIBS) \
271 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800272 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800273wayland_backend_la_CFLAGS = \
274 $(COMPOSITOR_CFLAGS) \
275 $(EGL_CFLAGS) \
276 $(PIXMAN_CFLAGS) \
277 $(CAIRO_CFLAGS) \
278 $(WAYLAND_COMPOSITOR_CFLAGS) \
279 $(GCC_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700280wayland_backend_la_SOURCES = \
281 src/compositor-wayland.c \
282 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500283nodist_wayland_backend_la_SOURCES = \
284 protocol/fullscreen-shell-protocol.c \
285 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800286endif
287
288if ENABLE_RPI_COMPOSITOR
289if INSTALL_RPI_COMPOSITOR
290module_LTLIBRARIES += rpi-backend.la
291else
292noinst_LTLIBRARIES += rpi-backend.la
293endif
294
295rpi_backend_la_LDFLAGS = -module -avoid-version
296rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
297 $(RPI_COMPOSITOR_LIBS) \
298 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100299 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800300 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800301 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800302rpi_backend_la_CFLAGS = \
303 $(GCC_CFLAGS) \
304 $(COMPOSITOR_CFLAGS) \
305 $(RPI_COMPOSITOR_CFLAGS) \
306 $(RPI_BCM_HOST_CFLAGS)
307rpi_backend_la_SOURCES = \
308 src/compositor-rpi.c \
309 src/rpi-renderer.c \
310 src/rpi-renderer.h \
311 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700312 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100313 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800314
315if ENABLE_EGL
316rpi_backend_la_LIBADD += $(EGL_LIBS)
317rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
318endif
319
320endif
321
322if ENABLE_HEADLESS_COMPOSITOR
323module_LTLIBRARIES += headless-backend.la
324headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800325headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
326headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700327headless_backend_la_SOURCES = \
328 src/compositor-headless.c \
329 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800330endif
331
332if ENABLE_FBDEV_COMPOSITOR
333module_LTLIBRARIES += fbdev-backend.la
334fbdev_backend_la_LDFLAGS = -module -avoid-version
335fbdev_backend_la_LIBADD = \
336 $(COMPOSITOR_LIBS) \
337 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100338 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800339 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800340 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800341fbdev_backend_la_CFLAGS = \
342 $(COMPOSITOR_CFLAGS) \
343 $(EGL_CFLAGS) \
344 $(FBDEV_COMPOSITOR_CFLAGS) \
345 $(PIXMAN_CFLAGS) \
346 $(GCC_CFLAGS)
347fbdev_backend_la_SOURCES = \
348 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700349 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100350 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800351endif
352
353if ENABLE_RDP_COMPOSITOR
354module_LTLIBRARIES += rdp-backend.la
355rdp_backend_la_LDFLAGS = -module -avoid-version
356rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
357 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800358 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800359rdp_backend_la_CFLAGS = \
360 $(COMPOSITOR_CFLAGS) \
361 $(RDP_COMPOSITOR_CFLAGS) \
362 $(GCC_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700363rdp_backend_la_SOURCES = \
364 src/compositor-rdp.c \
365 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800366endif
367
368if HAVE_LCMS
369module_LTLIBRARIES += cms-static.la
370cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800371cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800372cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
373cms_static_la_SOURCES = \
374 src/cms-static.c \
375 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700376 src/cms-helper.h \
377 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800378if ENABLE_COLORD
379module_LTLIBRARIES += cms-colord.la
380cms_colord_la_LDFLAGS = -module -avoid-version
381cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
382cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
383cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100384 src/cms-colord.c \
385 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700386 src/cms-helper.h \
387 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800388endif
389endif
390
391noinst_PROGRAMS += spring-tool
392spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
393spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
394spring_tool_SOURCES = \
395 src/spring-tool.c \
396 src/animation.c \
397 shared/matrix.c \
398 shared/matrix.h \
399 src/compositor.h
400
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800401if BUILD_CLIENTS
402
403bin_PROGRAMS += weston-terminal weston-info
404
405libexec_PROGRAMS += \
406 weston-desktop-shell \
407 weston-screenshooter \
408 weston-keyboard \
409 weston-simple-im
410
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900411if ENABLE_IVI_SHELL
412libexec_PROGRAMS += \
413 weston-ivi-shell-user-interface
414endif
415
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800416demo_clients = \
417 weston-flower \
418 weston-image \
419 weston-cliptest \
420 weston-dnd \
421 weston-smoke \
422 weston-resizor \
423 weston-eventdemo \
424 weston-clickdot \
425 weston-transformed \
426 weston-fullscreen \
427 weston-stacking \
428 weston-calibrator \
429 weston-scaler
430
431if INSTALL_DEMO_CLIENTS
432bin_PROGRAMS += $(demo_clients)
433else
434noinst_PROGRAMS += $(demo_clients)
435endif
436
437
438if BUILD_SIMPLE_CLIENTS
439demo_clients += \
440 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500441 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800442 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400443 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800444 weston-multi-resource
445
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800446weston_simple_shm_SOURCES = clients/simple-shm.c
447nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800448 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500449 protocol/xdg-shell-client-protocol.h \
450 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900451 protocol/fullscreen-shell-client-protocol.h \
452 protocol/ivi-application-protocol.c \
453 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800454weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800455weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800456
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500457weston_simple_damage_SOURCES = clients/simple-damage.c
458nodist_weston_simple_damage_SOURCES = \
459 protocol/scaler-protocol.c \
460 protocol/scaler-client-protocol.h \
461 protocol/xdg-shell-protocol.c \
462 protocol/xdg-shell-client-protocol.h \
463 protocol/fullscreen-shell-protocol.c \
464 protocol/fullscreen-shell-client-protocol.h
465weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
466weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
467
Jon A. Cruzb09da242015-06-16 13:15:13 -0700468weston_simple_touch_SOURCES = \
469 clients/simple-touch.c \
470 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800471weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800472weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800473
Jon A. Cruzb09da242015-06-16 13:15:13 -0700474weston_presentation_shm_SOURCES = \
475 clients/presentation-shm.c \
476 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400477nodist_weston_presentation_shm_SOURCES = \
478 protocol/presentation_timing-protocol.c \
479 protocol/presentation_timing-client-protocol.h
480weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
481weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
482
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800483weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800484weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000485weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800486endif
487
488if BUILD_SIMPLE_EGL_CLIENTS
489demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800490weston_simple_egl_SOURCES = clients/simple-egl.c
491nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800492 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900493 protocol/xdg-shell-client-protocol.h \
494 protocol/ivi-application-protocol.c \
495 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800496weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800497weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
498endif
499
500noinst_LTLIBRARIES += libtoytoolkit.la
501
502libtoytoolkit_la_SOURCES = \
503 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700504 clients/window.h \
505 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800506
507nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100508 protocol/text-cursor-position-protocol.c \
509 protocol/text-cursor-position-client-protocol.h \
510 protocol/scaler-protocol.c \
511 protocol/scaler-client-protocol.h \
512 protocol/workspaces-protocol.c \
513 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400514 protocol/presentation_timing-protocol.c \
515 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100516 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900517 protocol/xdg-shell-client-protocol.h \
518 protocol/ivi-application-protocol.c \
519 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500520
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800521BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
522
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800523
524libtoytoolkit_la_LIBADD = \
525 $(CLIENT_LIBS) \
526 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800527 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800528libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800529
530weston_flower_SOURCES = clients/flower.c
531weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800532weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800533
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100534weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800535 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800536nodist_weston_screenshooter_SOURCES = \
537 protocol/screenshooter-protocol.c \
538 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800539weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800540weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800541
Jon A. Cruzb09da242015-06-16 13:15:13 -0700542weston_terminal_SOURCES = \
543 clients/terminal.c \
544 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800545weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800546weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800547
548weston_image_SOURCES = clients/image.c
549weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800550weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800551
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300552weston_cliptest_SOURCES = \
553 clients/cliptest.c \
554 src/vertex-clipping.c \
555 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800556weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800557weston_cliptest_LDADD = libtoytoolkit.la
558
Jon A. Cruzb09da242015-06-16 13:15:13 -0700559weston_dnd_SOURCES = \
560 clients/dnd.c \
561 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800562weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800563weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800564
565weston_smoke_SOURCES = clients/smoke.c
566weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800567weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800568
569weston_resizor_SOURCES = clients/resizor.c
570weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800571weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800572
573weston_scaler_SOURCES = clients/scaler.c
574weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800575weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800576
577if HAVE_CAIRO_GLESV2
578demo_clients += weston-nested weston-nested-client
579
Jon A. Cruzb09da242015-06-16 13:15:13 -0700580weston_nested_SOURCES = \
581 clients/nested.c \
582 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800583weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800584weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800585
586weston_nested_client_SOURCES = clients/nested-client.c
587weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800588weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800589endif
590
Jon A. Cruzb09da242015-06-16 13:15:13 -0700591weston_eventdemo_SOURCES = \
592 clients/eventdemo.c \
593 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800594weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800595weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800596
Jon A. Cruzb09da242015-06-16 13:15:13 -0700597weston_clickdot_SOURCES = \
598 clients/clickdot.c \
599 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800600weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800601weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800602
603weston_transformed_SOURCES = clients/transformed.c
604weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800605weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800606
607weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500608nodist_weston_fullscreen_SOURCES = \
609 protocol/fullscreen-shell-protocol.c \
610 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800611weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800612weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800613
Jon A. Cruzb09da242015-06-16 13:15:13 -0700614weston_stacking_SOURCES = \
615 clients/stacking.c \
616 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800617weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800618weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800619
Jon A. Cruzb09da242015-06-16 13:15:13 -0700620weston_calibrator_SOURCES = \
621 clients/calibrator.c \
622 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800623 shared/matrix.c \
624 shared/matrix.h
625weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800626weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800627
628if BUILD_SUBSURFACES_CLIENT
629demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700630weston_subsurfaces_SOURCES = \
631 clients/subsurfaces.c \
632 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800633weston_subsurfaces_CFLAGS = \
634 $(AM_CFLAGS) \
635 $(SIMPLE_EGL_CLIENT_CFLAGS) \
636 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800637weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
638endif
639
640if HAVE_PANGO
641demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700642weston_editor_SOURCES = \
643 clients/editor.c \
644 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800645nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100646 protocol/text-protocol.c \
647 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800648weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800649weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800650endif
651
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800652weston_keyboard_SOURCES = clients/keyboard.c
653nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100654 protocol/desktop-shell-client-protocol.h \
655 protocol/desktop-shell-protocol.c \
656 protocol/input-method-protocol.c \
657 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800658weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800659weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800660
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800661weston_simple_im_SOURCES = clients/weston-simple-im.c
662nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100663 protocol/input-method-protocol.c \
664 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800665weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800666weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800667
Jon A. Cruzb09da242015-06-16 13:15:13 -0700668weston_info_SOURCES = \
669 clients/weston-info.c \
670 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400671nodist_weston_info_SOURCES = \
672 protocol/presentation_timing-protocol.c \
673 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800674weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200675weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800676
Jon A. Cruzb09da242015-06-16 13:15:13 -0700677weston_desktop_shell_SOURCES = \
678 clients/desktop-shell.c \
679 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800680nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100681 protocol/desktop-shell-client-protocol.h \
682 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800683weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800684weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800685
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900686if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700687weston_ivi_shell_user_interface_SOURCES = \
688 clients/ivi-shell-user-interface.c \
689 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900690nodist_weston_ivi_shell_user_interface_SOURCES = \
691 protocol/ivi-hmi-controller-client-protocol.h \
692 protocol/ivi-hmi-controller-protocol.c \
693 protocol/ivi-application-client-protocol.h \
694 protocol/ivi-application-protocol.c
695weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
696weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
697endif
698
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800699if BUILD_FULL_GL_CLIENTS
700demo_clients += weston-gears
701weston_gears_SOURCES = clients/gears.c
702weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800703weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800704
705if HAVE_GLU
706libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100707weston_screensaver_SOURCES = \
708 clients/wscreensaver.c \
709 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100710 clients/wscreensaver-glue.c \
711 clients/wscreensaver-glue.h \
712 clients/glmatrix.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700713 clients/matrix3.xpm \
714 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800715nodist_weston_screensaver_SOURCES = \
716 protocol/desktop-shell-client-protocol.h \
717 protocol/desktop-shell-protocol.c
718
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800719weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800720weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800721
722endif
723
724endif
725
726endif
727
728BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100729 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800730 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100731 protocol/text-cursor-position-client-protocol.h \
732 protocol/text-cursor-position-protocol.c \
733 protocol/text-protocol.c \
734 protocol/text-client-protocol.h \
735 protocol/input-method-protocol.c \
736 protocol/input-method-client-protocol.h \
737 protocol/desktop-shell-client-protocol.h \
738 protocol/desktop-shell-protocol.c \
739 protocol/scaler-client-protocol.h \
740 protocol/scaler-protocol.c \
741 protocol/workspaces-client-protocol.h \
742 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500743 protocol/fullscreen-shell-protocol.c \
744 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100745 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900746 protocol/xdg-shell-client-protocol.h \
747 protocol/ivi-hmi-controller-protocol.c \
748 protocol/ivi-hmi-controller-client-protocol.h \
749 protocol/ivi-application-protocol.c \
750 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800751
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800752westondatadir = $(datadir)/weston
753dist_westondata_DATA = \
754 data/wayland.svg \
755 data/wayland.png \
756 data/pattern.png \
757 data/terminal.png \
758 data/border.png \
759 data/icon_window.png \
760 data/sign_close.png \
761 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100762 data/sign_minimize.png
763
764if ENABLE_IVI_SHELL
765dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900766 data/background.png \
767 data/tiling.png \
768 data/fullscreen.png \
769 data/panel.png \
770 data/random.png \
771 data/sidebyside.png \
772 data/home.png \
773 data/icon_ivi_clickdot.png \
774 data/icon_ivi_flower.png \
775 data/icon_ivi_simple-egl.png \
776 data/icon_ivi_simple-shm.png \
777 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100778endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800779
780
781if BUILD_WCAP_TOOLS
782bin_PROGRAMS += wcap-decode
783
784wcap_decode_SOURCES = \
785 wcap/main.c \
786 wcap/wcap-decode.c \
787 wcap/wcap-decode.h
788
789wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
790wcap_decode_LDADD = $(WCAP_LIBS)
791endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800792
793
794if ENABLE_DESKTOP_SHELL
795
796module_LTLIBRARIES += desktop-shell.la
797
798desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100799 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800800 -I$(top_srcdir)/shared \
801 -I$(top_srcdir)/src \
802 -I$(top_builddir)/src \
803 -I$(top_builddir)/desktop-shell \
804 -DDATADIR='"$(datadir)"' \
805 -DMODULEDIR='"$(moduledir)"' \
806 -DLIBEXECDIR='"$(libexecdir)"' \
807 -DIN_WESTON
808
809desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800810desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800811desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
812desktop_shell_la_SOURCES = \
813 desktop-shell/shell.h \
814 desktop-shell/shell.c \
815 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700816 desktop-shell/input-panel.c \
817 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800818nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100819 protocol/desktop-shell-protocol.c \
820 protocol/desktop-shell-server-protocol.h \
821 protocol/xdg-shell-protocol.c \
822 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800823
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800824BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800825endif
826
Jason Ekstrand946a9482014-04-02 19:53:47 -0500827if ENABLE_FULLSCREEN_SHELL
828
829module_LTLIBRARIES += fullscreen-shell.la
830
831fullscreen_shell_la_CPPFLAGS = \
832 -I$(top_builddir)/protocol \
833 -I$(top_srcdir)/shared \
834 -I$(top_srcdir)/src \
835 -I$(top_builddir)/src \
836 -DIN_WESTON
837
838fullscreen_shell_la_LDFLAGS = -module -avoid-version
839fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
840fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
841fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700842 fullscreen-shell/fullscreen-shell.c \
843 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500844nodist_fullscreen_shell_la_SOURCES = \
845 protocol/fullscreen-shell-protocol.c \
846 protocol/fullscreen-shell-server-protocol.h
847
848BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
849endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800850
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900851if ENABLE_IVI_SHELL
852
853module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900854 $(ivi_shell) \
855 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900856
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900857ivi_shell = ivi-shell.la
858ivi_shell_la_LDFLAGS = -module -avoid-version
859ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
860ivi_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
861ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900862 ivi-shell/ivi-layout-export.h \
863 ivi-shell/ivi-layout-private.h \
864 ivi-shell/ivi-layout.c \
865 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900866 ivi-shell/ivi-shell.h \
867 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700868 ivi-shell/input-panel-ivi.c \
869 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900870nodist_ivi_shell_la_SOURCES = \
871 protocol/ivi-application-protocol.c \
872 protocol/ivi-application-server-protocol.h
873
874BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
875
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900876hmi_controller = hmi-controller.la
877hmi_controller_la_LDFLAGS = -module -avoid-version
878hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
879hmi_controller_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
880hmi_controller_la_SOURCES = \
881 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700882 ivi-shell/hmi-controller.c \
883 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900884nodist_hmi_controller_la_SOURCES = \
885 protocol/ivi-hmi-controller-protocol.c \
886 protocol/ivi-hmi-controller-server-protocol.h
887
888BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
889
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900890endif
891
892
Jason Ekstrand47928d82014-04-02 19:54:01 -0500893if ENABLE_SCREEN_SHARING
894
895module_LTLIBRARIES += screen-share.la
896
897screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
898screen_share_la_LDFLAGS = -module -avoid-version
899screen_share_la_LIBADD = \
900 $(COMPOSITOR_LIBS) \
901 $(SCREEN_SHARE_LIBS) \
902 libshared-cairo.la
903screen_share_la_CFLAGS = \
904 $(COMPOSITOR_CFLAGS) \
905 $(SCREEN_SHARE_CFLAGS) \
906 $(GCC_CFLAGS)
907screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700908 src/screen-share.c \
909 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500910nodist_screen_share_la_SOURCES = \
911 protocol/fullscreen-shell-protocol.c \
912 protocol/fullscreen-shell-client-protocol.h
913
914endif
915
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800916if ENABLE_XWAYLAND
917
918module_LTLIBRARIES += xwayland.la
919
920xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100921 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800922 -I$(top_srcdir)/shared \
923 -I$(top_srcdir)/src \
924 -I$(top_builddir)/src \
925 -I$(top_builddir)/xwayland \
926 -DDATADIR='"$(datadir)"' \
927 -DMODULEDIR='"$(moduledir)"' \
928 -DLIBEXECDIR='"$(libexecdir)"' \
929 -DXSERVER_PATH='"@XSERVER_PATH@"'
930
931xwayland_la_LDFLAGS = -module -avoid-version
932xwayland_la_LIBADD = \
933 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800934 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800935xwayland_la_CFLAGS = \
936 $(GCC_CFLAGS) \
937 $(COMPOSITOR_CFLAGS) \
938 $(PIXMAN_CFLAGS) \
939 $(CAIRO_CFLAGS)
940xwayland_la_SOURCES = \
941 xwayland/xwayland.h \
942 xwayland/window-manager.c \
943 xwayland/selection.c \
944 xwayland/dnd.c \
945 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800946 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700947 xwayland/hash.h \
948 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800949endif
950
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800951
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800952#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800953# Shared utilities
954#
955
956noinst_LTLIBRARIES += libshared.la libshared-cairo.la
957
958libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
959
960libshared_la_SOURCES = \
961 shared/config-parser.c \
962 shared/option-parser.c \
963 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200964 shared/file-util.c \
965 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700966 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800967 shared/os-compatibility.c \
968 shared/os-compatibility.h
969
970libshared_cairo_la_CFLAGS = \
971 -DDATADIR='"$(datadir)"' \
972 $(GCC_CFLAGS) \
973 $(COMPOSITOR_CFLAGS) \
974 $(PIXMAN_CFLAGS) \
975 $(CAIRO_CFLAGS) \
976 $(PNG_CFLAGS) \
977 $(WEBP_CFLAGS)
978
979libshared_cairo_la_LIBADD = \
980 $(PIXMAN_LIBS) \
981 $(CAIRO_LIBS) \
982 $(PNG_LIBS) \
983 $(WEBP_LIBS) \
984 $(JPEG_LIBS)
985
986libshared_cairo_la_SOURCES = \
987 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700988 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800989 shared/image-loader.c \
990 shared/image-loader.h \
991 shared/cairo-util.c \
992 shared/frame.c \
993 shared/cairo-util.h
994
995
996#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800997# tests subdirectory
998#
999
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001000TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1001
1002internal_tests = \
1003 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001004
1005shared_tests = \
1006 config-parser.test \
1007 vertex-clip.test
1008
1009module_tests = \
1010 surface-test.la \
1011 surface-global-test.la
1012
1013weston_tests = \
1014 bad_buffer.weston \
1015 keyboard.weston \
1016 event.weston \
1017 button.weston \
1018 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001019 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001020 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001021 subsurface.weston \
1022 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001023
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001024ivi_tests =
1025
1026$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001027
1028AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001029 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1030 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001031
1032TEST_EXTENSIONS = .la .weston
1033LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1034WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1035
1036clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001037 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001038
1039# To remove when automake 1.11 support is dropped
1040export abs_builddir
1041
1042noinst_LTLIBRARIES += \
1043 weston-test.la \
1044 $(module_tests) \
1045 libtest-runner.la \
1046 libtest-client.la
1047
1048noinst_PROGRAMS += \
1049 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001050 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001051 $(shared_tests) \
1052 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001053 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001054 matrix-test
1055
1056test_module_ldflags = \
1057 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1058
1059surface_global_test_la_SOURCES = tests/surface-global-test.c
1060surface_global_test_la_LDFLAGS = $(test_module_ldflags)
1061surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1062
1063surface_test_la_SOURCES = tests/surface-test.c
1064surface_test_la_LDFLAGS = $(test_module_ldflags)
1065surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1066
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001067weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001068weston_test_la_LDFLAGS = $(test_module_ldflags)
1069weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001070weston_test_la_SOURCES = \
1071 tests/weston-test.c \
1072 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001073nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001074 protocol/weston-test-protocol.c \
1075 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001076
1077if ENABLE_EGL
1078weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1079weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1080endif
1081
1082libtest_runner_la_SOURCES = \
1083 tests/weston-test-runner.c \
1084 tests/weston-test-runner.h
1085libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1086
1087config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001088config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001089
1090vertex_clip_test_SOURCES = \
1091 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001092 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001093 src/vertex-clipping.c \
1094 src/vertex-clipping.h
1095vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1096
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001097libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001098 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001099 tests/weston-test-client-helper.h
1100nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001101 protocol/weston-test-protocol.c \
1102 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001103libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001104libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001105
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001106
1107#
1108# Internal tests - tests functionality of the testsuite itself
1109#
1110
1111internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
1112internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1113internal_screenshot_weston_LDADD = libtest-client.la $(CAIRO_LIBS)
1114
1115
1116#
1117# Weston Tests
1118#
1119
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001120bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001121bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001122bad_buffer_weston_LDADD = libtest-client.la
1123
1124keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001125keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001126keyboard_weston_LDADD = libtest-client.la
1127
1128event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001129event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001130event_weston_LDADD = libtest-client.la
1131
1132button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001133button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001134button_weston_LDADD = libtest-client.la
1135
Marek Chalupa5fd81402015-03-30 09:21:29 -04001136devices_weston_SOURCES = tests/devices-test.c
1137devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1138devices_weston_LDADD = libtest-client.la
1139
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001140text_weston_SOURCES = tests/text-test.c
1141nodist_text_weston_SOURCES = \
1142 protocol/text-protocol.c \
1143 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001144text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001145text_weston_LDADD = libtest-client.la
1146
1147subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001148subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001149subsurface_weston_LDADD = libtest-client.la
1150
Jon A. Cruzb09da242015-06-16 13:15:13 -07001151presentation_weston_SOURCES = \
1152 tests/presentation-test.c \
1153 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001154nodist_presentation_weston_SOURCES = \
1155 protocol/presentation_timing-protocol.c \
1156 protocol/presentation_timing-client-protocol.h
1157presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1158presentation_weston_LDADD = libtest-client.la
1159
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001160roles_weston_SOURCES = tests/roles-test.c
1161roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1162roles_weston_LDADD = libtest-client.la
1163
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001164if ENABLE_EGL
1165weston_tests += buffer-count.weston
1166buffer_count_weston_SOURCES = tests/buffer-count-test.c
1167buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
1168buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1169endif
1170
1171if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001172weston_tests += xwayland-test.weston
1173xwayland_test_weston_SOURCES = tests/xwayland-test.c
1174xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
1175xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001176endif
1177
1178matrix_test_SOURCES = \
1179 tests/matrix-test.c \
1180 shared/matrix.c \
1181 shared/matrix.h
1182matrix_test_CPPFLAGS = -DUNIT_TEST
1183matrix_test_LDADD = -lm -lrt
1184
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001185if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001186module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001187 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001188 ivi-layout-test.la
1189
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001190ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1191ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
1192ivi_layout_internal_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1193ivi_layout_internal_test_la_SOURCES = \
1194 tests/ivi_layout-internal-test.c
1195
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001196ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1197ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
1198ivi_layout_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1199ivi_layout_test_la_SOURCES = \
1200 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001201 tests/ivi-test.h \
1202 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001203nodist_ivi_layout_test_la_SOURCES = \
1204 protocol/weston-test-protocol.c \
1205 protocol/weston-test-server-protocol.h
1206
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001207ivi_tests += \
1208 ivi-shell-app.weston
1209
1210ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1211nodist_ivi_shell_app_weston_SOURCES = \
1212 protocol/ivi-application-protocol.c \
1213 protocol/ivi-application-client-protocol.h
1214ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1215ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001216
1217noinst_PROGRAMS += ivi-layout.ivi
1218
1219ivi_layout_ivi_SOURCES = \
1220 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001221 tests/ivi-test.h \
1222 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001223nodist_ivi_layout_ivi_SOURCES = \
1224 protocol/ivi-application-protocol.c \
1225 protocol/ivi-application-client-protocol.h
1226ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1227ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001228endif
1229
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001230if BUILD_SETBACKLIGHT
1231noinst_PROGRAMS += setbacklight
1232setbacklight_SOURCES = \
1233 tests/setbacklight.c \
1234 src/libbacklight.c \
1235 src/libbacklight.h
1236setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1237setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1238endif
1239
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001240EXTRA_DIST += \
1241 tests/weston-tests-env \
1242 tests/internal-screenshot.ini \
1243 tests/reference/internal-screenshot-bad-00.png \
1244 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001245
1246BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001247 protocol/weston-test-protocol.c \
1248 protocol/weston-test-server-protocol.h \
1249 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001250 protocol/text-protocol.c \
1251 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001252
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001253EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001254 protocol/desktop-shell.xml \
1255 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001256 protocol/text.xml \
1257 protocol/input-method.xml \
1258 protocol/workspaces.xml \
1259 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001260 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001261 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001262 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001263 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001264 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001265 protocol/ivi-application.xml \
1266 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001267
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001268#
1269# manual test modules in tests subdirectory
1270#
1271
1272noinst_LTLIBRARIES += \
1273 surface-screenshot.la
1274
1275surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1276surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
1277surface_screenshot_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
1278surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1279
1280
1281#
1282# Documentation
1283#
1284
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001285man_MANS = weston.1 weston.ini.5
1286
1287if ENABLE_DRM_COMPOSITOR
1288man_MANS += weston-drm.7
1289endif
1290
1291MAN_SUBSTS = \
1292 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1293 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1294 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1295 -e 's|__version__|$(PACKAGE_VERSION)|g'
1296
1297SUFFIXES = .1 .5 .7 .man
1298
1299%.1 %.5 %.7 : man/%.man
1300 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1301
1302EXTRA_DIST += \
1303 man/weston.man \
1304 man/weston-drm.man \
1305 man/weston.ini.man
1306
1307CLEANFILES += $(man_MANS)
1308
1309
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001310protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1311 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001312
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001313protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1314 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001315
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001316protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1317 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@