blob: 39af03ff3e3044bab092cc2cc0744f6962a96a95 [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
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300479weston_cliptest_SOURCES = \
480 clients/cliptest.c \
481 src/vertex-clipping.c \
482 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800483weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800484weston_cliptest_LDADD = libtoytoolkit.la
485
486weston_dnd_SOURCES = clients/dnd.c
487weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800488weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800489
490weston_smoke_SOURCES = clients/smoke.c
491weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800492weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800493
494weston_resizor_SOURCES = clients/resizor.c
495weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800496weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800497
498weston_scaler_SOURCES = clients/scaler.c
499weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800500weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800501
502if HAVE_CAIRO_GLESV2
503demo_clients += weston-nested weston-nested-client
504
505weston_nested_SOURCES = clients/nested.c
506weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800507weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800508
509weston_nested_client_SOURCES = clients/nested-client.c
510weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800511weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800512endif
513
514weston_eventdemo_SOURCES = clients/eventdemo.c
515weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800516weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800517
518weston_clickdot_SOURCES = clients/clickdot.c
519weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800520weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800521
522weston_transformed_SOURCES = clients/transformed.c
523weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800524weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800525
526weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500527nodist_weston_fullscreen_SOURCES = \
528 protocol/fullscreen-shell-protocol.c \
529 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800530weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800531weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800532
533weston_stacking_SOURCES = clients/stacking.c
534weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800535weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800536
537weston_calibrator_SOURCES = clients/calibrator.c \
538 shared/matrix.c \
539 shared/matrix.h
540weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800541weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800542
543if BUILD_SUBSURFACES_CLIENT
544demo_clients += weston-subsurfaces
545weston_subsurfaces_SOURCES = clients/subsurfaces.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800546weston_subsurfaces_CFLAGS = \
547 $(AM_CFLAGS) \
548 $(SIMPLE_EGL_CLIENT_CFLAGS) \
549 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800550weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
551endif
552
553if HAVE_PANGO
554demo_clients += weston-editor
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800555weston_editor_SOURCES = clients/editor.c
556nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100557 protocol/text-protocol.c \
558 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800559weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800560weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800561endif
562
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800563weston_keyboard_SOURCES = clients/keyboard.c
564nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100565 protocol/desktop-shell-client-protocol.h \
566 protocol/desktop-shell-protocol.c \
567 protocol/input-method-protocol.c \
568 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800569weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800570weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800571
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800572weston_simple_im_SOURCES = clients/weston-simple-im.c
573nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100574 protocol/input-method-protocol.c \
575 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800576weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800577weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800578
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800579weston_info_SOURCES = clients/weston-info.c
580weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200581weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800582
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800583weston_desktop_shell_SOURCES = clients/desktop-shell.c
584nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100585 protocol/desktop-shell-client-protocol.h \
586 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800587weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800588weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800589
590if BUILD_FULL_GL_CLIENTS
591demo_clients += weston-gears
592weston_gears_SOURCES = clients/gears.c
593weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800594weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800595
596if HAVE_GLU
597libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100598weston_screensaver_SOURCES = \
599 clients/wscreensaver.c \
600 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100601 clients/wscreensaver-glue.c \
602 clients/wscreensaver-glue.h \
603 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800604 clients/matrix3.xpm
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800605nodist_weston_screensaver_SOURCES = \
606 protocol/desktop-shell-client-protocol.h \
607 protocol/desktop-shell-protocol.c
608
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800609weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800610weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800611
612endif
613
614endif
615
616endif
617
618BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100619 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800620 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100621 protocol/text-cursor-position-client-protocol.h \
622 protocol/text-cursor-position-protocol.c \
623 protocol/text-protocol.c \
624 protocol/text-client-protocol.h \
625 protocol/input-method-protocol.c \
626 protocol/input-method-client-protocol.h \
627 protocol/desktop-shell-client-protocol.h \
628 protocol/desktop-shell-protocol.c \
629 protocol/scaler-client-protocol.h \
630 protocol/scaler-protocol.c \
631 protocol/workspaces-client-protocol.h \
632 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500633 protocol/fullscreen-shell-protocol.c \
634 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100635 protocol/xdg-shell-protocol.c \
636 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800637
638
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800639westondatadir = $(datadir)/weston
640dist_westondata_DATA = \
641 data/wayland.svg \
642 data/wayland.png \
643 data/pattern.png \
644 data/terminal.png \
645 data/border.png \
646 data/icon_window.png \
647 data/sign_close.png \
648 data/sign_maximize.png \
649 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800650
651
652if BUILD_WCAP_TOOLS
653bin_PROGRAMS += wcap-decode
654
655wcap_decode_SOURCES = \
656 wcap/main.c \
657 wcap/wcap-decode.c \
658 wcap/wcap-decode.h
659
660wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
661wcap_decode_LDADD = $(WCAP_LIBS)
662endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800663
664
665if ENABLE_DESKTOP_SHELL
666
667module_LTLIBRARIES += desktop-shell.la
668
669desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100670 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800671 -I$(top_srcdir)/shared \
672 -I$(top_srcdir)/src \
673 -I$(top_builddir)/src \
674 -I$(top_builddir)/desktop-shell \
675 -DDATADIR='"$(datadir)"' \
676 -DMODULEDIR='"$(moduledir)"' \
677 -DLIBEXECDIR='"$(libexecdir)"' \
678 -DIN_WESTON
679
680desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800681desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800682desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
683desktop_shell_la_SOURCES = \
684 desktop-shell/shell.h \
685 desktop-shell/shell.c \
686 desktop-shell/exposay.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800687 desktop-shell/input-panel.c
688nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100689 protocol/desktop-shell-protocol.c \
690 protocol/desktop-shell-server-protocol.h \
691 protocol/xdg-shell-protocol.c \
692 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800693
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800694BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800695endif
696
Jason Ekstrand946a9482014-04-02 19:53:47 -0500697if ENABLE_FULLSCREEN_SHELL
698
699module_LTLIBRARIES += fullscreen-shell.la
700
701fullscreen_shell_la_CPPFLAGS = \
702 -I$(top_builddir)/protocol \
703 -I$(top_srcdir)/shared \
704 -I$(top_srcdir)/src \
705 -I$(top_builddir)/src \
706 -DIN_WESTON
707
708fullscreen_shell_la_LDFLAGS = -module -avoid-version
709fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
710fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
711fullscreen_shell_la_SOURCES = \
712 fullscreen-shell/fullscreen-shell.c
713nodist_fullscreen_shell_la_SOURCES = \
714 protocol/fullscreen-shell-protocol.c \
715 protocol/fullscreen-shell-server-protocol.h
716
717BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
718endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800719
Jason Ekstrand47928d82014-04-02 19:54:01 -0500720if ENABLE_SCREEN_SHARING
721
722module_LTLIBRARIES += screen-share.la
723
724screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
725screen_share_la_LDFLAGS = -module -avoid-version
726screen_share_la_LIBADD = \
727 $(COMPOSITOR_LIBS) \
728 $(SCREEN_SHARE_LIBS) \
729 libshared-cairo.la
730screen_share_la_CFLAGS = \
731 $(COMPOSITOR_CFLAGS) \
732 $(SCREEN_SHARE_CFLAGS) \
733 $(GCC_CFLAGS)
734screen_share_la_SOURCES = \
735 src/screen-share.c
736nodist_screen_share_la_SOURCES = \
737 protocol/fullscreen-shell-protocol.c \
738 protocol/fullscreen-shell-client-protocol.h
739
740endif
741
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800742if ENABLE_XWAYLAND
743
744module_LTLIBRARIES += xwayland.la
745
746xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100747 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800748 -I$(top_srcdir)/shared \
749 -I$(top_srcdir)/src \
750 -I$(top_builddir)/src \
751 -I$(top_builddir)/xwayland \
752 -DDATADIR='"$(datadir)"' \
753 -DMODULEDIR='"$(moduledir)"' \
754 -DLIBEXECDIR='"$(libexecdir)"' \
755 -DXSERVER_PATH='"@XSERVER_PATH@"'
756
757xwayland_la_LDFLAGS = -module -avoid-version
758xwayland_la_LIBADD = \
759 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800760 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800761xwayland_la_CFLAGS = \
762 $(GCC_CFLAGS) \
763 $(COMPOSITOR_CFLAGS) \
764 $(PIXMAN_CFLAGS) \
765 $(CAIRO_CFLAGS)
766xwayland_la_SOURCES = \
767 xwayland/xwayland.h \
768 xwayland/window-manager.c \
769 xwayland/selection.c \
770 xwayland/dnd.c \
771 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800772 xwayland/hash.c \
773 xwayland/hash.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800774endif
775
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800776
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800777#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800778# Shared utilities
779#
780
781noinst_LTLIBRARIES += libshared.la libshared-cairo.la
782
783libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
784
785libshared_la_SOURCES = \
786 shared/config-parser.c \
787 shared/option-parser.c \
788 shared/config-parser.h \
789 shared/os-compatibility.c \
790 shared/os-compatibility.h
791
792libshared_cairo_la_CFLAGS = \
793 -DDATADIR='"$(datadir)"' \
794 $(GCC_CFLAGS) \
795 $(COMPOSITOR_CFLAGS) \
796 $(PIXMAN_CFLAGS) \
797 $(CAIRO_CFLAGS) \
798 $(PNG_CFLAGS) \
799 $(WEBP_CFLAGS)
800
801libshared_cairo_la_LIBADD = \
802 $(PIXMAN_LIBS) \
803 $(CAIRO_LIBS) \
804 $(PNG_LIBS) \
805 $(WEBP_LIBS) \
806 $(JPEG_LIBS)
807
808libshared_cairo_la_SOURCES = \
809 $(libshared_la_SOURCES) \
810 shared/image-loader.c \
811 shared/image-loader.h \
812 shared/cairo-util.c \
813 shared/frame.c \
814 shared/cairo-util.h
815
816
817#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800818# tests subdirectory
819#
820
821TESTS = $(shared_tests) $(module_tests) $(weston_tests)
822
823shared_tests = \
824 config-parser.test \
825 vertex-clip.test
826
827module_tests = \
828 surface-test.la \
829 surface-global-test.la
830
831weston_tests = \
832 bad_buffer.weston \
833 keyboard.weston \
834 event.weston \
835 button.weston \
836 text.weston \
837 subsurface.weston
838
839
840AM_TESTS_ENVIRONMENT = \
841 abs_builddir='$(abs_builddir)'; export abs_builddir;
842
843TEST_EXTENSIONS = .la .weston
844LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
845WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
846
847clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +0300848 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800849
850# To remove when automake 1.11 support is dropped
851export abs_builddir
852
853noinst_LTLIBRARIES += \
854 weston-test.la \
855 $(module_tests) \
856 libtest-runner.la \
857 libtest-client.la
858
859noinst_PROGRAMS += \
860 $(setbacklight) \
861 $(shared_tests) \
862 $(weston_tests) \
863 matrix-test
864
865test_module_ldflags = \
866 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
867
868surface_global_test_la_SOURCES = tests/surface-global-test.c
869surface_global_test_la_LDFLAGS = $(test_module_ldflags)
870surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
871
872surface_test_la_SOURCES = tests/surface-test.c
873surface_test_la_LDFLAGS = $(test_module_ldflags)
874surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
875
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800876weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800877weston_test_la_LDFLAGS = $(test_module_ldflags)
878weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800879weston_test_la_SOURCES = tests/weston-test.c
880nodist_weston_test_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100881 protocol/wayland-test-protocol.c \
882 protocol/wayland-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800883
884if ENABLE_EGL
885weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
886weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
887endif
888
889libtest_runner_la_SOURCES = \
890 tests/weston-test-runner.c \
891 tests/weston-test-runner.h
892libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
893
894config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800895config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800896
897vertex_clip_test_SOURCES = \
898 tests/vertex-clip-test.c \
899 src/vertex-clipping.c \
900 src/vertex-clipping.h
901vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
902
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100903libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800904 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800905 tests/weston-test-client-helper.h
906nodist_libtest_client_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100907 protocol/wayland-test-protocol.c \
908 protocol/wayland-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800909libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800910libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800911
912bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800913bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800914bad_buffer_weston_LDADD = libtest-client.la
915
916keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800917keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800918keyboard_weston_LDADD = libtest-client.la
919
920event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800921event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800922event_weston_LDADD = libtest-client.la
923
924button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800925button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800926button_weston_LDADD = libtest-client.la
927
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800928text_weston_SOURCES = tests/text-test.c
929nodist_text_weston_SOURCES = \
930 protocol/text-protocol.c \
931 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800932text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800933text_weston_LDADD = libtest-client.la
934
935subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800936subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800937subsurface_weston_LDADD = libtest-client.la
938
939if ENABLE_EGL
940weston_tests += buffer-count.weston
941buffer_count_weston_SOURCES = tests/buffer-count-test.c
942buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
943buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
944endif
945
946if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +0300947weston_tests += xwayland-test.weston
948xwayland_test_weston_SOURCES = tests/xwayland-test.c
949xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
950xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800951endif
952
953matrix_test_SOURCES = \
954 tests/matrix-test.c \
955 shared/matrix.c \
956 shared/matrix.h
957matrix_test_CPPFLAGS = -DUNIT_TEST
958matrix_test_LDADD = -lm -lrt
959
960if BUILD_SETBACKLIGHT
961noinst_PROGRAMS += setbacklight
962setbacklight_SOURCES = \
963 tests/setbacklight.c \
964 src/libbacklight.c \
965 src/libbacklight.h
966setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
967setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
968endif
969
970EXTRA_DIST += tests/weston-tests-env
971
972BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100973 protocol/wayland-test-protocol.c \
974 protocol/wayland-test-server-protocol.h \
975 protocol/wayland-test-client-protocol.h \
976 protocol/text-protocol.c \
977 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800978
Kristian Høgsbergcd312752014-02-01 00:38:15 -0800979EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800980 protocol/desktop-shell.xml \
981 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800982 protocol/text.xml \
983 protocol/input-method.xml \
984 protocol/workspaces.xml \
985 protocol/text-cursor-position.xml \
986 protocol/wayland-test.xml \
987 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -0500988 protocol/fullscreen-shell.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800989 protocol/scaler.xml
990
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800991man_MANS = weston.1 weston.ini.5
992
993if ENABLE_DRM_COMPOSITOR
994man_MANS += weston-drm.7
995endif
996
997MAN_SUBSTS = \
998 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
999 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1000 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1001 -e 's|__version__|$(PACKAGE_VERSION)|g'
1002
1003SUFFIXES = .1 .5 .7 .man
1004
1005%.1 %.5 %.7 : man/%.man
1006 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1007
1008EXTRA_DIST += \
1009 man/weston.man \
1010 man/weston-drm.man \
1011 man/weston.ini.man
1012
1013CLEANFILES += $(man_MANS)
1014
1015
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001016protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1017 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001018
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001019protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1020 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001021
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001022protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1023 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@