blob: 2fc171ea586ab81ee87728a2c2b952c908a8bdd7 [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 \
Pekka Paalanen7e62d252014-09-23 22:08:42 -040081 protocol/presentation_timing-protocol.c \
82 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080083 protocol/scaler-protocol.c \
84 protocol/scaler-server-protocol.h
85
86BUILT_SOURCES += $(nodist_weston_SOURCES)
87
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -080088# Track this dependency explicitly instead of using BUILT_SOURCES. We
89# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
90# in case we're building from tarballs.
91
92src/compositor.c : $(top_builddir)/src/git-version.h
93
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080094noinst_LTLIBRARIES += \
95 libsession-helper.la
96
97libsession_helper_la_SOURCES = \
98 src/weston-launch.h \
99 src/launcher-util.c \
100 src/launcher-util.h
101libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
102libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
103
104if ENABLE_DBUS
105if HAVE_SYSTEMD_LOGIN
106libsession_helper_la_SOURCES += \
107 src/dbus.h \
108 src/dbus.c \
109 src/logind-util.h \
110 src/logind-util.c
111libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
112libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
113endif
114endif
115
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800116if HAVE_GIT_REPO
117src/git-version.h : $(top_srcdir)/.git/logs/HEAD
118 $(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 -0800119else
120src/git-version.h :
121 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
122
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800123endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800124
125.FORCE :
126
127if BUILD_WESTON_LAUNCH
128bin_PROGRAMS += weston-launch
129weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
130weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
131weston_launch_CFLAGS= \
132 $(GCC_CFLAGS) \
133 $(PAM_CFLAGS) \
134 $(SYSTEMD_LOGIN_CFLAGS) \
135 $(LIBDRM_CFLAGS)
136weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
137
138if ENABLE_SETUID_INSTALL
139install-exec-hook:
140 chown root $(DESTDIR)$(bindir)/weston-launch
141 chmod u+s $(DESTDIR)$(bindir)/weston-launch
142endif
143
144endif # BUILD_WESTON_LAUNCH
145
146pkgconfigdir = $(libdir)/pkgconfig
147pkgconfig_DATA = src/weston.pc
148
149westonincludedir = $(includedir)/weston
150westoninclude_HEADERS = \
151 src/version.h \
152 src/compositor.h \
153 shared/matrix.h \
154 shared/config-parser.h \
155 shared/zalloc.h
156
157if ENABLE_EGL
158module_LTLIBRARIES += gl-renderer.la
159gl_renderer_la_LDFLAGS = -module -avoid-version
160gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
161gl_renderer_la_CFLAGS = \
162 $(COMPOSITOR_CFLAGS) \
163 $(EGL_CFLAGS) \
164 $(GCC_CFLAGS)
165gl_renderer_la_SOURCES = \
166 src/gl-renderer.h \
167 src/gl-renderer.c \
168 src/vertex-clipping.c \
169 src/vertex-clipping.h
170endif
171
172if ENABLE_X11_COMPOSITOR
173module_LTLIBRARIES += x11-backend.la
174x11_backend_la_LDFLAGS = -module -avoid-version
175x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800176 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800177x11_backend_la_CFLAGS = \
178 $(COMPOSITOR_CFLAGS) \
179 $(EGL_CFLAGS) \
180 $(PIXMAN_CFLAGS) \
181 $(CAIRO_CFLAGS) \
182 $(X11_COMPOSITOR_CFLAGS) \
183 $(GCC_CFLAGS)
184x11_backend_la_SOURCES = src/compositor-x11.c
185endif
186
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100187INPUT_BACKEND_SOURCES = src/udev-input.h
188
189if ENABLE_LIBINPUT_BACKEND
190INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
191INPUT_BACKEND_SOURCES += \
192 src/libinput-seat.c \
193 src/libinput-seat.h \
194 src/libinput-device.c \
195 src/libinput-device.h
196else
197INPUT_BACKEND_SOURCES += \
198 src/filter.c \
199 src/filter.h \
200 src/udev-seat.c \
201 src/udev-seat.h \
202 src/evdev.c \
203 src/evdev.h \
204 src/evdev-touchpad.c
205endif
206
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800207if ENABLE_DRM_COMPOSITOR
208module_LTLIBRARIES += drm-backend.la
209drm_backend_la_LDFLAGS = -module -avoid-version
210drm_backend_la_LIBADD = \
211 $(COMPOSITOR_LIBS) \
212 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100213 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100214 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800215 libsession-helper.la
216drm_backend_la_CFLAGS = \
217 $(COMPOSITOR_CFLAGS) \
218 $(EGL_CFLAGS) \
219 $(DRM_COMPOSITOR_CFLAGS) \
220 $(GCC_CFLAGS)
221drm_backend_la_SOURCES = \
222 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100223 $(INPUT_BACKEND_SOURCES) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800224 src/libbacklight.c \
225 src/libbacklight.h
226
227if ENABLE_VAAPI_RECORDER
228drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
229drm_backend_la_LIBADD += $(LIBVA_LIBS)
230drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
231endif
232endif
233
234if ENABLE_WAYLAND_COMPOSITOR
235module_LTLIBRARIES += wayland-backend.la
236wayland_backend_la_LDFLAGS = -module -avoid-version
237wayland_backend_la_LIBADD = \
238 $(COMPOSITOR_LIBS) \
239 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800240 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800241wayland_backend_la_CFLAGS = \
242 $(COMPOSITOR_CFLAGS) \
243 $(EGL_CFLAGS) \
244 $(PIXMAN_CFLAGS) \
245 $(CAIRO_CFLAGS) \
246 $(WAYLAND_COMPOSITOR_CFLAGS) \
247 $(GCC_CFLAGS)
248wayland_backend_la_SOURCES = src/compositor-wayland.c
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500249nodist_wayland_backend_la_SOURCES = \
250 protocol/fullscreen-shell-protocol.c \
251 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800252endif
253
254if ENABLE_RPI_COMPOSITOR
255if INSTALL_RPI_COMPOSITOR
256module_LTLIBRARIES += rpi-backend.la
257else
258noinst_LTLIBRARIES += rpi-backend.la
259endif
260
261rpi_backend_la_LDFLAGS = -module -avoid-version
262rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
263 $(RPI_COMPOSITOR_LIBS) \
264 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100265 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800266 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800267 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800268rpi_backend_la_CFLAGS = \
269 $(GCC_CFLAGS) \
270 $(COMPOSITOR_CFLAGS) \
271 $(RPI_COMPOSITOR_CFLAGS) \
272 $(RPI_BCM_HOST_CFLAGS)
273rpi_backend_la_SOURCES = \
274 src/compositor-rpi.c \
275 src/rpi-renderer.c \
276 src/rpi-renderer.h \
277 src/rpi-bcm-stubs.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100278 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800279
280if ENABLE_EGL
281rpi_backend_la_LIBADD += $(EGL_LIBS)
282rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
283endif
284
285endif
286
287if ENABLE_HEADLESS_COMPOSITOR
288module_LTLIBRARIES += headless-backend.la
289headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800290headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
291headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800292headless_backend_la_SOURCES = src/compositor-headless.c
293endif
294
295if ENABLE_FBDEV_COMPOSITOR
296module_LTLIBRARIES += fbdev-backend.la
297fbdev_backend_la_LDFLAGS = -module -avoid-version
298fbdev_backend_la_LIBADD = \
299 $(COMPOSITOR_LIBS) \
300 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100301 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800302 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800303 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800304fbdev_backend_la_CFLAGS = \
305 $(COMPOSITOR_CFLAGS) \
306 $(EGL_CFLAGS) \
307 $(FBDEV_COMPOSITOR_CFLAGS) \
308 $(PIXMAN_CFLAGS) \
309 $(GCC_CFLAGS)
310fbdev_backend_la_SOURCES = \
311 src/compositor-fbdev.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100312 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800313endif
314
315if ENABLE_RDP_COMPOSITOR
316module_LTLIBRARIES += rdp-backend.la
317rdp_backend_la_LDFLAGS = -module -avoid-version
318rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
319 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800320 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800321rdp_backend_la_CFLAGS = \
322 $(COMPOSITOR_CFLAGS) \
323 $(RDP_COMPOSITOR_CFLAGS) \
324 $(GCC_CFLAGS)
325rdp_backend_la_SOURCES = src/compositor-rdp.c
326endif
327
328if HAVE_LCMS
329module_LTLIBRARIES += cms-static.la
330cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800331cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800332cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
333cms_static_la_SOURCES = \
334 src/cms-static.c \
335 src/cms-helper.c \
336 src/cms-helper.h
337if ENABLE_COLORD
338module_LTLIBRARIES += cms-colord.la
339cms_colord_la_LDFLAGS = -module -avoid-version
340cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
341cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
342cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100343 src/cms-colord.c \
344 src/cms-helper.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800345 src/cms-helper.h
346endif
347endif
348
349noinst_PROGRAMS += spring-tool
350spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
351spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
352spring_tool_SOURCES = \
353 src/spring-tool.c \
354 src/animation.c \
355 shared/matrix.c \
356 shared/matrix.h \
357 src/compositor.h
358
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800359if BUILD_CLIENTS
360
361bin_PROGRAMS += weston-terminal weston-info
362
363libexec_PROGRAMS += \
364 weston-desktop-shell \
365 weston-screenshooter \
366 weston-keyboard \
367 weston-simple-im
368
369demo_clients = \
370 weston-flower \
371 weston-image \
372 weston-cliptest \
373 weston-dnd \
374 weston-smoke \
375 weston-resizor \
376 weston-eventdemo \
377 weston-clickdot \
378 weston-transformed \
379 weston-fullscreen \
380 weston-stacking \
381 weston-calibrator \
382 weston-scaler
383
384if INSTALL_DEMO_CLIENTS
385bin_PROGRAMS += $(demo_clients)
386else
387noinst_PROGRAMS += $(demo_clients)
388endif
389
390
391if BUILD_SIMPLE_CLIENTS
392demo_clients += \
393 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500394 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800395 weston-simple-touch \
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400396 weston-presentation-shm \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800397 weston-multi-resource
398
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800399weston_simple_shm_SOURCES = clients/simple-shm.c
400nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800401 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500402 protocol/xdg-shell-client-protocol.h \
403 protocol/fullscreen-shell-protocol.c \
404 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800405weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800406weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800407
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500408weston_simple_damage_SOURCES = clients/simple-damage.c
409nodist_weston_simple_damage_SOURCES = \
410 protocol/scaler-protocol.c \
411 protocol/scaler-client-protocol.h \
412 protocol/xdg-shell-protocol.c \
413 protocol/xdg-shell-client-protocol.h \
414 protocol/fullscreen-shell-protocol.c \
415 protocol/fullscreen-shell-client-protocol.h
416weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
417weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
418
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800419weston_simple_touch_SOURCES = clients/simple-touch.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800420weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800421weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800422
Pekka Paalanenef2b5922014-09-23 22:08:49 -0400423weston_presentation_shm_SOURCES = clients/presentation-shm.c
424nodist_weston_presentation_shm_SOURCES = \
425 protocol/presentation_timing-protocol.c \
426 protocol/presentation_timing-client-protocol.h
427weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
428weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
429
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800430weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800431weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Javier Jardónc47931e2014-10-27 15:13:19 +0000432weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800433endif
434
435if BUILD_SIMPLE_EGL_CLIENTS
436demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800437weston_simple_egl_SOURCES = clients/simple-egl.c
438nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800439 protocol/xdg-shell-protocol.c \
440 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800441weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800442weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
443endif
444
445noinst_LTLIBRARIES += libtoytoolkit.la
446
447libtoytoolkit_la_SOURCES = \
448 clients/window.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800449 clients/window.h
450
451nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100452 protocol/text-cursor-position-protocol.c \
453 protocol/text-cursor-position-client-protocol.h \
454 protocol/scaler-protocol.c \
455 protocol/scaler-client-protocol.h \
456 protocol/workspaces-protocol.c \
457 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400458 protocol/presentation_timing-protocol.c \
459 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100460 protocol/xdg-shell-protocol.c \
461 protocol/xdg-shell-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500462
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800463BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
464
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800465
466libtoytoolkit_la_LIBADD = \
467 $(CLIENT_LIBS) \
468 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800469 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800470libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800471
472weston_flower_SOURCES = clients/flower.c
473weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800474weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800475
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100476weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800477 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800478nodist_weston_screenshooter_SOURCES = \
479 protocol/screenshooter-protocol.c \
480 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800481weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800482weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800483
484weston_terminal_SOURCES = clients/terminal.c
485weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800486weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800487
488weston_image_SOURCES = clients/image.c
489weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800490weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800491
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300492weston_cliptest_SOURCES = \
493 clients/cliptest.c \
494 src/vertex-clipping.c \
495 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800496weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800497weston_cliptest_LDADD = libtoytoolkit.la
498
499weston_dnd_SOURCES = clients/dnd.c
500weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800501weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800502
503weston_smoke_SOURCES = clients/smoke.c
504weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800505weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800506
507weston_resizor_SOURCES = clients/resizor.c
508weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800509weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800510
511weston_scaler_SOURCES = clients/scaler.c
512weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800513weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800514
515if HAVE_CAIRO_GLESV2
516demo_clients += weston-nested weston-nested-client
517
518weston_nested_SOURCES = clients/nested.c
519weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800520weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800521
522weston_nested_client_SOURCES = clients/nested-client.c
523weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800524weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800525endif
526
527weston_eventdemo_SOURCES = clients/eventdemo.c
528weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800529weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800530
531weston_clickdot_SOURCES = clients/clickdot.c
532weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800533weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800534
535weston_transformed_SOURCES = clients/transformed.c
536weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800537weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800538
539weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500540nodist_weston_fullscreen_SOURCES = \
541 protocol/fullscreen-shell-protocol.c \
542 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800543weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800544weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800545
546weston_stacking_SOURCES = clients/stacking.c
547weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800548weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800549
550weston_calibrator_SOURCES = clients/calibrator.c \
551 shared/matrix.c \
552 shared/matrix.h
553weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800554weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800555
556if BUILD_SUBSURFACES_CLIENT
557demo_clients += weston-subsurfaces
558weston_subsurfaces_SOURCES = clients/subsurfaces.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800559weston_subsurfaces_CFLAGS = \
560 $(AM_CFLAGS) \
561 $(SIMPLE_EGL_CLIENT_CFLAGS) \
562 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800563weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
564endif
565
566if HAVE_PANGO
567demo_clients += weston-editor
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800568weston_editor_SOURCES = clients/editor.c
569nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100570 protocol/text-protocol.c \
571 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800572weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800573weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800574endif
575
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800576weston_keyboard_SOURCES = clients/keyboard.c
577nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100578 protocol/desktop-shell-client-protocol.h \
579 protocol/desktop-shell-protocol.c \
580 protocol/input-method-protocol.c \
581 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800582weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800583weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800584
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800585weston_simple_im_SOURCES = clients/weston-simple-im.c
586nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100587 protocol/input-method-protocol.c \
588 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800589weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800590weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800591
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800592weston_info_SOURCES = clients/weston-info.c
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400593nodist_weston_info_SOURCES = \
594 protocol/presentation_timing-protocol.c \
595 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800596weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200597weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800598
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800599weston_desktop_shell_SOURCES = clients/desktop-shell.c
600nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100601 protocol/desktop-shell-client-protocol.h \
602 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800603weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800604weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800605
606if BUILD_FULL_GL_CLIENTS
607demo_clients += weston-gears
608weston_gears_SOURCES = clients/gears.c
609weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800610weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800611
612if HAVE_GLU
613libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100614weston_screensaver_SOURCES = \
615 clients/wscreensaver.c \
616 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100617 clients/wscreensaver-glue.c \
618 clients/wscreensaver-glue.h \
619 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800620 clients/matrix3.xpm
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800621nodist_weston_screensaver_SOURCES = \
622 protocol/desktop-shell-client-protocol.h \
623 protocol/desktop-shell-protocol.c
624
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800625weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800626weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800627
628endif
629
630endif
631
632endif
633
634BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100635 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800636 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100637 protocol/text-cursor-position-client-protocol.h \
638 protocol/text-cursor-position-protocol.c \
639 protocol/text-protocol.c \
640 protocol/text-client-protocol.h \
641 protocol/input-method-protocol.c \
642 protocol/input-method-client-protocol.h \
643 protocol/desktop-shell-client-protocol.h \
644 protocol/desktop-shell-protocol.c \
645 protocol/scaler-client-protocol.h \
646 protocol/scaler-protocol.c \
647 protocol/workspaces-client-protocol.h \
648 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500649 protocol/fullscreen-shell-protocol.c \
650 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100651 protocol/xdg-shell-protocol.c \
652 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800653
654
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800655westondatadir = $(datadir)/weston
656dist_westondata_DATA = \
657 data/wayland.svg \
658 data/wayland.png \
659 data/pattern.png \
660 data/terminal.png \
661 data/border.png \
662 data/icon_window.png \
663 data/sign_close.png \
664 data/sign_maximize.png \
665 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800666
667
668if BUILD_WCAP_TOOLS
669bin_PROGRAMS += wcap-decode
670
671wcap_decode_SOURCES = \
672 wcap/main.c \
673 wcap/wcap-decode.c \
674 wcap/wcap-decode.h
675
676wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
677wcap_decode_LDADD = $(WCAP_LIBS)
678endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800679
680
681if ENABLE_DESKTOP_SHELL
682
683module_LTLIBRARIES += desktop-shell.la
684
685desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100686 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800687 -I$(top_srcdir)/shared \
688 -I$(top_srcdir)/src \
689 -I$(top_builddir)/src \
690 -I$(top_builddir)/desktop-shell \
691 -DDATADIR='"$(datadir)"' \
692 -DMODULEDIR='"$(moduledir)"' \
693 -DLIBEXECDIR='"$(libexecdir)"' \
694 -DIN_WESTON
695
696desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800697desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800698desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
699desktop_shell_la_SOURCES = \
700 desktop-shell/shell.h \
701 desktop-shell/shell.c \
702 desktop-shell/exposay.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800703 desktop-shell/input-panel.c
704nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100705 protocol/desktop-shell-protocol.c \
706 protocol/desktop-shell-server-protocol.h \
707 protocol/xdg-shell-protocol.c \
708 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800709
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800710BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800711endif
712
Jason Ekstrand946a9482014-04-02 19:53:47 -0500713if ENABLE_FULLSCREEN_SHELL
714
715module_LTLIBRARIES += fullscreen-shell.la
716
717fullscreen_shell_la_CPPFLAGS = \
718 -I$(top_builddir)/protocol \
719 -I$(top_srcdir)/shared \
720 -I$(top_srcdir)/src \
721 -I$(top_builddir)/src \
722 -DIN_WESTON
723
724fullscreen_shell_la_LDFLAGS = -module -avoid-version
725fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
726fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
727fullscreen_shell_la_SOURCES = \
728 fullscreen-shell/fullscreen-shell.c
729nodist_fullscreen_shell_la_SOURCES = \
730 protocol/fullscreen-shell-protocol.c \
731 protocol/fullscreen-shell-server-protocol.h
732
733BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
734endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800735
Jason Ekstrand47928d82014-04-02 19:54:01 -0500736if ENABLE_SCREEN_SHARING
737
738module_LTLIBRARIES += screen-share.la
739
740screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
741screen_share_la_LDFLAGS = -module -avoid-version
742screen_share_la_LIBADD = \
743 $(COMPOSITOR_LIBS) \
744 $(SCREEN_SHARE_LIBS) \
745 libshared-cairo.la
746screen_share_la_CFLAGS = \
747 $(COMPOSITOR_CFLAGS) \
748 $(SCREEN_SHARE_CFLAGS) \
749 $(GCC_CFLAGS)
750screen_share_la_SOURCES = \
751 src/screen-share.c
752nodist_screen_share_la_SOURCES = \
753 protocol/fullscreen-shell-protocol.c \
754 protocol/fullscreen-shell-client-protocol.h
755
756endif
757
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800758if ENABLE_XWAYLAND
759
760module_LTLIBRARIES += xwayland.la
761
762xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100763 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800764 -I$(top_srcdir)/shared \
765 -I$(top_srcdir)/src \
766 -I$(top_builddir)/src \
767 -I$(top_builddir)/xwayland \
768 -DDATADIR='"$(datadir)"' \
769 -DMODULEDIR='"$(moduledir)"' \
770 -DLIBEXECDIR='"$(libexecdir)"' \
771 -DXSERVER_PATH='"@XSERVER_PATH@"'
772
773xwayland_la_LDFLAGS = -module -avoid-version
774xwayland_la_LIBADD = \
775 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800776 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800777xwayland_la_CFLAGS = \
778 $(GCC_CFLAGS) \
779 $(COMPOSITOR_CFLAGS) \
780 $(PIXMAN_CFLAGS) \
781 $(CAIRO_CFLAGS)
782xwayland_la_SOURCES = \
783 xwayland/xwayland.h \
784 xwayland/window-manager.c \
785 xwayland/selection.c \
786 xwayland/dnd.c \
787 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800788 xwayland/hash.c \
789 xwayland/hash.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800790endif
791
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800792
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800793#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800794# Shared utilities
795#
796
797noinst_LTLIBRARIES += libshared.la libshared-cairo.la
798
799libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
800
801libshared_la_SOURCES = \
802 shared/config-parser.c \
803 shared/option-parser.c \
804 shared/config-parser.h \
805 shared/os-compatibility.c \
806 shared/os-compatibility.h
807
808libshared_cairo_la_CFLAGS = \
809 -DDATADIR='"$(datadir)"' \
810 $(GCC_CFLAGS) \
811 $(COMPOSITOR_CFLAGS) \
812 $(PIXMAN_CFLAGS) \
813 $(CAIRO_CFLAGS) \
814 $(PNG_CFLAGS) \
815 $(WEBP_CFLAGS)
816
817libshared_cairo_la_LIBADD = \
818 $(PIXMAN_LIBS) \
819 $(CAIRO_LIBS) \
820 $(PNG_LIBS) \
821 $(WEBP_LIBS) \
822 $(JPEG_LIBS)
823
824libshared_cairo_la_SOURCES = \
825 $(libshared_la_SOURCES) \
826 shared/image-loader.c \
827 shared/image-loader.h \
828 shared/cairo-util.c \
829 shared/frame.c \
830 shared/cairo-util.h
831
832
833#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800834# tests subdirectory
835#
836
837TESTS = $(shared_tests) $(module_tests) $(weston_tests)
838
839shared_tests = \
840 config-parser.test \
841 vertex-clip.test
842
843module_tests = \
844 surface-test.la \
845 surface-global-test.la
846
847weston_tests = \
848 bad_buffer.weston \
849 keyboard.weston \
850 event.weston \
851 button.weston \
852 text.weston \
Pekka Paalanende7f5c82014-09-23 22:08:48 -0400853 presentation.weston \
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +0300854 roles.weston \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800855 subsurface.weston
856
857
858AM_TESTS_ENVIRONMENT = \
859 abs_builddir='$(abs_builddir)'; export abs_builddir;
860
861TEST_EXTENSIONS = .la .weston
862LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
863WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
864
865clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +0300866 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800867
868# To remove when automake 1.11 support is dropped
869export abs_builddir
870
871noinst_LTLIBRARIES += \
872 weston-test.la \
873 $(module_tests) \
874 libtest-runner.la \
875 libtest-client.la
876
877noinst_PROGRAMS += \
878 $(setbacklight) \
879 $(shared_tests) \
880 $(weston_tests) \
881 matrix-test
882
883test_module_ldflags = \
884 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
885
886surface_global_test_la_SOURCES = tests/surface-global-test.c
887surface_global_test_la_LDFLAGS = $(test_module_ldflags)
888surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
889
890surface_test_la_SOURCES = tests/surface-test.c
891surface_test_la_LDFLAGS = $(test_module_ldflags)
892surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
893
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800894weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800895weston_test_la_LDFLAGS = $(test_module_ldflags)
896weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800897weston_test_la_SOURCES = tests/weston-test.c
898nodist_weston_test_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100899 protocol/wayland-test-protocol.c \
900 protocol/wayland-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800901
902if ENABLE_EGL
903weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
904weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
905endif
906
907libtest_runner_la_SOURCES = \
908 tests/weston-test-runner.c \
909 tests/weston-test-runner.h
910libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
911
912config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800913config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800914
915vertex_clip_test_SOURCES = \
916 tests/vertex-clip-test.c \
917 src/vertex-clipping.c \
918 src/vertex-clipping.h
919vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
920
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100921libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800922 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800923 tests/weston-test-client-helper.h
924nodist_libtest_client_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100925 protocol/wayland-test-protocol.c \
926 protocol/wayland-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800927libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800928libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800929
930bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800931bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800932bad_buffer_weston_LDADD = libtest-client.la
933
934keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800935keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800936keyboard_weston_LDADD = libtest-client.la
937
938event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800939event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800940event_weston_LDADD = libtest-client.la
941
942button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800943button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800944button_weston_LDADD = libtest-client.la
945
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800946text_weston_SOURCES = tests/text-test.c
947nodist_text_weston_SOURCES = \
948 protocol/text-protocol.c \
949 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800950text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800951text_weston_LDADD = libtest-client.la
952
953subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800954subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800955subsurface_weston_LDADD = libtest-client.la
956
Pekka Paalanende7f5c82014-09-23 22:08:48 -0400957presentation_weston_SOURCES = tests/presentation-test.c
958nodist_presentation_weston_SOURCES = \
959 protocol/presentation_timing-protocol.c \
960 protocol/presentation_timing-client-protocol.h
961presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
962presentation_weston_LDADD = libtest-client.la
963
Pekka Paalanen3c5f1c72014-10-01 16:34:48 +0300964roles_weston_SOURCES = tests/roles-test.c
965roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
966roles_weston_LDADD = libtest-client.la
967
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800968if ENABLE_EGL
969weston_tests += buffer-count.weston
970buffer_count_weston_SOURCES = tests/buffer-count-test.c
971buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
972buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
973endif
974
975if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +0300976weston_tests += xwayland-test.weston
977xwayland_test_weston_SOURCES = tests/xwayland-test.c
978xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
979xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800980endif
981
982matrix_test_SOURCES = \
983 tests/matrix-test.c \
984 shared/matrix.c \
985 shared/matrix.h
986matrix_test_CPPFLAGS = -DUNIT_TEST
987matrix_test_LDADD = -lm -lrt
988
989if BUILD_SETBACKLIGHT
990noinst_PROGRAMS += setbacklight
991setbacklight_SOURCES = \
992 tests/setbacklight.c \
993 src/libbacklight.c \
994 src/libbacklight.h
995setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
996setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
997endif
998
999EXTRA_DIST += tests/weston-tests-env
1000
1001BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001002 protocol/wayland-test-protocol.c \
1003 protocol/wayland-test-server-protocol.h \
1004 protocol/wayland-test-client-protocol.h \
1005 protocol/text-protocol.c \
1006 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -08001007
Kristian Høgsbergcd312752014-02-01 00:38:15 -08001008EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001009 protocol/desktop-shell.xml \
1010 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001011 protocol/text.xml \
1012 protocol/input-method.xml \
1013 protocol/workspaces.xml \
1014 protocol/text-cursor-position.xml \
1015 protocol/wayland-test.xml \
1016 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -05001017 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -04001018 protocol/presentation_timing.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -08001019 protocol/scaler.xml
1020
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001021man_MANS = weston.1 weston.ini.5
1022
1023if ENABLE_DRM_COMPOSITOR
1024man_MANS += weston-drm.7
1025endif
1026
1027MAN_SUBSTS = \
1028 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1029 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1030 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1031 -e 's|__version__|$(PACKAGE_VERSION)|g'
1032
1033SUFFIXES = .1 .5 .7 .man
1034
1035%.1 %.5 %.7 : man/%.man
1036 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1037
1038EXTRA_DIST += \
1039 man/weston.man \
1040 man/weston-drm.man \
1041 man/weston.ini.man
1042
1043CLEANFILES += $(man_MANS)
1044
1045
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001046protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1047 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001048
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001049protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1050 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001051
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001052protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1053 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@