blob: 9bed32c7c5fef3f9303f754f47646eb71767c064 [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 \
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 Starkov94fd9a52015-09-29 14:50:41 +030098 src/weston-egl-ext.h
Egor Starkov7ce2e972015-09-25 18:00:27 +030099
100if SYSTEMD_NOTIFY_SUPPORT
101module_LTLIBRARIES += systemd-notify.la
102systemd_notify_la_LDFLAGS = -module -avoid-version
103systemd_notify_la_LIBADD = $(SYSTEMD_DAEMON_LIBS)
104systemd_notify_la_CFLAGS = \
Pekka Paalanenaff703e2016-04-05 14:08:11 +0300105 $(COMPOSITOR_CFLAGS) \
106 $(SYSTEMD_DAEMON_CFLAGS) \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300107 $(PIXMAN_CFLAGS) \
108 $(AM_CFLAGS)
109systemd_notify_la_SOURCES = \
110 src/systemd-notify.c \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300111 shared/helpers.h \
112 shared/zalloc.h \
Bryce Harringtona0dd5b42015-09-25 15:16:25 -0700113 src/compositor.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300114endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800115
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800116nodist_weston_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800117 protocol/weston-screenshooter-protocol.c \
118 protocol/weston-screenshooter-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800119 protocol/text-cursor-position-protocol.c \
120 protocol/text-cursor-position-server-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800121 protocol/text-input-unstable-v1-protocol.c \
122 protocol/text-input-unstable-v1-server-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800123 protocol/input-method-unstable-v1-protocol.c \
124 protocol/input-method-unstable-v1-server-protocol.h \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200125 protocol/presentation-time-protocol.c \
126 protocol/presentation-time-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800127 protocol/scaler-protocol.c \
Pekka Paalanen23ab7152014-09-29 14:08:29 -0400128 protocol/scaler-server-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800129 protocol/linux-dmabuf-unstable-v1-protocol.c \
130 protocol/linux-dmabuf-unstable-v1-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800131
132BUILT_SOURCES += $(nodist_weston_SOURCES)
133
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800134# Track this dependency explicitly instead of using BUILT_SOURCES. We
135# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
136# in case we're building from tarballs.
137
138src/compositor.c : $(top_builddir)/src/git-version.h
139
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800140noinst_LTLIBRARIES += \
141 libsession-helper.la
142
143libsession_helper_la_SOURCES = \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800144 src/launcher-util.c \
Jasper St. Pierre72dea062015-09-23 10:46:47 -0700145 src/launcher-util.h \
Derek Foremancb156202015-09-24 09:26:48 -0500146 src/launcher-impl.h \
Jasper St. Pierre72dea062015-09-23 10:46:47 -0700147 src/weston-launch.h \
148 src/launcher-weston-launch.c \
149 src/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500150libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800151libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
152
153if ENABLE_DBUS
154if HAVE_SYSTEMD_LOGIN
155libsession_helper_la_SOURCES += \
156 src/dbus.h \
157 src/dbus.c \
Jasper St. Pierre30bcf352015-09-23 10:46:46 -0700158 src/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800159libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
160libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
161endif
162endif
163
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800164if HAVE_GIT_REPO
165src/git-version.h : $(top_srcdir)/.git/logs/HEAD
166 $(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 -0800167else
168src/git-version.h :
169 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
170
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800171endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800172
173.FORCE :
174
175if BUILD_WESTON_LAUNCH
176bin_PROGRAMS += weston-launch
177weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
178weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
179weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500180 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800181 $(PAM_CFLAGS) \
182 $(SYSTEMD_LOGIN_CFLAGS) \
183 $(LIBDRM_CFLAGS)
184weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
185
186if ENABLE_SETUID_INSTALL
187install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700188 can_suid_files=no; \
189 chown root $(DESTDIR)$(bindir)/weston-launch \
190 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
191 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500192 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700193 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
194 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
195 false; \
196 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800197endif
198
199endif # BUILD_WESTON_LAUNCH
200
201pkgconfigdir = $(libdir)/pkgconfig
202pkgconfig_DATA = src/weston.pc
203
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100204wayland_sessiondir = $(datadir)/wayland-sessions
Ross Burton315476f2015-07-16 20:56:32 +0100205dist_wayland_session_DATA = src/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100206
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800207westonincludedir = $(includedir)/weston
208westoninclude_HEADERS = \
209 src/version.h \
210 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200211 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800212 shared/matrix.h \
213 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100214 shared/zalloc.h \
215 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800216
Ucan, Emre \(ADITG/SW1\)ae2541d2015-10-15 14:51:43 +0000217if ENABLE_IVI_SHELL
218westoninclude_HEADERS += \
219 ivi-shell/ivi-layout-export.h
220endif
221
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800222if ENABLE_EGL
223module_LTLIBRARIES += gl-renderer.la
224gl_renderer_la_LDFLAGS = -module -avoid-version
225gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
226gl_renderer_la_CFLAGS = \
227 $(COMPOSITOR_CFLAGS) \
228 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300229 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500230 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800231gl_renderer_la_SOURCES = \
232 src/gl-renderer.h \
233 src/gl-renderer.c \
234 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700235 src/vertex-clipping.h \
236 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800237endif
238
239if ENABLE_X11_COMPOSITOR
240module_LTLIBRARIES += x11-backend.la
241x11_backend_la_LDFLAGS = -module -avoid-version
242x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800243 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800244x11_backend_la_CFLAGS = \
245 $(COMPOSITOR_CFLAGS) \
246 $(EGL_CFLAGS) \
247 $(PIXMAN_CFLAGS) \
248 $(CAIRO_CFLAGS) \
249 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500250 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700251x11_backend_la_SOURCES = \
252 src/compositor-x11.c \
253 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800254endif
255
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100256INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000257INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100258 src/libinput-seat.c \
259 src/libinput-seat.h \
260 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700261 src/libinput-device.h \
262 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100263
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800264if ENABLE_DRM_COMPOSITOR
265module_LTLIBRARIES += drm-backend.la
266drm_backend_la_LDFLAGS = -module -avoid-version
267drm_backend_la_LIBADD = \
268 $(COMPOSITOR_LIBS) \
269 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100270 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100271 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800272 libsession-helper.la
273drm_backend_la_CFLAGS = \
274 $(COMPOSITOR_CFLAGS) \
275 $(EGL_CFLAGS) \
276 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500277 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800278drm_backend_la_SOURCES = \
279 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100280 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700281 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200282 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800283 src/libbacklight.c \
284 src/libbacklight.h
285
286if ENABLE_VAAPI_RECORDER
287drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
288drm_backend_la_LIBADD += $(LIBVA_LIBS)
289drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
290endif
291endif
292
293if ENABLE_WAYLAND_COMPOSITOR
294module_LTLIBRARIES += wayland-backend.la
295wayland_backend_la_LDFLAGS = -module -avoid-version
296wayland_backend_la_LIBADD = \
297 $(COMPOSITOR_LIBS) \
298 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800299 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800300wayland_backend_la_CFLAGS = \
301 $(COMPOSITOR_CFLAGS) \
302 $(EGL_CFLAGS) \
303 $(PIXMAN_CFLAGS) \
304 $(CAIRO_CFLAGS) \
305 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500306 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700307wayland_backend_la_SOURCES = \
308 src/compositor-wayland.c \
309 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500310nodist_wayland_backend_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800311 protocol/fullscreen-shell-unstable-v1-protocol.c \
312 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800313endif
314
315if ENABLE_RPI_COMPOSITOR
316if INSTALL_RPI_COMPOSITOR
317module_LTLIBRARIES += rpi-backend.la
318else
319noinst_LTLIBRARIES += rpi-backend.la
320endif
321
322rpi_backend_la_LDFLAGS = -module -avoid-version
323rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
324 $(RPI_COMPOSITOR_LIBS) \
325 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100326 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800327 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800328 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800329rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500330 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800331 $(COMPOSITOR_CFLAGS) \
332 $(RPI_COMPOSITOR_CFLAGS) \
333 $(RPI_BCM_HOST_CFLAGS)
334rpi_backend_la_SOURCES = \
335 src/compositor-rpi.c \
336 src/rpi-renderer.c \
337 src/rpi-renderer.h \
338 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700339 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100340 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800341
342if ENABLE_EGL
343rpi_backend_la_LIBADD += $(EGL_LIBS)
344rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
345endif
346
347endif
348
349if ENABLE_HEADLESS_COMPOSITOR
350module_LTLIBRARIES += headless-backend.la
351headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800352headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500353headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700354headless_backend_la_SOURCES = \
355 src/compositor-headless.c \
356 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800357endif
358
359if ENABLE_FBDEV_COMPOSITOR
360module_LTLIBRARIES += fbdev-backend.la
361fbdev_backend_la_LDFLAGS = -module -avoid-version
362fbdev_backend_la_LIBADD = \
363 $(COMPOSITOR_LIBS) \
364 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100365 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800366 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800367 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800368fbdev_backend_la_CFLAGS = \
369 $(COMPOSITOR_CFLAGS) \
370 $(EGL_CFLAGS) \
371 $(FBDEV_COMPOSITOR_CFLAGS) \
372 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500373 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800374fbdev_backend_la_SOURCES = \
375 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700376 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100377 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800378endif
379
380if ENABLE_RDP_COMPOSITOR
381module_LTLIBRARIES += rdp-backend.la
382rdp_backend_la_LDFLAGS = -module -avoid-version
383rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
384 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800385 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800386rdp_backend_la_CFLAGS = \
387 $(COMPOSITOR_CFLAGS) \
388 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500389 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700390rdp_backend_la_SOURCES = \
391 src/compositor-rdp.c \
392 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800393endif
394
395if HAVE_LCMS
396module_LTLIBRARIES += cms-static.la
397cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800398cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500399cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800400cms_static_la_SOURCES = \
401 src/cms-static.c \
402 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700403 src/cms-helper.h \
404 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800405if ENABLE_COLORD
406module_LTLIBRARIES += cms-colord.la
407cms_colord_la_LDFLAGS = -module -avoid-version
408cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500409cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800410cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100411 src/cms-colord.c \
412 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700413 src/cms-helper.h \
414 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800415endif
416endif
417
418noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500419spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800420spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
421spring_tool_SOURCES = \
422 src/spring-tool.c \
423 src/animation.c \
424 shared/matrix.c \
425 shared/matrix.h \
426 src/compositor.h
427
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800428if BUILD_CLIENTS
429
430bin_PROGRAMS += weston-terminal weston-info
431
432libexec_PROGRAMS += \
433 weston-desktop-shell \
434 weston-screenshooter \
435 weston-keyboard \
436 weston-simple-im
437
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900438if ENABLE_IVI_SHELL
439libexec_PROGRAMS += \
440 weston-ivi-shell-user-interface
441endif
442
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800443demo_clients = \
444 weston-flower \
445 weston-image \
446 weston-cliptest \
447 weston-dnd \
448 weston-smoke \
449 weston-resizor \
450 weston-eventdemo \
451 weston-clickdot \
452 weston-transformed \
453 weston-fullscreen \
454 weston-stacking \
455 weston-calibrator \
456 weston-scaler
457
458if INSTALL_DEMO_CLIENTS
459bin_PROGRAMS += $(demo_clients)
460else
461noinst_PROGRAMS += $(demo_clients)
462endif
463
464
465if BUILD_SIMPLE_CLIENTS
466demo_clients += \
467 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500468 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800469 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400470 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800471 weston-multi-resource
472
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800473weston_simple_shm_SOURCES = clients/simple-shm.c
474nodist_weston_simple_shm_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800475 protocol/xdg-shell-unstable-v5-protocol.c \
476 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800477 protocol/fullscreen-shell-unstable-v1-protocol.c \
478 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900479 protocol/ivi-application-protocol.c \
480 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800481weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800482weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800483
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500484weston_simple_damage_SOURCES = clients/simple-damage.c
485nodist_weston_simple_damage_SOURCES = \
486 protocol/scaler-protocol.c \
487 protocol/scaler-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800488 protocol/xdg-shell-unstable-v5-protocol.c \
489 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800490 protocol/fullscreen-shell-unstable-v1-protocol.c \
491 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500492weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
493weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
494
Jon A. Cruzb09da242015-06-16 13:15:13 -0700495weston_simple_touch_SOURCES = \
496 clients/simple-touch.c \
497 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800498weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800499weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800500
Jon A. Cruzb09da242015-06-16 13:15:13 -0700501weston_presentation_shm_SOURCES = \
502 clients/presentation-shm.c \
503 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400504nodist_weston_presentation_shm_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200505 protocol/presentation-time-protocol.c \
506 protocol/presentation-time-client-protocol.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400507weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Derek Foremane2926942015-06-29 14:05:38 -0500508weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm -lrt
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400509
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800510weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800511weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000512weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800513endif
514
515if BUILD_SIMPLE_EGL_CLIENTS
516demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800517weston_simple_egl_SOURCES = clients/simple-egl.c
518nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800519 protocol/xdg-shell-unstable-v5-protocol.c \
520 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900521 protocol/ivi-application-protocol.c \
522 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800523weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800524weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
525endif
526
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000527if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
528demo_clients += weston-simple-dmabuf-intel
529weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
530nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800531 protocol/xdg-shell-unstable-v5-protocol.c \
532 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800533 protocol/fullscreen-shell-unstable-v1-protocol.c \
534 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800535 protocol/linux-dmabuf-unstable-v1-protocol.c \
536 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000537weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
538weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800539BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200540endif
541
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000542if BUILD_SIMPLE_DMABUF_V4L_CLIENT
543demo_clients += weston-simple-dmabuf-v4l
544weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
545nodist_weston_simple_dmabuf_v4l_SOURCES = \
546 protocol/xdg-shell-unstable-v5-protocol.c \
547 protocol/xdg-shell-unstable-v5-client-protocol.h \
548 protocol/fullscreen-shell-unstable-v1-protocol.c \
549 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
550 protocol/linux-dmabuf-unstable-v1-protocol.c \
551 protocol/linux-dmabuf-unstable-v1-client-protocol.h
552weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
553weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
554BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
555endif
556
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800557noinst_LTLIBRARIES += libtoytoolkit.la
558
559libtoytoolkit_la_SOURCES = \
560 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700561 clients/window.h \
562 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800563
564nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100565 protocol/text-cursor-position-protocol.c \
566 protocol/text-cursor-position-client-protocol.h \
567 protocol/scaler-protocol.c \
568 protocol/scaler-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800569 protocol/xdg-shell-unstable-v5-protocol.c \
570 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900571 protocol/ivi-application-protocol.c \
572 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500573
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800574BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
575
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800576
577libtoytoolkit_la_LIBADD = \
578 $(CLIENT_LIBS) \
579 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800580 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800581libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800582
583weston_flower_SOURCES = clients/flower.c
584weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800585weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800586
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100587weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800588 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800589nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800590 protocol/weston-screenshooter-protocol.c \
591 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800592weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800593weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800594
Jon A. Cruzb09da242015-06-16 13:15:13 -0700595weston_terminal_SOURCES = \
596 clients/terminal.c \
597 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800598weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800599weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800600
601weston_image_SOURCES = clients/image.c
602weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800603weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800604
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300605weston_cliptest_SOURCES = \
606 clients/cliptest.c \
607 src/vertex-clipping.c \
608 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800609weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800610weston_cliptest_LDADD = libtoytoolkit.la
611
Jon A. Cruzb09da242015-06-16 13:15:13 -0700612weston_dnd_SOURCES = \
613 clients/dnd.c \
614 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800615weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800616weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800617
618weston_smoke_SOURCES = clients/smoke.c
619weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800620weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800621
622weston_resizor_SOURCES = clients/resizor.c
623weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800624weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800625
626weston_scaler_SOURCES = clients/scaler.c
627weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800628weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800629
630if HAVE_CAIRO_GLESV2
631demo_clients += weston-nested weston-nested-client
632
Jon A. Cruzb09da242015-06-16 13:15:13 -0700633weston_nested_SOURCES = \
634 clients/nested.c \
635 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800636weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800637weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800638
639weston_nested_client_SOURCES = clients/nested-client.c
640weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800641weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800642endif
643
Jon A. Cruzb09da242015-06-16 13:15:13 -0700644weston_eventdemo_SOURCES = \
645 clients/eventdemo.c \
646 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800647weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800648weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800649
Jon A. Cruzb09da242015-06-16 13:15:13 -0700650weston_clickdot_SOURCES = \
651 clients/clickdot.c \
652 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800653weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800654weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800655
656weston_transformed_SOURCES = clients/transformed.c
657weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800658weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800659
660weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500661nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800662 protocol/fullscreen-shell-unstable-v1-protocol.c \
663 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800664weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800665weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800666
Jon A. Cruzb09da242015-06-16 13:15:13 -0700667weston_stacking_SOURCES = \
668 clients/stacking.c \
669 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800670weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800671weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800672
Jon A. Cruzb09da242015-06-16 13:15:13 -0700673weston_calibrator_SOURCES = \
674 clients/calibrator.c \
675 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800676 shared/matrix.c \
677 shared/matrix.h
678weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800679weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800680
681if BUILD_SUBSURFACES_CLIENT
682demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700683weston_subsurfaces_SOURCES = \
684 clients/subsurfaces.c \
685 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800686weston_subsurfaces_CFLAGS = \
687 $(AM_CFLAGS) \
688 $(SIMPLE_EGL_CLIENT_CFLAGS) \
689 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800690weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
691endif
692
693if HAVE_PANGO
694demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700695weston_editor_SOURCES = \
696 clients/editor.c \
697 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800698nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800699 protocol/text-input-unstable-v1-protocol.c \
700 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800701weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800702weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800703endif
704
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800705weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800706nodist_weston_keyboard_SOURCES = \
707 protocol/weston-desktop-shell-client-protocol.h \
708 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800709 protocol/input-method-unstable-v1-protocol.c \
710 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800711weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800712weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800713
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800714weston_simple_im_SOURCES = clients/weston-simple-im.c
715nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800716 protocol/input-method-unstable-v1-protocol.c \
717 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800718weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800719weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800720
Jon A. Cruzb09da242015-06-16 13:15:13 -0700721weston_info_SOURCES = \
722 clients/weston-info.c \
723 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400724nodist_weston_info_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200725 protocol/presentation-time-protocol.c \
726 protocol/presentation-time-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800727weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200728weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800729
Jon A. Cruzb09da242015-06-16 13:15:13 -0700730weston_desktop_shell_SOURCES = \
731 clients/desktop-shell.c \
732 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800733nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800734 protocol/weston-desktop-shell-client-protocol.h \
735 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800736weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800737weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800738
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900739if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700740weston_ivi_shell_user_interface_SOURCES = \
741 clients/ivi-shell-user-interface.c \
742 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900743nodist_weston_ivi_shell_user_interface_SOURCES = \
744 protocol/ivi-hmi-controller-client-protocol.h \
745 protocol/ivi-hmi-controller-protocol.c \
746 protocol/ivi-application-client-protocol.h \
747 protocol/ivi-application-protocol.c
748weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
749weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
750endif
751
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800752if BUILD_FULL_GL_CLIENTS
753demo_clients += weston-gears
754weston_gears_SOURCES = clients/gears.c
755weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800756weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800757endif
758
759endif
760
761BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800762 protocol/weston-screenshooter-protocol.c \
763 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100764 protocol/text-cursor-position-client-protocol.h \
765 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800766 protocol/text-input-unstable-v1-protocol.c \
767 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800768 protocol/input-method-unstable-v1-protocol.c \
769 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800770 protocol/weston-desktop-shell-client-protocol.h \
771 protocol/weston-desktop-shell-protocol.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100772 protocol/scaler-client-protocol.h \
773 protocol/scaler-protocol.c \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200774 protocol/presentation-time-protocol.c \
775 protocol/presentation-time-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800776 protocol/fullscreen-shell-unstable-v1-protocol.c \
777 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800778 protocol/xdg-shell-unstable-v5-protocol.c \
779 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900780 protocol/ivi-hmi-controller-protocol.c \
781 protocol/ivi-hmi-controller-client-protocol.h \
782 protocol/ivi-application-protocol.c \
783 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800784
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800785westondatadir = $(datadir)/weston
786dist_westondata_DATA = \
787 data/wayland.svg \
788 data/wayland.png \
789 data/pattern.png \
790 data/terminal.png \
791 data/border.png \
792 data/icon_window.png \
793 data/sign_close.png \
794 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100795 data/sign_minimize.png
796
797if ENABLE_IVI_SHELL
798dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900799 data/background.png \
800 data/tiling.png \
801 data/fullscreen.png \
802 data/panel.png \
803 data/random.png \
804 data/sidebyside.png \
805 data/home.png \
806 data/icon_ivi_clickdot.png \
807 data/icon_ivi_flower.png \
808 data/icon_ivi_simple-egl.png \
809 data/icon_ivi_simple-shm.png \
810 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100811endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800812
813
814if BUILD_WCAP_TOOLS
815bin_PROGRAMS += wcap-decode
816
817wcap_decode_SOURCES = \
818 wcap/main.c \
819 wcap/wcap-decode.c \
820 wcap/wcap-decode.h
821
Derek Foreman4ff38742015-06-18 11:43:11 -0500822wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800823wcap_decode_LDADD = $(WCAP_LIBS)
824endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800825
826
827if ENABLE_DESKTOP_SHELL
828
829module_LTLIBRARIES += desktop-shell.la
830
831desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100832 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800833 -I$(top_srcdir)/shared \
834 -I$(top_srcdir)/src \
835 -I$(top_builddir)/src \
836 -I$(top_builddir)/desktop-shell \
837 -DDATADIR='"$(datadir)"' \
838 -DMODULEDIR='"$(moduledir)"' \
839 -DLIBEXECDIR='"$(libexecdir)"' \
840 -DIN_WESTON
841
842desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800843desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500844desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800845desktop_shell_la_SOURCES = \
846 desktop-shell/shell.h \
847 desktop-shell/shell.c \
848 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700849 desktop-shell/input-panel.c \
850 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800851nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800852 protocol/weston-desktop-shell-protocol.c \
853 protocol/weston-desktop-shell-server-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800854 protocol/xdg-shell-unstable-v5-protocol.c \
855 protocol/xdg-shell-unstable-v5-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800856
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800857BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800858endif
859
Jason Ekstrand946a9482014-04-02 19:53:47 -0500860if ENABLE_FULLSCREEN_SHELL
861
862module_LTLIBRARIES += fullscreen-shell.la
863
864fullscreen_shell_la_CPPFLAGS = \
865 -I$(top_builddir)/protocol \
866 -I$(top_srcdir)/shared \
867 -I$(top_srcdir)/src \
868 -I$(top_builddir)/src \
869 -DIN_WESTON
870
871fullscreen_shell_la_LDFLAGS = -module -avoid-version
872fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500873fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500874fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700875 fullscreen-shell/fullscreen-shell.c \
876 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500877nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800878 protocol/fullscreen-shell-unstable-v1-protocol.c \
879 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500880
881BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
882endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800883
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900884if ENABLE_IVI_SHELL
885
886module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900887 $(ivi_shell) \
888 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900889
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900890ivi_shell = ivi-shell.la
891ivi_shell_la_LDFLAGS = -module -avoid-version
892ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500893ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900894ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900895 ivi-shell/ivi-layout-export.h \
896 ivi-shell/ivi-layout-private.h \
Pekka Paalanen32ca7912016-03-15 17:21:00 +0200897 ivi-shell/ivi-layout-shell.h \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900898 ivi-shell/ivi-layout.c \
899 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900900 ivi-shell/ivi-shell.h \
901 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700902 ivi-shell/input-panel-ivi.c \
903 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900904nodist_ivi_shell_la_SOURCES = \
905 protocol/ivi-application-protocol.c \
906 protocol/ivi-application-server-protocol.h
907
908BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
909
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900910hmi_controller = hmi-controller.la
911hmi_controller_la_LDFLAGS = -module -avoid-version
912hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500913hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900914hmi_controller_la_SOURCES = \
915 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700916 ivi-shell/hmi-controller.c \
917 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900918nodist_hmi_controller_la_SOURCES = \
919 protocol/ivi-hmi-controller-protocol.c \
920 protocol/ivi-hmi-controller-server-protocol.h
921
922BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
923
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900924endif
925
926
Jason Ekstrand47928d82014-04-02 19:54:01 -0500927if ENABLE_SCREEN_SHARING
928
929module_LTLIBRARIES += screen-share.la
930
931screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
932screen_share_la_LDFLAGS = -module -avoid-version
933screen_share_la_LIBADD = \
934 $(COMPOSITOR_LIBS) \
935 $(SCREEN_SHARE_LIBS) \
936 libshared-cairo.la
937screen_share_la_CFLAGS = \
938 $(COMPOSITOR_CFLAGS) \
939 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500940 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500941screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700942 src/screen-share.c \
943 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500944nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800945 protocol/fullscreen-shell-unstable-v1-protocol.c \
946 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500947
948endif
949
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800950if ENABLE_XWAYLAND
951
952module_LTLIBRARIES += xwayland.la
953
954xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100955 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800956 -I$(top_srcdir)/shared \
957 -I$(top_srcdir)/src \
958 -I$(top_builddir)/src \
959 -I$(top_builddir)/xwayland \
960 -DDATADIR='"$(datadir)"' \
961 -DMODULEDIR='"$(moduledir)"' \
962 -DLIBEXECDIR='"$(libexecdir)"' \
963 -DXSERVER_PATH='"@XSERVER_PATH@"'
964
965xwayland_la_LDFLAGS = -module -avoid-version
966xwayland_la_LIBADD = \
967 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800968 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800969xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500970 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800971 $(COMPOSITOR_CFLAGS) \
972 $(PIXMAN_CFLAGS) \
973 $(CAIRO_CFLAGS)
974xwayland_la_SOURCES = \
975 xwayland/xwayland.h \
976 xwayland/window-manager.c \
977 xwayland/selection.c \
978 xwayland/dnd.c \
979 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800980 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700981 xwayland/hash.h \
982 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800983endif
984
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800985
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800986#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800987# Shared utilities
988#
989
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700990noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
991 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800992
Derek Foreman4ff38742015-06-18 11:43:11 -0500993libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800994
995libshared_la_SOURCES = \
996 shared/config-parser.c \
997 shared/option-parser.c \
998 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200999 shared/file-util.c \
1000 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001001 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001002 shared/os-compatibility.c \
Bryce Harringtone99e4bf2016-03-16 14:15:18 -07001003 shared/os-compatibility.h \
1004 shared/xalloc.c \
1005 shared/xalloc.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001006
1007libshared_cairo_la_CFLAGS = \
1008 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001009 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001010 $(COMPOSITOR_CFLAGS) \
1011 $(PIXMAN_CFLAGS) \
1012 $(CAIRO_CFLAGS) \
1013 $(PNG_CFLAGS) \
1014 $(WEBP_CFLAGS)
1015
1016libshared_cairo_la_LIBADD = \
1017 $(PIXMAN_LIBS) \
1018 $(CAIRO_LIBS) \
1019 $(PNG_LIBS) \
1020 $(WEBP_LIBS) \
1021 $(JPEG_LIBS)
1022
1023libshared_cairo_la_SOURCES = \
1024 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001025 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001026 shared/image-loader.c \
1027 shared/image-loader.h \
1028 shared/cairo-util.c \
1029 shared/frame.c \
1030 shared/cairo-util.h
1031
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001032libzunitc_la_SOURCES = \
1033 tools/zunitc/inc/zunitc/zunitc.h \
1034 tools/zunitc/inc/zunitc/zunitc_impl.h \
1035 tools/zunitc/src/zuc_base_logger.c \
1036 tools/zunitc/src/zuc_base_logger.h \
1037 tools/zunitc/src/zuc_collector.c \
1038 tools/zunitc/src/zuc_collector.h \
1039 tools/zunitc/src/zuc_context.h \
1040 tools/zunitc/src/zuc_event.h \
1041 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001042 tools/zunitc/src/zuc_junit_reporter.c \
1043 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001044 tools/zunitc/src/zuc_types.h \
1045 tools/zunitc/src/zunitc_impl.c \
1046 shared/helpers.h
1047
1048libzunitc_la_CFLAGS = \
1049 $(AM_CFLAGS) \
1050 -I$(top_srcdir)/tools/zunitc/inc
1051
1052libzunitc_la_LIBADD = \
1053 libshared.la
1054
Jon A. Cruz646aef52015-07-15 19:22:41 -07001055if ENABLE_JUNIT_XML
1056libzunitc_la_CFLAGS += \
1057 $(LIBXML2_CFLAGS)
1058libzunitc_la_LIBADD += \
1059 $(LIBXML2_LIBS)
1060endif
1061
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001062libzunitcmain_la_SOURCES = \
1063 tools/zunitc/src/main.c
1064
1065libzunitcmain_la_CFLAGS = \
1066 $(AM_CFLAGS) \
1067 -I$(top_srcdir)/tools/zunitc/inc
1068
1069libzunitcmain_la_LIBADD = \
1070 libzunitc.la \
1071 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001072
1073#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001074# tests subdirectory
1075#
1076
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001077TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1078
1079internal_tests = \
1080 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001081
1082shared_tests = \
1083 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001084 vertex-clip.test \
1085 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001086
1087module_tests = \
1088 surface-test.la \
1089 surface-global-test.la
1090
1091weston_tests = \
1092 bad_buffer.weston \
1093 keyboard.weston \
1094 event.weston \
1095 button.weston \
1096 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001097 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001098 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001099 subsurface.weston \
1100 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001101
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001102ivi_tests =
1103
1104$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001105
1106AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001107 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1108 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001109
1110TEST_EXTENSIONS = .la .weston
1111LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1112WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1113
1114clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001115 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001116 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001117
1118# To remove when automake 1.11 support is dropped
1119export abs_builddir
1120
1121noinst_LTLIBRARIES += \
1122 weston-test.la \
1123 $(module_tests) \
1124 libtest-runner.la \
1125 libtest-client.la
1126
1127noinst_PROGRAMS += \
1128 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001129 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001130 $(shared_tests) \
1131 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001132 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001133 matrix-test
1134
1135test_module_ldflags = \
1136 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1137
1138surface_global_test_la_SOURCES = tests/surface-global-test.c
1139surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001140surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001141
1142surface_test_la_SOURCES = tests/surface-test.c
1143surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001144surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001145
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001146weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001147weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001148weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001149weston_test_la_SOURCES = \
1150 tests/weston-test.c \
1151 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001152nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001153 protocol/weston-test-protocol.c \
1154 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001155
1156if ENABLE_EGL
1157weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1158weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1159endif
1160
1161libtest_runner_la_SOURCES = \
1162 tests/weston-test-runner.c \
1163 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001164libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001165
1166config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001167config_parser_test_LDADD = \
1168 libshared.la \
1169 $(COMPOSITOR_LIBS) \
1170 libzunitc.la \
1171 libzunitcmain.la
1172config_parser_test_CFLAGS = \
1173 $(AM_CFLAGS) \
1174 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001175
1176vertex_clip_test_SOURCES = \
1177 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001178 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001179 src/vertex-clipping.c \
1180 src/vertex-clipping.h
1181vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1182
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001183libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001184 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001185 tests/weston-test-client-helper.h
1186nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001187 protocol/weston-test-protocol.c \
1188 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001189libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1190libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) $(CAIRO_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001191
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001192
1193#
1194# Internal tests - tests functionality of the testsuite itself
1195#
1196
1197internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001198internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1199internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001200
1201
1202#
1203# Weston Tests
1204#
1205
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001206bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001207bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001208bad_buffer_weston_LDADD = libtest-client.la
1209
1210keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001211keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001212keyboard_weston_LDADD = libtest-client.la
1213
1214event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001215event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001216event_weston_LDADD = libtest-client.la
1217
1218button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001219button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001220button_weston_LDADD = libtest-client.la
1221
Marek Chalupa5fd81402015-03-30 09:21:29 -04001222devices_weston_SOURCES = tests/devices-test.c
1223devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1224devices_weston_LDADD = libtest-client.la
1225
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001226text_weston_SOURCES = tests/text-test.c
1227nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001228 protocol/text-input-unstable-v1-protocol.c \
1229 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001230text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001231text_weston_LDADD = libtest-client.la
1232
1233subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001234subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001235subsurface_weston_LDADD = libtest-client.la
1236
Jon A. Cruzb09da242015-06-16 13:15:13 -07001237presentation_weston_SOURCES = \
1238 tests/presentation-test.c \
1239 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001240nodist_presentation_weston_SOURCES = \
Pekka Paalanenb00c79b2016-02-18 16:53:27 +02001241 protocol/presentation-time-protocol.c \
1242 protocol/presentation-time-client-protocol.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001243presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1244presentation_weston_LDADD = libtest-client.la
1245
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001246roles_weston_SOURCES = tests/roles-test.c
1247roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1248roles_weston_LDADD = libtest-client.la
1249
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001250if ENABLE_EGL
1251weston_tests += buffer-count.weston
1252buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001253buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001254buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1255endif
1256
1257if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001258weston_tests += xwayland-test.weston
1259xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001260xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001261xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001262endif
1263
1264matrix_test_SOURCES = \
1265 tests/matrix-test.c \
1266 shared/matrix.c \
1267 shared/matrix.h
1268matrix_test_CPPFLAGS = -DUNIT_TEST
1269matrix_test_LDADD = -lm -lrt
1270
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001271if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001272module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001273 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001274 ivi-layout-test.la
1275
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001276ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1277ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001278ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001279ivi_layout_internal_test_la_SOURCES = \
1280 tests/ivi_layout-internal-test.c
1281
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001282ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1283ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001284ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001285ivi_layout_test_la_SOURCES = \
1286 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001287 tests/ivi-test.h \
1288 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001289nodist_ivi_layout_test_la_SOURCES = \
1290 protocol/weston-test-protocol.c \
1291 protocol/weston-test-server-protocol.h
1292
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001293ivi_tests += \
1294 ivi-shell-app.weston
1295
1296ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1297nodist_ivi_shell_app_weston_SOURCES = \
1298 protocol/ivi-application-protocol.c \
1299 protocol/ivi-application-client-protocol.h
1300ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1301ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001302
1303noinst_PROGRAMS += ivi-layout.ivi
1304
1305ivi_layout_ivi_SOURCES = \
1306 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001307 tests/ivi-test.h \
1308 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001309nodist_ivi_layout_ivi_SOURCES = \
1310 protocol/ivi-application-protocol.c \
1311 protocol/ivi-application-client-protocol.h
1312ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1313ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001314endif
1315
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001316if BUILD_SETBACKLIGHT
1317noinst_PROGRAMS += setbacklight
1318setbacklight_SOURCES = \
1319 tests/setbacklight.c \
1320 src/libbacklight.c \
1321 src/libbacklight.h
1322setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1323setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1324endif
1325
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001326all-local: zuctest$(EXEEXT)
1327
1328noinst_PROGRAMS += zuctest$(EXEEXT)
1329
1330zuctest_LDADD = \
1331 libzunitc.la \
1332 libzunitcmain.la
1333
1334zuctest_CFLAGS = \
1335 $(AM_CFLAGS) \
1336 -I$(top_srcdir)/tools/zunitc/inc
1337
1338zuctest_SOURCES = \
1339 tools/zunitc/test/fixtures_test.c \
1340 tools/zunitc/test/zunitc_test.c
1341
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001342EXTRA_DIST += \
1343 tests/weston-tests-env \
1344 tests/internal-screenshot.ini \
1345 tests/reference/internal-screenshot-bad-00.png \
1346 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001347
1348BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001349 protocol/weston-test-protocol.c \
1350 protocol/weston-test-server-protocol.h \
1351 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001352 protocol/text-input-unstable-v1-protocol.c \
1353 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001354
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001355EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001356 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001357 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001358 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001359 protocol/weston-test.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001360 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001361 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001362 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001363
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001364#
1365# manual test modules in tests subdirectory
1366#
1367
1368noinst_LTLIBRARIES += \
1369 surface-screenshot.la
1370
1371surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1372surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001373surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001374surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1375
1376
1377#
1378# Documentation
1379#
1380
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001381man_MANS = weston.1 weston.ini.5
1382
1383if ENABLE_DRM_COMPOSITOR
1384man_MANS += weston-drm.7
1385endif
1386
1387MAN_SUBSTS = \
1388 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1389 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1390 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1391 -e 's|__version__|$(PACKAGE_VERSION)|g'
1392
1393SUFFIXES = .1 .5 .7 .man
1394
1395%.1 %.5 %.7 : man/%.man
1396 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1397
1398EXTRA_DIST += \
1399 man/weston.man \
1400 man/weston-drm.man \
1401 man/weston.ini.man
1402
1403CLEANFILES += $(man_MANS)
1404
Jon A. Cruz179c1862015-07-15 19:22:43 -07001405if ENABLE_DEVDOCS
1406DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1407
1408docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1409 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1410
1411docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1412 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1413endif
1414
1415DOCDIRS = \
1416 docs/developer \
1417 docs/tools
1418
1419$(DOCDIRS):
1420 $(MKDIR_P) $@
1421
1422.PHONY: doc $(DOXYGEN_INDICES)
1423
1424doc: $(DOXYGEN_INDICES)
1425
Jonas Ådahl496adb32015-11-17 16:00:27 +08001426.SECONDEXPANSION:
1427
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001428define protostability
Pekka Paalanen35552aa2016-02-18 16:56:13 +02001429$(if $(findstring unstable,$1),unstable,stable)
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001430endef
1431
1432define protoname
1433$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1434endef
1435
1436protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001437 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1438
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001439protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001440 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1441
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001442protocol/%-client-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) client-header < $< > $@
1444
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001445protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1446 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001447
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001448protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1449 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001450
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001451protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1452 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@