blob: d3c3f71e0738e9970c3b39385f6397a84ce81cc3 [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) \
Derek Foremane2926942015-06-29 14:05:38 -050068 $(DLOPEN_LIBS) -lm -lrt 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 \
Benoit Gschwind3c530942016-04-15 20:28:32 -070075 src/compositor-headless.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080076 src/input.c \
77 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080078 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080079 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080080 src/zoom.c \
81 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080082 src/bindings.c \
83 src/animation.c \
84 src/noop-renderer.c \
85 src/pixman-renderer.c \
86 src/pixman-renderer.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +020087 src/timeline.c \
88 src/timeline.h \
89 src/timeline-object.h \
Giulio Camuffobab996e2014-10-12 00:24:25 +030090 src/main.c \
Pekka Paalanen230f3b12014-09-29 14:18:40 -040091 src/linux-dmabuf.c \
92 src/linux-dmabuf.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -070093 shared/helpers.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080094 shared/matrix.c \
95 shared/matrix.h \
Pekka Paalanenaa21f622015-07-03 15:44:50 +030096 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080097 shared/zalloc.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +010098 shared/platform.h \
Egor Starkov94fd9a52015-09-29 14:50:41 +030099 src/weston-egl-ext.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300100
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 = \
Pekka Paalanenaff703e2016-04-05 14:08:11 +0300106 $(COMPOSITOR_CFLAGS) \
107 $(SYSTEMD_DAEMON_CFLAGS) \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300108 $(PIXMAN_CFLAGS) \
109 $(AM_CFLAGS)
110systemd_notify_la_SOURCES = \
111 src/systemd-notify.c \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300112 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 = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800118 protocol/weston-screenshooter-protocol.c \
119 protocol/weston-screenshooter-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800120 protocol/text-cursor-position-protocol.c \
121 protocol/text-cursor-position-server-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800122 protocol/text-input-unstable-v1-protocol.c \
123 protocol/text-input-unstable-v1-server-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800124 protocol/input-method-unstable-v1-protocol.c \
125 protocol/input-method-unstable-v1-server-protocol.h \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200126 protocol/presentation-time-protocol.c \
127 protocol/presentation-time-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800128 protocol/scaler-protocol.c \
Pekka Paalanen23ab7152014-09-29 14:08:29 -0400129 protocol/scaler-server-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800130 protocol/linux-dmabuf-unstable-v1-protocol.c \
131 protocol/linux-dmabuf-unstable-v1-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800132
133BUILT_SOURCES += $(nodist_weston_SOURCES)
134
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800135# Track this dependency explicitly instead of using BUILT_SOURCES. We
136# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
137# in case we're building from tarballs.
138
139src/compositor.c : $(top_builddir)/src/git-version.h
140
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800141noinst_LTLIBRARIES += \
142 libsession-helper.la
143
144libsession_helper_la_SOURCES = \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800145 src/launcher-util.c \
Jasper St. Pierre72dea062015-09-23 10:46:47 -0700146 src/launcher-util.h \
Derek Foremancb156202015-09-24 09:26:48 -0500147 src/launcher-impl.h \
Jasper St. Pierre72dea062015-09-23 10:46:47 -0700148 src/weston-launch.h \
149 src/launcher-weston-launch.c \
150 src/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500151libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800152libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
153
154if ENABLE_DBUS
155if HAVE_SYSTEMD_LOGIN
156libsession_helper_la_SOURCES += \
157 src/dbus.h \
158 src/dbus.c \
Jasper St. Pierre30bcf352015-09-23 10:46:46 -0700159 src/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800160libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
161libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
162endif
163endif
164
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800165if HAVE_GIT_REPO
166src/git-version.h : $(top_srcdir)/.git/logs/HEAD
167 $(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 -0800168else
169src/git-version.h :
170 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
171
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800172endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800173
174.FORCE :
175
176if BUILD_WESTON_LAUNCH
177bin_PROGRAMS += weston-launch
178weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
179weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
180weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500181 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800182 $(PAM_CFLAGS) \
183 $(SYSTEMD_LOGIN_CFLAGS) \
184 $(LIBDRM_CFLAGS)
185weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
186
187if ENABLE_SETUID_INSTALL
188install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700189 can_suid_files=no; \
190 chown root $(DESTDIR)$(bindir)/weston-launch \
191 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
192 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500193 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700194 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
195 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
196 false; \
197 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800198endif
199
200endif # BUILD_WESTON_LAUNCH
201
202pkgconfigdir = $(libdir)/pkgconfig
203pkgconfig_DATA = src/weston.pc
204
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100205wayland_sessiondir = $(datadir)/wayland-sessions
Ross Burton315476f2015-07-16 20:56:32 +0100206dist_wayland_session_DATA = src/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100207
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800208westonincludedir = $(includedir)/weston
209westoninclude_HEADERS = \
210 src/version.h \
211 src/compositor.h \
Benoit Gschwind3c530942016-04-15 20:28:32 -0700212 src/compositor-headless.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200213 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800214 shared/matrix.h \
215 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100216 shared/zalloc.h \
217 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800218
Ucan, Emre \(ADITG/SW1\)ae2541d2015-10-15 14:51:43 +0000219if ENABLE_IVI_SHELL
220westoninclude_HEADERS += \
221 ivi-shell/ivi-layout-export.h
222endif
223
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800224if ENABLE_EGL
225module_LTLIBRARIES += gl-renderer.la
226gl_renderer_la_LDFLAGS = -module -avoid-version
227gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
228gl_renderer_la_CFLAGS = \
229 $(COMPOSITOR_CFLAGS) \
230 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300231 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500232 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800233gl_renderer_la_SOURCES = \
234 src/gl-renderer.h \
235 src/gl-renderer.c \
236 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700237 src/vertex-clipping.h \
238 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800239endif
240
241if ENABLE_X11_COMPOSITOR
242module_LTLIBRARIES += x11-backend.la
243x11_backend_la_LDFLAGS = -module -avoid-version
244x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800245 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800246x11_backend_la_CFLAGS = \
247 $(COMPOSITOR_CFLAGS) \
248 $(EGL_CFLAGS) \
249 $(PIXMAN_CFLAGS) \
250 $(CAIRO_CFLAGS) \
251 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500252 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700253x11_backend_la_SOURCES = \
254 src/compositor-x11.c \
255 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800256endif
257
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100258INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000259INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100260 src/libinput-seat.c \
261 src/libinput-seat.h \
262 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700263 src/libinput-device.h \
264 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100265
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800266if ENABLE_DRM_COMPOSITOR
267module_LTLIBRARIES += drm-backend.la
268drm_backend_la_LDFLAGS = -module -avoid-version
269drm_backend_la_LIBADD = \
270 $(COMPOSITOR_LIBS) \
271 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100272 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100273 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800274 libsession-helper.la
275drm_backend_la_CFLAGS = \
276 $(COMPOSITOR_CFLAGS) \
277 $(EGL_CFLAGS) \
278 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500279 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800280drm_backend_la_SOURCES = \
281 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100282 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700283 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200284 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800285 src/libbacklight.c \
286 src/libbacklight.h
287
288if ENABLE_VAAPI_RECORDER
289drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
290drm_backend_la_LIBADD += $(LIBVA_LIBS)
291drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
292endif
293endif
294
295if ENABLE_WAYLAND_COMPOSITOR
296module_LTLIBRARIES += wayland-backend.la
297wayland_backend_la_LDFLAGS = -module -avoid-version
298wayland_backend_la_LIBADD = \
299 $(COMPOSITOR_LIBS) \
300 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800301 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800302wayland_backend_la_CFLAGS = \
303 $(COMPOSITOR_CFLAGS) \
304 $(EGL_CFLAGS) \
305 $(PIXMAN_CFLAGS) \
306 $(CAIRO_CFLAGS) \
307 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500308 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700309wayland_backend_la_SOURCES = \
310 src/compositor-wayland.c \
311 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500312nodist_wayland_backend_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800313 protocol/fullscreen-shell-unstable-v1-protocol.c \
314 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800315endif
316
317if ENABLE_RPI_COMPOSITOR
318if INSTALL_RPI_COMPOSITOR
319module_LTLIBRARIES += rpi-backend.la
320else
321noinst_LTLIBRARIES += rpi-backend.la
322endif
323
324rpi_backend_la_LDFLAGS = -module -avoid-version
325rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
326 $(RPI_COMPOSITOR_LIBS) \
327 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100328 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800329 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800330 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800331rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500332 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800333 $(COMPOSITOR_CFLAGS) \
334 $(RPI_COMPOSITOR_CFLAGS) \
335 $(RPI_BCM_HOST_CFLAGS)
336rpi_backend_la_SOURCES = \
337 src/compositor-rpi.c \
338 src/rpi-renderer.c \
339 src/rpi-renderer.h \
340 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700341 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100342 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800343
344if ENABLE_EGL
345rpi_backend_la_LIBADD += $(EGL_LIBS)
346rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
347endif
348
349endif
350
351if ENABLE_HEADLESS_COMPOSITOR
352module_LTLIBRARIES += headless-backend.la
353headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800354headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500355headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700356headless_backend_la_SOURCES = \
357 src/compositor-headless.c \
Benoit Gschwind3c530942016-04-15 20:28:32 -0700358 src/compositor-headless.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700359 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800360endif
361
362if ENABLE_FBDEV_COMPOSITOR
363module_LTLIBRARIES += fbdev-backend.la
364fbdev_backend_la_LDFLAGS = -module -avoid-version
365fbdev_backend_la_LIBADD = \
366 $(COMPOSITOR_LIBS) \
367 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100368 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800369 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800370 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800371fbdev_backend_la_CFLAGS = \
372 $(COMPOSITOR_CFLAGS) \
373 $(EGL_CFLAGS) \
374 $(FBDEV_COMPOSITOR_CFLAGS) \
375 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500376 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800377fbdev_backend_la_SOURCES = \
378 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700379 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100380 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800381endif
382
383if ENABLE_RDP_COMPOSITOR
384module_LTLIBRARIES += rdp-backend.la
385rdp_backend_la_LDFLAGS = -module -avoid-version
386rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
387 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800388 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800389rdp_backend_la_CFLAGS = \
390 $(COMPOSITOR_CFLAGS) \
391 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500392 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700393rdp_backend_la_SOURCES = \
394 src/compositor-rdp.c \
395 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800396endif
397
398if HAVE_LCMS
399module_LTLIBRARIES += cms-static.la
400cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800401cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500402cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800403cms_static_la_SOURCES = \
404 src/cms-static.c \
405 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700406 src/cms-helper.h \
407 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800408if ENABLE_COLORD
409module_LTLIBRARIES += cms-colord.la
410cms_colord_la_LDFLAGS = -module -avoid-version
411cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500412cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800413cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100414 src/cms-colord.c \
415 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700416 src/cms-helper.h \
417 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800418endif
419endif
420
421noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500422spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800423spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
424spring_tool_SOURCES = \
425 src/spring-tool.c \
426 src/animation.c \
427 shared/matrix.c \
428 shared/matrix.h \
429 src/compositor.h
430
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800431if BUILD_CLIENTS
432
433bin_PROGRAMS += weston-terminal weston-info
434
435libexec_PROGRAMS += \
436 weston-desktop-shell \
437 weston-screenshooter \
438 weston-keyboard \
439 weston-simple-im
440
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900441if ENABLE_IVI_SHELL
442libexec_PROGRAMS += \
443 weston-ivi-shell-user-interface
444endif
445
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800446demo_clients = \
447 weston-flower \
448 weston-image \
449 weston-cliptest \
450 weston-dnd \
451 weston-smoke \
452 weston-resizor \
453 weston-eventdemo \
454 weston-clickdot \
455 weston-transformed \
456 weston-fullscreen \
457 weston-stacking \
458 weston-calibrator \
459 weston-scaler
460
461if INSTALL_DEMO_CLIENTS
462bin_PROGRAMS += $(demo_clients)
463else
464noinst_PROGRAMS += $(demo_clients)
465endif
466
467
468if BUILD_SIMPLE_CLIENTS
469demo_clients += \
470 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500471 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800472 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400473 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800474 weston-multi-resource
475
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800476weston_simple_shm_SOURCES = clients/simple-shm.c
477nodist_weston_simple_shm_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800478 protocol/xdg-shell-unstable-v5-protocol.c \
479 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800480 protocol/fullscreen-shell-unstable-v1-protocol.c \
481 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900482 protocol/ivi-application-protocol.c \
483 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800484weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800485weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800486
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500487weston_simple_damage_SOURCES = clients/simple-damage.c
488nodist_weston_simple_damage_SOURCES = \
489 protocol/scaler-protocol.c \
490 protocol/scaler-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800491 protocol/xdg-shell-unstable-v5-protocol.c \
492 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800493 protocol/fullscreen-shell-unstable-v1-protocol.c \
494 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500495weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
496weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
497
Jon A. Cruzb09da242015-06-16 13:15:13 -0700498weston_simple_touch_SOURCES = \
499 clients/simple-touch.c \
500 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800501weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800502weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800503
Jon A. Cruzb09da242015-06-16 13:15:13 -0700504weston_presentation_shm_SOURCES = \
505 clients/presentation-shm.c \
506 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400507nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200508 protocol/presentation-time-protocol.c \
509 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400510weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Derek Foremane2926942015-06-29 14:05:38 -0500511weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm -lrt
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400512
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800513weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800514weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000515weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800516endif
517
518if BUILD_SIMPLE_EGL_CLIENTS
519demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800520weston_simple_egl_SOURCES = clients/simple-egl.c
521nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800522 protocol/xdg-shell-unstable-v5-protocol.c \
523 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900524 protocol/ivi-application-protocol.c \
525 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800526weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800527weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
528endif
529
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000530if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
531demo_clients += weston-simple-dmabuf-intel
532weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
533nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800534 protocol/xdg-shell-unstable-v5-protocol.c \
535 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800536 protocol/fullscreen-shell-unstable-v1-protocol.c \
537 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800538 protocol/linux-dmabuf-unstable-v1-protocol.c \
539 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000540weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
541weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800542BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200543endif
544
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000545if BUILD_SIMPLE_DMABUF_V4L_CLIENT
546demo_clients += weston-simple-dmabuf-v4l
547weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
548nodist_weston_simple_dmabuf_v4l_SOURCES = \
549 protocol/xdg-shell-unstable-v5-protocol.c \
550 protocol/xdg-shell-unstable-v5-client-protocol.h \
551 protocol/fullscreen-shell-unstable-v1-protocol.c \
552 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
553 protocol/linux-dmabuf-unstable-v1-protocol.c \
554 protocol/linux-dmabuf-unstable-v1-client-protocol.h
555weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
556weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
557BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
558endif
559
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800560noinst_LTLIBRARIES += libtoytoolkit.la
561
562libtoytoolkit_la_SOURCES = \
563 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700564 clients/window.h \
565 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800566
567nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100568 protocol/text-cursor-position-protocol.c \
569 protocol/text-cursor-position-client-protocol.h \
570 protocol/scaler-protocol.c \
571 protocol/scaler-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800572 protocol/xdg-shell-unstable-v5-protocol.c \
573 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900574 protocol/ivi-application-protocol.c \
575 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500576
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800577BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
578
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800579
580libtoytoolkit_la_LIBADD = \
581 $(CLIENT_LIBS) \
582 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800583 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800584libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800585
586weston_flower_SOURCES = clients/flower.c
587weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800588weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800589
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100590weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800591 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800592nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800593 protocol/weston-screenshooter-protocol.c \
594 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800595weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800596weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800597
Jon A. Cruzb09da242015-06-16 13:15:13 -0700598weston_terminal_SOURCES = \
599 clients/terminal.c \
600 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800601weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800602weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800603
604weston_image_SOURCES = clients/image.c
605weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800606weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800607
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300608weston_cliptest_SOURCES = \
609 clients/cliptest.c \
610 src/vertex-clipping.c \
611 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800612weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800613weston_cliptest_LDADD = libtoytoolkit.la
614
Jon A. Cruzb09da242015-06-16 13:15:13 -0700615weston_dnd_SOURCES = \
616 clients/dnd.c \
617 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800618weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800619weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800620
621weston_smoke_SOURCES = clients/smoke.c
622weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800623weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800624
625weston_resizor_SOURCES = clients/resizor.c
626weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800627weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800628
629weston_scaler_SOURCES = clients/scaler.c
630weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800631weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800632
633if HAVE_CAIRO_GLESV2
634demo_clients += weston-nested weston-nested-client
635
Jon A. Cruzb09da242015-06-16 13:15:13 -0700636weston_nested_SOURCES = \
637 clients/nested.c \
638 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800639weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800640weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800641
642weston_nested_client_SOURCES = clients/nested-client.c
643weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800644weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800645endif
646
Jon A. Cruzb09da242015-06-16 13:15:13 -0700647weston_eventdemo_SOURCES = \
648 clients/eventdemo.c \
649 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800650weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800651weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800652
Jon A. Cruzb09da242015-06-16 13:15:13 -0700653weston_clickdot_SOURCES = \
654 clients/clickdot.c \
655 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800656weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800657weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800658
659weston_transformed_SOURCES = clients/transformed.c
660weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800661weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800662
663weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500664nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800665 protocol/fullscreen-shell-unstable-v1-protocol.c \
666 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800667weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800668weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800669
Jon A. Cruzb09da242015-06-16 13:15:13 -0700670weston_stacking_SOURCES = \
671 clients/stacking.c \
672 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800673weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800674weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800675
Jon A. Cruzb09da242015-06-16 13:15:13 -0700676weston_calibrator_SOURCES = \
677 clients/calibrator.c \
678 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800679 shared/matrix.c \
680 shared/matrix.h
681weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800682weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800683
684if BUILD_SUBSURFACES_CLIENT
685demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700686weston_subsurfaces_SOURCES = \
687 clients/subsurfaces.c \
688 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800689weston_subsurfaces_CFLAGS = \
690 $(AM_CFLAGS) \
691 $(SIMPLE_EGL_CLIENT_CFLAGS) \
692 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800693weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
694endif
695
696if HAVE_PANGO
697demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700698weston_editor_SOURCES = \
699 clients/editor.c \
700 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800701nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800702 protocol/text-input-unstable-v1-protocol.c \
703 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800704weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800705weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800706endif
707
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800708weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800709nodist_weston_keyboard_SOURCES = \
710 protocol/weston-desktop-shell-client-protocol.h \
711 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800712 protocol/input-method-unstable-v1-protocol.c \
713 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800714weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800715weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800716
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800717weston_simple_im_SOURCES = clients/weston-simple-im.c
718nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800719 protocol/input-method-unstable-v1-protocol.c \
720 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800721weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800722weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800723
Jon A. Cruzb09da242015-06-16 13:15:13 -0700724weston_info_SOURCES = \
725 clients/weston-info.c \
726 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400727nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200728 protocol/presentation-time-protocol.c \
729 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800730weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200731weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800732
Jon A. Cruzb09da242015-06-16 13:15:13 -0700733weston_desktop_shell_SOURCES = \
734 clients/desktop-shell.c \
735 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800736nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800737 protocol/weston-desktop-shell-client-protocol.h \
738 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800739weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800740weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800741
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900742if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700743weston_ivi_shell_user_interface_SOURCES = \
744 clients/ivi-shell-user-interface.c \
745 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900746nodist_weston_ivi_shell_user_interface_SOURCES = \
747 protocol/ivi-hmi-controller-client-protocol.h \
748 protocol/ivi-hmi-controller-protocol.c \
749 protocol/ivi-application-client-protocol.h \
750 protocol/ivi-application-protocol.c
751weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
752weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
753endif
754
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800755if BUILD_FULL_GL_CLIENTS
756demo_clients += weston-gears
757weston_gears_SOURCES = clients/gears.c
758weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800759weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800760endif
761
762endif
763
764BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800765 protocol/weston-screenshooter-protocol.c \
766 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100767 protocol/text-cursor-position-client-protocol.h \
768 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800769 protocol/text-input-unstable-v1-protocol.c \
770 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800771 protocol/input-method-unstable-v1-protocol.c \
772 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800773 protocol/weston-desktop-shell-client-protocol.h \
774 protocol/weston-desktop-shell-protocol.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100775 protocol/scaler-client-protocol.h \
776 protocol/scaler-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200777 protocol/presentation-time-protocol.c \
778 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800779 protocol/fullscreen-shell-unstable-v1-protocol.c \
780 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800781 protocol/xdg-shell-unstable-v5-protocol.c \
782 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900783 protocol/ivi-hmi-controller-protocol.c \
784 protocol/ivi-hmi-controller-client-protocol.h \
785 protocol/ivi-application-protocol.c \
786 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800787
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800788westondatadir = $(datadir)/weston
789dist_westondata_DATA = \
790 data/wayland.svg \
791 data/wayland.png \
792 data/pattern.png \
793 data/terminal.png \
794 data/border.png \
795 data/icon_window.png \
796 data/sign_close.png \
797 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100798 data/sign_minimize.png
799
800if ENABLE_IVI_SHELL
801dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900802 data/background.png \
803 data/tiling.png \
804 data/fullscreen.png \
805 data/panel.png \
806 data/random.png \
807 data/sidebyside.png \
808 data/home.png \
809 data/icon_ivi_clickdot.png \
810 data/icon_ivi_flower.png \
811 data/icon_ivi_simple-egl.png \
812 data/icon_ivi_simple-shm.png \
813 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100814endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800815
816
817if BUILD_WCAP_TOOLS
818bin_PROGRAMS += wcap-decode
819
820wcap_decode_SOURCES = \
821 wcap/main.c \
822 wcap/wcap-decode.c \
823 wcap/wcap-decode.h
824
Derek Foreman4ff38742015-06-18 11:43:11 -0500825wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800826wcap_decode_LDADD = $(WCAP_LIBS)
827endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800828
829
830if ENABLE_DESKTOP_SHELL
831
832module_LTLIBRARIES += desktop-shell.la
833
834desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100835 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800836 -I$(top_srcdir)/shared \
837 -I$(top_srcdir)/src \
838 -I$(top_builddir)/src \
839 -I$(top_builddir)/desktop-shell \
840 -DDATADIR='"$(datadir)"' \
841 -DMODULEDIR='"$(moduledir)"' \
842 -DLIBEXECDIR='"$(libexecdir)"' \
843 -DIN_WESTON
844
845desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800846desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500847desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800848desktop_shell_la_SOURCES = \
849 desktop-shell/shell.h \
850 desktop-shell/shell.c \
851 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700852 desktop-shell/input-panel.c \
853 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800854nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800855 protocol/weston-desktop-shell-protocol.c \
856 protocol/weston-desktop-shell-server-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800857 protocol/xdg-shell-unstable-v5-protocol.c \
858 protocol/xdg-shell-unstable-v5-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800859
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800860BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800861endif
862
Jason Ekstrand946a9482014-04-02 19:53:47 -0500863if ENABLE_FULLSCREEN_SHELL
864
865module_LTLIBRARIES += fullscreen-shell.la
866
867fullscreen_shell_la_CPPFLAGS = \
868 -I$(top_builddir)/protocol \
869 -I$(top_srcdir)/shared \
870 -I$(top_srcdir)/src \
871 -I$(top_builddir)/src \
872 -DIN_WESTON
873
874fullscreen_shell_la_LDFLAGS = -module -avoid-version
875fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500876fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500877fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700878 fullscreen-shell/fullscreen-shell.c \
879 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500880nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800881 protocol/fullscreen-shell-unstable-v1-protocol.c \
882 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500883
884BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
885endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800886
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900887if ENABLE_IVI_SHELL
888
889module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900890 $(ivi_shell) \
891 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900892
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900893ivi_shell = ivi-shell.la
894ivi_shell_la_LDFLAGS = -module -avoid-version
895ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500896ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900897ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900898 ivi-shell/ivi-layout-export.h \
899 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +0200900 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900901 ivi-shell/ivi-layout.c \
902 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900903 ivi-shell/ivi-shell.h \
904 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700905 ivi-shell/input-panel-ivi.c \
906 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900907nodist_ivi_shell_la_SOURCES = \
908 protocol/ivi-application-protocol.c \
909 protocol/ivi-application-server-protocol.h
910
911BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
912
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900913hmi_controller = hmi-controller.la
914hmi_controller_la_LDFLAGS = -module -avoid-version
915hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500916hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900917hmi_controller_la_SOURCES = \
918 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700919 ivi-shell/hmi-controller.c \
920 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900921nodist_hmi_controller_la_SOURCES = \
922 protocol/ivi-hmi-controller-protocol.c \
923 protocol/ivi-hmi-controller-server-protocol.h
924
925BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
926
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900927endif
928
929
Jason Ekstrand47928d82014-04-02 19:54:01 -0500930if ENABLE_SCREEN_SHARING
931
932module_LTLIBRARIES += screen-share.la
933
934screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
935screen_share_la_LDFLAGS = -module -avoid-version
936screen_share_la_LIBADD = \
937 $(COMPOSITOR_LIBS) \
938 $(SCREEN_SHARE_LIBS) \
939 libshared-cairo.la
940screen_share_la_CFLAGS = \
941 $(COMPOSITOR_CFLAGS) \
942 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500943 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500944screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700945 src/screen-share.c \
946 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500947nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800948 protocol/fullscreen-shell-unstable-v1-protocol.c \
949 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500950
951endif
952
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800953if ENABLE_XWAYLAND
954
955module_LTLIBRARIES += xwayland.la
956
957xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100958 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800959 -I$(top_srcdir)/shared \
960 -I$(top_srcdir)/src \
961 -I$(top_builddir)/src \
962 -I$(top_builddir)/xwayland \
963 -DDATADIR='"$(datadir)"' \
964 -DMODULEDIR='"$(moduledir)"' \
965 -DLIBEXECDIR='"$(libexecdir)"' \
966 -DXSERVER_PATH='"@XSERVER_PATH@"'
967
968xwayland_la_LDFLAGS = -module -avoid-version
969xwayland_la_LIBADD = \
970 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800971 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800972xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500973 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800974 $(COMPOSITOR_CFLAGS) \
975 $(PIXMAN_CFLAGS) \
976 $(CAIRO_CFLAGS)
977xwayland_la_SOURCES = \
978 xwayland/xwayland.h \
979 xwayland/window-manager.c \
980 xwayland/selection.c \
981 xwayland/dnd.c \
982 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800983 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700984 xwayland/hash.h \
985 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800986endif
987
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800988
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800989#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800990# Shared utilities
991#
992
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700993noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
994 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800995
Derek Foreman4ff38742015-06-18 11:43:11 -0500996libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800997
998libshared_la_SOURCES = \
999 shared/config-parser.c \
1000 shared/option-parser.c \
1001 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +02001002 shared/file-util.c \
1003 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001004 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001005 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001006 shared/os-compatibility.h \
1007 shared/xalloc.c \
1008 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001009
1010libshared_cairo_la_CFLAGS = \
1011 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001012 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001013 $(COMPOSITOR_CFLAGS) \
1014 $(PIXMAN_CFLAGS) \
1015 $(CAIRO_CFLAGS) \
1016 $(PNG_CFLAGS) \
1017 $(WEBP_CFLAGS)
1018
1019libshared_cairo_la_LIBADD = \
1020 $(PIXMAN_LIBS) \
1021 $(CAIRO_LIBS) \
1022 $(PNG_LIBS) \
1023 $(WEBP_LIBS) \
1024 $(JPEG_LIBS)
1025
1026libshared_cairo_la_SOURCES = \
1027 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001028 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001029 shared/image-loader.c \
1030 shared/image-loader.h \
1031 shared/cairo-util.c \
1032 shared/frame.c \
1033 shared/cairo-util.h
1034
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001035libzunitc_la_SOURCES = \
1036 tools/zunitc/inc/zunitc/zunitc.h \
1037 tools/zunitc/inc/zunitc/zunitc_impl.h \
1038 tools/zunitc/src/zuc_base_logger.c \
1039 tools/zunitc/src/zuc_base_logger.h \
1040 tools/zunitc/src/zuc_collector.c \
1041 tools/zunitc/src/zuc_collector.h \
1042 tools/zunitc/src/zuc_context.h \
1043 tools/zunitc/src/zuc_event.h \
1044 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001045 tools/zunitc/src/zuc_junit_reporter.c \
1046 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001047 tools/zunitc/src/zuc_types.h \
1048 tools/zunitc/src/zunitc_impl.c \
1049 shared/helpers.h
1050
1051libzunitc_la_CFLAGS = \
1052 $(AM_CFLAGS) \
1053 -I$(top_srcdir)/tools/zunitc/inc
1054
1055libzunitc_la_LIBADD = \
1056 libshared.la
1057
Jon A. Cruz646aef52015-07-15 19:22:41 -07001058if ENABLE_JUNIT_XML
1059libzunitc_la_CFLAGS += \
1060 $(LIBXML2_CFLAGS)
1061libzunitc_la_LIBADD += \
1062 $(LIBXML2_LIBS)
1063endif
1064
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001065libzunitcmain_la_SOURCES = \
1066 tools/zunitc/src/main.c
1067
1068libzunitcmain_la_CFLAGS = \
1069 $(AM_CFLAGS) \
1070 -I$(top_srcdir)/tools/zunitc/inc
1071
1072libzunitcmain_la_LIBADD = \
1073 libzunitc.la \
1074 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001075
1076#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001077# tests subdirectory
1078#
1079
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001080TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1081
1082internal_tests = \
1083 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001084
1085shared_tests = \
1086 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001087 vertex-clip.test \
1088 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001089
1090module_tests = \
1091 surface-test.la \
1092 surface-global-test.la
1093
1094weston_tests = \
1095 bad_buffer.weston \
1096 keyboard.weston \
1097 event.weston \
1098 button.weston \
1099 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001100 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001101 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001102 subsurface.weston \
1103 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001104
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001105ivi_tests =
1106
1107$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001108
1109AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001110 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1111 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001112
1113TEST_EXTENSIONS = .la .weston
1114LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1115WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1116
1117clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001118 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001119 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001120
1121# To remove when automake 1.11 support is dropped
1122export abs_builddir
1123
1124noinst_LTLIBRARIES += \
1125 weston-test.la \
1126 $(module_tests) \
1127 libtest-runner.la \
1128 libtest-client.la
1129
1130noinst_PROGRAMS += \
1131 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001132 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001133 $(shared_tests) \
1134 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001135 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001136 matrix-test
1137
1138test_module_ldflags = \
1139 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1140
1141surface_global_test_la_SOURCES = tests/surface-global-test.c
1142surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001143surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001144
1145surface_test_la_SOURCES = tests/surface-test.c
1146surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001147surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001148
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001149weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001150weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001151weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001152weston_test_la_SOURCES = \
1153 tests/weston-test.c \
1154 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001155nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001156 protocol/weston-test-protocol.c \
1157 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001158
1159if ENABLE_EGL
1160weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1161weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1162endif
1163
1164libtest_runner_la_SOURCES = \
1165 tests/weston-test-runner.c \
1166 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001167libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001168
1169config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001170config_parser_test_LDADD = \
1171 libshared.la \
1172 $(COMPOSITOR_LIBS) \
1173 libzunitc.la \
1174 libzunitcmain.la
1175config_parser_test_CFLAGS = \
1176 $(AM_CFLAGS) \
1177 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001178
1179vertex_clip_test_SOURCES = \
1180 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001181 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001182 src/vertex-clipping.c \
1183 src/vertex-clipping.h
1184vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1185
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001186libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001187 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001188 tests/weston-test-client-helper.h
1189nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001190 protocol/weston-test-protocol.c \
1191 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001192libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1193libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) $(CAIRO_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001194
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001195
1196#
1197# Internal tests - tests functionality of the testsuite itself
1198#
1199
1200internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001201internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1202internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001203
1204
1205#
1206# Weston Tests
1207#
1208
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001209bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001210bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001211bad_buffer_weston_LDADD = libtest-client.la
1212
1213keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001214keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001215keyboard_weston_LDADD = libtest-client.la
1216
1217event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001218event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001219event_weston_LDADD = libtest-client.la
1220
1221button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001222button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001223button_weston_LDADD = libtest-client.la
1224
Marek Chalupa5fd81402015-03-30 09:21:29 -04001225devices_weston_SOURCES = tests/devices-test.c
1226devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1227devices_weston_LDADD = libtest-client.la
1228
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001229text_weston_SOURCES = tests/text-test.c
1230nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001231 protocol/text-input-unstable-v1-protocol.c \
1232 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001233text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001234text_weston_LDADD = libtest-client.la
1235
1236subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001237subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001238subsurface_weston_LDADD = libtest-client.la
1239
Jon A. Cruzb09da242015-06-16 13:15:13 -07001240presentation_weston_SOURCES = \
1241 tests/presentation-test.c \
1242 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001243nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001244 protocol/presentation-time-protocol.c \
1245 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001246presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1247presentation_weston_LDADD = libtest-client.la
1248
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001249roles_weston_SOURCES = tests/roles-test.c
1250roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1251roles_weston_LDADD = libtest-client.la
1252
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001253if ENABLE_EGL
1254weston_tests += buffer-count.weston
1255buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001256buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001257buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1258endif
1259
1260if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001261weston_tests += xwayland-test.weston
1262xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001263xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001264xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001265endif
1266
1267matrix_test_SOURCES = \
1268 tests/matrix-test.c \
1269 shared/matrix.c \
1270 shared/matrix.h
1271matrix_test_CPPFLAGS = -DUNIT_TEST
1272matrix_test_LDADD = -lm -lrt
1273
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001274if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001275module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001276 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001277 ivi-layout-test.la
1278
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001279ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1280ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001281ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001282ivi_layout_internal_test_la_SOURCES = \
1283 tests/ivi_layout-internal-test.c
1284
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001285ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1286ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001287ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001288ivi_layout_test_la_SOURCES = \
1289 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001290 tests/ivi-test.h \
1291 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001292nodist_ivi_layout_test_la_SOURCES = \
1293 protocol/weston-test-protocol.c \
1294 protocol/weston-test-server-protocol.h
1295
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001296ivi_tests += \
1297 ivi-shell-app.weston
1298
1299ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1300nodist_ivi_shell_app_weston_SOURCES = \
1301 protocol/ivi-application-protocol.c \
1302 protocol/ivi-application-client-protocol.h
1303ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1304ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001305
1306noinst_PROGRAMS += ivi-layout.ivi
1307
1308ivi_layout_ivi_SOURCES = \
1309 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001310 tests/ivi-test.h \
1311 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001312nodist_ivi_layout_ivi_SOURCES = \
1313 protocol/ivi-application-protocol.c \
1314 protocol/ivi-application-client-protocol.h
1315ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1316ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001317endif
1318
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001319if BUILD_SETBACKLIGHT
1320noinst_PROGRAMS += setbacklight
1321setbacklight_SOURCES = \
1322 tests/setbacklight.c \
1323 src/libbacklight.c \
1324 src/libbacklight.h
1325setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1326setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1327endif
1328
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001329all-local: zuctest$(EXEEXT)
1330
1331noinst_PROGRAMS += zuctest$(EXEEXT)
1332
1333zuctest_LDADD = \
1334 libzunitc.la \
1335 libzunitcmain.la
1336
1337zuctest_CFLAGS = \
1338 $(AM_CFLAGS) \
1339 -I$(top_srcdir)/tools/zunitc/inc
1340
1341zuctest_SOURCES = \
1342 tools/zunitc/test/fixtures_test.c \
1343 tools/zunitc/test/zunitc_test.c
1344
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001345EXTRA_DIST += \
1346 tests/weston-tests-env \
1347 tests/internal-screenshot.ini \
1348 tests/reference/internal-screenshot-bad-00.png \
1349 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001350
1351BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001352 protocol/weston-test-protocol.c \
1353 protocol/weston-test-server-protocol.h \
1354 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001355 protocol/text-input-unstable-v1-protocol.c \
1356 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001357
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001358EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001359 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001360 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001361 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001362 protocol/weston-test.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001363 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001364 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001365 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001366
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001367#
1368# manual test modules in tests subdirectory
1369#
1370
1371noinst_LTLIBRARIES += \
1372 surface-screenshot.la
1373
1374surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1375surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001376surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001377surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1378
1379
1380#
1381# Documentation
1382#
1383
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001384man_MANS = weston.1 weston.ini.5
1385
1386if ENABLE_DRM_COMPOSITOR
1387man_MANS += weston-drm.7
1388endif
1389
1390MAN_SUBSTS = \
1391 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1392 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1393 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1394 -e 's|__version__|$(PACKAGE_VERSION)|g'
1395
1396SUFFIXES = .1 .5 .7 .man
1397
1398%.1 %.5 %.7 : man/%.man
1399 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1400
1401EXTRA_DIST += \
1402 man/weston.man \
1403 man/weston-drm.man \
1404 man/weston.ini.man
1405
1406CLEANFILES += $(man_MANS)
1407
Jon A. Cruz179c1862015-07-15 19:22:43 -07001408if ENABLE_DEVDOCS
1409DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1410
1411docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1412 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1413
1414docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1415 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1416endif
1417
1418DOCDIRS = \
1419 docs/developer \
1420 docs/tools
1421
1422$(DOCDIRS):
1423 $(MKDIR_P) $@
1424
1425.PHONY: doc $(DOXYGEN_INDICES)
1426
1427doc: $(DOXYGEN_INDICES)
1428
Jonas Ådahl496adb32015-11-17 16:00:27 +08001429.SECONDEXPANSION:
1430
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001431define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001432$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001433endef
1434
1435define protoname
1436$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1437endef
1438
1439protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001440 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1441
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001442protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001443 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1444
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001445protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001446 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
1447
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001448protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1449 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001450
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001451protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1452 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001453
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001454protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1455 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@