blob: 8a27d44b6fcc2d2c6d78e917ce3bb11a173a5184 [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
Kristian Høgsberg850f24c2012-02-09 09:20:44 -050011DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050012
Kristian Høgsberg08229422014-02-01 00:33:04 -080013EXTRA_DIST = 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
Kristian Høgsbergcd312752014-02-01 00:38:15 -080022all-local : weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080023
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080024AM_CFLAGS = $(GCC_CFLAGS)
25
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080026AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080027 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080028 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080029 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080030 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080031 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010032 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080033 -DDATADIR='"$(datadir)"' \
34 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080035 -DLIBEXECDIR='"$(libexecdir)"' \
36 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080037
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080038CLEANFILES = weston.ini $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080039
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080040bin_PROGRAMS += weston
41
42weston_LDFLAGS = -export-dynamic
43weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
44weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
45weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080046 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080047
48weston_SOURCES = \
49 src/git-version.h \
50 src/log.c \
51 src/compositor.c \
52 src/compositor.h \
53 src/input.c \
54 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080055 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080056 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080057 src/zoom.c \
58 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080059 src/bindings.c \
60 src/animation.c \
61 src/noop-renderer.c \
62 src/pixman-renderer.c \
63 src/pixman-renderer.h \
64 shared/matrix.c \
65 shared/matrix.h \
66 shared/zalloc.h \
67 src/weston-egl-ext.h
68
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080069nodist_weston_SOURCES = \
70 protocol/screenshooter-protocol.c \
71 protocol/screenshooter-server-protocol.h \
72 protocol/text-cursor-position-protocol.c \
73 protocol/text-cursor-position-server-protocol.h \
74 protocol/text-protocol.c \
75 protocol/text-server-protocol.h \
76 protocol/input-method-protocol.c \
77 protocol/input-method-server-protocol.h \
78 protocol/workspaces-protocol.c \
79 protocol/workspaces-server-protocol.h \
80 protocol/scaler-protocol.c \
81 protocol/scaler-server-protocol.h
82
83BUILT_SOURCES += $(nodist_weston_SOURCES)
84
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -080085# Track this dependency explicitly instead of using BUILT_SOURCES. We
86# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
87# in case we're building from tarballs.
88
89src/compositor.c : $(top_builddir)/src/git-version.h
90
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080091noinst_LTLIBRARIES += \
92 libsession-helper.la
93
94libsession_helper_la_SOURCES = \
95 src/weston-launch.h \
96 src/launcher-util.c \
97 src/launcher-util.h
98libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
99libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
100
101if ENABLE_DBUS
102if HAVE_SYSTEMD_LOGIN
103libsession_helper_la_SOURCES += \
104 src/dbus.h \
105 src/dbus.c \
106 src/logind-util.h \
107 src/logind-util.c
108libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
109libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
110endif
111endif
112
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800113if HAVE_GIT_REPO
114src/git-version.h : $(top_srcdir)/.git/logs/HEAD
115 $(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 -0800116else
117src/git-version.h :
118 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
119
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800120endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800121
122.FORCE :
123
124if BUILD_WESTON_LAUNCH
125bin_PROGRAMS += weston-launch
126weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
127weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
128weston_launch_CFLAGS= \
129 $(GCC_CFLAGS) \
130 $(PAM_CFLAGS) \
131 $(SYSTEMD_LOGIN_CFLAGS) \
132 $(LIBDRM_CFLAGS)
133weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
134
135if ENABLE_SETUID_INSTALL
136install-exec-hook:
137 chown root $(DESTDIR)$(bindir)/weston-launch
138 chmod u+s $(DESTDIR)$(bindir)/weston-launch
139endif
140
141endif # BUILD_WESTON_LAUNCH
142
143pkgconfigdir = $(libdir)/pkgconfig
144pkgconfig_DATA = src/weston.pc
145
146westonincludedir = $(includedir)/weston
147westoninclude_HEADERS = \
148 src/version.h \
149 src/compositor.h \
150 shared/matrix.h \
151 shared/config-parser.h \
152 shared/zalloc.h
153
154if ENABLE_EGL
155module_LTLIBRARIES += gl-renderer.la
156gl_renderer_la_LDFLAGS = -module -avoid-version
157gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
158gl_renderer_la_CFLAGS = \
159 $(COMPOSITOR_CFLAGS) \
160 $(EGL_CFLAGS) \
161 $(GCC_CFLAGS)
162gl_renderer_la_SOURCES = \
163 src/gl-renderer.h \
164 src/gl-renderer.c \
165 src/vertex-clipping.c \
166 src/vertex-clipping.h
167endif
168
169if ENABLE_X11_COMPOSITOR
170module_LTLIBRARIES += x11-backend.la
171x11_backend_la_LDFLAGS = -module -avoid-version
172x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800173 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800174x11_backend_la_CFLAGS = \
175 $(COMPOSITOR_CFLAGS) \
176 $(EGL_CFLAGS) \
177 $(PIXMAN_CFLAGS) \
178 $(CAIRO_CFLAGS) \
179 $(X11_COMPOSITOR_CFLAGS) \
180 $(GCC_CFLAGS)
181x11_backend_la_SOURCES = src/compositor-x11.c
182endif
183
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100184INPUT_BACKEND_SOURCES = src/udev-input.h
185
186if ENABLE_LIBINPUT_BACKEND
187INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
188INPUT_BACKEND_SOURCES += \
189 src/libinput-seat.c \
190 src/libinput-seat.h \
191 src/libinput-device.c \
192 src/libinput-device.h
193else
194INPUT_BACKEND_SOURCES += \
195 src/filter.c \
196 src/filter.h \
197 src/udev-seat.c \
198 src/udev-seat.h \
199 src/evdev.c \
200 src/evdev.h \
201 src/evdev-touchpad.c
202endif
203
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800204if ENABLE_DRM_COMPOSITOR
205module_LTLIBRARIES += drm-backend.la
206drm_backend_la_LDFLAGS = -module -avoid-version
207drm_backend_la_LIBADD = \
208 $(COMPOSITOR_LIBS) \
209 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100210 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100211 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800212 libsession-helper.la
213drm_backend_la_CFLAGS = \
214 $(COMPOSITOR_CFLAGS) \
215 $(EGL_CFLAGS) \
216 $(DRM_COMPOSITOR_CFLAGS) \
217 $(GCC_CFLAGS)
218drm_backend_la_SOURCES = \
219 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100220 $(INPUT_BACKEND_SOURCES) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800221 src/libbacklight.c \
222 src/libbacklight.h
223
224if ENABLE_VAAPI_RECORDER
225drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
226drm_backend_la_LIBADD += $(LIBVA_LIBS)
227drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
228endif
229endif
230
231if ENABLE_WAYLAND_COMPOSITOR
232module_LTLIBRARIES += wayland-backend.la
233wayland_backend_la_LDFLAGS = -module -avoid-version
234wayland_backend_la_LIBADD = \
235 $(COMPOSITOR_LIBS) \
236 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800237 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800238wayland_backend_la_CFLAGS = \
239 $(COMPOSITOR_CFLAGS) \
240 $(EGL_CFLAGS) \
241 $(PIXMAN_CFLAGS) \
242 $(CAIRO_CFLAGS) \
243 $(WAYLAND_COMPOSITOR_CFLAGS) \
244 $(GCC_CFLAGS)
245wayland_backend_la_SOURCES = src/compositor-wayland.c
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500246nodist_wayland_backend_la_SOURCES = \
247 protocol/fullscreen-shell-protocol.c \
248 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800249endif
250
251if ENABLE_RPI_COMPOSITOR
252if INSTALL_RPI_COMPOSITOR
253module_LTLIBRARIES += rpi-backend.la
254else
255noinst_LTLIBRARIES += rpi-backend.la
256endif
257
258rpi_backend_la_LDFLAGS = -module -avoid-version
259rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
260 $(RPI_COMPOSITOR_LIBS) \
261 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100262 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800263 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800264 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800265rpi_backend_la_CFLAGS = \
266 $(GCC_CFLAGS) \
267 $(COMPOSITOR_CFLAGS) \
268 $(RPI_COMPOSITOR_CFLAGS) \
269 $(RPI_BCM_HOST_CFLAGS)
270rpi_backend_la_SOURCES = \
271 src/compositor-rpi.c \
272 src/rpi-renderer.c \
273 src/rpi-renderer.h \
274 src/rpi-bcm-stubs.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100275 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800276
277if ENABLE_EGL
278rpi_backend_la_LIBADD += $(EGL_LIBS)
279rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
280endif
281
282endif
283
284if ENABLE_HEADLESS_COMPOSITOR
285module_LTLIBRARIES += headless-backend.la
286headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800287headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
288headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800289headless_backend_la_SOURCES = src/compositor-headless.c
290endif
291
292if ENABLE_FBDEV_COMPOSITOR
293module_LTLIBRARIES += fbdev-backend.la
294fbdev_backend_la_LDFLAGS = -module -avoid-version
295fbdev_backend_la_LIBADD = \
296 $(COMPOSITOR_LIBS) \
297 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100298 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800299 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800300 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800301fbdev_backend_la_CFLAGS = \
302 $(COMPOSITOR_CFLAGS) \
303 $(EGL_CFLAGS) \
304 $(FBDEV_COMPOSITOR_CFLAGS) \
305 $(PIXMAN_CFLAGS) \
306 $(GCC_CFLAGS)
307fbdev_backend_la_SOURCES = \
308 src/compositor-fbdev.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100309 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800310endif
311
312if ENABLE_RDP_COMPOSITOR
313module_LTLIBRARIES += rdp-backend.la
314rdp_backend_la_LDFLAGS = -module -avoid-version
315rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
316 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800317 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800318rdp_backend_la_CFLAGS = \
319 $(COMPOSITOR_CFLAGS) \
320 $(RDP_COMPOSITOR_CFLAGS) \
321 $(GCC_CFLAGS)
322rdp_backend_la_SOURCES = src/compositor-rdp.c
323endif
324
325if HAVE_LCMS
326module_LTLIBRARIES += cms-static.la
327cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800328cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800329cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
330cms_static_la_SOURCES = \
331 src/cms-static.c \
332 src/cms-helper.c \
333 src/cms-helper.h
334if ENABLE_COLORD
335module_LTLIBRARIES += cms-colord.la
336cms_colord_la_LDFLAGS = -module -avoid-version
337cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
338cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
339cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100340 src/cms-colord.c \
341 src/cms-helper.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800342 src/cms-helper.h
343endif
344endif
345
346noinst_PROGRAMS += spring-tool
347spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
348spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
349spring_tool_SOURCES = \
350 src/spring-tool.c \
351 src/animation.c \
352 shared/matrix.c \
353 shared/matrix.h \
354 src/compositor.h
355
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800356if BUILD_CLIENTS
357
358bin_PROGRAMS += weston-terminal weston-info
359
360libexec_PROGRAMS += \
361 weston-desktop-shell \
362 weston-screenshooter \
363 weston-keyboard \
364 weston-simple-im
365
366demo_clients = \
367 weston-flower \
368 weston-image \
369 weston-cliptest \
370 weston-dnd \
371 weston-smoke \
372 weston-resizor \
373 weston-eventdemo \
374 weston-clickdot \
375 weston-transformed \
376 weston-fullscreen \
377 weston-stacking \
378 weston-calibrator \
379 weston-scaler
380
381if INSTALL_DEMO_CLIENTS
382bin_PROGRAMS += $(demo_clients)
383else
384noinst_PROGRAMS += $(demo_clients)
385endif
386
387
388if BUILD_SIMPLE_CLIENTS
389demo_clients += \
390 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500391 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800392 weston-simple-touch \
393 weston-multi-resource
394
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800395weston_simple_shm_SOURCES = clients/simple-shm.c
396nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800397 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500398 protocol/xdg-shell-client-protocol.h \
399 protocol/fullscreen-shell-protocol.c \
400 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800401weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800402weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800403
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500404weston_simple_damage_SOURCES = clients/simple-damage.c
405nodist_weston_simple_damage_SOURCES = \
406 protocol/scaler-protocol.c \
407 protocol/scaler-client-protocol.h \
408 protocol/xdg-shell-protocol.c \
409 protocol/xdg-shell-client-protocol.h \
410 protocol/fullscreen-shell-protocol.c \
411 protocol/fullscreen-shell-client-protocol.h
412weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
413weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
414
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800415weston_simple_touch_SOURCES = clients/simple-touch.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800416weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800417weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800418
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800419weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800420weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800421weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800422endif
423
424if BUILD_SIMPLE_EGL_CLIENTS
425demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800426weston_simple_egl_SOURCES = clients/simple-egl.c
427nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800428 protocol/xdg-shell-protocol.c \
429 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800430weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800431weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
432endif
433
434noinst_LTLIBRARIES += libtoytoolkit.la
435
436libtoytoolkit_la_SOURCES = \
437 clients/window.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800438 clients/window.h
439
440nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100441 protocol/text-cursor-position-protocol.c \
442 protocol/text-cursor-position-client-protocol.h \
443 protocol/scaler-protocol.c \
444 protocol/scaler-client-protocol.h \
445 protocol/workspaces-protocol.c \
446 protocol/workspaces-client-protocol.h \
447 protocol/xdg-shell-protocol.c \
448 protocol/xdg-shell-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500449
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800450BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
451
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800452
453libtoytoolkit_la_LIBADD = \
454 $(CLIENT_LIBS) \
455 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800456 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800457libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800458
459weston_flower_SOURCES = clients/flower.c
460weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800461weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800462
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100463weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800464 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800465nodist_weston_screenshooter_SOURCES = \
466 protocol/screenshooter-protocol.c \
467 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800468weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800469weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800470
471weston_terminal_SOURCES = clients/terminal.c
472weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800473weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800474
475weston_image_SOURCES = clients/image.c
476weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800477weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800478
Ondřej Majerech06e08922014-08-19 15:59:44 +0200479weston_cliptest_SOURCES = clients/cliptest.c src/vertex-clipping.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800480weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800481weston_cliptest_LDADD = libtoytoolkit.la
482
483weston_dnd_SOURCES = clients/dnd.c
484weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800485weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800486
487weston_smoke_SOURCES = clients/smoke.c
488weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800489weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800490
491weston_resizor_SOURCES = clients/resizor.c
492weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800493weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800494
495weston_scaler_SOURCES = clients/scaler.c
496weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800497weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800498
499if HAVE_CAIRO_GLESV2
500demo_clients += weston-nested weston-nested-client
501
502weston_nested_SOURCES = clients/nested.c
503weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800504weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800505
506weston_nested_client_SOURCES = clients/nested-client.c
507weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800508weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800509endif
510
511weston_eventdemo_SOURCES = clients/eventdemo.c
512weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800513weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800514
515weston_clickdot_SOURCES = clients/clickdot.c
516weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800517weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800518
519weston_transformed_SOURCES = clients/transformed.c
520weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800521weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800522
523weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500524nodist_weston_fullscreen_SOURCES = \
525 protocol/fullscreen-shell-protocol.c \
526 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800527weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800528weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800529
530weston_stacking_SOURCES = clients/stacking.c
531weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800532weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800533
534weston_calibrator_SOURCES = clients/calibrator.c \
535 shared/matrix.c \
536 shared/matrix.h
537weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800538weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800539
540if BUILD_SUBSURFACES_CLIENT
541demo_clients += weston-subsurfaces
542weston_subsurfaces_SOURCES = clients/subsurfaces.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800543weston_subsurfaces_CFLAGS = \
544 $(AM_CFLAGS) \
545 $(SIMPLE_EGL_CLIENT_CFLAGS) \
546 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800547weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
548endif
549
550if HAVE_PANGO
551demo_clients += weston-editor
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800552weston_editor_SOURCES = clients/editor.c
553nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100554 protocol/text-protocol.c \
555 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800556weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800557weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800558endif
559
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800560weston_keyboard_SOURCES = clients/keyboard.c
561nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100562 protocol/desktop-shell-client-protocol.h \
563 protocol/desktop-shell-protocol.c \
564 protocol/input-method-protocol.c \
565 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800566weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800567weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800568
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800569weston_simple_im_SOURCES = clients/weston-simple-im.c
570nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100571 protocol/input-method-protocol.c \
572 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800573weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800574weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800575
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800576weston_info_SOURCES = clients/weston-info.c
577weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200578weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800579
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800580weston_desktop_shell_SOURCES = clients/desktop-shell.c
581nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100582 protocol/desktop-shell-client-protocol.h \
583 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800584weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800585weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800586
587if BUILD_FULL_GL_CLIENTS
588demo_clients += weston-gears
589weston_gears_SOURCES = clients/gears.c
590weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800591weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800592
593if HAVE_GLU
594libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100595weston_screensaver_SOURCES = \
596 clients/wscreensaver.c \
597 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100598 clients/wscreensaver-glue.c \
599 clients/wscreensaver-glue.h \
600 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800601 clients/matrix3.xpm
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800602nodist_weston_screensaver_SOURCES = \
603 protocol/desktop-shell-client-protocol.h \
604 protocol/desktop-shell-protocol.c
605
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800606weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800607weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800608
609endif
610
611endif
612
613endif
614
615BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100616 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800617 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100618 protocol/text-cursor-position-client-protocol.h \
619 protocol/text-cursor-position-protocol.c \
620 protocol/text-protocol.c \
621 protocol/text-client-protocol.h \
622 protocol/input-method-protocol.c \
623 protocol/input-method-client-protocol.h \
624 protocol/desktop-shell-client-protocol.h \
625 protocol/desktop-shell-protocol.c \
626 protocol/scaler-client-protocol.h \
627 protocol/scaler-protocol.c \
628 protocol/workspaces-client-protocol.h \
629 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500630 protocol/fullscreen-shell-protocol.c \
631 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100632 protocol/xdg-shell-protocol.c \
633 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800634
635
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800636westondatadir = $(datadir)/weston
637dist_westondata_DATA = \
638 data/wayland.svg \
639 data/wayland.png \
640 data/pattern.png \
641 data/terminal.png \
642 data/border.png \
643 data/icon_window.png \
644 data/sign_close.png \
645 data/sign_maximize.png \
646 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800647
648
649if BUILD_WCAP_TOOLS
650bin_PROGRAMS += wcap-decode
651
652wcap_decode_SOURCES = \
653 wcap/main.c \
654 wcap/wcap-decode.c \
655 wcap/wcap-decode.h
656
657wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
658wcap_decode_LDADD = $(WCAP_LIBS)
659endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800660
661
662if ENABLE_DESKTOP_SHELL
663
664module_LTLIBRARIES += desktop-shell.la
665
666desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100667 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800668 -I$(top_srcdir)/shared \
669 -I$(top_srcdir)/src \
670 -I$(top_builddir)/src \
671 -I$(top_builddir)/desktop-shell \
672 -DDATADIR='"$(datadir)"' \
673 -DMODULEDIR='"$(moduledir)"' \
674 -DLIBEXECDIR='"$(libexecdir)"' \
675 -DIN_WESTON
676
677desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800678desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800679desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
680desktop_shell_la_SOURCES = \
681 desktop-shell/shell.h \
682 desktop-shell/shell.c \
683 desktop-shell/exposay.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800684 desktop-shell/input-panel.c
685nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100686 protocol/desktop-shell-protocol.c \
687 protocol/desktop-shell-server-protocol.h \
688 protocol/xdg-shell-protocol.c \
689 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800690
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800691BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800692endif
693
Jason Ekstrand946a9482014-04-02 19:53:47 -0500694if ENABLE_FULLSCREEN_SHELL
695
696module_LTLIBRARIES += fullscreen-shell.la
697
698fullscreen_shell_la_CPPFLAGS = \
699 -I$(top_builddir)/protocol \
700 -I$(top_srcdir)/shared \
701 -I$(top_srcdir)/src \
702 -I$(top_builddir)/src \
703 -DIN_WESTON
704
705fullscreen_shell_la_LDFLAGS = -module -avoid-version
706fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
707fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
708fullscreen_shell_la_SOURCES = \
709 fullscreen-shell/fullscreen-shell.c
710nodist_fullscreen_shell_la_SOURCES = \
711 protocol/fullscreen-shell-protocol.c \
712 protocol/fullscreen-shell-server-protocol.h
713
714BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
715endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800716
Jason Ekstrand47928d82014-04-02 19:54:01 -0500717if ENABLE_SCREEN_SHARING
718
719module_LTLIBRARIES += screen-share.la
720
721screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
722screen_share_la_LDFLAGS = -module -avoid-version
723screen_share_la_LIBADD = \
724 $(COMPOSITOR_LIBS) \
725 $(SCREEN_SHARE_LIBS) \
726 libshared-cairo.la
727screen_share_la_CFLAGS = \
728 $(COMPOSITOR_CFLAGS) \
729 $(SCREEN_SHARE_CFLAGS) \
730 $(GCC_CFLAGS)
731screen_share_la_SOURCES = \
732 src/screen-share.c
733nodist_screen_share_la_SOURCES = \
734 protocol/fullscreen-shell-protocol.c \
735 protocol/fullscreen-shell-client-protocol.h
736
737endif
738
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800739if ENABLE_XWAYLAND
740
741module_LTLIBRARIES += xwayland.la
742
743xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100744 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800745 -I$(top_srcdir)/shared \
746 -I$(top_srcdir)/src \
747 -I$(top_builddir)/src \
748 -I$(top_builddir)/xwayland \
749 -DDATADIR='"$(datadir)"' \
750 -DMODULEDIR='"$(moduledir)"' \
751 -DLIBEXECDIR='"$(libexecdir)"' \
752 -DXSERVER_PATH='"@XSERVER_PATH@"'
753
754xwayland_la_LDFLAGS = -module -avoid-version
755xwayland_la_LIBADD = \
756 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800757 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800758xwayland_la_CFLAGS = \
759 $(GCC_CFLAGS) \
760 $(COMPOSITOR_CFLAGS) \
761 $(PIXMAN_CFLAGS) \
762 $(CAIRO_CFLAGS)
763xwayland_la_SOURCES = \
764 xwayland/xwayland.h \
765 xwayland/window-manager.c \
766 xwayland/selection.c \
767 xwayland/dnd.c \
768 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800769 xwayland/hash.c \
770 xwayland/hash.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800771endif
772
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800773
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800774#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800775# Shared utilities
776#
777
778noinst_LTLIBRARIES += libshared.la libshared-cairo.la
779
780libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
781
782libshared_la_SOURCES = \
783 shared/config-parser.c \
784 shared/option-parser.c \
785 shared/config-parser.h \
786 shared/os-compatibility.c \
787 shared/os-compatibility.h
788
789libshared_cairo_la_CFLAGS = \
790 -DDATADIR='"$(datadir)"' \
791 $(GCC_CFLAGS) \
792 $(COMPOSITOR_CFLAGS) \
793 $(PIXMAN_CFLAGS) \
794 $(CAIRO_CFLAGS) \
795 $(PNG_CFLAGS) \
796 $(WEBP_CFLAGS)
797
798libshared_cairo_la_LIBADD = \
799 $(PIXMAN_LIBS) \
800 $(CAIRO_LIBS) \
801 $(PNG_LIBS) \
802 $(WEBP_LIBS) \
803 $(JPEG_LIBS)
804
805libshared_cairo_la_SOURCES = \
806 $(libshared_la_SOURCES) \
807 shared/image-loader.c \
808 shared/image-loader.h \
809 shared/cairo-util.c \
810 shared/frame.c \
811 shared/cairo-util.h
812
813
814#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800815# tests subdirectory
816#
817
818TESTS = $(shared_tests) $(module_tests) $(weston_tests)
819
820shared_tests = \
821 config-parser.test \
822 vertex-clip.test
823
824module_tests = \
825 surface-test.la \
826 surface-global-test.la
827
828weston_tests = \
829 bad_buffer.weston \
830 keyboard.weston \
831 event.weston \
832 button.weston \
833 text.weston \
834 subsurface.weston
835
836
837AM_TESTS_ENVIRONMENT = \
838 abs_builddir='$(abs_builddir)'; export abs_builddir;
839
840TEST_EXTENSIONS = .la .weston
841LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
842WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
843
844clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +0300845 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800846
847# To remove when automake 1.11 support is dropped
848export abs_builddir
849
850noinst_LTLIBRARIES += \
851 weston-test.la \
852 $(module_tests) \
853 libtest-runner.la \
854 libtest-client.la
855
856noinst_PROGRAMS += \
857 $(setbacklight) \
858 $(shared_tests) \
859 $(weston_tests) \
860 matrix-test
861
862test_module_ldflags = \
863 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
864
865surface_global_test_la_SOURCES = tests/surface-global-test.c
866surface_global_test_la_LDFLAGS = $(test_module_ldflags)
867surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
868
869surface_test_la_SOURCES = tests/surface-test.c
870surface_test_la_LDFLAGS = $(test_module_ldflags)
871surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
872
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800873weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800874weston_test_la_LDFLAGS = $(test_module_ldflags)
875weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800876weston_test_la_SOURCES = tests/weston-test.c
877nodist_weston_test_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100878 protocol/wayland-test-protocol.c \
879 protocol/wayland-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800880
881if ENABLE_EGL
882weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
883weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
884endif
885
886libtest_runner_la_SOURCES = \
887 tests/weston-test-runner.c \
888 tests/weston-test-runner.h
889libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
890
891config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800892config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800893
894vertex_clip_test_SOURCES = \
895 tests/vertex-clip-test.c \
896 src/vertex-clipping.c \
897 src/vertex-clipping.h
898vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
899
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100900libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800901 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800902 tests/weston-test-client-helper.h
903nodist_libtest_client_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100904 protocol/wayland-test-protocol.c \
905 protocol/wayland-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800906libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800907libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800908
909bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800910bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800911bad_buffer_weston_LDADD = libtest-client.la
912
913keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800914keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800915keyboard_weston_LDADD = libtest-client.la
916
917event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800918event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800919event_weston_LDADD = libtest-client.la
920
921button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800922button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800923button_weston_LDADD = libtest-client.la
924
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800925text_weston_SOURCES = tests/text-test.c
926nodist_text_weston_SOURCES = \
927 protocol/text-protocol.c \
928 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800929text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800930text_weston_LDADD = libtest-client.la
931
932subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800933subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800934subsurface_weston_LDADD = libtest-client.la
935
936if ENABLE_EGL
937weston_tests += buffer-count.weston
938buffer_count_weston_SOURCES = tests/buffer-count-test.c
939buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
940buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
941endif
942
943if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +0300944weston_tests += xwayland-test.weston
945xwayland_test_weston_SOURCES = tests/xwayland-test.c
946xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
947xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800948endif
949
950matrix_test_SOURCES = \
951 tests/matrix-test.c \
952 shared/matrix.c \
953 shared/matrix.h
954matrix_test_CPPFLAGS = -DUNIT_TEST
955matrix_test_LDADD = -lm -lrt
956
957if BUILD_SETBACKLIGHT
958noinst_PROGRAMS += setbacklight
959setbacklight_SOURCES = \
960 tests/setbacklight.c \
961 src/libbacklight.c \
962 src/libbacklight.h
963setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
964setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
965endif
966
967EXTRA_DIST += tests/weston-tests-env
968
969BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100970 protocol/wayland-test-protocol.c \
971 protocol/wayland-test-server-protocol.h \
972 protocol/wayland-test-client-protocol.h \
973 protocol/text-protocol.c \
974 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800975
Kristian Høgsbergcd312752014-02-01 00:38:15 -0800976EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800977 protocol/desktop-shell.xml \
978 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800979 protocol/text.xml \
980 protocol/input-method.xml \
981 protocol/workspaces.xml \
982 protocol/text-cursor-position.xml \
983 protocol/wayland-test.xml \
984 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -0500985 protocol/fullscreen-shell.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800986 protocol/scaler.xml
987
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800988man_MANS = weston.1 weston.ini.5
989
990if ENABLE_DRM_COMPOSITOR
991man_MANS += weston-drm.7
992endif
993
994MAN_SUBSTS = \
995 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
996 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
997 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
998 -e 's|__version__|$(PACKAGE_VERSION)|g'
999
1000SUFFIXES = .1 .5 .7 .man
1001
1002%.1 %.5 %.7 : man/%.man
1003 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1004
1005EXTRA_DIST += \
1006 man/weston.man \
1007 man/weston-drm.man \
1008 man/weston.ini.man
1009
1010CLEANFILES += $(man_MANS)
1011
1012
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001013protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1014 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001015
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001016protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1017 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001018
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001019protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1020 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@