blob: c6d2ba6666e8f1343ae7cfcb9f8f17924caeb45d [file] [log] [blame]
Thierry Reding0e6d9a72014-05-27 09:07:54 +02001ACLOCAL_AMFLAGS = -I m4
2
Kristian Høgsberge895f142014-01-27 21:46:30 -08003bin_PROGRAMS =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08004noinst_PROGRAMS =
Kristian Høgsberge73eccd2014-01-31 16:15:11 -08005libexec_PROGRAMS =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08006moduledir = $(libdir)/weston
7module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08008noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08009BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -080010
Derek Foreman2ef9e812015-02-09 09:57:29 -060011AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050012
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090013EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000014
15weston.ini : $(srcdir)/weston.ini.in
16 $(AM_V_GEN)$(SED) \
17 -e 's|@bindir[@]|$(bindir)|g' \
18 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
19 -e 's|@libexecdir[@]|$(libexecdir)|g' \
20 $< > $@
21
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090022ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
Ross Burton2eff22b2015-07-17 12:33:45 +010023 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090024 -e 's|@bindir[@]|$(bindir)|g' \
25 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020026 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090027 -e 's|@libexecdir[@]|$(libexecdir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020028 -e 's|@plugin_prefix[@]||g' \
29 $< > $@
30
31tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in
Ross Burton2eff22b2015-07-17 12:33:45 +010032 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020033 -e 's|@bindir[@]|$(bindir)|g' \
34 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
Pekka Paalanen8cb25872015-03-24 14:09:57 +020035 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
Derek Foremanbbdd9bc2015-06-16 13:30:35 -050036 -e 's|@libexecdir[@]|$(abs_builddir)|g' \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020037 -e 's|@plugin_prefix[@]|$(abs_top_builddir)/.libs/|g' \
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090038 $< > $@
39
40all-local : weston.ini ivi-shell/weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080041
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080042AM_CFLAGS = $(GCC_CFLAGS)
43
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080044AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080045 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080046 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080047 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080048 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080049 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010050 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080051 -DDATADIR='"$(datadir)"' \
52 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080053 -DLIBEXECDIR='"$(libexecdir)"' \
54 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080055
Pekka Paalanenf3a34532015-03-24 13:51:05 +020056CLEANFILES = weston.ini \
57 ivi-shell/weston.ini \
58 tests/weston-ivi.ini \
Derek Foreman1ce2ef52015-05-26 10:21:03 -050059 internal-screenshot-00.png \
Pekka Paalanenf3a34532015-03-24 13:51:05 +020060 $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080061
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080062bin_PROGRAMS += weston
63
64weston_LDFLAGS = -export-dynamic
65weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
Derek Foreman4ff38742015-06-18 11:43:11 -050066weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080067weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080068 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080069
70weston_SOURCES = \
71 src/git-version.h \
72 src/log.c \
73 src/compositor.c \
74 src/compositor.h \
75 src/input.c \
76 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080077 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080078 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080079 src/zoom.c \
80 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080081 src/bindings.c \
82 src/animation.c \
83 src/noop-renderer.c \
84 src/pixman-renderer.c \
85 src/pixman-renderer.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +020086 src/timeline.c \
87 src/timeline.h \
88 src/timeline-object.h \
Giulio Camuffobab996e2014-10-12 00:24:25 +030089 src/main.c \
Pekka Paalanen230f3b12014-09-29 14:18:40 -040090 src/linux-dmabuf.c \
91 src/linux-dmabuf.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -070092 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080093 shared/matrix.c \
94 shared/matrix.h \
Pekka Paalanenaa21f622015-07-03 15:44:50 +030095 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080096 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +010097 shared/platform.h \
Egor Starkov7ce2e972015-09-25 18:00:27 +030098 src/weston-egl-ext.h \
99 src/systemd-notify.h
100
101if SYSTEMD_NOTIFY_SUPPORT
102module_LTLIBRARIES += systemd-notify.la
103systemd_notify_la_LDFLAGS = -module -avoid-version
104systemd_notify_la_LIBADD = $(SYSTEMD_DAEMON_LIBS)
105systemd_notify_la_CFLAGS = \
106 $(SYSTEMD_DAEMON_LIBS) \
107 $(PIXMAN_CFLAGS) \
108 $(AM_CFLAGS)
109systemd_notify_la_SOURCES = \
110 src/systemd-notify.c \
111 src/systemd-notify.h \
112 shared/helpers.h \
113 shared/zalloc.h \
Bryce Harringtona0dd5b42015-09-25 15:16:25 -0700114 src/compositor.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300115endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800116
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800117nodist_weston_SOURCES = \
118 protocol/screenshooter-protocol.c \
119 protocol/screenshooter-server-protocol.h \
120 protocol/text-cursor-position-protocol.c \
121 protocol/text-cursor-position-server-protocol.h \
122 protocol/text-protocol.c \
123 protocol/text-server-protocol.h \
124 protocol/input-method-protocol.c \
125 protocol/input-method-server-protocol.h \
126 protocol/workspaces-protocol.c \
127 protocol/workspaces-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400128 protocol/presentation_timing-protocol.c \
129 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800130 protocol/scaler-protocol.c \
Pekka Paalanen23ab7152014-09-29 14:08:29 -0400131 protocol/scaler-server-protocol.h \
132 protocol/linux-dmabuf-protocol.c \
133 protocol/linux-dmabuf-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800134
135BUILT_SOURCES += $(nodist_weston_SOURCES)
136
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800137# Track this dependency explicitly instead of using BUILT_SOURCES. We
138# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
139# in case we're building from tarballs.
140
141src/compositor.c : $(top_builddir)/src/git-version.h
142
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800143noinst_LTLIBRARIES += \
144 libsession-helper.la
145
146libsession_helper_la_SOURCES = \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800147 src/launcher-util.c \
Jasper St. Pierre72dea062015-09-23 10:46:47 -0700148 src/launcher-util.h \
Derek Foremancb156202015-09-24 09:26:48 -0500149 src/launcher-impl.h \
Jasper St. Pierre72dea062015-09-23 10:46:47 -0700150 src/weston-launch.h \
151 src/launcher-weston-launch.c \
152 src/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500153libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800154libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
155
156if ENABLE_DBUS
157if HAVE_SYSTEMD_LOGIN
158libsession_helper_la_SOURCES += \
159 src/dbus.h \
160 src/dbus.c \
Jasper St. Pierre30bcf352015-09-23 10:46:46 -0700161 src/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800162libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
163libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
164endif
165endif
166
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800167if HAVE_GIT_REPO
168src/git-version.h : $(top_srcdir)/.git/logs/HEAD
169 $(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 -0800170else
171src/git-version.h :
172 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
173
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800174endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800175
176.FORCE :
177
178if BUILD_WESTON_LAUNCH
179bin_PROGRAMS += weston-launch
180weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
181weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
182weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500183 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800184 $(PAM_CFLAGS) \
185 $(SYSTEMD_LOGIN_CFLAGS) \
186 $(LIBDRM_CFLAGS)
187weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
188
189if ENABLE_SETUID_INSTALL
190install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700191 can_suid_files=no; \
192 chown root $(DESTDIR)$(bindir)/weston-launch \
193 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
194 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500195 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700196 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
197 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
198 false; \
199 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800200endif
201
202endif # BUILD_WESTON_LAUNCH
203
204pkgconfigdir = $(libdir)/pkgconfig
205pkgconfig_DATA = src/weston.pc
206
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100207wayland_sessiondir = $(datadir)/wayland-sessions
Ross Burton315476f2015-07-16 20:56:32 +0100208dist_wayland_session_DATA = src/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100209
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800210westonincludedir = $(includedir)/weston
211westoninclude_HEADERS = \
212 src/version.h \
213 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200214 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800215 shared/matrix.h \
216 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100217 shared/zalloc.h \
218 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800219
220if ENABLE_EGL
221module_LTLIBRARIES += gl-renderer.la
222gl_renderer_la_LDFLAGS = -module -avoid-version
223gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
224gl_renderer_la_CFLAGS = \
225 $(COMPOSITOR_CFLAGS) \
226 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300227 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500228 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800229gl_renderer_la_SOURCES = \
230 src/gl-renderer.h \
231 src/gl-renderer.c \
232 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700233 src/vertex-clipping.h \
234 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800235endif
236
237if ENABLE_X11_COMPOSITOR
238module_LTLIBRARIES += x11-backend.la
239x11_backend_la_LDFLAGS = -module -avoid-version
240x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800241 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800242x11_backend_la_CFLAGS = \
243 $(COMPOSITOR_CFLAGS) \
244 $(EGL_CFLAGS) \
245 $(PIXMAN_CFLAGS) \
246 $(CAIRO_CFLAGS) \
247 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500248 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700249x11_backend_la_SOURCES = \
250 src/compositor-x11.c \
251 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800252endif
253
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100254INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000255INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100256 src/libinput-seat.c \
257 src/libinput-seat.h \
258 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700259 src/libinput-device.h \
260 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100261
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800262if ENABLE_DRM_COMPOSITOR
263module_LTLIBRARIES += drm-backend.la
264drm_backend_la_LDFLAGS = -module -avoid-version
265drm_backend_la_LIBADD = \
266 $(COMPOSITOR_LIBS) \
267 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100268 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100269 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800270 libsession-helper.la
271drm_backend_la_CFLAGS = \
272 $(COMPOSITOR_CFLAGS) \
273 $(EGL_CFLAGS) \
274 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500275 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800276drm_backend_la_SOURCES = \
277 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100278 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700279 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200280 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800281 src/libbacklight.c \
282 src/libbacklight.h
283
284if ENABLE_VAAPI_RECORDER
285drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
286drm_backend_la_LIBADD += $(LIBVA_LIBS)
287drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
288endif
289endif
290
291if ENABLE_WAYLAND_COMPOSITOR
292module_LTLIBRARIES += wayland-backend.la
293wayland_backend_la_LDFLAGS = -module -avoid-version
294wayland_backend_la_LIBADD = \
295 $(COMPOSITOR_LIBS) \
296 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800297 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800298wayland_backend_la_CFLAGS = \
299 $(COMPOSITOR_CFLAGS) \
300 $(EGL_CFLAGS) \
301 $(PIXMAN_CFLAGS) \
302 $(CAIRO_CFLAGS) \
303 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500304 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700305wayland_backend_la_SOURCES = \
306 src/compositor-wayland.c \
307 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500308nodist_wayland_backend_la_SOURCES = \
309 protocol/fullscreen-shell-protocol.c \
310 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800311endif
312
313if ENABLE_RPI_COMPOSITOR
314if INSTALL_RPI_COMPOSITOR
315module_LTLIBRARIES += rpi-backend.la
316else
317noinst_LTLIBRARIES += rpi-backend.la
318endif
319
320rpi_backend_la_LDFLAGS = -module -avoid-version
321rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
322 $(RPI_COMPOSITOR_LIBS) \
323 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100324 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800325 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800326 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800327rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500328 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800329 $(COMPOSITOR_CFLAGS) \
330 $(RPI_COMPOSITOR_CFLAGS) \
331 $(RPI_BCM_HOST_CFLAGS)
332rpi_backend_la_SOURCES = \
333 src/compositor-rpi.c \
334 src/rpi-renderer.c \
335 src/rpi-renderer.h \
336 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700337 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100338 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800339
340if ENABLE_EGL
341rpi_backend_la_LIBADD += $(EGL_LIBS)
342rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
343endif
344
345endif
346
347if ENABLE_HEADLESS_COMPOSITOR
348module_LTLIBRARIES += headless-backend.la
349headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800350headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500351headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700352headless_backend_la_SOURCES = \
353 src/compositor-headless.c \
354 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800355endif
356
357if ENABLE_FBDEV_COMPOSITOR
358module_LTLIBRARIES += fbdev-backend.la
359fbdev_backend_la_LDFLAGS = -module -avoid-version
360fbdev_backend_la_LIBADD = \
361 $(COMPOSITOR_LIBS) \
362 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100363 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800364 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800365 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800366fbdev_backend_la_CFLAGS = \
367 $(COMPOSITOR_CFLAGS) \
368 $(EGL_CFLAGS) \
369 $(FBDEV_COMPOSITOR_CFLAGS) \
370 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500371 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800372fbdev_backend_la_SOURCES = \
373 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700374 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100375 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800376endif
377
378if ENABLE_RDP_COMPOSITOR
379module_LTLIBRARIES += rdp-backend.la
380rdp_backend_la_LDFLAGS = -module -avoid-version
381rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
382 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800383 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800384rdp_backend_la_CFLAGS = \
385 $(COMPOSITOR_CFLAGS) \
386 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500387 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700388rdp_backend_la_SOURCES = \
389 src/compositor-rdp.c \
390 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800391endif
392
393if HAVE_LCMS
394module_LTLIBRARIES += cms-static.la
395cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800396cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500397cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800398cms_static_la_SOURCES = \
399 src/cms-static.c \
400 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700401 src/cms-helper.h \
402 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800403if ENABLE_COLORD
404module_LTLIBRARIES += cms-colord.la
405cms_colord_la_LDFLAGS = -module -avoid-version
406cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500407cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800408cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100409 src/cms-colord.c \
410 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700411 src/cms-helper.h \
412 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800413endif
414endif
415
416noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500417spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800418spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
419spring_tool_SOURCES = \
420 src/spring-tool.c \
421 src/animation.c \
422 shared/matrix.c \
423 shared/matrix.h \
424 src/compositor.h
425
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800426if BUILD_CLIENTS
427
428bin_PROGRAMS += weston-terminal weston-info
429
430libexec_PROGRAMS += \
431 weston-desktop-shell \
432 weston-screenshooter \
433 weston-keyboard \
434 weston-simple-im
435
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900436if ENABLE_IVI_SHELL
437libexec_PROGRAMS += \
438 weston-ivi-shell-user-interface
439endif
440
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800441demo_clients = \
442 weston-flower \
443 weston-image \
444 weston-cliptest \
445 weston-dnd \
446 weston-smoke \
447 weston-resizor \
448 weston-eventdemo \
449 weston-clickdot \
450 weston-transformed \
451 weston-fullscreen \
452 weston-stacking \
453 weston-calibrator \
454 weston-scaler
455
456if INSTALL_DEMO_CLIENTS
457bin_PROGRAMS += $(demo_clients)
458else
459noinst_PROGRAMS += $(demo_clients)
460endif
461
462
463if BUILD_SIMPLE_CLIENTS
464demo_clients += \
465 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500466 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800467 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400468 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800469 weston-multi-resource
470
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800471weston_simple_shm_SOURCES = clients/simple-shm.c
472nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800473 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500474 protocol/xdg-shell-client-protocol.h \
475 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900476 protocol/fullscreen-shell-client-protocol.h \
477 protocol/ivi-application-protocol.c \
478 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800479weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800480weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800481
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500482weston_simple_damage_SOURCES = clients/simple-damage.c
483nodist_weston_simple_damage_SOURCES = \
484 protocol/scaler-protocol.c \
485 protocol/scaler-client-protocol.h \
486 protocol/xdg-shell-protocol.c \
487 protocol/xdg-shell-client-protocol.h \
488 protocol/fullscreen-shell-protocol.c \
489 protocol/fullscreen-shell-client-protocol.h
490weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
491weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
492
Jon A. Cruzb09da242015-06-16 13:15:13 -0700493weston_simple_touch_SOURCES = \
494 clients/simple-touch.c \
495 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800496weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800497weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800498
Jon A. Cruzb09da242015-06-16 13:15:13 -0700499weston_presentation_shm_SOURCES = \
500 clients/presentation-shm.c \
501 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400502nodist_weston_presentation_shm_SOURCES = \
503 protocol/presentation_timing-protocol.c \
504 protocol/presentation_timing-client-protocol.h
505weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
506weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
507
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800508weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800509weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000510weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800511endif
512
513if BUILD_SIMPLE_EGL_CLIENTS
514demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800515weston_simple_egl_SOURCES = clients/simple-egl.c
516nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800517 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900518 protocol/xdg-shell-client-protocol.h \
519 protocol/ivi-application-protocol.c \
520 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800521weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800522weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
523endif
524
George Kiagiadakis53868982014-06-12 16:26:49 +0200525if BUILD_SIMPLE_INTEL_DMABUF_CLIENT
526demo_clients += weston-simple-dmabuf
527weston_simple_dmabuf_SOURCES = clients/simple-dmabuf.c
528nodist_weston_simple_dmabuf_SOURCES = \
529 protocol/xdg-shell-protocol.c \
530 protocol/xdg-shell-client-protocol.h \
531 protocol/fullscreen-shell-protocol.c \
532 protocol/fullscreen-shell-client-protocol.h \
533 protocol/linux-dmabuf-protocol.c \
534 protocol/linux-dmabuf-client-protocol.h
535weston_simple_dmabuf_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_CLIENT_CFLAGS)
536weston_simple_dmabuf_LDADD = $(SIMPLE_DMABUF_CLIENT_LIBS) libshared.la
537BUILT_SOURCES += protocol/linux-dmabuf-client-protocol.h
538endif
539
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800540noinst_LTLIBRARIES += libtoytoolkit.la
541
542libtoytoolkit_la_SOURCES = \
543 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700544 clients/window.h \
545 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800546
547nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100548 protocol/text-cursor-position-protocol.c \
549 protocol/text-cursor-position-client-protocol.h \
550 protocol/scaler-protocol.c \
551 protocol/scaler-client-protocol.h \
552 protocol/workspaces-protocol.c \
553 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400554 protocol/presentation_timing-protocol.c \
555 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100556 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900557 protocol/xdg-shell-client-protocol.h \
558 protocol/ivi-application-protocol.c \
559 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500560
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800561BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
562
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800563
564libtoytoolkit_la_LIBADD = \
565 $(CLIENT_LIBS) \
566 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800567 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800568libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800569
570weston_flower_SOURCES = clients/flower.c
571weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800572weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800573
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100574weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800575 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800576nodist_weston_screenshooter_SOURCES = \
577 protocol/screenshooter-protocol.c \
578 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800579weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800580weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800581
Jon A. Cruzb09da242015-06-16 13:15:13 -0700582weston_terminal_SOURCES = \
583 clients/terminal.c \
584 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800585weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800586weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800587
588weston_image_SOURCES = clients/image.c
589weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800590weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800591
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300592weston_cliptest_SOURCES = \
593 clients/cliptest.c \
594 src/vertex-clipping.c \
595 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800596weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800597weston_cliptest_LDADD = libtoytoolkit.la
598
Jon A. Cruzb09da242015-06-16 13:15:13 -0700599weston_dnd_SOURCES = \
600 clients/dnd.c \
601 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800602weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800603weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800604
605weston_smoke_SOURCES = clients/smoke.c
606weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800607weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800608
609weston_resizor_SOURCES = clients/resizor.c
610weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800611weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800612
613weston_scaler_SOURCES = clients/scaler.c
614weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800615weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800616
617if HAVE_CAIRO_GLESV2
618demo_clients += weston-nested weston-nested-client
619
Jon A. Cruzb09da242015-06-16 13:15:13 -0700620weston_nested_SOURCES = \
621 clients/nested.c \
622 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800623weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800624weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800625
626weston_nested_client_SOURCES = clients/nested-client.c
627weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800628weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800629endif
630
Jon A. Cruzb09da242015-06-16 13:15:13 -0700631weston_eventdemo_SOURCES = \
632 clients/eventdemo.c \
633 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800634weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800635weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800636
Jon A. Cruzb09da242015-06-16 13:15:13 -0700637weston_clickdot_SOURCES = \
638 clients/clickdot.c \
639 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800640weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800641weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800642
643weston_transformed_SOURCES = clients/transformed.c
644weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800645weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800646
647weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500648nodist_weston_fullscreen_SOURCES = \
649 protocol/fullscreen-shell-protocol.c \
650 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800651weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800652weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800653
Jon A. Cruzb09da242015-06-16 13:15:13 -0700654weston_stacking_SOURCES = \
655 clients/stacking.c \
656 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800657weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800658weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800659
Jon A. Cruzb09da242015-06-16 13:15:13 -0700660weston_calibrator_SOURCES = \
661 clients/calibrator.c \
662 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800663 shared/matrix.c \
664 shared/matrix.h
665weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800666weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800667
668if BUILD_SUBSURFACES_CLIENT
669demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700670weston_subsurfaces_SOURCES = \
671 clients/subsurfaces.c \
672 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800673weston_subsurfaces_CFLAGS = \
674 $(AM_CFLAGS) \
675 $(SIMPLE_EGL_CLIENT_CFLAGS) \
676 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800677weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
678endif
679
680if HAVE_PANGO
681demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700682weston_editor_SOURCES = \
683 clients/editor.c \
684 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800685nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100686 protocol/text-protocol.c \
687 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800688weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800689weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800690endif
691
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800692weston_keyboard_SOURCES = clients/keyboard.c
693nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100694 protocol/desktop-shell-client-protocol.h \
695 protocol/desktop-shell-protocol.c \
696 protocol/input-method-protocol.c \
697 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800698weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800699weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800700
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800701weston_simple_im_SOURCES = clients/weston-simple-im.c
702nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100703 protocol/input-method-protocol.c \
704 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800705weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800706weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800707
Jon A. Cruzb09da242015-06-16 13:15:13 -0700708weston_info_SOURCES = \
709 clients/weston-info.c \
710 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400711nodist_weston_info_SOURCES = \
712 protocol/presentation_timing-protocol.c \
713 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800714weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200715weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800716
Jon A. Cruzb09da242015-06-16 13:15:13 -0700717weston_desktop_shell_SOURCES = \
718 clients/desktop-shell.c \
719 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800720nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100721 protocol/desktop-shell-client-protocol.h \
722 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800723weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800724weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800725
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900726if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700727weston_ivi_shell_user_interface_SOURCES = \
728 clients/ivi-shell-user-interface.c \
729 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900730nodist_weston_ivi_shell_user_interface_SOURCES = \
731 protocol/ivi-hmi-controller-client-protocol.h \
732 protocol/ivi-hmi-controller-protocol.c \
733 protocol/ivi-application-client-protocol.h \
734 protocol/ivi-application-protocol.c
735weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
736weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
737endif
738
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800739if BUILD_FULL_GL_CLIENTS
740demo_clients += weston-gears
741weston_gears_SOURCES = clients/gears.c
742weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800743weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800744endif
745
746endif
747
748BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100749 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800750 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100751 protocol/text-cursor-position-client-protocol.h \
752 protocol/text-cursor-position-protocol.c \
753 protocol/text-protocol.c \
754 protocol/text-client-protocol.h \
755 protocol/input-method-protocol.c \
756 protocol/input-method-client-protocol.h \
757 protocol/desktop-shell-client-protocol.h \
758 protocol/desktop-shell-protocol.c \
759 protocol/scaler-client-protocol.h \
760 protocol/scaler-protocol.c \
761 protocol/workspaces-client-protocol.h \
762 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500763 protocol/fullscreen-shell-protocol.c \
764 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100765 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900766 protocol/xdg-shell-client-protocol.h \
767 protocol/ivi-hmi-controller-protocol.c \
768 protocol/ivi-hmi-controller-client-protocol.h \
769 protocol/ivi-application-protocol.c \
770 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800771
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800772westondatadir = $(datadir)/weston
773dist_westondata_DATA = \
774 data/wayland.svg \
775 data/wayland.png \
776 data/pattern.png \
777 data/terminal.png \
778 data/border.png \
779 data/icon_window.png \
780 data/sign_close.png \
781 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100782 data/sign_minimize.png
783
784if ENABLE_IVI_SHELL
785dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900786 data/background.png \
787 data/tiling.png \
788 data/fullscreen.png \
789 data/panel.png \
790 data/random.png \
791 data/sidebyside.png \
792 data/home.png \
793 data/icon_ivi_clickdot.png \
794 data/icon_ivi_flower.png \
795 data/icon_ivi_simple-egl.png \
796 data/icon_ivi_simple-shm.png \
797 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100798endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800799
800
801if BUILD_WCAP_TOOLS
802bin_PROGRAMS += wcap-decode
803
804wcap_decode_SOURCES = \
805 wcap/main.c \
806 wcap/wcap-decode.c \
807 wcap/wcap-decode.h
808
Derek Foreman4ff38742015-06-18 11:43:11 -0500809wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800810wcap_decode_LDADD = $(WCAP_LIBS)
811endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800812
813
814if ENABLE_DESKTOP_SHELL
815
816module_LTLIBRARIES += desktop-shell.la
817
818desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100819 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800820 -I$(top_srcdir)/shared \
821 -I$(top_srcdir)/src \
822 -I$(top_builddir)/src \
823 -I$(top_builddir)/desktop-shell \
824 -DDATADIR='"$(datadir)"' \
825 -DMODULEDIR='"$(moduledir)"' \
826 -DLIBEXECDIR='"$(libexecdir)"' \
827 -DIN_WESTON
828
829desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800830desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500831desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800832desktop_shell_la_SOURCES = \
833 desktop-shell/shell.h \
834 desktop-shell/shell.c \
835 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700836 desktop-shell/input-panel.c \
837 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800838nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100839 protocol/desktop-shell-protocol.c \
840 protocol/desktop-shell-server-protocol.h \
841 protocol/xdg-shell-protocol.c \
842 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800843
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800844BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800845endif
846
Jason Ekstrand946a9482014-04-02 19:53:47 -0500847if ENABLE_FULLSCREEN_SHELL
848
849module_LTLIBRARIES += fullscreen-shell.la
850
851fullscreen_shell_la_CPPFLAGS = \
852 -I$(top_builddir)/protocol \
853 -I$(top_srcdir)/shared \
854 -I$(top_srcdir)/src \
855 -I$(top_builddir)/src \
856 -DIN_WESTON
857
858fullscreen_shell_la_LDFLAGS = -module -avoid-version
859fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500860fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500861fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700862 fullscreen-shell/fullscreen-shell.c \
863 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500864nodist_fullscreen_shell_la_SOURCES = \
865 protocol/fullscreen-shell-protocol.c \
866 protocol/fullscreen-shell-server-protocol.h
867
868BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
869endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800870
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900871if ENABLE_IVI_SHELL
872
873module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900874 $(ivi_shell) \
875 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900876
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900877ivi_shell = ivi-shell.la
878ivi_shell_la_LDFLAGS = -module -avoid-version
879ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500880ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900881ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900882 ivi-shell/ivi-layout-export.h \
883 ivi-shell/ivi-layout-private.h \
884 ivi-shell/ivi-layout.c \
885 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900886 ivi-shell/ivi-shell.h \
887 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700888 ivi-shell/input-panel-ivi.c \
889 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900890nodist_ivi_shell_la_SOURCES = \
891 protocol/ivi-application-protocol.c \
892 protocol/ivi-application-server-protocol.h
893
894BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
895
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900896hmi_controller = hmi-controller.la
897hmi_controller_la_LDFLAGS = -module -avoid-version
898hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500899hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900900hmi_controller_la_SOURCES = \
901 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700902 ivi-shell/hmi-controller.c \
903 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900904nodist_hmi_controller_la_SOURCES = \
905 protocol/ivi-hmi-controller-protocol.c \
906 protocol/ivi-hmi-controller-server-protocol.h
907
908BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
909
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900910endif
911
912
Jason Ekstrand47928d82014-04-02 19:54:01 -0500913if ENABLE_SCREEN_SHARING
914
915module_LTLIBRARIES += screen-share.la
916
917screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
918screen_share_la_LDFLAGS = -module -avoid-version
919screen_share_la_LIBADD = \
920 $(COMPOSITOR_LIBS) \
921 $(SCREEN_SHARE_LIBS) \
922 libshared-cairo.la
923screen_share_la_CFLAGS = \
924 $(COMPOSITOR_CFLAGS) \
925 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500926 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500927screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700928 src/screen-share.c \
929 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500930nodist_screen_share_la_SOURCES = \
931 protocol/fullscreen-shell-protocol.c \
932 protocol/fullscreen-shell-client-protocol.h
933
934endif
935
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800936if ENABLE_XWAYLAND
937
938module_LTLIBRARIES += xwayland.la
939
940xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100941 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800942 -I$(top_srcdir)/shared \
943 -I$(top_srcdir)/src \
944 -I$(top_builddir)/src \
945 -I$(top_builddir)/xwayland \
946 -DDATADIR='"$(datadir)"' \
947 -DMODULEDIR='"$(moduledir)"' \
948 -DLIBEXECDIR='"$(libexecdir)"' \
949 -DXSERVER_PATH='"@XSERVER_PATH@"'
950
951xwayland_la_LDFLAGS = -module -avoid-version
952xwayland_la_LIBADD = \
953 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800954 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800955xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500956 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800957 $(COMPOSITOR_CFLAGS) \
958 $(PIXMAN_CFLAGS) \
959 $(CAIRO_CFLAGS)
960xwayland_la_SOURCES = \
961 xwayland/xwayland.h \
962 xwayland/window-manager.c \
963 xwayland/selection.c \
964 xwayland/dnd.c \
965 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800966 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700967 xwayland/hash.h \
968 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800969endif
970
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800971
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800972#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800973# Shared utilities
974#
975
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700976noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
977 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800978
Derek Foreman4ff38742015-06-18 11:43:11 -0500979libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800980
981libshared_la_SOURCES = \
982 shared/config-parser.c \
983 shared/option-parser.c \
984 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200985 shared/file-util.c \
986 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700987 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800988 shared/os-compatibility.c \
989 shared/os-compatibility.h
990
991libshared_cairo_la_CFLAGS = \
992 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -0500993 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800994 $(COMPOSITOR_CFLAGS) \
995 $(PIXMAN_CFLAGS) \
996 $(CAIRO_CFLAGS) \
997 $(PNG_CFLAGS) \
998 $(WEBP_CFLAGS)
999
1000libshared_cairo_la_LIBADD = \
1001 $(PIXMAN_LIBS) \
1002 $(CAIRO_LIBS) \
1003 $(PNG_LIBS) \
1004 $(WEBP_LIBS) \
1005 $(JPEG_LIBS)
1006
1007libshared_cairo_la_SOURCES = \
1008 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001009 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001010 shared/image-loader.c \
1011 shared/image-loader.h \
1012 shared/cairo-util.c \
1013 shared/frame.c \
1014 shared/cairo-util.h
1015
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001016libzunitc_la_SOURCES = \
1017 tools/zunitc/inc/zunitc/zunitc.h \
1018 tools/zunitc/inc/zunitc/zunitc_impl.h \
1019 tools/zunitc/src/zuc_base_logger.c \
1020 tools/zunitc/src/zuc_base_logger.h \
1021 tools/zunitc/src/zuc_collector.c \
1022 tools/zunitc/src/zuc_collector.h \
1023 tools/zunitc/src/zuc_context.h \
1024 tools/zunitc/src/zuc_event.h \
1025 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001026 tools/zunitc/src/zuc_junit_reporter.c \
1027 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001028 tools/zunitc/src/zuc_types.h \
1029 tools/zunitc/src/zunitc_impl.c \
1030 shared/helpers.h
1031
1032libzunitc_la_CFLAGS = \
1033 $(AM_CFLAGS) \
1034 -I$(top_srcdir)/tools/zunitc/inc
1035
1036libzunitc_la_LIBADD = \
1037 libshared.la
1038
Jon A. Cruz646aef52015-07-15 19:22:41 -07001039if ENABLE_JUNIT_XML
1040libzunitc_la_CFLAGS += \
1041 $(LIBXML2_CFLAGS)
1042libzunitc_la_LIBADD += \
1043 $(LIBXML2_LIBS)
1044endif
1045
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001046libzunitcmain_la_SOURCES = \
1047 tools/zunitc/src/main.c
1048
1049libzunitcmain_la_CFLAGS = \
1050 $(AM_CFLAGS) \
1051 -I$(top_srcdir)/tools/zunitc/inc
1052
1053libzunitcmain_la_LIBADD = \
1054 libzunitc.la \
1055 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001056
1057#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001058# tests subdirectory
1059#
1060
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001061TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1062
1063internal_tests = \
1064 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001065
1066shared_tests = \
1067 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001068 vertex-clip.test \
1069 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001070
1071module_tests = \
1072 surface-test.la \
1073 surface-global-test.la
1074
1075weston_tests = \
1076 bad_buffer.weston \
1077 keyboard.weston \
1078 event.weston \
1079 button.weston \
1080 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001081 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001082 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001083 subsurface.weston \
1084 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001085
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001086ivi_tests =
1087
1088$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001089
1090AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001091 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1092 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001093
1094TEST_EXTENSIONS = .la .weston
1095LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1096WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1097
1098clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001099 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001100 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001101
1102# To remove when automake 1.11 support is dropped
1103export abs_builddir
1104
1105noinst_LTLIBRARIES += \
1106 weston-test.la \
1107 $(module_tests) \
1108 libtest-runner.la \
1109 libtest-client.la
1110
1111noinst_PROGRAMS += \
1112 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001113 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001114 $(shared_tests) \
1115 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001116 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001117 matrix-test
1118
1119test_module_ldflags = \
1120 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1121
1122surface_global_test_la_SOURCES = tests/surface-global-test.c
1123surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001124surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001125
1126surface_test_la_SOURCES = tests/surface-test.c
1127surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001128surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001129
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001130weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001131weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001132weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001133weston_test_la_SOURCES = \
1134 tests/weston-test.c \
1135 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001136nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001137 protocol/weston-test-protocol.c \
1138 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001139
1140if ENABLE_EGL
1141weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1142weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1143endif
1144
1145libtest_runner_la_SOURCES = \
1146 tests/weston-test-runner.c \
1147 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001148libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001149
1150config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001151config_parser_test_LDADD = \
1152 libshared.la \
1153 $(COMPOSITOR_LIBS) \
1154 libzunitc.la \
1155 libzunitcmain.la
1156config_parser_test_CFLAGS = \
1157 $(AM_CFLAGS) \
1158 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001159
1160vertex_clip_test_SOURCES = \
1161 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001162 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001163 src/vertex-clipping.c \
1164 src/vertex-clipping.h
1165vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1166
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001167libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001168 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001169 tests/weston-test-client-helper.h
1170nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001171 protocol/weston-test-protocol.c \
1172 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001173libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1174libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) $(CAIRO_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001175
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001176
1177#
1178# Internal tests - tests functionality of the testsuite itself
1179#
1180
1181internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001182internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1183internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001184
1185
1186#
1187# Weston Tests
1188#
1189
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001190bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001191bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001192bad_buffer_weston_LDADD = libtest-client.la
1193
1194keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001195keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001196keyboard_weston_LDADD = libtest-client.la
1197
1198event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001199event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001200event_weston_LDADD = libtest-client.la
1201
1202button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001203button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001204button_weston_LDADD = libtest-client.la
1205
Marek Chalupa5fd81402015-03-30 09:21:29 -04001206devices_weston_SOURCES = tests/devices-test.c
1207devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1208devices_weston_LDADD = libtest-client.la
1209
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001210text_weston_SOURCES = tests/text-test.c
1211nodist_text_weston_SOURCES = \
1212 protocol/text-protocol.c \
1213 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001214text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001215text_weston_LDADD = libtest-client.la
1216
1217subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001218subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001219subsurface_weston_LDADD = libtest-client.la
1220
Jon A. Cruzb09da242015-06-16 13:15:13 -07001221presentation_weston_SOURCES = \
1222 tests/presentation-test.c \
1223 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001224nodist_presentation_weston_SOURCES = \
1225 protocol/presentation_timing-protocol.c \
1226 protocol/presentation_timing-client-protocol.h
1227presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1228presentation_weston_LDADD = libtest-client.la
1229
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001230roles_weston_SOURCES = tests/roles-test.c
1231roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1232roles_weston_LDADD = libtest-client.la
1233
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001234if ENABLE_EGL
1235weston_tests += buffer-count.weston
1236buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001237buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001238buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1239endif
1240
1241if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001242weston_tests += xwayland-test.weston
1243xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001244xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001245xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001246endif
1247
1248matrix_test_SOURCES = \
1249 tests/matrix-test.c \
1250 shared/matrix.c \
1251 shared/matrix.h
1252matrix_test_CPPFLAGS = -DUNIT_TEST
1253matrix_test_LDADD = -lm -lrt
1254
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001255if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001256module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001257 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001258 ivi-layout-test.la
1259
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001260ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1261ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001262ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001263ivi_layout_internal_test_la_SOURCES = \
1264 tests/ivi_layout-internal-test.c
1265
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001266ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1267ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001268ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001269ivi_layout_test_la_SOURCES = \
1270 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001271 tests/ivi-test.h \
1272 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001273nodist_ivi_layout_test_la_SOURCES = \
1274 protocol/weston-test-protocol.c \
1275 protocol/weston-test-server-protocol.h
1276
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001277ivi_tests += \
1278 ivi-shell-app.weston
1279
1280ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1281nodist_ivi_shell_app_weston_SOURCES = \
1282 protocol/ivi-application-protocol.c \
1283 protocol/ivi-application-client-protocol.h
1284ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1285ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001286
1287noinst_PROGRAMS += ivi-layout.ivi
1288
1289ivi_layout_ivi_SOURCES = \
1290 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001291 tests/ivi-test.h \
1292 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001293nodist_ivi_layout_ivi_SOURCES = \
1294 protocol/ivi-application-protocol.c \
1295 protocol/ivi-application-client-protocol.h
1296ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1297ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001298endif
1299
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001300if BUILD_SETBACKLIGHT
1301noinst_PROGRAMS += setbacklight
1302setbacklight_SOURCES = \
1303 tests/setbacklight.c \
1304 src/libbacklight.c \
1305 src/libbacklight.h
1306setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1307setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1308endif
1309
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001310all-local: zuctest$(EXEEXT)
1311
1312noinst_PROGRAMS += zuctest$(EXEEXT)
1313
1314zuctest_LDADD = \
1315 libzunitc.la \
1316 libzunitcmain.la
1317
1318zuctest_CFLAGS = \
1319 $(AM_CFLAGS) \
1320 -I$(top_srcdir)/tools/zunitc/inc
1321
1322zuctest_SOURCES = \
1323 tools/zunitc/test/fixtures_test.c \
1324 tools/zunitc/test/zunitc_test.c
1325
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001326EXTRA_DIST += \
1327 tests/weston-tests-env \
1328 tests/internal-screenshot.ini \
1329 tests/reference/internal-screenshot-bad-00.png \
1330 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001331
1332BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001333 protocol/weston-test-protocol.c \
1334 protocol/weston-test-server-protocol.h \
1335 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001336 protocol/text-protocol.c \
1337 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001338
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001339EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001340 protocol/desktop-shell.xml \
1341 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001342 protocol/text.xml \
1343 protocol/input-method.xml \
1344 protocol/workspaces.xml \
1345 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001346 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001347 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001348 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001349 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001350 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001351 protocol/ivi-application.xml \
Pekka Paalanen23ab7152014-09-29 14:08:29 -04001352 protocol/ivi-hmi-controller.xml \
1353 protocol/linux-dmabuf.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001354
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001355#
1356# manual test modules in tests subdirectory
1357#
1358
1359noinst_LTLIBRARIES += \
1360 surface-screenshot.la
1361
1362surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1363surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001364surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001365surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1366
1367
1368#
1369# Documentation
1370#
1371
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001372man_MANS = weston.1 weston.ini.5
1373
1374if ENABLE_DRM_COMPOSITOR
1375man_MANS += weston-drm.7
1376endif
1377
1378MAN_SUBSTS = \
1379 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1380 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1381 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1382 -e 's|__version__|$(PACKAGE_VERSION)|g'
1383
1384SUFFIXES = .1 .5 .7 .man
1385
1386%.1 %.5 %.7 : man/%.man
1387 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1388
1389EXTRA_DIST += \
1390 man/weston.man \
1391 man/weston-drm.man \
1392 man/weston.ini.man
1393
1394CLEANFILES += $(man_MANS)
1395
Jon A. Cruz179c1862015-07-15 19:22:43 -07001396if ENABLE_DEVDOCS
1397DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1398
1399docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1400 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1401
1402docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1403 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1404endif
1405
1406DOCDIRS = \
1407 docs/developer \
1408 docs/tools
1409
1410$(DOCDIRS):
1411 $(MKDIR_P) $@
1412
1413.PHONY: doc $(DOXYGEN_INDICES)
1414
1415doc: $(DOXYGEN_INDICES)
1416
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001417protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1418 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001419
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001420protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1421 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001422
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001423protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1424 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@