blob: 5b6b523aa05bdf3054363053d5b3fd3025e0c522 [file] [log] [blame]
Kristian Høgsberge895f142014-01-27 21:46:30 -08001bin_PROGRAMS =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08002noinst_PROGRAMS =
Kristian Høgsberge73eccd2014-01-31 16:15:11 -08003libexec_PROGRAMS =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08004moduledir = $(libdir)/weston
5module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08006noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08007BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -08008
Kristian Høgsberg850f24c2012-02-09 09:20:44 -05009DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050010
Kristian Høgsberg08229422014-02-01 00:33:04 -080011EXTRA_DIST = weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000012
13weston.ini : $(srcdir)/weston.ini.in
14 $(AM_V_GEN)$(SED) \
15 -e 's|@bindir[@]|$(bindir)|g' \
16 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
17 -e 's|@libexecdir[@]|$(libexecdir)|g' \
18 $< > $@
19
Kristian Høgsbergcd312752014-02-01 00:38:15 -080020all-local : weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080021
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080022AM_CFLAGS = $(GCC_CFLAGS)
23
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080024AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080025 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080026 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080027 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080028 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080029 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010030 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080031 -DDATADIR='"$(datadir)"' \
32 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080033 -DLIBEXECDIR='"$(libexecdir)"' \
34 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080035
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080036CLEANFILES = weston.ini $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080037
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080038bin_PROGRAMS += weston
39
40weston_LDFLAGS = -export-dynamic
41weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
42weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
43weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080044 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080045
46weston_SOURCES = \
47 src/git-version.h \
48 src/log.c \
49 src/compositor.c \
50 src/compositor.h \
51 src/input.c \
52 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080053 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080054 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080055 src/zoom.c \
56 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080057 src/bindings.c \
58 src/animation.c \
59 src/noop-renderer.c \
60 src/pixman-renderer.c \
61 src/pixman-renderer.h \
62 shared/matrix.c \
63 shared/matrix.h \
64 shared/zalloc.h \
65 src/weston-egl-ext.h
66
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080067nodist_weston_SOURCES = \
68 protocol/screenshooter-protocol.c \
69 protocol/screenshooter-server-protocol.h \
70 protocol/text-cursor-position-protocol.c \
71 protocol/text-cursor-position-server-protocol.h \
72 protocol/text-protocol.c \
73 protocol/text-server-protocol.h \
74 protocol/input-method-protocol.c \
75 protocol/input-method-server-protocol.h \
76 protocol/workspaces-protocol.c \
77 protocol/workspaces-server-protocol.h \
78 protocol/scaler-protocol.c \
79 protocol/scaler-server-protocol.h
80
81BUILT_SOURCES += $(nodist_weston_SOURCES)
82
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -080083# Track this dependency explicitly instead of using BUILT_SOURCES. We
84# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
85# in case we're building from tarballs.
86
87src/compositor.c : $(top_builddir)/src/git-version.h
88
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080089noinst_LTLIBRARIES += \
90 libsession-helper.la
91
92libsession_helper_la_SOURCES = \
93 src/weston-launch.h \
94 src/launcher-util.c \
95 src/launcher-util.h
96libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
97libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
98
99if ENABLE_DBUS
100if HAVE_SYSTEMD_LOGIN
101libsession_helper_la_SOURCES += \
102 src/dbus.h \
103 src/dbus.c \
104 src/logind-util.h \
105 src/logind-util.c
106libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
107libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
108endif
109endif
110
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800111if HAVE_GIT_REPO
112src/git-version.h : $(top_srcdir)/.git/logs/HEAD
113 $(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 -0800114else
115src/git-version.h :
116 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
117
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800118endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800119
120.FORCE :
121
122if BUILD_WESTON_LAUNCH
123bin_PROGRAMS += weston-launch
124weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
125weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
126weston_launch_CFLAGS= \
127 $(GCC_CFLAGS) \
128 $(PAM_CFLAGS) \
129 $(SYSTEMD_LOGIN_CFLAGS) \
130 $(LIBDRM_CFLAGS)
131weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
132
133if ENABLE_SETUID_INSTALL
134install-exec-hook:
135 chown root $(DESTDIR)$(bindir)/weston-launch
136 chmod u+s $(DESTDIR)$(bindir)/weston-launch
137endif
138
139endif # BUILD_WESTON_LAUNCH
140
141pkgconfigdir = $(libdir)/pkgconfig
142pkgconfig_DATA = src/weston.pc
143
144westonincludedir = $(includedir)/weston
145westoninclude_HEADERS = \
146 src/version.h \
147 src/compositor.h \
148 shared/matrix.h \
149 shared/config-parser.h \
150 shared/zalloc.h
151
152if ENABLE_EGL
153module_LTLIBRARIES += gl-renderer.la
154gl_renderer_la_LDFLAGS = -module -avoid-version
155gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
156gl_renderer_la_CFLAGS = \
157 $(COMPOSITOR_CFLAGS) \
158 $(EGL_CFLAGS) \
159 $(GCC_CFLAGS)
160gl_renderer_la_SOURCES = \
161 src/gl-renderer.h \
162 src/gl-renderer.c \
163 src/vertex-clipping.c \
164 src/vertex-clipping.h
165endif
166
167if ENABLE_X11_COMPOSITOR
168module_LTLIBRARIES += x11-backend.la
169x11_backend_la_LDFLAGS = -module -avoid-version
170x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800171 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800172x11_backend_la_CFLAGS = \
173 $(COMPOSITOR_CFLAGS) \
174 $(EGL_CFLAGS) \
175 $(PIXMAN_CFLAGS) \
176 $(CAIRO_CFLAGS) \
177 $(X11_COMPOSITOR_CFLAGS) \
178 $(GCC_CFLAGS)
179x11_backend_la_SOURCES = src/compositor-x11.c
180endif
181
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100182INPUT_BACKEND_SOURCES = src/udev-input.h
183
184if ENABLE_LIBINPUT_BACKEND
185INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
186INPUT_BACKEND_SOURCES += \
187 src/libinput-seat.c \
188 src/libinput-seat.h \
189 src/libinput-device.c \
190 src/libinput-device.h
191else
192INPUT_BACKEND_SOURCES += \
193 src/filter.c \
194 src/filter.h \
195 src/udev-seat.c \
196 src/udev-seat.h \
197 src/evdev.c \
198 src/evdev.h \
199 src/evdev-touchpad.c
200endif
201
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800202if ENABLE_DRM_COMPOSITOR
203module_LTLIBRARIES += drm-backend.la
204drm_backend_la_LDFLAGS = -module -avoid-version
205drm_backend_la_LIBADD = \
206 $(COMPOSITOR_LIBS) \
207 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100208 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100209 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800210 libsession-helper.la
211drm_backend_la_CFLAGS = \
212 $(COMPOSITOR_CFLAGS) \
213 $(EGL_CFLAGS) \
214 $(DRM_COMPOSITOR_CFLAGS) \
215 $(GCC_CFLAGS)
216drm_backend_la_SOURCES = \
217 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100218 $(INPUT_BACKEND_SOURCES) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800219 src/libbacklight.c \
220 src/libbacklight.h
221
222if ENABLE_VAAPI_RECORDER
223drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
224drm_backend_la_LIBADD += $(LIBVA_LIBS)
225drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
226endif
227endif
228
229if ENABLE_WAYLAND_COMPOSITOR
230module_LTLIBRARIES += wayland-backend.la
231wayland_backend_la_LDFLAGS = -module -avoid-version
232wayland_backend_la_LIBADD = \
233 $(COMPOSITOR_LIBS) \
234 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800235 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800236wayland_backend_la_CFLAGS = \
237 $(COMPOSITOR_CFLAGS) \
238 $(EGL_CFLAGS) \
239 $(PIXMAN_CFLAGS) \
240 $(CAIRO_CFLAGS) \
241 $(WAYLAND_COMPOSITOR_CFLAGS) \
242 $(GCC_CFLAGS)
243wayland_backend_la_SOURCES = src/compositor-wayland.c
244endif
245
246if ENABLE_RPI_COMPOSITOR
247if INSTALL_RPI_COMPOSITOR
248module_LTLIBRARIES += rpi-backend.la
249else
250noinst_LTLIBRARIES += rpi-backend.la
251endif
252
253rpi_backend_la_LDFLAGS = -module -avoid-version
254rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
255 $(RPI_COMPOSITOR_LIBS) \
256 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100257 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800258 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800259 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800260rpi_backend_la_CFLAGS = \
261 $(GCC_CFLAGS) \
262 $(COMPOSITOR_CFLAGS) \
263 $(RPI_COMPOSITOR_CFLAGS) \
264 $(RPI_BCM_HOST_CFLAGS)
265rpi_backend_la_SOURCES = \
266 src/compositor-rpi.c \
267 src/rpi-renderer.c \
268 src/rpi-renderer.h \
269 src/rpi-bcm-stubs.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100270 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800271
272if ENABLE_EGL
273rpi_backend_la_LIBADD += $(EGL_LIBS)
274rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
275endif
276
277endif
278
279if ENABLE_HEADLESS_COMPOSITOR
280module_LTLIBRARIES += headless-backend.la
281headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800282headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
283headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800284headless_backend_la_SOURCES = src/compositor-headless.c
285endif
286
287if ENABLE_FBDEV_COMPOSITOR
288module_LTLIBRARIES += fbdev-backend.la
289fbdev_backend_la_LDFLAGS = -module -avoid-version
290fbdev_backend_la_LIBADD = \
291 $(COMPOSITOR_LIBS) \
292 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100293 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800294 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800295 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800296fbdev_backend_la_CFLAGS = \
297 $(COMPOSITOR_CFLAGS) \
298 $(EGL_CFLAGS) \
299 $(FBDEV_COMPOSITOR_CFLAGS) \
300 $(PIXMAN_CFLAGS) \
301 $(GCC_CFLAGS)
302fbdev_backend_la_SOURCES = \
303 src/compositor-fbdev.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100304 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800305endif
306
307if ENABLE_RDP_COMPOSITOR
308module_LTLIBRARIES += rdp-backend.la
309rdp_backend_la_LDFLAGS = -module -avoid-version
310rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
311 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800312 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800313rdp_backend_la_CFLAGS = \
314 $(COMPOSITOR_CFLAGS) \
315 $(RDP_COMPOSITOR_CFLAGS) \
316 $(GCC_CFLAGS)
317rdp_backend_la_SOURCES = src/compositor-rdp.c
318endif
319
320if HAVE_LCMS
321module_LTLIBRARIES += cms-static.la
322cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800323cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800324cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
325cms_static_la_SOURCES = \
326 src/cms-static.c \
327 src/cms-helper.c \
328 src/cms-helper.h
329if ENABLE_COLORD
330module_LTLIBRARIES += cms-colord.la
331cms_colord_la_LDFLAGS = -module -avoid-version
332cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
333cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
334cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100335 src/cms-colord.c \
336 src/cms-helper.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800337 src/cms-helper.h
338endif
339endif
340
341noinst_PROGRAMS += spring-tool
342spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
343spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
344spring_tool_SOURCES = \
345 src/spring-tool.c \
346 src/animation.c \
347 shared/matrix.c \
348 shared/matrix.h \
349 src/compositor.h
350
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800351if BUILD_CLIENTS
352
353bin_PROGRAMS += weston-terminal weston-info
354
355libexec_PROGRAMS += \
356 weston-desktop-shell \
357 weston-screenshooter \
358 weston-keyboard \
359 weston-simple-im
360
361demo_clients = \
362 weston-flower \
363 weston-image \
364 weston-cliptest \
365 weston-dnd \
366 weston-smoke \
367 weston-resizor \
368 weston-eventdemo \
369 weston-clickdot \
370 weston-transformed \
371 weston-fullscreen \
372 weston-stacking \
373 weston-calibrator \
374 weston-scaler
375
376if INSTALL_DEMO_CLIENTS
377bin_PROGRAMS += $(demo_clients)
378else
379noinst_PROGRAMS += $(demo_clients)
380endif
381
382
383if BUILD_SIMPLE_CLIENTS
384demo_clients += \
385 weston-simple-shm \
386 weston-simple-touch \
387 weston-multi-resource
388
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800389weston_simple_shm_SOURCES = clients/simple-shm.c
390nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800391 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500392 protocol/xdg-shell-client-protocol.h \
393 protocol/fullscreen-shell-protocol.c \
394 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800395weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800396weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800397
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800398weston_simple_touch_SOURCES = clients/simple-touch.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800399weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800400weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800401
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800402weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800403weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800404weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800405endif
406
407if BUILD_SIMPLE_EGL_CLIENTS
408demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800409weston_simple_egl_SOURCES = clients/simple-egl.c
410nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800411 protocol/xdg-shell-protocol.c \
412 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800413weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800414weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
415endif
416
417noinst_LTLIBRARIES += libtoytoolkit.la
418
419libtoytoolkit_la_SOURCES = \
420 clients/window.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800421 clients/window.h
422
423nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100424 protocol/text-cursor-position-protocol.c \
425 protocol/text-cursor-position-client-protocol.h \
426 protocol/scaler-protocol.c \
427 protocol/scaler-client-protocol.h \
428 protocol/workspaces-protocol.c \
429 protocol/workspaces-client-protocol.h \
430 protocol/xdg-shell-protocol.c \
431 protocol/xdg-shell-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500432
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800433BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
434
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800435
436libtoytoolkit_la_LIBADD = \
437 $(CLIENT_LIBS) \
438 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800439 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800440libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800441
442weston_flower_SOURCES = clients/flower.c
443weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800444weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800445
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100446weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800447 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800448nodist_weston_screenshooter_SOURCES = \
449 protocol/screenshooter-protocol.c \
450 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800451weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800452weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800453
454weston_terminal_SOURCES = clients/terminal.c
455weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800456weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800457
458weston_image_SOURCES = clients/image.c
459weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800460weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800461
462weston_cliptest_SOURCES = clients/cliptest.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800463weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800464weston_cliptest_LDADD = libtoytoolkit.la
465
466weston_dnd_SOURCES = clients/dnd.c
467weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800468weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800469
470weston_smoke_SOURCES = clients/smoke.c
471weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800472weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800473
474weston_resizor_SOURCES = clients/resizor.c
475weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800476weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800477
478weston_scaler_SOURCES = clients/scaler.c
479weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800480weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800481
482if HAVE_CAIRO_GLESV2
483demo_clients += weston-nested weston-nested-client
484
485weston_nested_SOURCES = clients/nested.c
486weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800487weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800488
489weston_nested_client_SOURCES = clients/nested-client.c
490weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800491weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800492endif
493
494weston_eventdemo_SOURCES = clients/eventdemo.c
495weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800496weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800497
498weston_clickdot_SOURCES = clients/clickdot.c
499weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800500weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800501
502weston_transformed_SOURCES = clients/transformed.c
503weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800504weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800505
506weston_fullscreen_SOURCES = clients/fullscreen.c
507weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800508weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800509
510weston_stacking_SOURCES = clients/stacking.c
511weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800512weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800513
514weston_calibrator_SOURCES = clients/calibrator.c \
515 shared/matrix.c \
516 shared/matrix.h
517weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800518weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800519
520if BUILD_SUBSURFACES_CLIENT
521demo_clients += weston-subsurfaces
522weston_subsurfaces_SOURCES = clients/subsurfaces.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800523weston_subsurfaces_CFLAGS = \
524 $(AM_CFLAGS) \
525 $(SIMPLE_EGL_CLIENT_CFLAGS) \
526 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800527weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
528endif
529
530if HAVE_PANGO
531demo_clients += weston-editor
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800532weston_editor_SOURCES = clients/editor.c
533nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100534 protocol/text-protocol.c \
535 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800536weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800537weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800538endif
539
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800540weston_keyboard_SOURCES = clients/keyboard.c
541nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100542 protocol/desktop-shell-client-protocol.h \
543 protocol/desktop-shell-protocol.c \
544 protocol/input-method-protocol.c \
545 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800546weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800547weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800548
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800549weston_simple_im_SOURCES = clients/weston-simple-im.c
550nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100551 protocol/input-method-protocol.c \
552 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800553weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800554weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800555
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800556weston_info_SOURCES = clients/weston-info.c
557weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200558weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800559
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800560weston_desktop_shell_SOURCES = clients/desktop-shell.c
561nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100562 protocol/desktop-shell-client-protocol.h \
563 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800564weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800565weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800566
567if BUILD_FULL_GL_CLIENTS
568demo_clients += weston-gears
569weston_gears_SOURCES = clients/gears.c
570weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800571weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800572
573if HAVE_GLU
574libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100575weston_screensaver_SOURCES = \
576 clients/wscreensaver.c \
577 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100578 clients/wscreensaver-glue.c \
579 clients/wscreensaver-glue.h \
580 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800581 clients/matrix3.xpm
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800582nodist_weston_screensaver_SOURCES = \
583 protocol/desktop-shell-client-protocol.h \
584 protocol/desktop-shell-protocol.c
585
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800586weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800587weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800588
589endif
590
591endif
592
593endif
594
595BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100596 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800597 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100598 protocol/text-cursor-position-client-protocol.h \
599 protocol/text-cursor-position-protocol.c \
600 protocol/text-protocol.c \
601 protocol/text-client-protocol.h \
602 protocol/input-method-protocol.c \
603 protocol/input-method-client-protocol.h \
604 protocol/desktop-shell-client-protocol.h \
605 protocol/desktop-shell-protocol.c \
606 protocol/scaler-client-protocol.h \
607 protocol/scaler-protocol.c \
608 protocol/workspaces-client-protocol.h \
609 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500610 protocol/fullscreen-shell-protocol.c \
611 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100612 protocol/xdg-shell-protocol.c \
613 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800614
615
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800616westondatadir = $(datadir)/weston
617dist_westondata_DATA = \
618 data/wayland.svg \
619 data/wayland.png \
620 data/pattern.png \
621 data/terminal.png \
622 data/border.png \
623 data/icon_window.png \
624 data/sign_close.png \
625 data/sign_maximize.png \
626 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800627
628
629if BUILD_WCAP_TOOLS
630bin_PROGRAMS += wcap-decode
631
632wcap_decode_SOURCES = \
633 wcap/main.c \
634 wcap/wcap-decode.c \
635 wcap/wcap-decode.h
636
637wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
638wcap_decode_LDADD = $(WCAP_LIBS)
639endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800640
641
642if ENABLE_DESKTOP_SHELL
643
644module_LTLIBRARIES += desktop-shell.la
645
646desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100647 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800648 -I$(top_srcdir)/shared \
649 -I$(top_srcdir)/src \
650 -I$(top_builddir)/src \
651 -I$(top_builddir)/desktop-shell \
652 -DDATADIR='"$(datadir)"' \
653 -DMODULEDIR='"$(moduledir)"' \
654 -DLIBEXECDIR='"$(libexecdir)"' \
655 -DIN_WESTON
656
657desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800658desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800659desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
660desktop_shell_la_SOURCES = \
661 desktop-shell/shell.h \
662 desktop-shell/shell.c \
663 desktop-shell/exposay.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800664 desktop-shell/input-panel.c
665nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100666 protocol/desktop-shell-protocol.c \
667 protocol/desktop-shell-server-protocol.h \
668 protocol/xdg-shell-protocol.c \
669 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800670
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800671BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800672endif
673
Jason Ekstrand946a9482014-04-02 19:53:47 -0500674if ENABLE_FULLSCREEN_SHELL
675
676module_LTLIBRARIES += fullscreen-shell.la
677
678fullscreen_shell_la_CPPFLAGS = \
679 -I$(top_builddir)/protocol \
680 -I$(top_srcdir)/shared \
681 -I$(top_srcdir)/src \
682 -I$(top_builddir)/src \
683 -DIN_WESTON
684
685fullscreen_shell_la_LDFLAGS = -module -avoid-version
686fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
687fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
688fullscreen_shell_la_SOURCES = \
689 fullscreen-shell/fullscreen-shell.c
690nodist_fullscreen_shell_la_SOURCES = \
691 protocol/fullscreen-shell-protocol.c \
692 protocol/fullscreen-shell-server-protocol.h
693
694BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
695endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800696
697if ENABLE_XWAYLAND
698
699module_LTLIBRARIES += xwayland.la
700
701xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100702 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800703 -I$(top_srcdir)/shared \
704 -I$(top_srcdir)/src \
705 -I$(top_builddir)/src \
706 -I$(top_builddir)/xwayland \
707 -DDATADIR='"$(datadir)"' \
708 -DMODULEDIR='"$(moduledir)"' \
709 -DLIBEXECDIR='"$(libexecdir)"' \
710 -DXSERVER_PATH='"@XSERVER_PATH@"'
711
712xwayland_la_LDFLAGS = -module -avoid-version
713xwayland_la_LIBADD = \
714 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800715 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800716xwayland_la_CFLAGS = \
717 $(GCC_CFLAGS) \
718 $(COMPOSITOR_CFLAGS) \
719 $(PIXMAN_CFLAGS) \
720 $(CAIRO_CFLAGS)
721xwayland_la_SOURCES = \
722 xwayland/xwayland.h \
723 xwayland/window-manager.c \
724 xwayland/selection.c \
725 xwayland/dnd.c \
726 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800727 xwayland/hash.c \
728 xwayland/hash.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800729nodist_xwayland_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100730 protocol/xserver-protocol.c \
731 protocol/xserver-server-protocol.h
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800732
733BUILT_SOURCES += $(nodist_xwayland_la_SOURCES)
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800734endif
735
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800736
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800737#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800738# Shared utilities
739#
740
741noinst_LTLIBRARIES += libshared.la libshared-cairo.la
742
743libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
744
745libshared_la_SOURCES = \
746 shared/config-parser.c \
747 shared/option-parser.c \
748 shared/config-parser.h \
749 shared/os-compatibility.c \
750 shared/os-compatibility.h
751
752libshared_cairo_la_CFLAGS = \
753 -DDATADIR='"$(datadir)"' \
754 $(GCC_CFLAGS) \
755 $(COMPOSITOR_CFLAGS) \
756 $(PIXMAN_CFLAGS) \
757 $(CAIRO_CFLAGS) \
758 $(PNG_CFLAGS) \
759 $(WEBP_CFLAGS)
760
761libshared_cairo_la_LIBADD = \
762 $(PIXMAN_LIBS) \
763 $(CAIRO_LIBS) \
764 $(PNG_LIBS) \
765 $(WEBP_LIBS) \
766 $(JPEG_LIBS)
767
768libshared_cairo_la_SOURCES = \
769 $(libshared_la_SOURCES) \
770 shared/image-loader.c \
771 shared/image-loader.h \
772 shared/cairo-util.c \
773 shared/frame.c \
774 shared/cairo-util.h
775
776
777#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800778# tests subdirectory
779#
780
781TESTS = $(shared_tests) $(module_tests) $(weston_tests)
782
783shared_tests = \
784 config-parser.test \
785 vertex-clip.test
786
787module_tests = \
788 surface-test.la \
789 surface-global-test.la
790
791weston_tests = \
792 bad_buffer.weston \
793 keyboard.weston \
794 event.weston \
795 button.weston \
796 text.weston \
797 subsurface.weston
798
799
800AM_TESTS_ENVIRONMENT = \
801 abs_builddir='$(abs_builddir)'; export abs_builddir;
802
803TEST_EXTENSIONS = .la .weston
804LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
805WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
806
807clean-local:
808 -rm -rf tests/logs
809
810# To remove when automake 1.11 support is dropped
811export abs_builddir
812
813noinst_LTLIBRARIES += \
814 weston-test.la \
815 $(module_tests) \
816 libtest-runner.la \
817 libtest-client.la
818
819noinst_PROGRAMS += \
820 $(setbacklight) \
821 $(shared_tests) \
822 $(weston_tests) \
823 matrix-test
824
825test_module_ldflags = \
826 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
827
828surface_global_test_la_SOURCES = tests/surface-global-test.c
829surface_global_test_la_LDFLAGS = $(test_module_ldflags)
830surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
831
832surface_test_la_SOURCES = tests/surface-test.c
833surface_test_la_LDFLAGS = $(test_module_ldflags)
834surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
835
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800836weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800837weston_test_la_LDFLAGS = $(test_module_ldflags)
838weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800839weston_test_la_SOURCES = tests/weston-test.c
840nodist_weston_test_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100841 protocol/wayland-test-protocol.c \
842 protocol/wayland-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800843
844if ENABLE_EGL
845weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
846weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
847endif
848
849libtest_runner_la_SOURCES = \
850 tests/weston-test-runner.c \
851 tests/weston-test-runner.h
852libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
853
854config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800855config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800856
857vertex_clip_test_SOURCES = \
858 tests/vertex-clip-test.c \
859 src/vertex-clipping.c \
860 src/vertex-clipping.h
861vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
862
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100863libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800864 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800865 tests/weston-test-client-helper.h
866nodist_libtest_client_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100867 protocol/wayland-test-protocol.c \
868 protocol/wayland-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800869libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800870libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800871
872bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800873bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800874bad_buffer_weston_LDADD = libtest-client.la
875
876keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800877keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800878keyboard_weston_LDADD = libtest-client.la
879
880event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800881event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800882event_weston_LDADD = libtest-client.la
883
884button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800885button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800886button_weston_LDADD = libtest-client.la
887
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800888text_weston_SOURCES = tests/text-test.c
889nodist_text_weston_SOURCES = \
890 protocol/text-protocol.c \
891 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800892text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800893text_weston_LDADD = libtest-client.la
894
895subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800896subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800897subsurface_weston_LDADD = libtest-client.la
898
899if ENABLE_EGL
900weston_tests += buffer-count.weston
901buffer_count_weston_SOURCES = tests/buffer-count-test.c
902buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
903buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
904endif
905
906if ENABLE_XWAYLAND_TEST
907weston_tests += xwayland.weston
908xwayland_weston_SOURCES = tests/xwayland-test.c
909xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
910xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
911endif
912
913matrix_test_SOURCES = \
914 tests/matrix-test.c \
915 shared/matrix.c \
916 shared/matrix.h
917matrix_test_CPPFLAGS = -DUNIT_TEST
918matrix_test_LDADD = -lm -lrt
919
920if BUILD_SETBACKLIGHT
921noinst_PROGRAMS += setbacklight
922setbacklight_SOURCES = \
923 tests/setbacklight.c \
924 src/libbacklight.c \
925 src/libbacklight.h
926setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
927setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
928endif
929
930EXTRA_DIST += tests/weston-tests-env
931
932BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100933 protocol/wayland-test-protocol.c \
934 protocol/wayland-test-server-protocol.h \
935 protocol/wayland-test-client-protocol.h \
936 protocol/text-protocol.c \
937 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800938
Kristian Høgsbergcd312752014-02-01 00:38:15 -0800939EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800940 protocol/desktop-shell.xml \
941 protocol/screenshooter.xml \
942 protocol/xserver.xml \
943 protocol/text.xml \
944 protocol/input-method.xml \
945 protocol/workspaces.xml \
946 protocol/text-cursor-position.xml \
947 protocol/wayland-test.xml \
948 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -0500949 protocol/fullscreen-shell.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800950 protocol/scaler.xml
951
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800952man_MANS = weston.1 weston.ini.5
953
954if ENABLE_DRM_COMPOSITOR
955man_MANS += weston-drm.7
956endif
957
958MAN_SUBSTS = \
959 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
960 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
961 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
962 -e 's|__version__|$(PACKAGE_VERSION)|g'
963
964SUFFIXES = .1 .5 .7 .man
965
966%.1 %.5 %.7 : man/%.man
967 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
968
969EXTRA_DIST += \
970 man/weston.man \
971 man/weston-drm.man \
972 man/weston.ini.man
973
974CLEANFILES += $(man_MANS)
975
976
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100977protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
978 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -0800979
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100980protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
981 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -0800982
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100983protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
984 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@