blob: b2d6893513cab9166f7ca40dd5d7a2efe6a57857 [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
Pekka Paalanen3d3f4852014-08-20 12:11:04 +030011# Do not run xwayland test while it is known broken.
12AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install --disable-xwayland-test
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050013
Kristian Høgsberg08229422014-02-01 00:33:04 -080014EXTRA_DIST = weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000015
16weston.ini : $(srcdir)/weston.ini.in
17 $(AM_V_GEN)$(SED) \
18 -e 's|@bindir[@]|$(bindir)|g' \
19 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
20 -e 's|@libexecdir[@]|$(libexecdir)|g' \
21 $< > $@
22
Kristian Høgsbergcd312752014-02-01 00:38:15 -080023all-local : weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080024
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080025AM_CFLAGS = $(GCC_CFLAGS)
26
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080027AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080028 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080029 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080030 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080031 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080032 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010033 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080034 -DDATADIR='"$(datadir)"' \
35 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080036 -DLIBEXECDIR='"$(libexecdir)"' \
37 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080038
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080039CLEANFILES = weston.ini $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080040
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080041bin_PROGRAMS += weston
42
43weston_LDFLAGS = -export-dynamic
44weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
45weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
46weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080047 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080048
49weston_SOURCES = \
50 src/git-version.h \
51 src/log.c \
52 src/compositor.c \
53 src/compositor.h \
54 src/input.c \
55 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080056 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080057 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080058 src/zoom.c \
59 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080060 src/bindings.c \
61 src/animation.c \
62 src/noop-renderer.c \
63 src/pixman-renderer.c \
64 src/pixman-renderer.h \
65 shared/matrix.c \
66 shared/matrix.h \
67 shared/zalloc.h \
68 src/weston-egl-ext.h
69
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080070nodist_weston_SOURCES = \
71 protocol/screenshooter-protocol.c \
72 protocol/screenshooter-server-protocol.h \
73 protocol/text-cursor-position-protocol.c \
74 protocol/text-cursor-position-server-protocol.h \
75 protocol/text-protocol.c \
76 protocol/text-server-protocol.h \
77 protocol/input-method-protocol.c \
78 protocol/input-method-server-protocol.h \
79 protocol/workspaces-protocol.c \
80 protocol/workspaces-server-protocol.h \
81 protocol/scaler-protocol.c \
82 protocol/scaler-server-protocol.h
83
84BUILT_SOURCES += $(nodist_weston_SOURCES)
85
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -080086# Track this dependency explicitly instead of using BUILT_SOURCES. We
87# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
88# in case we're building from tarballs.
89
90src/compositor.c : $(top_builddir)/src/git-version.h
91
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080092noinst_LTLIBRARIES += \
93 libsession-helper.la
94
95libsession_helper_la_SOURCES = \
96 src/weston-launch.h \
97 src/launcher-util.c \
98 src/launcher-util.h
99libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
100libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
101
102if ENABLE_DBUS
103if HAVE_SYSTEMD_LOGIN
104libsession_helper_la_SOURCES += \
105 src/dbus.h \
106 src/dbus.c \
107 src/logind-util.h \
108 src/logind-util.c
109libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
110libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
111endif
112endif
113
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800114if HAVE_GIT_REPO
115src/git-version.h : $(top_srcdir)/.git/logs/HEAD
116 $(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 -0800117else
118src/git-version.h :
119 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
120
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800121endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800122
123.FORCE :
124
125if BUILD_WESTON_LAUNCH
126bin_PROGRAMS += weston-launch
127weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
128weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
129weston_launch_CFLAGS= \
130 $(GCC_CFLAGS) \
131 $(PAM_CFLAGS) \
132 $(SYSTEMD_LOGIN_CFLAGS) \
133 $(LIBDRM_CFLAGS)
134weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
135
136if ENABLE_SETUID_INSTALL
137install-exec-hook:
138 chown root $(DESTDIR)$(bindir)/weston-launch
139 chmod u+s $(DESTDIR)$(bindir)/weston-launch
140endif
141
142endif # BUILD_WESTON_LAUNCH
143
144pkgconfigdir = $(libdir)/pkgconfig
145pkgconfig_DATA = src/weston.pc
146
147westonincludedir = $(includedir)/weston
148westoninclude_HEADERS = \
149 src/version.h \
150 src/compositor.h \
151 shared/matrix.h \
152 shared/config-parser.h \
153 shared/zalloc.h
154
155if ENABLE_EGL
156module_LTLIBRARIES += gl-renderer.la
157gl_renderer_la_LDFLAGS = -module -avoid-version
158gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
159gl_renderer_la_CFLAGS = \
160 $(COMPOSITOR_CFLAGS) \
161 $(EGL_CFLAGS) \
162 $(GCC_CFLAGS)
163gl_renderer_la_SOURCES = \
164 src/gl-renderer.h \
165 src/gl-renderer.c \
166 src/vertex-clipping.c \
167 src/vertex-clipping.h
168endif
169
170if ENABLE_X11_COMPOSITOR
171module_LTLIBRARIES += x11-backend.la
172x11_backend_la_LDFLAGS = -module -avoid-version
173x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800174 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800175x11_backend_la_CFLAGS = \
176 $(COMPOSITOR_CFLAGS) \
177 $(EGL_CFLAGS) \
178 $(PIXMAN_CFLAGS) \
179 $(CAIRO_CFLAGS) \
180 $(X11_COMPOSITOR_CFLAGS) \
181 $(GCC_CFLAGS)
182x11_backend_la_SOURCES = src/compositor-x11.c
183endif
184
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100185INPUT_BACKEND_SOURCES = src/udev-input.h
186
187if ENABLE_LIBINPUT_BACKEND
188INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
189INPUT_BACKEND_SOURCES += \
190 src/libinput-seat.c \
191 src/libinput-seat.h \
192 src/libinput-device.c \
193 src/libinput-device.h
194else
195INPUT_BACKEND_SOURCES += \
196 src/filter.c \
197 src/filter.h \
198 src/udev-seat.c \
199 src/udev-seat.h \
200 src/evdev.c \
201 src/evdev.h \
202 src/evdev-touchpad.c
203endif
204
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800205if ENABLE_DRM_COMPOSITOR
206module_LTLIBRARIES += drm-backend.la
207drm_backend_la_LDFLAGS = -module -avoid-version
208drm_backend_la_LIBADD = \
209 $(COMPOSITOR_LIBS) \
210 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100211 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100212 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800213 libsession-helper.la
214drm_backend_la_CFLAGS = \
215 $(COMPOSITOR_CFLAGS) \
216 $(EGL_CFLAGS) \
217 $(DRM_COMPOSITOR_CFLAGS) \
218 $(GCC_CFLAGS)
219drm_backend_la_SOURCES = \
220 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100221 $(INPUT_BACKEND_SOURCES) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800222 src/libbacklight.c \
223 src/libbacklight.h
224
225if ENABLE_VAAPI_RECORDER
226drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
227drm_backend_la_LIBADD += $(LIBVA_LIBS)
228drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
229endif
230endif
231
232if ENABLE_WAYLAND_COMPOSITOR
233module_LTLIBRARIES += wayland-backend.la
234wayland_backend_la_LDFLAGS = -module -avoid-version
235wayland_backend_la_LIBADD = \
236 $(COMPOSITOR_LIBS) \
237 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800238 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800239wayland_backend_la_CFLAGS = \
240 $(COMPOSITOR_CFLAGS) \
241 $(EGL_CFLAGS) \
242 $(PIXMAN_CFLAGS) \
243 $(CAIRO_CFLAGS) \
244 $(WAYLAND_COMPOSITOR_CFLAGS) \
245 $(GCC_CFLAGS)
246wayland_backend_la_SOURCES = src/compositor-wayland.c
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500247nodist_wayland_backend_la_SOURCES = \
248 protocol/fullscreen-shell-protocol.c \
249 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800250endif
251
252if ENABLE_RPI_COMPOSITOR
253if INSTALL_RPI_COMPOSITOR
254module_LTLIBRARIES += rpi-backend.la
255else
256noinst_LTLIBRARIES += rpi-backend.la
257endif
258
259rpi_backend_la_LDFLAGS = -module -avoid-version
260rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
261 $(RPI_COMPOSITOR_LIBS) \
262 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100263 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800264 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800265 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800266rpi_backend_la_CFLAGS = \
267 $(GCC_CFLAGS) \
268 $(COMPOSITOR_CFLAGS) \
269 $(RPI_COMPOSITOR_CFLAGS) \
270 $(RPI_BCM_HOST_CFLAGS)
271rpi_backend_la_SOURCES = \
272 src/compositor-rpi.c \
273 src/rpi-renderer.c \
274 src/rpi-renderer.h \
275 src/rpi-bcm-stubs.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100276 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800277
278if ENABLE_EGL
279rpi_backend_la_LIBADD += $(EGL_LIBS)
280rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
281endif
282
283endif
284
285if ENABLE_HEADLESS_COMPOSITOR
286module_LTLIBRARIES += headless-backend.la
287headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800288headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
289headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800290headless_backend_la_SOURCES = src/compositor-headless.c
291endif
292
293if ENABLE_FBDEV_COMPOSITOR
294module_LTLIBRARIES += fbdev-backend.la
295fbdev_backend_la_LDFLAGS = -module -avoid-version
296fbdev_backend_la_LIBADD = \
297 $(COMPOSITOR_LIBS) \
298 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100299 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800300 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800301 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800302fbdev_backend_la_CFLAGS = \
303 $(COMPOSITOR_CFLAGS) \
304 $(EGL_CFLAGS) \
305 $(FBDEV_COMPOSITOR_CFLAGS) \
306 $(PIXMAN_CFLAGS) \
307 $(GCC_CFLAGS)
308fbdev_backend_la_SOURCES = \
309 src/compositor-fbdev.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100310 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800311endif
312
313if ENABLE_RDP_COMPOSITOR
314module_LTLIBRARIES += rdp-backend.la
315rdp_backend_la_LDFLAGS = -module -avoid-version
316rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
317 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800318 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800319rdp_backend_la_CFLAGS = \
320 $(COMPOSITOR_CFLAGS) \
321 $(RDP_COMPOSITOR_CFLAGS) \
322 $(GCC_CFLAGS)
323rdp_backend_la_SOURCES = src/compositor-rdp.c
324endif
325
326if HAVE_LCMS
327module_LTLIBRARIES += cms-static.la
328cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800329cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800330cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
331cms_static_la_SOURCES = \
332 src/cms-static.c \
333 src/cms-helper.c \
334 src/cms-helper.h
335if ENABLE_COLORD
336module_LTLIBRARIES += cms-colord.la
337cms_colord_la_LDFLAGS = -module -avoid-version
338cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
339cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
340cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100341 src/cms-colord.c \
342 src/cms-helper.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800343 src/cms-helper.h
344endif
345endif
346
347noinst_PROGRAMS += spring-tool
348spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
349spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
350spring_tool_SOURCES = \
351 src/spring-tool.c \
352 src/animation.c \
353 shared/matrix.c \
354 shared/matrix.h \
355 src/compositor.h
356
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800357if BUILD_CLIENTS
358
359bin_PROGRAMS += weston-terminal weston-info
360
361libexec_PROGRAMS += \
362 weston-desktop-shell \
363 weston-screenshooter \
364 weston-keyboard \
365 weston-simple-im
366
367demo_clients = \
368 weston-flower \
369 weston-image \
370 weston-cliptest \
371 weston-dnd \
372 weston-smoke \
373 weston-resizor \
374 weston-eventdemo \
375 weston-clickdot \
376 weston-transformed \
377 weston-fullscreen \
378 weston-stacking \
379 weston-calibrator \
380 weston-scaler
381
382if INSTALL_DEMO_CLIENTS
383bin_PROGRAMS += $(demo_clients)
384else
385noinst_PROGRAMS += $(demo_clients)
386endif
387
388
389if BUILD_SIMPLE_CLIENTS
390demo_clients += \
391 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500392 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800393 weston-simple-touch \
394 weston-multi-resource
395
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800396weston_simple_shm_SOURCES = clients/simple-shm.c
397nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800398 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500399 protocol/xdg-shell-client-protocol.h \
400 protocol/fullscreen-shell-protocol.c \
401 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800402weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800403weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800404
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500405weston_simple_damage_SOURCES = clients/simple-damage.c
406nodist_weston_simple_damage_SOURCES = \
407 protocol/scaler-protocol.c \
408 protocol/scaler-client-protocol.h \
409 protocol/xdg-shell-protocol.c \
410 protocol/xdg-shell-client-protocol.h \
411 protocol/fullscreen-shell-protocol.c \
412 protocol/fullscreen-shell-client-protocol.h
413weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
414weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
415
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800416weston_simple_touch_SOURCES = clients/simple-touch.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800417weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800418weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800419
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800420weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800421weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800422weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800423endif
424
425if BUILD_SIMPLE_EGL_CLIENTS
426demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800427weston_simple_egl_SOURCES = clients/simple-egl.c
428nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800429 protocol/xdg-shell-protocol.c \
430 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800431weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800432weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
433endif
434
435noinst_LTLIBRARIES += libtoytoolkit.la
436
437libtoytoolkit_la_SOURCES = \
438 clients/window.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800439 clients/window.h
440
441nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100442 protocol/text-cursor-position-protocol.c \
443 protocol/text-cursor-position-client-protocol.h \
444 protocol/scaler-protocol.c \
445 protocol/scaler-client-protocol.h \
446 protocol/workspaces-protocol.c \
447 protocol/workspaces-client-protocol.h \
448 protocol/xdg-shell-protocol.c \
449 protocol/xdg-shell-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500450
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800451BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
452
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800453
454libtoytoolkit_la_LIBADD = \
455 $(CLIENT_LIBS) \
456 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800457 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800458libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800459
460weston_flower_SOURCES = clients/flower.c
461weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800462weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800463
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100464weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800465 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800466nodist_weston_screenshooter_SOURCES = \
467 protocol/screenshooter-protocol.c \
468 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800469weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800470weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800471
472weston_terminal_SOURCES = clients/terminal.c
473weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800474weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800475
476weston_image_SOURCES = clients/image.c
477weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800478weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800479
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300480weston_cliptest_SOURCES = \
481 clients/cliptest.c \
482 src/vertex-clipping.c \
483 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800484weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800485weston_cliptest_LDADD = libtoytoolkit.la
486
487weston_dnd_SOURCES = clients/dnd.c
488weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800489weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800490
491weston_smoke_SOURCES = clients/smoke.c
492weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800493weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800494
495weston_resizor_SOURCES = clients/resizor.c
496weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800497weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800498
499weston_scaler_SOURCES = clients/scaler.c
500weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800501weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800502
503if HAVE_CAIRO_GLESV2
504demo_clients += weston-nested weston-nested-client
505
506weston_nested_SOURCES = clients/nested.c
507weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800508weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800509
510weston_nested_client_SOURCES = clients/nested-client.c
511weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800512weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800513endif
514
515weston_eventdemo_SOURCES = clients/eventdemo.c
516weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800517weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800518
519weston_clickdot_SOURCES = clients/clickdot.c
520weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800521weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800522
523weston_transformed_SOURCES = clients/transformed.c
524weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800525weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800526
527weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500528nodist_weston_fullscreen_SOURCES = \
529 protocol/fullscreen-shell-protocol.c \
530 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800531weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800532weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800533
534weston_stacking_SOURCES = clients/stacking.c
535weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800536weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800537
538weston_calibrator_SOURCES = clients/calibrator.c \
539 shared/matrix.c \
540 shared/matrix.h
541weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800542weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800543
544if BUILD_SUBSURFACES_CLIENT
545demo_clients += weston-subsurfaces
546weston_subsurfaces_SOURCES = clients/subsurfaces.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800547weston_subsurfaces_CFLAGS = \
548 $(AM_CFLAGS) \
549 $(SIMPLE_EGL_CLIENT_CFLAGS) \
550 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800551weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
552endif
553
554if HAVE_PANGO
555demo_clients += weston-editor
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800556weston_editor_SOURCES = clients/editor.c
557nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100558 protocol/text-protocol.c \
559 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800560weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800561weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800562endif
563
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800564weston_keyboard_SOURCES = clients/keyboard.c
565nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100566 protocol/desktop-shell-client-protocol.h \
567 protocol/desktop-shell-protocol.c \
568 protocol/input-method-protocol.c \
569 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800570weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800571weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800572
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800573weston_simple_im_SOURCES = clients/weston-simple-im.c
574nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100575 protocol/input-method-protocol.c \
576 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800577weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800578weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800579
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800580weston_info_SOURCES = clients/weston-info.c
581weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200582weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800583
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800584weston_desktop_shell_SOURCES = clients/desktop-shell.c
585nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100586 protocol/desktop-shell-client-protocol.h \
587 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800588weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800589weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800590
591if BUILD_FULL_GL_CLIENTS
592demo_clients += weston-gears
593weston_gears_SOURCES = clients/gears.c
594weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800595weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800596
597if HAVE_GLU
598libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100599weston_screensaver_SOURCES = \
600 clients/wscreensaver.c \
601 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100602 clients/wscreensaver-glue.c \
603 clients/wscreensaver-glue.h \
604 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800605 clients/matrix3.xpm
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800606nodist_weston_screensaver_SOURCES = \
607 protocol/desktop-shell-client-protocol.h \
608 protocol/desktop-shell-protocol.c
609
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800610weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800611weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800612
613endif
614
615endif
616
617endif
618
619BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100620 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800621 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100622 protocol/text-cursor-position-client-protocol.h \
623 protocol/text-cursor-position-protocol.c \
624 protocol/text-protocol.c \
625 protocol/text-client-protocol.h \
626 protocol/input-method-protocol.c \
627 protocol/input-method-client-protocol.h \
628 protocol/desktop-shell-client-protocol.h \
629 protocol/desktop-shell-protocol.c \
630 protocol/scaler-client-protocol.h \
631 protocol/scaler-protocol.c \
632 protocol/workspaces-client-protocol.h \
633 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500634 protocol/fullscreen-shell-protocol.c \
635 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100636 protocol/xdg-shell-protocol.c \
637 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800638
639
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800640westondatadir = $(datadir)/weston
641dist_westondata_DATA = \
642 data/wayland.svg \
643 data/wayland.png \
644 data/pattern.png \
645 data/terminal.png \
646 data/border.png \
647 data/icon_window.png \
648 data/sign_close.png \
649 data/sign_maximize.png \
650 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800651
652
653if BUILD_WCAP_TOOLS
654bin_PROGRAMS += wcap-decode
655
656wcap_decode_SOURCES = \
657 wcap/main.c \
658 wcap/wcap-decode.c \
659 wcap/wcap-decode.h
660
661wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
662wcap_decode_LDADD = $(WCAP_LIBS)
663endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800664
665
666if ENABLE_DESKTOP_SHELL
667
668module_LTLIBRARIES += desktop-shell.la
669
670desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100671 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800672 -I$(top_srcdir)/shared \
673 -I$(top_srcdir)/src \
674 -I$(top_builddir)/src \
675 -I$(top_builddir)/desktop-shell \
676 -DDATADIR='"$(datadir)"' \
677 -DMODULEDIR='"$(moduledir)"' \
678 -DLIBEXECDIR='"$(libexecdir)"' \
679 -DIN_WESTON
680
681desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800682desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800683desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
684desktop_shell_la_SOURCES = \
685 desktop-shell/shell.h \
686 desktop-shell/shell.c \
687 desktop-shell/exposay.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800688 desktop-shell/input-panel.c
689nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100690 protocol/desktop-shell-protocol.c \
691 protocol/desktop-shell-server-protocol.h \
692 protocol/xdg-shell-protocol.c \
693 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800694
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800695BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800696endif
697
Jason Ekstrand946a9482014-04-02 19:53:47 -0500698if ENABLE_FULLSCREEN_SHELL
699
700module_LTLIBRARIES += fullscreen-shell.la
701
702fullscreen_shell_la_CPPFLAGS = \
703 -I$(top_builddir)/protocol \
704 -I$(top_srcdir)/shared \
705 -I$(top_srcdir)/src \
706 -I$(top_builddir)/src \
707 -DIN_WESTON
708
709fullscreen_shell_la_LDFLAGS = -module -avoid-version
710fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
711fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
712fullscreen_shell_la_SOURCES = \
713 fullscreen-shell/fullscreen-shell.c
714nodist_fullscreen_shell_la_SOURCES = \
715 protocol/fullscreen-shell-protocol.c \
716 protocol/fullscreen-shell-server-protocol.h
717
718BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
719endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800720
Jason Ekstrand47928d82014-04-02 19:54:01 -0500721if ENABLE_SCREEN_SHARING
722
723module_LTLIBRARIES += screen-share.la
724
725screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
726screen_share_la_LDFLAGS = -module -avoid-version
727screen_share_la_LIBADD = \
728 $(COMPOSITOR_LIBS) \
729 $(SCREEN_SHARE_LIBS) \
730 libshared-cairo.la
731screen_share_la_CFLAGS = \
732 $(COMPOSITOR_CFLAGS) \
733 $(SCREEN_SHARE_CFLAGS) \
734 $(GCC_CFLAGS)
735screen_share_la_SOURCES = \
736 src/screen-share.c
737nodist_screen_share_la_SOURCES = \
738 protocol/fullscreen-shell-protocol.c \
739 protocol/fullscreen-shell-client-protocol.h
740
741endif
742
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800743if ENABLE_XWAYLAND
744
745module_LTLIBRARIES += xwayland.la
746
747xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100748 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800749 -I$(top_srcdir)/shared \
750 -I$(top_srcdir)/src \
751 -I$(top_builddir)/src \
752 -I$(top_builddir)/xwayland \
753 -DDATADIR='"$(datadir)"' \
754 -DMODULEDIR='"$(moduledir)"' \
755 -DLIBEXECDIR='"$(libexecdir)"' \
756 -DXSERVER_PATH='"@XSERVER_PATH@"'
757
758xwayland_la_LDFLAGS = -module -avoid-version
759xwayland_la_LIBADD = \
760 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800761 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800762xwayland_la_CFLAGS = \
763 $(GCC_CFLAGS) \
764 $(COMPOSITOR_CFLAGS) \
765 $(PIXMAN_CFLAGS) \
766 $(CAIRO_CFLAGS)
767xwayland_la_SOURCES = \
768 xwayland/xwayland.h \
769 xwayland/window-manager.c \
770 xwayland/selection.c \
771 xwayland/dnd.c \
772 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800773 xwayland/hash.c \
774 xwayland/hash.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800775endif
776
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800777
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800778#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800779# Shared utilities
780#
781
782noinst_LTLIBRARIES += libshared.la libshared-cairo.la
783
784libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
785
786libshared_la_SOURCES = \
787 shared/config-parser.c \
788 shared/option-parser.c \
789 shared/config-parser.h \
790 shared/os-compatibility.c \
791 shared/os-compatibility.h
792
793libshared_cairo_la_CFLAGS = \
794 -DDATADIR='"$(datadir)"' \
795 $(GCC_CFLAGS) \
796 $(COMPOSITOR_CFLAGS) \
797 $(PIXMAN_CFLAGS) \
798 $(CAIRO_CFLAGS) \
799 $(PNG_CFLAGS) \
800 $(WEBP_CFLAGS)
801
802libshared_cairo_la_LIBADD = \
803 $(PIXMAN_LIBS) \
804 $(CAIRO_LIBS) \
805 $(PNG_LIBS) \
806 $(WEBP_LIBS) \
807 $(JPEG_LIBS)
808
809libshared_cairo_la_SOURCES = \
810 $(libshared_la_SOURCES) \
811 shared/image-loader.c \
812 shared/image-loader.h \
813 shared/cairo-util.c \
814 shared/frame.c \
815 shared/cairo-util.h
816
817
818#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800819# tests subdirectory
820#
821
822TESTS = $(shared_tests) $(module_tests) $(weston_tests)
823
824shared_tests = \
825 config-parser.test \
826 vertex-clip.test
827
828module_tests = \
829 surface-test.la \
830 surface-global-test.la
831
832weston_tests = \
833 bad_buffer.weston \
834 keyboard.weston \
835 event.weston \
836 button.weston \
837 text.weston \
838 subsurface.weston
839
840
841AM_TESTS_ENVIRONMENT = \
842 abs_builddir='$(abs_builddir)'; export abs_builddir;
843
844TEST_EXTENSIONS = .la .weston
845LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
846WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
847
848clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +0300849 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800850
851# To remove when automake 1.11 support is dropped
852export abs_builddir
853
854noinst_LTLIBRARIES += \
855 weston-test.la \
856 $(module_tests) \
857 libtest-runner.la \
858 libtest-client.la
859
860noinst_PROGRAMS += \
861 $(setbacklight) \
862 $(shared_tests) \
863 $(weston_tests) \
864 matrix-test
865
866test_module_ldflags = \
867 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
868
869surface_global_test_la_SOURCES = tests/surface-global-test.c
870surface_global_test_la_LDFLAGS = $(test_module_ldflags)
871surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
872
873surface_test_la_SOURCES = tests/surface-test.c
874surface_test_la_LDFLAGS = $(test_module_ldflags)
875surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
876
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800877weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800878weston_test_la_LDFLAGS = $(test_module_ldflags)
879weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800880weston_test_la_SOURCES = tests/weston-test.c
881nodist_weston_test_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100882 protocol/wayland-test-protocol.c \
883 protocol/wayland-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800884
885if ENABLE_EGL
886weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
887weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
888endif
889
890libtest_runner_la_SOURCES = \
891 tests/weston-test-runner.c \
892 tests/weston-test-runner.h
893libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
894
895config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800896config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800897
898vertex_clip_test_SOURCES = \
899 tests/vertex-clip-test.c \
900 src/vertex-clipping.c \
901 src/vertex-clipping.h
902vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
903
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100904libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800905 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800906 tests/weston-test-client-helper.h
907nodist_libtest_client_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100908 protocol/wayland-test-protocol.c \
909 protocol/wayland-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800910libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800911libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800912
913bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800914bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800915bad_buffer_weston_LDADD = libtest-client.la
916
917keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800918keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800919keyboard_weston_LDADD = libtest-client.la
920
921event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800922event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800923event_weston_LDADD = libtest-client.la
924
925button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800926button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800927button_weston_LDADD = libtest-client.la
928
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800929text_weston_SOURCES = tests/text-test.c
930nodist_text_weston_SOURCES = \
931 protocol/text-protocol.c \
932 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800933text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800934text_weston_LDADD = libtest-client.la
935
936subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800937subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800938subsurface_weston_LDADD = libtest-client.la
939
940if ENABLE_EGL
941weston_tests += buffer-count.weston
942buffer_count_weston_SOURCES = tests/buffer-count-test.c
943buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
944buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
945endif
946
947if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +0300948weston_tests += xwayland-test.weston
949xwayland_test_weston_SOURCES = tests/xwayland-test.c
950xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
951xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800952endif
953
954matrix_test_SOURCES = \
955 tests/matrix-test.c \
956 shared/matrix.c \
957 shared/matrix.h
958matrix_test_CPPFLAGS = -DUNIT_TEST
959matrix_test_LDADD = -lm -lrt
960
961if BUILD_SETBACKLIGHT
962noinst_PROGRAMS += setbacklight
963setbacklight_SOURCES = \
964 tests/setbacklight.c \
965 src/libbacklight.c \
966 src/libbacklight.h
967setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
968setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
969endif
970
971EXTRA_DIST += tests/weston-tests-env
972
973BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100974 protocol/wayland-test-protocol.c \
975 protocol/wayland-test-server-protocol.h \
976 protocol/wayland-test-client-protocol.h \
977 protocol/text-protocol.c \
978 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800979
Kristian Høgsbergcd312752014-02-01 00:38:15 -0800980EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800981 protocol/desktop-shell.xml \
982 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800983 protocol/text.xml \
984 protocol/input-method.xml \
985 protocol/workspaces.xml \
986 protocol/text-cursor-position.xml \
987 protocol/wayland-test.xml \
988 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -0500989 protocol/fullscreen-shell.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800990 protocol/scaler.xml
991
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800992man_MANS = weston.1 weston.ini.5
993
994if ENABLE_DRM_COMPOSITOR
995man_MANS += weston-drm.7
996endif
997
998MAN_SUBSTS = \
999 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1000 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1001 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1002 -e 's|__version__|$(PACKAGE_VERSION)|g'
1003
1004SUFFIXES = .1 .5 .7 .man
1005
1006%.1 %.5 %.7 : man/%.man
1007 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1008
1009EXTRA_DIST += \
1010 man/weston.man \
1011 man/weston-drm.man \
1012 man/weston.ini.man
1013
1014CLEANFILES += $(man_MANS)
1015
1016
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001017protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1018 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001019
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001020protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1021 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001022
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001023protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1024 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@