blob: 7fb9e17a8463c34f9a9a3453ac20587528e6ee54 [file] [log] [blame]
Thierry Reding0e6d9a72014-05-27 09:07:54 +02001ACLOCAL_AMFLAGS = -I m4
2
Kristian Høgsberge895f142014-01-27 21:46:30 -08003bin_PROGRAMS =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08004noinst_PROGRAMS =
Kristian Høgsberge73eccd2014-01-31 16:15:11 -08005libexec_PROGRAMS =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08006moduledir = $(libdir)/weston
7module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08008noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08009BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -080010
Derek Foreman2ef9e812015-02-09 09:57:29 -060011AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050012
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090013EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000014
15weston.ini : $(srcdir)/weston.ini.in
16 $(AM_V_GEN)$(SED) \
17 -e 's|@bindir[@]|$(bindir)|g' \
18 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
19 -e 's|@libexecdir[@]|$(libexecdir)|g' \
20 $< > $@
21
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090022ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
23 $(AM_V_GEN)$(SED) \
24 -e 's|@bindir[@]|$(bindir)|g' \
25 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
26 -e 's|@libexecdir[@]|$(libexecdir)|g' \
27 $< > $@
28
29all-local : weston.ini ivi-shell/weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080030
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080031AM_CFLAGS = $(GCC_CFLAGS)
32
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080033AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080034 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080035 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080036 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080037 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080038 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010039 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080040 -DDATADIR='"$(datadir)"' \
41 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080042 -DLIBEXECDIR='"$(libexecdir)"' \
43 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080044
Nobuhiko Tanibata45d4cbf2014-11-27 13:24:16 +090045CLEANFILES = weston.ini ivi-shell/weston.ini $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080046
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080047bin_PROGRAMS += weston
48
49weston_LDFLAGS = -export-dynamic
50weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
51weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
52weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080053 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080054
55weston_SOURCES = \
56 src/git-version.h \
57 src/log.c \
58 src/compositor.c \
59 src/compositor.h \
60 src/input.c \
61 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080062 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080063 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080064 src/zoom.c \
65 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080066 src/bindings.c \
67 src/animation.c \
68 src/noop-renderer.c \
69 src/pixman-renderer.c \
70 src/pixman-renderer.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +020071 src/timeline.c \
72 src/timeline.h \
73 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080074 shared/matrix.c \
75 shared/matrix.h \
76 shared/zalloc.h \
77 src/weston-egl-ext.h
78
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080079nodist_weston_SOURCES = \
80 protocol/screenshooter-protocol.c \
81 protocol/screenshooter-server-protocol.h \
82 protocol/text-cursor-position-protocol.c \
83 protocol/text-cursor-position-server-protocol.h \
84 protocol/text-protocol.c \
85 protocol/text-server-protocol.h \
86 protocol/input-method-protocol.c \
87 protocol/input-method-server-protocol.h \
88 protocol/workspaces-protocol.c \
89 protocol/workspaces-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -040090 protocol/presentation_timing-protocol.c \
91 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080092 protocol/scaler-protocol.c \
93 protocol/scaler-server-protocol.h
94
95BUILT_SOURCES += $(nodist_weston_SOURCES)
96
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -080097# Track this dependency explicitly instead of using BUILT_SOURCES. We
98# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
99# in case we're building from tarballs.
100
101src/compositor.c : $(top_builddir)/src/git-version.h
102
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800103noinst_LTLIBRARIES += \
104 libsession-helper.la
105
106libsession_helper_la_SOURCES = \
107 src/weston-launch.h \
108 src/launcher-util.c \
109 src/launcher-util.h
110libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
111libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
112
113if ENABLE_DBUS
114if HAVE_SYSTEMD_LOGIN
115libsession_helper_la_SOURCES += \
116 src/dbus.h \
117 src/dbus.c \
118 src/logind-util.h \
119 src/logind-util.c
120libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
121libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
122endif
123endif
124
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800125if HAVE_GIT_REPO
126src/git-version.h : $(top_srcdir)/.git/logs/HEAD
127 $(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 -0800128else
129src/git-version.h :
130 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
131
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800132endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800133
134.FORCE :
135
136if BUILD_WESTON_LAUNCH
137bin_PROGRAMS += weston-launch
138weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
139weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
140weston_launch_CFLAGS= \
141 $(GCC_CFLAGS) \
142 $(PAM_CFLAGS) \
143 $(SYSTEMD_LOGIN_CFLAGS) \
144 $(LIBDRM_CFLAGS)
145weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
146
147if ENABLE_SETUID_INSTALL
148install-exec-hook:
149 chown root $(DESTDIR)$(bindir)/weston-launch
150 chmod u+s $(DESTDIR)$(bindir)/weston-launch
151endif
152
153endif # BUILD_WESTON_LAUNCH
154
155pkgconfigdir = $(libdir)/pkgconfig
156pkgconfig_DATA = src/weston.pc
157
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100158wayland_sessiondir = $(datadir)/wayland-sessions
159wayland_session_DATA = src/weston.desktop
Marek Chalupa194ca2b2015-01-22 10:03:03 +0100160dist_wayland_session_DATA = $(wayland_session_DATA)
Lubomir Rintel4f4b47a2014-12-28 14:20:49 +0100161
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800162westonincludedir = $(includedir)/weston
163westoninclude_HEADERS = \
164 src/version.h \
165 src/compositor.h \
Pekka Paalanenb5026542014-11-12 15:09:24 +0200166 src/timeline-object.h \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800167 shared/matrix.h \
168 shared/config-parser.h \
169 shared/zalloc.h
170
171if ENABLE_EGL
172module_LTLIBRARIES += gl-renderer.la
173gl_renderer_la_LDFLAGS = -module -avoid-version
174gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
175gl_renderer_la_CFLAGS = \
176 $(COMPOSITOR_CFLAGS) \
177 $(EGL_CFLAGS) \
178 $(GCC_CFLAGS)
179gl_renderer_la_SOURCES = \
180 src/gl-renderer.h \
181 src/gl-renderer.c \
182 src/vertex-clipping.c \
183 src/vertex-clipping.h
184endif
185
186if ENABLE_X11_COMPOSITOR
187module_LTLIBRARIES += x11-backend.la
188x11_backend_la_LDFLAGS = -module -avoid-version
189x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800190 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800191x11_backend_la_CFLAGS = \
192 $(COMPOSITOR_CFLAGS) \
193 $(EGL_CFLAGS) \
194 $(PIXMAN_CFLAGS) \
195 $(CAIRO_CFLAGS) \
196 $(X11_COMPOSITOR_CFLAGS) \
197 $(GCC_CFLAGS)
198x11_backend_la_SOURCES = src/compositor-x11.c
199endif
200
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100201INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
Peter Hutterer823ad332014-11-26 07:06:31 +1000202INPUT_BACKEND_SOURCES = \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100203 src/libinput-seat.c \
204 src/libinput-seat.h \
205 src/libinput-device.c \
206 src/libinput-device.h
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100207
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800208if ENABLE_DRM_COMPOSITOR
209module_LTLIBRARIES += drm-backend.la
210drm_backend_la_LDFLAGS = -module -avoid-version
211drm_backend_la_LIBADD = \
212 $(COMPOSITOR_LIBS) \
213 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100214 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100215 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800216 libsession-helper.la
217drm_backend_la_CFLAGS = \
218 $(COMPOSITOR_CFLAGS) \
219 $(EGL_CFLAGS) \
220 $(DRM_COMPOSITOR_CFLAGS) \
221 $(GCC_CFLAGS)
222drm_backend_la_SOURCES = \
223 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100224 $(INPUT_BACKEND_SOURCES) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800225 src/libbacklight.c \
226 src/libbacklight.h
227
228if ENABLE_VAAPI_RECORDER
229drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
230drm_backend_la_LIBADD += $(LIBVA_LIBS)
231drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
232endif
233endif
234
235if ENABLE_WAYLAND_COMPOSITOR
236module_LTLIBRARIES += wayland-backend.la
237wayland_backend_la_LDFLAGS = -module -avoid-version
238wayland_backend_la_LIBADD = \
239 $(COMPOSITOR_LIBS) \
240 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800241 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800242wayland_backend_la_CFLAGS = \
243 $(COMPOSITOR_CFLAGS) \
244 $(EGL_CFLAGS) \
245 $(PIXMAN_CFLAGS) \
246 $(CAIRO_CFLAGS) \
247 $(WAYLAND_COMPOSITOR_CFLAGS) \
248 $(GCC_CFLAGS)
249wayland_backend_la_SOURCES = src/compositor-wayland.c
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500250nodist_wayland_backend_la_SOURCES = \
251 protocol/fullscreen-shell-protocol.c \
252 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800253endif
254
255if ENABLE_RPI_COMPOSITOR
256if INSTALL_RPI_COMPOSITOR
257module_LTLIBRARIES += rpi-backend.la
258else
259noinst_LTLIBRARIES += rpi-backend.la
260endif
261
262rpi_backend_la_LDFLAGS = -module -avoid-version
263rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
264 $(RPI_COMPOSITOR_LIBS) \
265 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100266 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800267 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800268 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800269rpi_backend_la_CFLAGS = \
270 $(GCC_CFLAGS) \
271 $(COMPOSITOR_CFLAGS) \
272 $(RPI_COMPOSITOR_CFLAGS) \
273 $(RPI_BCM_HOST_CFLAGS)
274rpi_backend_la_SOURCES = \
275 src/compositor-rpi.c \
276 src/rpi-renderer.c \
277 src/rpi-renderer.h \
278 src/rpi-bcm-stubs.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100279 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800280
281if ENABLE_EGL
282rpi_backend_la_LIBADD += $(EGL_LIBS)
283rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
284endif
285
286endif
287
288if ENABLE_HEADLESS_COMPOSITOR
289module_LTLIBRARIES += headless-backend.la
290headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800291headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
292headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800293headless_backend_la_SOURCES = src/compositor-headless.c
294endif
295
296if ENABLE_FBDEV_COMPOSITOR
297module_LTLIBRARIES += fbdev-backend.la
298fbdev_backend_la_LDFLAGS = -module -avoid-version
299fbdev_backend_la_LIBADD = \
300 $(COMPOSITOR_LIBS) \
301 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100302 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800303 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800304 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800305fbdev_backend_la_CFLAGS = \
306 $(COMPOSITOR_CFLAGS) \
307 $(EGL_CFLAGS) \
308 $(FBDEV_COMPOSITOR_CFLAGS) \
309 $(PIXMAN_CFLAGS) \
310 $(GCC_CFLAGS)
311fbdev_backend_la_SOURCES = \
312 src/compositor-fbdev.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100313 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800314endif
315
316if ENABLE_RDP_COMPOSITOR
317module_LTLIBRARIES += rdp-backend.la
318rdp_backend_la_LDFLAGS = -module -avoid-version
319rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
320 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800321 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800322rdp_backend_la_CFLAGS = \
323 $(COMPOSITOR_CFLAGS) \
324 $(RDP_COMPOSITOR_CFLAGS) \
325 $(GCC_CFLAGS)
326rdp_backend_la_SOURCES = src/compositor-rdp.c
327endif
328
329if HAVE_LCMS
330module_LTLIBRARIES += cms-static.la
331cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800332cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800333cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
334cms_static_la_SOURCES = \
335 src/cms-static.c \
336 src/cms-helper.c \
337 src/cms-helper.h
338if ENABLE_COLORD
339module_LTLIBRARIES += cms-colord.la
340cms_colord_la_LDFLAGS = -module -avoid-version
341cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
342cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
343cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100344 src/cms-colord.c \
345 src/cms-helper.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800346 src/cms-helper.h
347endif
348endif
349
350noinst_PROGRAMS += spring-tool
351spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
352spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
353spring_tool_SOURCES = \
354 src/spring-tool.c \
355 src/animation.c \
356 shared/matrix.c \
357 shared/matrix.h \
358 src/compositor.h
359
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800360if BUILD_CLIENTS
361
362bin_PROGRAMS += weston-terminal weston-info
363
364libexec_PROGRAMS += \
365 weston-desktop-shell \
366 weston-screenshooter \
367 weston-keyboard \
368 weston-simple-im
369
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900370if ENABLE_IVI_SHELL
371libexec_PROGRAMS += \
372 weston-ivi-shell-user-interface
373endif
374
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800375demo_clients = \
376 weston-flower \
377 weston-image \
378 weston-cliptest \
379 weston-dnd \
380 weston-smoke \
381 weston-resizor \
382 weston-eventdemo \
383 weston-clickdot \
384 weston-transformed \
385 weston-fullscreen \
386 weston-stacking \
387 weston-calibrator \
388 weston-scaler
389
390if INSTALL_DEMO_CLIENTS
391bin_PROGRAMS += $(demo_clients)
392else
393noinst_PROGRAMS += $(demo_clients)
394endif
395
396
397if BUILD_SIMPLE_CLIENTS
398demo_clients += \
399 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500400 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800401 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400402 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800403 weston-multi-resource
404
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800405weston_simple_shm_SOURCES = clients/simple-shm.c
406nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800407 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500408 protocol/xdg-shell-client-protocol.h \
409 protocol/fullscreen-shell-protocol.c \
Nobuhiko Tanibatafba4ea32014-11-27 13:24:29 +0900410 protocol/fullscreen-shell-client-protocol.h \
411 protocol/ivi-application-protocol.c \
412 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800413weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800414weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800415
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500416weston_simple_damage_SOURCES = clients/simple-damage.c
417nodist_weston_simple_damage_SOURCES = \
418 protocol/scaler-protocol.c \
419 protocol/scaler-client-protocol.h \
420 protocol/xdg-shell-protocol.c \
421 protocol/xdg-shell-client-protocol.h \
422 protocol/fullscreen-shell-protocol.c \
423 protocol/fullscreen-shell-client-protocol.h
424weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
425weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
426
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800427weston_simple_touch_SOURCES = clients/simple-touch.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800428weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800429weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800430
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400431weston_presentation_shm_SOURCES = clients/presentation-shm.c
432nodist_weston_presentation_shm_SOURCES = \
433 protocol/presentation_timing-protocol.c \
434 protocol/presentation_timing-client-protocol.h
435weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
436weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
437
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800438weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800439weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000440weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800441endif
442
443if BUILD_SIMPLE_EGL_CLIENTS
444demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800445weston_simple_egl_SOURCES = clients/simple-egl.c
446nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800447 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata4f01a0b2014-11-27 13:24:42 +0900448 protocol/xdg-shell-client-protocol.h \
449 protocol/ivi-application-protocol.c \
450 protocol/ivi-application-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800451weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800452weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
453endif
454
455noinst_LTLIBRARIES += libtoytoolkit.la
456
457libtoytoolkit_la_SOURCES = \
458 clients/window.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800459 clients/window.h
460
461nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100462 protocol/text-cursor-position-protocol.c \
463 protocol/text-cursor-position-client-protocol.h \
464 protocol/scaler-protocol.c \
465 protocol/scaler-client-protocol.h \
466 protocol/workspaces-protocol.c \
467 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400468 protocol/presentation_timing-protocol.c \
469 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100470 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +0900471 protocol/xdg-shell-client-protocol.h \
472 protocol/ivi-application-protocol.c \
473 protocol/ivi-application-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500474
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800475BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
476
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800477
478libtoytoolkit_la_LIBADD = \
479 $(CLIENT_LIBS) \
480 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800481 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800482libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800483
484weston_flower_SOURCES = clients/flower.c
485weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800486weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800487
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100488weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800489 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800490nodist_weston_screenshooter_SOURCES = \
491 protocol/screenshooter-protocol.c \
492 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800493weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800494weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800495
496weston_terminal_SOURCES = clients/terminal.c
497weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800498weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800499
500weston_image_SOURCES = clients/image.c
501weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800502weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800503
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300504weston_cliptest_SOURCES = \
505 clients/cliptest.c \
506 src/vertex-clipping.c \
507 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800508weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800509weston_cliptest_LDADD = libtoytoolkit.la
510
511weston_dnd_SOURCES = clients/dnd.c
512weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800513weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800514
515weston_smoke_SOURCES = clients/smoke.c
516weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800517weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800518
519weston_resizor_SOURCES = clients/resizor.c
520weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800521weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800522
523weston_scaler_SOURCES = clients/scaler.c
524weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800525weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800526
527if HAVE_CAIRO_GLESV2
528demo_clients += weston-nested weston-nested-client
529
530weston_nested_SOURCES = clients/nested.c
531weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800532weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800533
534weston_nested_client_SOURCES = clients/nested-client.c
535weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800536weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800537endif
538
539weston_eventdemo_SOURCES = clients/eventdemo.c
540weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800541weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800542
543weston_clickdot_SOURCES = clients/clickdot.c
544weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800545weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800546
547weston_transformed_SOURCES = clients/transformed.c
548weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800549weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800550
551weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500552nodist_weston_fullscreen_SOURCES = \
553 protocol/fullscreen-shell-protocol.c \
554 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800555weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800556weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800557
558weston_stacking_SOURCES = clients/stacking.c
559weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800560weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800561
562weston_calibrator_SOURCES = clients/calibrator.c \
563 shared/matrix.c \
564 shared/matrix.h
565weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800566weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800567
568if BUILD_SUBSURFACES_CLIENT
569demo_clients += weston-subsurfaces
570weston_subsurfaces_SOURCES = clients/subsurfaces.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800571weston_subsurfaces_CFLAGS = \
572 $(AM_CFLAGS) \
573 $(SIMPLE_EGL_CLIENT_CFLAGS) \
574 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800575weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
576endif
577
578if HAVE_PANGO
579demo_clients += weston-editor
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800580weston_editor_SOURCES = clients/editor.c
581nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100582 protocol/text-protocol.c \
583 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800584weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800585weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800586endif
587
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800588weston_keyboard_SOURCES = clients/keyboard.c
589nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100590 protocol/desktop-shell-client-protocol.h \
591 protocol/desktop-shell-protocol.c \
592 protocol/input-method-protocol.c \
593 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800594weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800595weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800596
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800597weston_simple_im_SOURCES = clients/weston-simple-im.c
598nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100599 protocol/input-method-protocol.c \
600 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800601weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800602weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800603
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800604weston_info_SOURCES = clients/weston-info.c
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400605nodist_weston_info_SOURCES = \
606 protocol/presentation_timing-protocol.c \
607 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800608weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200609weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800610
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800611weston_desktop_shell_SOURCES = clients/desktop-shell.c
612nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100613 protocol/desktop-shell-client-protocol.h \
614 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800615weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800616weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800617
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900618if ENABLE_IVI_SHELL
619weston_ivi_shell_user_interface_SOURCES = clients/ivi-shell-user-interface.c
620nodist_weston_ivi_shell_user_interface_SOURCES = \
621 protocol/ivi-hmi-controller-client-protocol.h \
622 protocol/ivi-hmi-controller-protocol.c \
623 protocol/ivi-application-client-protocol.h \
624 protocol/ivi-application-protocol.c
625weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
626weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
627endif
628
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800629if BUILD_FULL_GL_CLIENTS
630demo_clients += weston-gears
631weston_gears_SOURCES = clients/gears.c
632weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800633weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800634
635if HAVE_GLU
636libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100637weston_screensaver_SOURCES = \
638 clients/wscreensaver.c \
639 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100640 clients/wscreensaver-glue.c \
641 clients/wscreensaver-glue.h \
642 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800643 clients/matrix3.xpm
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800644nodist_weston_screensaver_SOURCES = \
645 protocol/desktop-shell-client-protocol.h \
646 protocol/desktop-shell-protocol.c
647
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800648weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800649weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800650
651endif
652
653endif
654
655endif
656
657BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100658 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800659 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100660 protocol/text-cursor-position-client-protocol.h \
661 protocol/text-cursor-position-protocol.c \
662 protocol/text-protocol.c \
663 protocol/text-client-protocol.h \
664 protocol/input-method-protocol.c \
665 protocol/input-method-client-protocol.h \
666 protocol/desktop-shell-client-protocol.h \
667 protocol/desktop-shell-protocol.c \
668 protocol/scaler-client-protocol.h \
669 protocol/scaler-protocol.c \
670 protocol/workspaces-client-protocol.h \
671 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500672 protocol/fullscreen-shell-protocol.c \
673 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100674 protocol/xdg-shell-protocol.c \
Nobuhiko Tanibata923bc142014-11-27 13:23:32 +0900675 protocol/xdg-shell-client-protocol.h \
676 protocol/ivi-hmi-controller-protocol.c \
677 protocol/ivi-hmi-controller-client-protocol.h \
678 protocol/ivi-application-protocol.c \
679 protocol/ivi-application-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800680
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800681westondatadir = $(datadir)/weston
682dist_westondata_DATA = \
683 data/wayland.svg \
684 data/wayland.png \
685 data/pattern.png \
686 data/terminal.png \
687 data/border.png \
688 data/icon_window.png \
689 data/sign_close.png \
690 data/sign_maximize.png \
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100691 data/sign_minimize.png
692
693if ENABLE_IVI_SHELL
694dist_westondata_DATA += \
Nobuhiko Tanibata001a5432014-03-11 11:54:45 +0900695 data/background.png \
696 data/tiling.png \
697 data/fullscreen.png \
698 data/panel.png \
699 data/random.png \
700 data/sidebyside.png \
701 data/home.png \
702 data/icon_ivi_clickdot.png \
703 data/icon_ivi_flower.png \
704 data/icon_ivi_simple-egl.png \
705 data/icon_ivi_simple-shm.png \
706 data/icon_ivi_smoke.png
Manuel Bachmannd2c68922015-02-16 11:00:36 +0100707endif
Kristian Høgsberge895f142014-01-27 21:46:30 -0800708
709
710if BUILD_WCAP_TOOLS
711bin_PROGRAMS += wcap-decode
712
713wcap_decode_SOURCES = \
714 wcap/main.c \
715 wcap/wcap-decode.c \
716 wcap/wcap-decode.h
717
718wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
719wcap_decode_LDADD = $(WCAP_LIBS)
720endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800721
722
723if ENABLE_DESKTOP_SHELL
724
725module_LTLIBRARIES += desktop-shell.la
726
727desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100728 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800729 -I$(top_srcdir)/shared \
730 -I$(top_srcdir)/src \
731 -I$(top_builddir)/src \
732 -I$(top_builddir)/desktop-shell \
733 -DDATADIR='"$(datadir)"' \
734 -DMODULEDIR='"$(moduledir)"' \
735 -DLIBEXECDIR='"$(libexecdir)"' \
736 -DIN_WESTON
737
738desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800739desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800740desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
741desktop_shell_la_SOURCES = \
742 desktop-shell/shell.h \
743 desktop-shell/shell.c \
744 desktop-shell/exposay.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800745 desktop-shell/input-panel.c
746nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100747 protocol/desktop-shell-protocol.c \
748 protocol/desktop-shell-server-protocol.h \
749 protocol/xdg-shell-protocol.c \
750 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800751
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800752BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800753endif
754
Jason Ekstrand946a9482014-04-02 19:53:47 -0500755if ENABLE_FULLSCREEN_SHELL
756
757module_LTLIBRARIES += fullscreen-shell.la
758
759fullscreen_shell_la_CPPFLAGS = \
760 -I$(top_builddir)/protocol \
761 -I$(top_srcdir)/shared \
762 -I$(top_srcdir)/src \
763 -I$(top_builddir)/src \
764 -DIN_WESTON
765
766fullscreen_shell_la_LDFLAGS = -module -avoid-version
767fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
768fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
769fullscreen_shell_la_SOURCES = \
770 fullscreen-shell/fullscreen-shell.c
771nodist_fullscreen_shell_la_SOURCES = \
772 protocol/fullscreen-shell-protocol.c \
773 protocol/fullscreen-shell-server-protocol.h
774
775BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
776endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800777
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900778if ENABLE_IVI_SHELL
779
780module_LTLIBRARIES += \
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900781 $(ivi_shell) \
782 $(hmi_controller)
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900783
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900784ivi_shell = ivi-shell.la
785ivi_shell_la_LDFLAGS = -module -avoid-version
786ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
787ivi_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
788ivi_shell_la_SOURCES = \
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900789 ivi-shell/ivi-layout-export.h \
790 ivi-shell/ivi-layout-private.h \
791 ivi-shell/ivi-layout.c \
792 ivi-shell/ivi-layout-transition.c \
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900793 ivi-shell/ivi-shell.h \
794 ivi-shell/ivi-shell.c \
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +0900795 ivi-shell/input-panel-ivi.c
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900796nodist_ivi_shell_la_SOURCES = \
797 protocol/ivi-application-protocol.c \
798 protocol/ivi-application-server-protocol.h
799
800BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
801
Nobuhiko Tanibata4f6853b2014-11-27 13:23:12 +0900802hmi_controller = hmi-controller.la
803hmi_controller_la_LDFLAGS = -module -avoid-version
804hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
805hmi_controller_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
806hmi_controller_la_SOURCES = \
807 ivi-shell/ivi-layout-export.h \
808 ivi-shell/hmi-controller.c
809nodist_hmi_controller_la_SOURCES = \
810 protocol/ivi-hmi-controller-protocol.c \
811 protocol/ivi-hmi-controller-server-protocol.h
812
813BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
814
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900815endif
816
817
Jason Ekstrand47928d82014-04-02 19:54:01 -0500818if ENABLE_SCREEN_SHARING
819
820module_LTLIBRARIES += screen-share.la
821
822screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
823screen_share_la_LDFLAGS = -module -avoid-version
824screen_share_la_LIBADD = \
825 $(COMPOSITOR_LIBS) \
826 $(SCREEN_SHARE_LIBS) \
827 libshared-cairo.la
828screen_share_la_CFLAGS = \
829 $(COMPOSITOR_CFLAGS) \
830 $(SCREEN_SHARE_CFLAGS) \
831 $(GCC_CFLAGS)
832screen_share_la_SOURCES = \
833 src/screen-share.c
834nodist_screen_share_la_SOURCES = \
835 protocol/fullscreen-shell-protocol.c \
836 protocol/fullscreen-shell-client-protocol.h
837
838endif
839
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800840if ENABLE_XWAYLAND
841
842module_LTLIBRARIES += xwayland.la
843
844xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100845 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800846 -I$(top_srcdir)/shared \
847 -I$(top_srcdir)/src \
848 -I$(top_builddir)/src \
849 -I$(top_builddir)/xwayland \
850 -DDATADIR='"$(datadir)"' \
851 -DMODULEDIR='"$(moduledir)"' \
852 -DLIBEXECDIR='"$(libexecdir)"' \
853 -DXSERVER_PATH='"@XSERVER_PATH@"'
854
855xwayland_la_LDFLAGS = -module -avoid-version
856xwayland_la_LIBADD = \
857 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800858 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800859xwayland_la_CFLAGS = \
860 $(GCC_CFLAGS) \
861 $(COMPOSITOR_CFLAGS) \
862 $(PIXMAN_CFLAGS) \
863 $(CAIRO_CFLAGS)
864xwayland_la_SOURCES = \
865 xwayland/xwayland.h \
866 xwayland/window-manager.c \
867 xwayland/selection.c \
868 xwayland/dnd.c \
869 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800870 xwayland/hash.c \
871 xwayland/hash.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800872endif
873
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800874
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800875#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800876# Shared utilities
877#
878
879noinst_LTLIBRARIES += libshared.la libshared-cairo.la
880
881libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
882
883libshared_la_SOURCES = \
884 shared/config-parser.c \
885 shared/option-parser.c \
886 shared/config-parser.h \
887 shared/os-compatibility.c \
888 shared/os-compatibility.h
889
890libshared_cairo_la_CFLAGS = \
891 -DDATADIR='"$(datadir)"' \
892 $(GCC_CFLAGS) \
893 $(COMPOSITOR_CFLAGS) \
894 $(PIXMAN_CFLAGS) \
895 $(CAIRO_CFLAGS) \
896 $(PNG_CFLAGS) \
897 $(WEBP_CFLAGS)
898
899libshared_cairo_la_LIBADD = \
900 $(PIXMAN_LIBS) \
901 $(CAIRO_LIBS) \
902 $(PNG_LIBS) \
903 $(WEBP_LIBS) \
904 $(JPEG_LIBS)
905
906libshared_cairo_la_SOURCES = \
907 $(libshared_la_SOURCES) \
908 shared/image-loader.c \
909 shared/image-loader.h \
910 shared/cairo-util.c \
911 shared/frame.c \
912 shared/cairo-util.h
913
914
915#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800916# tests subdirectory
917#
918
919TESTS = $(shared_tests) $(module_tests) $(weston_tests)
920
921shared_tests = \
922 config-parser.test \
923 vertex-clip.test
924
925module_tests = \
926 surface-test.la \
927 surface-global-test.la
928
929weston_tests = \
930 bad_buffer.weston \
931 keyboard.weston \
932 event.weston \
933 button.weston \
934 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -0400935 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +0300936 roles.weston \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800937 subsurface.weston
938
939
940AM_TESTS_ENVIRONMENT = \
941 abs_builddir='$(abs_builddir)'; export abs_builddir;
942
943TEST_EXTENSIONS = .la .weston
944LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
945WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
946
947clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +0300948 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800949
950# To remove when automake 1.11 support is dropped
951export abs_builddir
952
953noinst_LTLIBRARIES += \
954 weston-test.la \
955 $(module_tests) \
956 libtest-runner.la \
957 libtest-client.la
958
959noinst_PROGRAMS += \
960 $(setbacklight) \
961 $(shared_tests) \
962 $(weston_tests) \
963 matrix-test
964
965test_module_ldflags = \
966 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
967
968surface_global_test_la_SOURCES = tests/surface-global-test.c
969surface_global_test_la_LDFLAGS = $(test_module_ldflags)
970surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
971
972surface_test_la_SOURCES = tests/surface-test.c
973surface_test_la_LDFLAGS = $(test_module_ldflags)
974surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
975
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800976weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800977weston_test_la_LDFLAGS = $(test_module_ldflags)
978weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800979weston_test_la_SOURCES = tests/weston-test.c
980nodist_weston_test_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -0600981 protocol/weston-test-protocol.c \
982 protocol/weston-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800983
984if ENABLE_EGL
985weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
986weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
987endif
988
989libtest_runner_la_SOURCES = \
990 tests/weston-test-runner.c \
991 tests/weston-test-runner.h
992libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
993
994config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800995config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800996
997vertex_clip_test_SOURCES = \
998 tests/vertex-clip-test.c \
999 src/vertex-clipping.c \
1000 src/vertex-clipping.h
1001vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
1002
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001003libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001004 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001005 tests/weston-test-client-helper.h
1006nodist_libtest_client_la_SOURCES = \
Derek Foremanf6a65922015-02-24 09:32:14 -06001007 protocol/weston-test-protocol.c \
1008 protocol/weston-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001009libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -08001010libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001011
1012bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001013bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001014bad_buffer_weston_LDADD = libtest-client.la
1015
1016keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001017keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001018keyboard_weston_LDADD = libtest-client.la
1019
1020event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001021event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001022event_weston_LDADD = libtest-client.la
1023
1024button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001025button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001026button_weston_LDADD = libtest-client.la
1027
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -08001028text_weston_SOURCES = tests/text-test.c
1029nodist_text_weston_SOURCES = \
1030 protocol/text-protocol.c \
1031 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001032text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001033text_weston_LDADD = libtest-client.la
1034
1035subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -08001036subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001037subsurface_weston_LDADD = libtest-client.la
1038
Pekka Paalanende7f5c82014-09-23 22:08:48 -04001039presentation_weston_SOURCES = tests/presentation-test.c
1040nodist_presentation_weston_SOURCES = \
1041 protocol/presentation_timing-protocol.c \
1042 protocol/presentation_timing-client-protocol.h
1043presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1044presentation_weston_LDADD = libtest-client.la
1045
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +03001046roles_weston_SOURCES = tests/roles-test.c
1047roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
1048roles_weston_LDADD = libtest-client.la
1049
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001050if ENABLE_EGL
1051weston_tests += buffer-count.weston
1052buffer_count_weston_SOURCES = tests/buffer-count-test.c
1053buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
1054buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
1055endif
1056
1057if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +03001058weston_tests += xwayland-test.weston
1059xwayland_test_weston_SOURCES = tests/xwayland-test.c
1060xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
1061xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001062endif
1063
1064matrix_test_SOURCES = \
1065 tests/matrix-test.c \
1066 shared/matrix.c \
1067 shared/matrix.h
1068matrix_test_CPPFLAGS = -DUNIT_TEST
1069matrix_test_LDADD = -lm -lrt
1070
1071if BUILD_SETBACKLIGHT
1072noinst_PROGRAMS += setbacklight
1073setbacklight_SOURCES = \
1074 tests/setbacklight.c \
1075 src/libbacklight.c \
1076 src/libbacklight.h
1077setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
1078setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
1079endif
1080
1081EXTRA_DIST += tests/weston-tests-env
1082
1083BUILT_SOURCES += \
Derek Foremanf6a65922015-02-24 09:32:14 -06001084 protocol/weston-test-protocol.c \
1085 protocol/weston-test-server-protocol.h \
1086 protocol/weston-test-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001087 protocol/text-protocol.c \
1088 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001089
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001090EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001091 protocol/desktop-shell.xml \
1092 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001093 protocol/text.xml \
1094 protocol/input-method.xml \
1095 protocol/workspaces.xml \
1096 protocol/text-cursor-position.xml \
Derek Foremanf6a65922015-02-24 09:32:14 -06001097 protocol/weston-test.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001098 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001099 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001100 protocol/presentation_timing.xml \
Nobuhiko Tanibatabff1b4a2014-11-27 13:21:34 +09001101 protocol/scaler.xml \
Nobuhiko Tanibata68cfabb2014-11-27 13:22:53 +09001102 protocol/ivi-application.xml \
1103 protocol/ivi-hmi-controller.xml
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001104
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001105man_MANS = weston.1 weston.ini.5
1106
1107if ENABLE_DRM_COMPOSITOR
1108man_MANS += weston-drm.7
1109endif
1110
1111MAN_SUBSTS = \
1112 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1113 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1114 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1115 -e 's|__version__|$(PACKAGE_VERSION)|g'
1116
1117SUFFIXES = .1 .5 .7 .man
1118
1119%.1 %.5 %.7 : man/%.man
1120 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1121
1122EXTRA_DIST += \
1123 man/weston.man \
1124 man/weston-drm.man \
1125 man/weston.ini.man
1126
1127CLEANFILES += $(man_MANS)
1128
1129
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001130protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1131 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001132
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001133protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1134 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001135
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001136protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1137 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@