blob: e3653964c9ef0c8f08ca711728354f285037798e [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 = \
105 $(SYSTEMD_DAEMON_LIBS) \
106 $(PIXMAN_CFLAGS) \
107 $(AM_CFLAGS)
108systemd_notify_la_SOURCES = \
109 src/systemd-notify.c \
Egor Starkov7ce2e972015-09-25 18:00:27 +0300110 shared/helpers.h \
111 shared/zalloc.h \
Bryce Harringtona0dd5b42015-09-25 15:16:25 -0700112 src/compositor.h
Egor Starkov7ce2e972015-09-25 18:00:27 +0300113endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800114
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800115nodist_weston_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800116 protocol/weston-screenshooter-protocol.c \
117 protocol/weston-screenshooter-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800118 protocol/text-cursor-position-protocol.c \
119 protocol/text-cursor-position-server-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800120 protocol/text-input-unstable-v1-protocol.c \
121 protocol/text-input-unstable-v1-server-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800122 protocol/input-method-unstable-v1-protocol.c \
123 protocol/input-method-unstable-v1-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400124 protocol/presentation_timing-protocol.c \
125 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800126 protocol/scaler-protocol.c \
Pekka Paalanen23ab7152014-09-29 14:08:29 -0400127 protocol/scaler-server-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800128 protocol/linux-dmabuf-unstable-v1-protocol.c \
129 protocol/linux-dmabuf-unstable-v1-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800130
131BUILT_SOURCES += $(nodist_weston_SOURCES)
132
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800133# Track this dependency explicitly instead of using BUILT_SOURCES. We
134# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
135# in case we're building from tarballs.
136
137src/compositor.c : $(top_builddir)/src/git-version.h
138
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800139noinst_LTLIBRARIES += \
140 libsession-helper.la
141
142libsession_helper_la_SOURCES = \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800143 src/launcher-util.c \
Jasper St. Pierre72dea062015-09-23 10:46:47 -0700144 src/launcher-util.h \
Derek Foremancb156202015-09-24 09:26:48 -0500145 src/launcher-impl.h \
Jasper St. Pierre72dea062015-09-23 10:46:47 -0700146 src/weston-launch.h \
147 src/launcher-weston-launch.c \
148 src/launcher-direct.c
Derek Foreman4ff38742015-06-18 11:43:11 -0500149libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800150libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
151
152if ENABLE_DBUS
153if HAVE_SYSTEMD_LOGIN
154libsession_helper_la_SOURCES += \
155 src/dbus.h \
156 src/dbus.c \
Jasper St. Pierre30bcf352015-09-23 10:46:46 -0700157 src/launcher-logind.c
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800158libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
159libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
160endif
161endif
162
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800163if HAVE_GIT_REPO
164src/git-version.h : $(top_srcdir)/.git/logs/HEAD
165 $(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 -0800166else
167src/git-version.h :
168 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
169
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800170endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800171
172.FORCE :
173
174if BUILD_WESTON_LAUNCH
175bin_PROGRAMS += weston-launch
176weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
177weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
178weston_launch_CFLAGS= \
Derek Foreman4ff38742015-06-18 11:43:11 -0500179 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800180 $(PAM_CFLAGS) \
181 $(SYSTEMD_LOGIN_CFLAGS) \
182 $(LIBDRM_CFLAGS)
183weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
184
185if ENABLE_SETUID_INSTALL
186install-exec-hook:
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700187 can_suid_files=no; \
188 chown root $(DESTDIR)$(bindir)/weston-launch \
189 && chmod u+s $(DESTDIR)$(bindir)/weston-launch \
190 && can_suid_files=yes;\
Derek Foreman6d116792015-04-10 11:55:27 -0500191 if test $$can_suid_files = no; then \
Jon A. Cruz90f23ca2015-04-09 17:52:56 -0700192 echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
193 echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
194 false; \
195 fi
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800196endif
197
198endif # BUILD_WESTON_LAUNCH
199
200pkgconfigdir = $(libdir)/pkgconfig
201pkgconfig_DATA = src/weston.pc
202
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100203wayland_sessiondir = $(datadir)/wayland-sessions
Ross Burton315476f2015-07-16 20:56:32 +0100204dist_wayland_session_DATA = src/weston.desktop
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100205
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800206westonincludedir = $(includedir)/weston
207westoninclude_HEADERS = \
208 src/version.h \
209 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200210 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800211 shared/matrix.h \
212 shared/config-parser.h \
Jonny Lamb51a7ae52015-03-20 15:26:51 +0100213 shared/zalloc.h \
214 shared/platform.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800215
Ucan, Emre \(ADITG/SW1\)ae2541d2015-10-15 14:51:43 +0000216if ENABLE_IVI_SHELL
217westoninclude_HEADERS += \
218 ivi-shell/ivi-layout-export.h
219endif
220
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800221if ENABLE_EGL
222module_LTLIBRARIES += gl-renderer.la
223gl_renderer_la_LDFLAGS = -module -avoid-version
224gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
225gl_renderer_la_CFLAGS = \
226 $(COMPOSITOR_CFLAGS) \
227 $(EGL_CFLAGS) \
Pekka Paalanena3525802014-06-12 16:49:29 +0300228 $(GL_RENDERER_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500229 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800230gl_renderer_la_SOURCES = \
231 src/gl-renderer.h \
232 src/gl-renderer.c \
233 src/vertex-clipping.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700234 src/vertex-clipping.h \
235 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800236endif
237
238if ENABLE_X11_COMPOSITOR
239module_LTLIBRARIES += x11-backend.la
240x11_backend_la_LDFLAGS = -module -avoid-version
241x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800242 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800243x11_backend_la_CFLAGS = \
244 $(COMPOSITOR_CFLAGS) \
245 $(EGL_CFLAGS) \
246 $(PIXMAN_CFLAGS) \
247 $(CAIRO_CFLAGS) \
248 $(X11_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500249 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700250x11_backend_la_SOURCES = \
251 src/compositor-x11.c \
252 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800253endif
254
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100255INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000256INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100257 src/libinput-seat.c \
258 src/libinput-seat.h \
259 src/libinput-device.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700260 src/libinput-device.h \
261 shared/helpers.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100262
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800263if ENABLE_DRM_COMPOSITOR
264module_LTLIBRARIES += drm-backend.la
265drm_backend_la_LDFLAGS = -module -avoid-version
266drm_backend_la_LIBADD = \
267 $(COMPOSITOR_LIBS) \
268 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100269 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100270 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800271 libsession-helper.la
272drm_backend_la_CFLAGS = \
273 $(COMPOSITOR_CFLAGS) \
274 $(EGL_CFLAGS) \
275 $(DRM_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500276 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800277drm_backend_la_SOURCES = \
278 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100279 $(INPUT_BACKEND_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700280 shared/helpers.h \
Mario Kleinerf507ec32015-06-21 21:25:14 +0200281 shared/timespec-util.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800282 src/libbacklight.c \
283 src/libbacklight.h
284
285if ENABLE_VAAPI_RECORDER
286drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
287drm_backend_la_LIBADD += $(LIBVA_LIBS)
288drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
289endif
290endif
291
292if ENABLE_WAYLAND_COMPOSITOR
293module_LTLIBRARIES += wayland-backend.la
294wayland_backend_la_LDFLAGS = -module -avoid-version
295wayland_backend_la_LIBADD = \
296 $(COMPOSITOR_LIBS) \
297 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800298 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800299wayland_backend_la_CFLAGS = \
300 $(COMPOSITOR_CFLAGS) \
301 $(EGL_CFLAGS) \
302 $(PIXMAN_CFLAGS) \
303 $(CAIRO_CFLAGS) \
304 $(WAYLAND_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500305 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700306wayland_backend_la_SOURCES = \
307 src/compositor-wayland.c \
308 shared/helpers.h
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500309nodist_wayland_backend_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800310 protocol/fullscreen-shell-unstable-v1-protocol.c \
311 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800312endif
313
314if ENABLE_RPI_COMPOSITOR
315if INSTALL_RPI_COMPOSITOR
316module_LTLIBRARIES += rpi-backend.la
317else
318noinst_LTLIBRARIES += rpi-backend.la
319endif
320
321rpi_backend_la_LDFLAGS = -module -avoid-version
322rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
323 $(RPI_COMPOSITOR_LIBS) \
324 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100325 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800326 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800327 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800328rpi_backend_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500329 $(AM_CFLAGS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800330 $(COMPOSITOR_CFLAGS) \
331 $(RPI_COMPOSITOR_CFLAGS) \
332 $(RPI_BCM_HOST_CFLAGS)
333rpi_backend_la_SOURCES = \
334 src/compositor-rpi.c \
335 src/rpi-renderer.c \
336 src/rpi-renderer.h \
337 src/rpi-bcm-stubs.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700338 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100339 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800340
341if ENABLE_EGL
342rpi_backend_la_LIBADD += $(EGL_LIBS)
343rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
344endif
345
346endif
347
348if ENABLE_HEADLESS_COMPOSITOR
349module_LTLIBRARIES += headless-backend.la
350headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800351headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500352headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700353headless_backend_la_SOURCES = \
354 src/compositor-headless.c \
355 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800356endif
357
358if ENABLE_FBDEV_COMPOSITOR
359module_LTLIBRARIES += fbdev-backend.la
360fbdev_backend_la_LDFLAGS = -module -avoid-version
361fbdev_backend_la_LIBADD = \
362 $(COMPOSITOR_LIBS) \
363 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100364 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800365 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800366 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800367fbdev_backend_la_CFLAGS = \
368 $(COMPOSITOR_CFLAGS) \
369 $(EGL_CFLAGS) \
370 $(FBDEV_COMPOSITOR_CFLAGS) \
371 $(PIXMAN_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500372 $(AM_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800373fbdev_backend_la_SOURCES = \
374 src/compositor-fbdev.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700375 shared/helpers.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100376 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800377endif
378
379if ENABLE_RDP_COMPOSITOR
380module_LTLIBRARIES += rdp-backend.la
381rdp_backend_la_LDFLAGS = -module -avoid-version
382rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
383 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800384 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800385rdp_backend_la_CFLAGS = \
386 $(COMPOSITOR_CFLAGS) \
387 $(RDP_COMPOSITOR_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500388 $(AM_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -0700389rdp_backend_la_SOURCES = \
390 src/compositor-rdp.c \
391 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800392endif
393
394if HAVE_LCMS
395module_LTLIBRARIES += cms-static.la
396cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800397cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500398cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800399cms_static_la_SOURCES = \
400 src/cms-static.c \
401 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700402 src/cms-helper.h \
403 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800404if ENABLE_COLORD
405module_LTLIBRARIES += cms-colord.la
406cms_colord_la_LDFLAGS = -module -avoid-version
407cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500408cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800409cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100410 src/cms-colord.c \
411 src/cms-helper.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700412 src/cms-helper.h \
413 shared/helpers.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800414endif
415endif
416
417noinst_PROGRAMS += spring-tool
Derek Foreman4ff38742015-06-18 11:43:11 -0500418spring_tool_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800419spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
420spring_tool_SOURCES = \
421 src/spring-tool.c \
422 src/animation.c \
423 shared/matrix.c \
424 shared/matrix.h \
425 src/compositor.h
426
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800427if BUILD_CLIENTS
428
429bin_PROGRAMS += weston-terminal weston-info
430
431libexec_PROGRAMS += \
432 weston-desktop-shell \
433 weston-screenshooter \
434 weston-keyboard \
435 weston-simple-im
436
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900437if ENABLE_IVI_SHELL
438libexec_PROGRAMS += \
439 weston-ivi-shell-user-interface
440endif
441
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800442demo_clients = \
443 weston-flower \
444 weston-image \
445 weston-cliptest \
446 weston-dnd \
447 weston-smoke \
448 weston-resizor \
449 weston-eventdemo \
450 weston-clickdot \
451 weston-transformed \
452 weston-fullscreen \
453 weston-stacking \
454 weston-calibrator \
455 weston-scaler
456
457if INSTALL_DEMO_CLIENTS
458bin_PROGRAMS += $(demo_clients)
459else
460noinst_PROGRAMS += $(demo_clients)
461endif
462
463
464if BUILD_SIMPLE_CLIENTS
465demo_clients += \
466 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500467 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800468 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400469 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800470 weston-multi-resource
471
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800472weston_simple_shm_SOURCES = clients/simple-shm.c
473nodist_weston_simple_shm_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800474 protocol/xdg-shell-unstable-v5-protocol.c \
475 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800476 protocol/fullscreen-shell-unstable-v1-protocol.c \
477 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900478 protocol/ivi-application-protocol.c \
479 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800480weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800481weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800482
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500483weston_simple_damage_SOURCES = clients/simple-damage.c
484nodist_weston_simple_damage_SOURCES = \
485 protocol/scaler-protocol.c \
486 protocol/scaler-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800487 protocol/xdg-shell-unstable-v5-protocol.c \
488 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800489 protocol/fullscreen-shell-unstable-v1-protocol.c \
490 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500491weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
492weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
493
Jon A. Cruzb09da242015-06-16 13:15:13 -0700494weston_simple_touch_SOURCES = \
495 clients/simple-touch.c \
496 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800497weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800498weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800499
Jon A. Cruzb09da242015-06-16 13:15:13 -0700500weston_presentation_shm_SOURCES = \
501 clients/presentation-shm.c \
502 shared/helpers.h
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400503nodist_weston_presentation_shm_SOURCES = \
504 protocol/presentation_timing-protocol.c \
505 protocol/presentation_timing-client-protocol.h
506weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Derek Foremane2926942015-06-29 14:05:38 -0500507weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm -lrt
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400508
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800509weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800510weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000511weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800512endif
513
514if BUILD_SIMPLE_EGL_CLIENTS
515demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800516weston_simple_egl_SOURCES = clients/simple-egl.c
517nodist_weston_simple_egl_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800518 protocol/xdg-shell-unstable-v5-protocol.c \
519 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900520 protocol/ivi-application-protocol.c \
521 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800522weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800523weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
524endif
525
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000526if BUILD_SIMPLE_DMABUF_INTEL_CLIENT
527demo_clients += weston-simple-dmabuf-intel
528weston_simple_dmabuf_intel_SOURCES = clients/simple-dmabuf-intel.c
529nodist_weston_simple_dmabuf_intel_SOURCES = \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800530 protocol/xdg-shell-unstable-v5-protocol.c \
531 protocol/xdg-shell-unstable-v5-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800532 protocol/fullscreen-shell-unstable-v1-protocol.c \
533 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800534 protocol/linux-dmabuf-unstable-v1-protocol.c \
535 protocol/linux-dmabuf-unstable-v1-client-protocol.h
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000536weston_simple_dmabuf_intel_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_INTEL_CLIENT_CFLAGS)
537weston_simple_dmabuf_intel_LDADD = $(SIMPLE_DMABUF_INTEL_CLIENT_LIBS) libshared.la
Jonas Ådahl57e48f02015-11-17 16:00:28 +0800538BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
George Kiagiadakis53868982014-06-12 16:26:49 +0200539endif
540
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000541if BUILD_SIMPLE_DMABUF_V4L_CLIENT
542demo_clients += weston-simple-dmabuf-v4l
543weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
544nodist_weston_simple_dmabuf_v4l_SOURCES = \
545 protocol/xdg-shell-unstable-v5-protocol.c \
546 protocol/xdg-shell-unstable-v5-client-protocol.h \
547 protocol/fullscreen-shell-unstable-v1-protocol.c \
548 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
549 protocol/linux-dmabuf-unstable-v1-protocol.c \
550 protocol/linux-dmabuf-unstable-v1-client-protocol.h
551weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS)
552weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
553BUILT_SOURCES += protocol/linux-dmabuf-unstable-v1-client-protocol.h
554endif
555
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800556noinst_LTLIBRARIES += libtoytoolkit.la
557
558libtoytoolkit_la_SOURCES = \
559 clients/window.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700560 clients/window.h \
561 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800562
563nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100564 protocol/text-cursor-position-protocol.c \
565 protocol/text-cursor-position-client-protocol.h \
566 protocol/scaler-protocol.c \
567 protocol/scaler-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800568 protocol/xdg-shell-unstable-v5-protocol.c \
569 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900570 protocol/ivi-application-protocol.c \
571 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500572
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800573BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
574
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800575
576libtoytoolkit_la_LIBADD = \
577 $(CLIENT_LIBS) \
578 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800579 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800580libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800581
582weston_flower_SOURCES = clients/flower.c
583weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800584weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800585
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100586weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800587 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800588nodist_weston_screenshooter_SOURCES = \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800589 protocol/weston-screenshooter-protocol.c \
590 protocol/weston-screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800591weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800592weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800593
Jon A. Cruzb09da242015-06-16 13:15:13 -0700594weston_terminal_SOURCES = \
595 clients/terminal.c \
596 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800597weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800598weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800599
600weston_image_SOURCES = clients/image.c
601weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800602weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800603
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300604weston_cliptest_SOURCES = \
605 clients/cliptest.c \
606 src/vertex-clipping.c \
607 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800608weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800609weston_cliptest_LDADD = libtoytoolkit.la
610
Jon A. Cruzb09da242015-06-16 13:15:13 -0700611weston_dnd_SOURCES = \
612 clients/dnd.c \
613 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800614weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800615weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800616
617weston_smoke_SOURCES = clients/smoke.c
618weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800619weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800620
621weston_resizor_SOURCES = clients/resizor.c
622weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800623weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800624
625weston_scaler_SOURCES = clients/scaler.c
626weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800627weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800628
629if HAVE_CAIRO_GLESV2
630demo_clients += weston-nested weston-nested-client
631
Jon A. Cruzb09da242015-06-16 13:15:13 -0700632weston_nested_SOURCES = \
633 clients/nested.c \
634 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800635weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800636weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800637
638weston_nested_client_SOURCES = clients/nested-client.c
639weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800640weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800641endif
642
Jon A. Cruzb09da242015-06-16 13:15:13 -0700643weston_eventdemo_SOURCES = \
644 clients/eventdemo.c \
645 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800646weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800647weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800648
Jon A. Cruzb09da242015-06-16 13:15:13 -0700649weston_clickdot_SOURCES = \
650 clients/clickdot.c \
651 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800652weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800653weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800654
655weston_transformed_SOURCES = clients/transformed.c
656weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800657weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800658
659weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500660nodist_weston_fullscreen_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800661 protocol/fullscreen-shell-unstable-v1-protocol.c \
662 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800663weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800664weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800665
Jon A. Cruzb09da242015-06-16 13:15:13 -0700666weston_stacking_SOURCES = \
667 clients/stacking.c \
668 shared/helpers.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800669weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800670weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800671
Jon A. Cruzb09da242015-06-16 13:15:13 -0700672weston_calibrator_SOURCES = \
673 clients/calibrator.c \
674 shared/helpers.h \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800675 shared/matrix.c \
676 shared/matrix.h
677weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800678weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800679
680if BUILD_SUBSURFACES_CLIENT
681demo_clients += weston-subsurfaces
Jon A. Cruzb09da242015-06-16 13:15:13 -0700682weston_subsurfaces_SOURCES = \
683 clients/subsurfaces.c \
684 shared/helpers.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800685weston_subsurfaces_CFLAGS = \
686 $(AM_CFLAGS) \
687 $(SIMPLE_EGL_CLIENT_CFLAGS) \
688 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800689weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
690endif
691
692if HAVE_PANGO
693demo_clients += weston-editor
Jon A. Cruzb09da242015-06-16 13:15:13 -0700694weston_editor_SOURCES = \
695 clients/editor.c \
696 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800697nodist_weston_editor_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800698 protocol/text-input-unstable-v1-protocol.c \
699 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800700weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800701weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800702endif
703
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800704weston_keyboard_SOURCES = clients/keyboard.c
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800705nodist_weston_keyboard_SOURCES = \
706 protocol/weston-desktop-shell-client-protocol.h \
707 protocol/weston-desktop-shell-protocol.c \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800708 protocol/input-method-unstable-v1-protocol.c \
709 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800710weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800711weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800712
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800713weston_simple_im_SOURCES = clients/weston-simple-im.c
714nodist_weston_simple_im_SOURCES = \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800715 protocol/input-method-unstable-v1-protocol.c \
716 protocol/input-method-unstable-v1-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800717weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800718weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800719
Jon A. Cruzb09da242015-06-16 13:15:13 -0700720weston_info_SOURCES = \
721 clients/weston-info.c \
722 shared/helpers.h
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400723nodist_weston_info_SOURCES = \
724 protocol/presentation_timing-protocol.c \
725 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800726weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200727weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800728
Jon A. Cruzb09da242015-06-16 13:15:13 -0700729weston_desktop_shell_SOURCES = \
730 clients/desktop-shell.c \
731 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800732nodist_weston_desktop_shell_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800733 protocol/weston-desktop-shell-client-protocol.h \
734 protocol/weston-desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800735weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800736weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800737
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900738if ENABLE_IVI_SHELL
Jon A. Cruzb09da242015-06-16 13:15:13 -0700739weston_ivi_shell_user_interface_SOURCES = \
740 clients/ivi-shell-user-interface.c \
741 shared/helpers.h
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900742nodist_weston_ivi_shell_user_interface_SOURCES = \
743 protocol/ivi-hmi-controller-client-protocol.h \
744 protocol/ivi-hmi-controller-protocol.c \
745 protocol/ivi-application-client-protocol.h \
746 protocol/ivi-application-protocol.c
747weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
748weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
749endif
750
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800751if BUILD_FULL_GL_CLIENTS
752demo_clients += weston-gears
753weston_gears_SOURCES = clients/gears.c
754weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800755weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800756endif
757
758endif
759
760BUILT_SOURCES += \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +0800761 protocol/weston-screenshooter-protocol.c \
762 protocol/weston-screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100763 protocol/text-cursor-position-client-protocol.h \
764 protocol/text-cursor-position-protocol.c \
Jonas Ådahl3bcba342015-11-17 16:00:29 +0800765 protocol/text-input-unstable-v1-protocol.c \
766 protocol/text-input-unstable-v1-client-protocol.h \
Jonas Ådahlb57f4722015-11-17 16:00:30 +0800767 protocol/input-method-unstable-v1-protocol.c \
768 protocol/input-method-unstable-v1-client-protocol.h \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800769 protocol/weston-desktop-shell-client-protocol.h \
770 protocol/weston-desktop-shell-protocol.c \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100771 protocol/scaler-client-protocol.h \
772 protocol/scaler-protocol.c \
Pekka Paalanen2e497942016-02-18 15:21:58 +0200773 protocol/presentation_timing-protocol.c \
774 protocol/presentation_timing-client-protocol.h \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800775 protocol/fullscreen-shell-unstable-v1-protocol.c \
776 protocol/fullscreen-shell-unstable-v1-client-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800777 protocol/xdg-shell-unstable-v5-protocol.c \
778 protocol/xdg-shell-unstable-v5-client-protocol.h \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900779 protocol/ivi-hmi-controller-protocol.c \
780 protocol/ivi-hmi-controller-client-protocol.h \
781 protocol/ivi-application-protocol.c \
782 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800783
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800784westondatadir = $(datadir)/weston
785dist_westondata_DATA = \
786 data/wayland.svg \
787 data/wayland.png \
788 data/pattern.png \
789 data/terminal.png \
790 data/border.png \
791 data/icon_window.png \
792 data/sign_close.png \
793 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100794 data/sign_minimize.png
795
796if ENABLE_IVI_SHELL
797dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900798 data/background.png \
799 data/tiling.png \
800 data/fullscreen.png \
801 data/panel.png \
802 data/random.png \
803 data/sidebyside.png \
804 data/home.png \
805 data/icon_ivi_clickdot.png \
806 data/icon_ivi_flower.png \
807 data/icon_ivi_simple-egl.png \
808 data/icon_ivi_simple-shm.png \
809 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100810endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800811
812
813if BUILD_WCAP_TOOLS
814bin_PROGRAMS += wcap-decode
815
816wcap_decode_SOURCES = \
817 wcap/main.c \
818 wcap/wcap-decode.c \
819 wcap/wcap-decode.h
820
Derek Foreman4ff38742015-06-18 11:43:11 -0500821wcap_decode_CFLAGS = $(AM_CFLAGS) $(WCAP_CFLAGS)
Kristian Høgsberge895f142014-01-27 21:46:30 -0800822wcap_decode_LDADD = $(WCAP_LIBS)
823endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800824
825
826if ENABLE_DESKTOP_SHELL
827
828module_LTLIBRARIES += desktop-shell.la
829
830desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100831 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800832 -I$(top_srcdir)/shared \
833 -I$(top_srcdir)/src \
834 -I$(top_builddir)/src \
835 -I$(top_builddir)/desktop-shell \
836 -DDATADIR='"$(datadir)"' \
837 -DMODULEDIR='"$(moduledir)"' \
838 -DLIBEXECDIR='"$(libexecdir)"' \
839 -DIN_WESTON
840
841desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800842desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500843desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800844desktop_shell_la_SOURCES = \
845 desktop-shell/shell.h \
846 desktop-shell/shell.c \
847 desktop-shell/exposay.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700848 desktop-shell/input-panel.c \
849 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800850nodist_desktop_shell_la_SOURCES = \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +0800851 protocol/weston-desktop-shell-protocol.c \
852 protocol/weston-desktop-shell-server-protocol.h \
Jonas Ådahl2a229332015-11-17 16:00:32 +0800853 protocol/xdg-shell-unstable-v5-protocol.c \
854 protocol/xdg-shell-unstable-v5-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800855
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800856BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800857endif
858
Jason Ekstrand946a9482014-04-02 19:53:47 -0500859if ENABLE_FULLSCREEN_SHELL
860
861module_LTLIBRARIES += fullscreen-shell.la
862
863fullscreen_shell_la_CPPFLAGS = \
864 -I$(top_builddir)/protocol \
865 -I$(top_srcdir)/shared \
866 -I$(top_srcdir)/src \
867 -I$(top_builddir)/src \
868 -DIN_WESTON
869
870fullscreen_shell_la_LDFLAGS = -module -avoid-version
871fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
Derek Foreman4ff38742015-06-18 11:43:11 -0500872fullscreen_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jason Ekstrand946a9482014-04-02 19:53:47 -0500873fullscreen_shell_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700874 fullscreen-shell/fullscreen-shell.c \
875 shared/helpers.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500876nodist_fullscreen_shell_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800877 protocol/fullscreen-shell-unstable-v1-protocol.c \
878 protocol/fullscreen-shell-unstable-v1-server-protocol.h
Jason Ekstrand946a9482014-04-02 19:53:47 -0500879
880BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
881endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800882
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900883if ENABLE_IVI_SHELL
884
885module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900886 $(ivi_shell) \
887 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900888
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900889ivi_shell = ivi-shell.la
890ivi_shell_la_LDFLAGS = -module -avoid-version
891ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500892ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900893ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900894 ivi-shell/ivi-layout-export.h \
895 ivi-shell/ivi-layout-private.h \
896 ivi-shell/ivi-layout.c \
897 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900898 ivi-shell/ivi-shell.h \
899 ivi-shell/ivi-shell.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700900 ivi-shell/input-panel-ivi.c \
901 shared/helpers.h
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900902nodist_ivi_shell_la_SOURCES = \
903 protocol/ivi-application-protocol.c \
904 protocol/ivi-application-server-protocol.h
905
906BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
907
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900908hmi_controller = hmi-controller.la
909hmi_controller_la_LDFLAGS = -module -avoid-version
910hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Derek Foreman4ff38742015-06-18 11:43:11 -0500911hmi_controller_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900912hmi_controller_la_SOURCES = \
913 ivi-shell/ivi-layout-export.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700914 ivi-shell/hmi-controller.c \
915 shared/helpers.h
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900916nodist_hmi_controller_la_SOURCES = \
917 protocol/ivi-hmi-controller-protocol.c \
918 protocol/ivi-hmi-controller-server-protocol.h
919
920BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
921
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900922endif
923
924
Jason Ekstrand47928d82014-04-02 19:54:01 -0500925if ENABLE_SCREEN_SHARING
926
927module_LTLIBRARIES += screen-share.la
928
929screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
930screen_share_la_LDFLAGS = -module -avoid-version
931screen_share_la_LIBADD = \
932 $(COMPOSITOR_LIBS) \
933 $(SCREEN_SHARE_LIBS) \
934 libshared-cairo.la
935screen_share_la_CFLAGS = \
936 $(COMPOSITOR_CFLAGS) \
937 $(SCREEN_SHARE_CFLAGS) \
Derek Foreman4ff38742015-06-18 11:43:11 -0500938 $(AM_CFLAGS)
Jason Ekstrand47928d82014-04-02 19:54:01 -0500939screen_share_la_SOURCES = \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700940 src/screen-share.c \
941 shared/helpers.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500942nodist_screen_share_la_SOURCES = \
Jonas Ådahl496adb32015-11-17 16:00:27 +0800943 protocol/fullscreen-shell-unstable-v1-protocol.c \
944 protocol/fullscreen-shell-unstable-v1-client-protocol.h
Jason Ekstrand47928d82014-04-02 19:54:01 -0500945
946endif
947
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800948if ENABLE_XWAYLAND
949
950module_LTLIBRARIES += xwayland.la
951
952xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100953 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800954 -I$(top_srcdir)/shared \
955 -I$(top_srcdir)/src \
956 -I$(top_builddir)/src \
957 -I$(top_builddir)/xwayland \
958 -DDATADIR='"$(datadir)"' \
959 -DMODULEDIR='"$(moduledir)"' \
960 -DLIBEXECDIR='"$(libexecdir)"' \
961 -DXSERVER_PATH='"@XSERVER_PATH@"'
962
963xwayland_la_LDFLAGS = -module -avoid-version
964xwayland_la_LIBADD = \
965 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800966 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800967xwayland_la_CFLAGS = \
Derek Foreman4ff38742015-06-18 11:43:11 -0500968 $(AM_CFLAGS) \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800969 $(COMPOSITOR_CFLAGS) \
970 $(PIXMAN_CFLAGS) \
971 $(CAIRO_CFLAGS)
972xwayland_la_SOURCES = \
973 xwayland/xwayland.h \
974 xwayland/window-manager.c \
975 xwayland/selection.c \
976 xwayland/dnd.c \
977 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800978 xwayland/hash.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700979 xwayland/hash.h \
980 shared/helpers.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800981endif
982
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800983
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800984#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800985# Shared utilities
986#
987
Jon A. Cruz5a75a412015-07-02 23:36:44 -0700988noinst_LTLIBRARIES += libshared.la libshared-cairo.la \
989 libzunitc.la libzunitcmain.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800990
Derek Foreman4ff38742015-06-18 11:43:11 -0500991libshared_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800992
993libshared_la_SOURCES = \
994 shared/config-parser.c \
995 shared/option-parser.c \
996 shared/config-parser.h \
Pekka Paalanen899b50b2015-02-12 12:52:21 +0200997 shared/file-util.c \
998 shared/file-util.h \
Jon A. Cruzb09da242015-06-16 13:15:13 -0700999 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001000 shared/os-compatibility.c \
1001 shared/os-compatibility.h
1002
1003libshared_cairo_la_CFLAGS = \
1004 -DDATADIR='"$(datadir)"' \
Derek Foreman4ff38742015-06-18 11:43:11 -05001005 $(AM_CFLAGS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001006 $(COMPOSITOR_CFLAGS) \
1007 $(PIXMAN_CFLAGS) \
1008 $(CAIRO_CFLAGS) \
1009 $(PNG_CFLAGS) \
1010 $(WEBP_CFLAGS)
1011
1012libshared_cairo_la_LIBADD = \
1013 $(PIXMAN_LIBS) \
1014 $(CAIRO_LIBS) \
1015 $(PNG_LIBS) \
1016 $(WEBP_LIBS) \
1017 $(JPEG_LIBS)
1018
1019libshared_cairo_la_SOURCES = \
1020 $(libshared_la_SOURCES) \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001021 shared/helpers.h \
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001022 shared/image-loader.c \
1023 shared/image-loader.h \
1024 shared/cairo-util.c \
1025 shared/frame.c \
1026 shared/cairo-util.h
1027
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001028libzunitc_la_SOURCES = \
1029 tools/zunitc/inc/zunitc/zunitc.h \
1030 tools/zunitc/inc/zunitc/zunitc_impl.h \
1031 tools/zunitc/src/zuc_base_logger.c \
1032 tools/zunitc/src/zuc_base_logger.h \
1033 tools/zunitc/src/zuc_collector.c \
1034 tools/zunitc/src/zuc_collector.h \
1035 tools/zunitc/src/zuc_context.h \
1036 tools/zunitc/src/zuc_event.h \
1037 tools/zunitc/src/zuc_event_listener.h \
Jon A. Cruz646aef52015-07-15 19:22:41 -07001038 tools/zunitc/src/zuc_junit_reporter.c \
1039 tools/zunitc/src/zuc_junit_reporter.h \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001040 tools/zunitc/src/zuc_types.h \
1041 tools/zunitc/src/zunitc_impl.c \
1042 shared/helpers.h
1043
1044libzunitc_la_CFLAGS = \
1045 $(AM_CFLAGS) \
1046 -I$(top_srcdir)/tools/zunitc/inc
1047
1048libzunitc_la_LIBADD = \
1049 libshared.la
1050
Jon A. Cruz646aef52015-07-15 19:22:41 -07001051if ENABLE_JUNIT_XML
1052libzunitc_la_CFLAGS += \
1053 $(LIBXML2_CFLAGS)
1054libzunitc_la_LIBADD += \
1055 $(LIBXML2_LIBS)
1056endif
1057
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001058libzunitcmain_la_SOURCES = \
1059 tools/zunitc/src/main.c
1060
1061libzunitcmain_la_CFLAGS = \
1062 $(AM_CFLAGS) \
1063 -I$(top_srcdir)/tools/zunitc/inc
1064
1065libzunitcmain_la_LIBADD = \
1066 libzunitc.la \
1067 libshared.la
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001068
1069#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001070# tests subdirectory
1071#
1072
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001073TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
1074
1075internal_tests = \
1076 internal-screenshot.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001077
1078shared_tests = \
1079 config-parser.test \
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001080 vertex-clip.test \
1081 zuctest
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001082
1083module_tests = \
1084 surface-test.la \
1085 surface-global-test.la
1086
1087weston_tests = \
1088 bad_buffer.weston \
1089 keyboard.weston \
1090 event.weston \
1091 button.weston \
1092 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001093 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001094 roles.weston \
Marek Chalupa5fd81402015-03-30 09:21:29 -04001095 subsurface.weston \
1096 devices.weston
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001097
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001098ivi_tests =
1099
1100$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001101
1102AM_TESTS_ENVIRONMENT = \
Bryce Harringtoned2c6442015-04-15 15:31:11 -07001103 abs_builddir='$(abs_builddir)'; export abs_builddir; \
1104 abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001105
1106TEST_EXTENSIONS = .la .weston
1107LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1108WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
1109
1110clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +03001111 -rm -rf logs
Jon A. Cruz179c1862015-07-15 19:22:43 -07001112 -rm -rf $(DOCDIRS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001113
1114# To remove when automake 1.11 support is dropped
1115export abs_builddir
1116
1117noinst_LTLIBRARIES += \
1118 weston-test.la \
1119 $(module_tests) \
1120 libtest-runner.la \
1121 libtest-client.la
1122
1123noinst_PROGRAMS += \
1124 $(setbacklight) \
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001125 $(internal_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001126 $(shared_tests) \
1127 $(weston_tests) \
Pekka Paalanenf3a34532015-03-24 13:51:05 +02001128 $(ivi_tests) \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001129 matrix-test
1130
1131test_module_ldflags = \
1132 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
1133
1134surface_global_test_la_SOURCES = tests/surface-global-test.c
1135surface_global_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001136surface_global_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001137
1138surface_test_la_SOURCES = tests/surface-test.c
1139surface_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001140surface_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001141
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001142weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001143weston_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001144weston_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Jon A. Cruzb09da242015-06-16 13:15:13 -07001145weston_test_la_SOURCES = \
1146 tests/weston-test.c \
1147 shared/helpers.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001148nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001149 protocol/weston-test-protocol.c \
1150 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001151
1152if ENABLE_EGL
1153weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
1154weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
1155endif
1156
1157libtest_runner_la_SOURCES = \
1158 tests/weston-test-runner.c \
1159 tests/weston-test-runner.h
Derek Foreman4ff38742015-06-18 11:43:11 -05001160libtest_runner_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001161
1162config_parser_test_SOURCES = tests/config-parser-test.c
Jon A. Cruza67c5412015-07-15 19:22:42 -07001163config_parser_test_LDADD = \
1164 libshared.la \
1165 $(COMPOSITOR_LIBS) \
1166 libzunitc.la \
1167 libzunitcmain.la
1168config_parser_test_CFLAGS = \
1169 $(AM_CFLAGS) \
1170 -I$(top_srcdir)/tools/zunitc/inc
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001171
1172vertex_clip_test_SOURCES = \
1173 tests/vertex-clip-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001174 shared/helpers.h \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001175 src/vertex-clipping.c \
1176 src/vertex-clipping.h
1177vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1178
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001179libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001180 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001181 tests/weston-test-client-helper.h
1182nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001183 protocol/weston-test-protocol.c \
1184 protocol/weston-test-client-protocol.h
Bryce Harrington892122e2015-09-24 14:31:44 -07001185libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
1186libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) $(CAIRO_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001187
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001188
1189#
1190# Internal tests - tests functionality of the testsuite itself
1191#
1192
1193internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
Bryce Harrington892122e2015-09-24 14:31:44 -07001194internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1195internal_screenshot_weston_LDADD = libtest-client.la
Bryce Harringtonfb9089d2014-11-04 16:39:38 -08001196
1197
1198#
1199# Weston Tests
1200#
1201
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001202bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001203bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001204bad_buffer_weston_LDADD = libtest-client.la
1205
1206keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001207keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001208keyboard_weston_LDADD = libtest-client.la
1209
1210event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001211event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001212event_weston_LDADD = libtest-client.la
1213
1214button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001215button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001216button_weston_LDADD = libtest-client.la
1217
Marek Chalupa5fd81402015-03-30 09:21:29 -04001218devices_weston_SOURCES = tests/devices-test.c
1219devices_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1220devices_weston_LDADD = libtest-client.la
1221
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001222text_weston_SOURCES = tests/text-test.c
1223nodist_text_weston_SOURCES = \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001224 protocol/text-input-unstable-v1-protocol.c \
1225 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001226text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001227text_weston_LDADD = libtest-client.la
1228
1229subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001230subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001231subsurface_weston_LDADD = libtest-client.la
1232
Jon A. Cruzb09da242015-06-16 13:15:13 -07001233presentation_weston_SOURCES = \
1234 tests/presentation-test.c \
1235 shared/helpers.h
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001236nodist_presentation_weston_SOURCES = \
1237 protocol/presentation_timing-protocol.c \
1238 protocol/presentation_timing-client-protocol.h
1239presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1240presentation_weston_LDADD = libtest-client.la
1241
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001242roles_weston_SOURCES = tests/roles-test.c
1243roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1244roles_weston_LDADD = libtest-client.la
1245
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001246if ENABLE_EGL
1247weston_tests += buffer-count.weston
1248buffer_count_weston_SOURCES = tests/buffer-count-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001249buffer_count_weston_CFLAGS = $(AM_CFLAGS) $(EGL_TESTS_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001250buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1251endif
1252
1253if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001254weston_tests += xwayland-test.weston
1255xwayland_test_weston_SOURCES = tests/xwayland-test.c
Derek Foreman4ff38742015-06-18 11:43:11 -05001256xwayland_test_weston_CFLAGS = $(AM_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001257xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001258endif
1259
1260matrix_test_SOURCES = \
1261 tests/matrix-test.c \
1262 shared/matrix.c \
1263 shared/matrix.h
1264matrix_test_CPPFLAGS = -DUNIT_TEST
1265matrix_test_LDADD = -lm -lrt
1266
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001267if ENABLE_IVI_SHELL
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001268module_tests += \
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001269 ivi-layout-internal-test.la \
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001270 ivi-layout-test.la
1271
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001272ivi_layout_internal_test_la_LIBADD = $(COMPOSITOR_LIBS)
1273ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001274ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen46804ca2015-03-27 11:55:21 +02001275ivi_layout_internal_test_la_SOURCES = \
1276 tests/ivi_layout-internal-test.c
1277
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001278ivi_layout_test_la_LIBADD = $(COMPOSITOR_LIBS)
1279ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001280ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001281ivi_layout_test_la_SOURCES = \
1282 tests/ivi_layout-test-plugin.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001283 tests/ivi-test.h \
1284 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001285nodist_ivi_layout_test_la_SOURCES = \
1286 protocol/weston-test-protocol.c \
1287 protocol/weston-test-server-protocol.h
1288
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001289ivi_tests += \
1290 ivi-shell-app.weston
1291
1292ivi_shell_app_weston_SOURCES = tests/ivi-shell-app-test.c
1293nodist_ivi_shell_app_weston_SOURCES = \
1294 protocol/ivi-application-protocol.c \
1295 protocol/ivi-application-client-protocol.h
1296ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1297ivi_shell_app_weston_LDADD = libtest-client.la
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001298
1299noinst_PROGRAMS += ivi-layout.ivi
1300
1301ivi_layout_ivi_SOURCES = \
1302 tests/ivi_layout-test.c \
Jon A. Cruzb09da242015-06-16 13:15:13 -07001303 tests/ivi-test.h \
1304 shared/helpers.h
Pekka Paalanenf5b74f72015-03-25 12:50:31 +02001305nodist_ivi_layout_ivi_SOURCES = \
1306 protocol/ivi-application-protocol.c \
1307 protocol/ivi-application-client-protocol.h
1308ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1309ivi_layout_ivi_LDADD = libtest-client.la
Pekka Paalanen0eb09412015-03-23 13:55:06 +02001310endif
1311
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001312if BUILD_SETBACKLIGHT
1313noinst_PROGRAMS += setbacklight
1314setbacklight_SOURCES = \
1315 tests/setbacklight.c \
1316 src/libbacklight.c \
1317 src/libbacklight.h
1318setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1319setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1320endif
1321
Jon A. Cruz5a75a412015-07-02 23:36:44 -07001322all-local: zuctest$(EXEEXT)
1323
1324noinst_PROGRAMS += zuctest$(EXEEXT)
1325
1326zuctest_LDADD = \
1327 libzunitc.la \
1328 libzunitcmain.la
1329
1330zuctest_CFLAGS = \
1331 $(AM_CFLAGS) \
1332 -I$(top_srcdir)/tools/zunitc/inc
1333
1334zuctest_SOURCES = \
1335 tools/zunitc/test/fixtures_test.c \
1336 tools/zunitc/test/zunitc_test.c
1337
Derek Foreman1ce2ef52015-05-26 10:21:03 -05001338EXTRA_DIST += \
1339 tests/weston-tests-env \
1340 tests/internal-screenshot.ini \
1341 tests/reference/internal-screenshot-bad-00.png \
1342 tests/reference/internal-screenshot-good-00.png
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001343
1344BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001345 protocol/weston-test-protocol.c \
1346 protocol/weston-test-server-protocol.h \
1347 protocol/weston-test-client-protocol.h \
Jonas Ådahl3bcba342015-11-17 16:00:29 +08001348 protocol/text-input-unstable-v1-protocol.c \
1349 protocol/text-input-unstable-v1-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001350
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001351EXTRA_DIST += \
Jonas Ådahl6d6fb612015-11-17 16:00:33 +08001352 protocol/weston-desktop-shell.xml \
Jonas Ådahlcf1efd22015-11-17 16:00:34 +08001353 protocol/weston-screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001354 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001355 protocol/weston-test.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001356 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001357 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001358 protocol/ivi-application.xml \
Jonas Ådahl57e48f02015-11-17 16:00:28 +08001359 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001360
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001361#
1362# manual test modules in tests subdirectory
1363#
1364
1365noinst_LTLIBRARIES += \
1366 surface-screenshot.la
1367
1368surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
1369surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
Derek Foreman4ff38742015-06-18 11:43:11 -05001370surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
Pekka Paalanen312fe5f2015-02-09 11:23:48 +02001371surface_screenshot_la_SOURCES = tests/surface-screenshot.c
1372
1373
1374#
1375# Documentation
1376#
1377
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001378man_MANS = weston.1 weston.ini.5
1379
1380if ENABLE_DRM_COMPOSITOR
1381man_MANS += weston-drm.7
1382endif
1383
1384MAN_SUBSTS = \
1385 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1386 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1387 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1388 -e 's|__version__|$(PACKAGE_VERSION)|g'
1389
1390SUFFIXES = .1 .5 .7 .man
1391
1392%.1 %.5 %.7 : man/%.man
1393 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1394
1395EXTRA_DIST += \
1396 man/weston.man \
1397 man/weston-drm.man \
1398 man/weston.ini.man
1399
1400CLEANFILES += $(man_MANS)
1401
Jon A. Cruz179c1862015-07-15 19:22:43 -07001402if ENABLE_DEVDOCS
1403DOXYGEN_INDICES = docs/developer/html/index.html docs/tools/html/index.html
1404
1405docs/developer/html/index.html: doc/doxygen/tooldev.doxygen | docs/developer
1406 cd doc/doxygen && $(DOXYGEN) tooldev.doxygen
1407
1408docs/tools/html/index.html: doc/doxygen/tools.doxygen | docs/tools
1409 cd doc/doxygen && $(DOXYGEN) tools.doxygen
1410endif
1411
1412DOCDIRS = \
1413 docs/developer \
1414 docs/tools
1415
1416$(DOCDIRS):
1417 $(MKDIR_P) $@
1418
1419.PHONY: doc $(DOXYGEN_INDICES)
1420
1421doc: $(DOXYGEN_INDICES)
1422
Jonas Ådahl496adb32015-11-17 16:00:27 +08001423.SECONDEXPANSION:
1424
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001425define protostability
1426$(shell echo $1 | sed 's/.*\(\<unstable\>\|\<stable\>\).*/\1/')
1427endef
1428
1429define protoname
1430$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
1431endef
1432
1433protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001434 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
1435
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001436protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
Jonas Ådahl496adb32015-11-17 16:00:27 +08001437 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
1438
Jonas Ådahl08ab0bc2015-11-17 16:00:31 +08001439protocol/%-client-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) client-header < $< > $@
1441
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001442protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1443 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001444
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001445protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1446 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001447
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001448protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1449 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@