blob: 6a91a8f8e72822e5f87549111d5aaca9bc2788aa [file] [log] [blame]
Thierry Reding0e6d9a72014-05-27 09:07:54 +02001ACLOCAL_AMFLAGS = -I m4
2
Kristian Høgsberge895f142014-01-27 21:46:30 -08003bin_PROGRAMS =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08004noinst_PROGRAMS =
Kristian Høgsberge73eccd2014-01-31 16:15:11 -08005libexec_PROGRAMS =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08006moduledir = $(libdir)/weston
7module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08008noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08009BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -080010
Pekka Paalanen3d3f4852014-08-20 12:11:04 +030011# Do not run xwayland test while it is known broken.
12AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install --disable-xwayland-test
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050013
Kristian Høgsberg08229422014-02-01 00:33:04 -080014EXTRA_DIST = weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000015
16weston.ini : $(srcdir)/weston.ini.in
17 $(AM_V_GEN)$(SED) \
18 -e 's|@bindir[@]|$(bindir)|g' \
19 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
20 -e 's|@libexecdir[@]|$(libexecdir)|g' \
21 $< > $@
22
Kristian Høgsbergcd312752014-02-01 00:38:15 -080023all-local : weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080024
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080025AM_CFLAGS = $(GCC_CFLAGS)
26
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080027AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080028 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080029 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080030 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080031 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080032 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010033 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080034 -DDATADIR='"$(datadir)"' \
35 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080036 -DLIBEXECDIR='"$(libexecdir)"' \
37 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080038
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080039CLEANFILES = weston.ini $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080040
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080041bin_PROGRAMS += weston
42
43weston_LDFLAGS = -export-dynamic
44weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
45weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
46weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080047 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080048
49weston_SOURCES = \
50 src/git-version.h \
51 src/log.c \
52 src/compositor.c \
53 src/compositor.h \
54 src/input.c \
55 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080056 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080057 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080058 src/zoom.c \
59 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080060 src/bindings.c \
61 src/animation.c \
62 src/noop-renderer.c \
63 src/pixman-renderer.c \
64 src/pixman-renderer.h \
65 shared/matrix.c \
66 shared/matrix.h \
67 shared/zalloc.h \
68 src/weston-egl-ext.h
69
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080070nodist_weston_SOURCES = \
71 protocol/screenshooter-protocol.c \
72 protocol/screenshooter-server-protocol.h \
73 protocol/text-cursor-position-protocol.c \
74 protocol/text-cursor-position-server-protocol.h \
75 protocol/text-protocol.c \
76 protocol/text-server-protocol.h \
77 protocol/input-method-protocol.c \
78 protocol/input-method-server-protocol.h \
79 protocol/workspaces-protocol.c \
80 protocol/workspaces-server-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -040081 protocol/presentation_timing-protocol.c \
82 protocol/presentation_timing-server-protocol.h \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080083 protocol/scaler-protocol.c \
84 protocol/scaler-server-protocol.h
85
86BUILT_SOURCES += $(nodist_weston_SOURCES)
87
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -080088# Track this dependency explicitly instead of using BUILT_SOURCES. We
89# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
90# in case we're building from tarballs.
91
92src/compositor.c : $(top_builddir)/src/git-version.h
93
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080094noinst_LTLIBRARIES += \
95 libsession-helper.la
96
97libsession_helper_la_SOURCES = \
98 src/weston-launch.h \
99 src/launcher-util.c \
100 src/launcher-util.h
101libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
102libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
103
104if ENABLE_DBUS
105if HAVE_SYSTEMD_LOGIN
106libsession_helper_la_SOURCES += \
107 src/dbus.h \
108 src/dbus.c \
109 src/logind-util.h \
110 src/logind-util.c
111libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
112libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
113endif
114endif
115
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800116if HAVE_GIT_REPO
117src/git-version.h : $(top_srcdir)/.git/logs/HEAD
118 $(AM_V_GEN)echo "#define BUILD_ID \"$(shell git --git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')\"" > $@
Kristian Høgsberg1d2dd072014-02-03 10:55:51 -0800119else
120src/git-version.h :
121 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
122
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800123endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800124
125.FORCE :
126
127if BUILD_WESTON_LAUNCH
128bin_PROGRAMS += weston-launch
129weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
130weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
131weston_launch_CFLAGS= \
132 $(GCC_CFLAGS) \
133 $(PAM_CFLAGS) \
134 $(SYSTEMD_LOGIN_CFLAGS) \
135 $(LIBDRM_CFLAGS)
136weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
137
138if ENABLE_SETUID_INSTALL
139install-exec-hook:
140 chown root $(DESTDIR)$(bindir)/weston-launch
141 chmod u+s $(DESTDIR)$(bindir)/weston-launch
142endif
143
144endif # BUILD_WESTON_LAUNCH
145
146pkgconfigdir = $(libdir)/pkgconfig
147pkgconfig_DATA = src/weston.pc
148
149westonincludedir = $(includedir)/weston
150westoninclude_HEADERS = \
151 src/version.h \
152 src/compositor.h \
153 shared/matrix.h \
154 shared/config-parser.h \
155 shared/zalloc.h
156
157if ENABLE_EGL
158module_LTLIBRARIES += gl-renderer.la
159gl_renderer_la_LDFLAGS = -module -avoid-version
160gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
161gl_renderer_la_CFLAGS = \
162 $(COMPOSITOR_CFLAGS) \
163 $(EGL_CFLAGS) \
164 $(GCC_CFLAGS)
165gl_renderer_la_SOURCES = \
166 src/gl-renderer.h \
167 src/gl-renderer.c \
168 src/vertex-clipping.c \
169 src/vertex-clipping.h
170endif
171
172if ENABLE_X11_COMPOSITOR
173module_LTLIBRARIES += x11-backend.la
174x11_backend_la_LDFLAGS = -module -avoid-version
175x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800176 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800177x11_backend_la_CFLAGS = \
178 $(COMPOSITOR_CFLAGS) \
179 $(EGL_CFLAGS) \
180 $(PIXMAN_CFLAGS) \
181 $(CAIRO_CFLAGS) \
182 $(X11_COMPOSITOR_CFLAGS) \
183 $(GCC_CFLAGS)
184x11_backend_la_SOURCES = src/compositor-x11.c
185endif
186
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100187INPUT_BACKEND_SOURCES = src/udev-input.h
188
189if ENABLE_LIBINPUT_BACKEND
190INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
191INPUT_BACKEND_SOURCES += \
192 src/libinput-seat.c \
193 src/libinput-seat.h \
194 src/libinput-device.c \
195 src/libinput-device.h
196else
197INPUT_BACKEND_SOURCES += \
198 src/filter.c \
199 src/filter.h \
200 src/udev-seat.c \
201 src/udev-seat.h \
202 src/evdev.c \
203 src/evdev.h \
204 src/evdev-touchpad.c
205endif
206
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800207if ENABLE_DRM_COMPOSITOR
208module_LTLIBRARIES += drm-backend.la
209drm_backend_la_LDFLAGS = -module -avoid-version
210drm_backend_la_LIBADD = \
211 $(COMPOSITOR_LIBS) \
212 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100213 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100214 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800215 libsession-helper.la
216drm_backend_la_CFLAGS = \
217 $(COMPOSITOR_CFLAGS) \
218 $(EGL_CFLAGS) \
219 $(DRM_COMPOSITOR_CFLAGS) \
220 $(GCC_CFLAGS)
221drm_backend_la_SOURCES = \
222 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100223 $(INPUT_BACKEND_SOURCES) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800224 src/libbacklight.c \
225 src/libbacklight.h
226
227if ENABLE_VAAPI_RECORDER
228drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
229drm_backend_la_LIBADD += $(LIBVA_LIBS)
230drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
231endif
232endif
233
234if ENABLE_WAYLAND_COMPOSITOR
235module_LTLIBRARIES += wayland-backend.la
236wayland_backend_la_LDFLAGS = -module -avoid-version
237wayland_backend_la_LIBADD = \
238 $(COMPOSITOR_LIBS) \
239 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800240 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800241wayland_backend_la_CFLAGS = \
242 $(COMPOSITOR_CFLAGS) \
243 $(EGL_CFLAGS) \
244 $(PIXMAN_CFLAGS) \
245 $(CAIRO_CFLAGS) \
246 $(WAYLAND_COMPOSITOR_CFLAGS) \
247 $(GCC_CFLAGS)
248wayland_backend_la_SOURCES = src/compositor-wayland.c
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500249nodist_wayland_backend_la_SOURCES = \
250 protocol/fullscreen-shell-protocol.c \
251 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800252endif
253
254if ENABLE_RPI_COMPOSITOR
255if INSTALL_RPI_COMPOSITOR
256module_LTLIBRARIES += rpi-backend.la
257else
258noinst_LTLIBRARIES += rpi-backend.la
259endif
260
261rpi_backend_la_LDFLAGS = -module -avoid-version
262rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
263 $(RPI_COMPOSITOR_LIBS) \
264 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100265 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800266 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800267 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800268rpi_backend_la_CFLAGS = \
269 $(GCC_CFLAGS) \
270 $(COMPOSITOR_CFLAGS) \
271 $(RPI_COMPOSITOR_CFLAGS) \
272 $(RPI_BCM_HOST_CFLAGS)
273rpi_backend_la_SOURCES = \
274 src/compositor-rpi.c \
275 src/rpi-renderer.c \
276 src/rpi-renderer.h \
277 src/rpi-bcm-stubs.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100278 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800279
280if ENABLE_EGL
281rpi_backend_la_LIBADD += $(EGL_LIBS)
282rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
283endif
284
285endif
286
287if ENABLE_HEADLESS_COMPOSITOR
288module_LTLIBRARIES += headless-backend.la
289headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800290headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
291headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800292headless_backend_la_SOURCES = src/compositor-headless.c
293endif
294
295if ENABLE_FBDEV_COMPOSITOR
296module_LTLIBRARIES += fbdev-backend.la
297fbdev_backend_la_LDFLAGS = -module -avoid-version
298fbdev_backend_la_LIBADD = \
299 $(COMPOSITOR_LIBS) \
300 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100301 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800302 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800303 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800304fbdev_backend_la_CFLAGS = \
305 $(COMPOSITOR_CFLAGS) \
306 $(EGL_CFLAGS) \
307 $(FBDEV_COMPOSITOR_CFLAGS) \
308 $(PIXMAN_CFLAGS) \
309 $(GCC_CFLAGS)
310fbdev_backend_la_SOURCES = \
311 src/compositor-fbdev.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100312 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800313endif
314
315if ENABLE_RDP_COMPOSITOR
316module_LTLIBRARIES += rdp-backend.la
317rdp_backend_la_LDFLAGS = -module -avoid-version
318rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
319 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800320 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800321rdp_backend_la_CFLAGS = \
322 $(COMPOSITOR_CFLAGS) \
323 $(RDP_COMPOSITOR_CFLAGS) \
324 $(GCC_CFLAGS)
325rdp_backend_la_SOURCES = src/compositor-rdp.c
326endif
327
328if HAVE_LCMS
329module_LTLIBRARIES += cms-static.la
330cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800331cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800332cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
333cms_static_la_SOURCES = \
334 src/cms-static.c \
335 src/cms-helper.c \
336 src/cms-helper.h
337if ENABLE_COLORD
338module_LTLIBRARIES += cms-colord.la
339cms_colord_la_LDFLAGS = -module -avoid-version
340cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
341cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
342cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100343 src/cms-colord.c \
344 src/cms-helper.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800345 src/cms-helper.h
346endif
347endif
348
349noinst_PROGRAMS += spring-tool
350spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
351spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
352spring_tool_SOURCES = \
353 src/spring-tool.c \
354 src/animation.c \
355 shared/matrix.c \
356 shared/matrix.h \
357 src/compositor.h
358
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800359if BUILD_CLIENTS
360
361bin_PROGRAMS += weston-terminal weston-info
362
363libexec_PROGRAMS += \
364 weston-desktop-shell \
365 weston-screenshooter \
366 weston-keyboard \
367 weston-simple-im
368
369demo_clients = \
370 weston-flower \
371 weston-image \
372 weston-cliptest \
373 weston-dnd \
374 weston-smoke \
375 weston-resizor \
376 weston-eventdemo \
377 weston-clickdot \
378 weston-transformed \
379 weston-fullscreen \
380 weston-stacking \
381 weston-calibrator \
382 weston-scaler
383
384if INSTALL_DEMO_CLIENTS
385bin_PROGRAMS += $(demo_clients)
386else
387noinst_PROGRAMS += $(demo_clients)
388endif
389
390
391if BUILD_SIMPLE_CLIENTS
392demo_clients += \
393 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500394 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800395 weston-simple-touch \
396 weston-multi-resource
397
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800398weston_simple_shm_SOURCES = clients/simple-shm.c
399nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800400 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500401 protocol/xdg-shell-client-protocol.h \
402 protocol/fullscreen-shell-protocol.c \
403 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800404weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800405weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800406
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500407weston_simple_damage_SOURCES = clients/simple-damage.c
408nodist_weston_simple_damage_SOURCES = \
409 protocol/scaler-protocol.c \
410 protocol/scaler-client-protocol.h \
411 protocol/xdg-shell-protocol.c \
412 protocol/xdg-shell-client-protocol.h \
413 protocol/fullscreen-shell-protocol.c \
414 protocol/fullscreen-shell-client-protocol.h
415weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
416weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
417
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800418weston_simple_touch_SOURCES = clients/simple-touch.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800419weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800420weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800421
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800422weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800423weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800424weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800425endif
426
427if BUILD_SIMPLE_EGL_CLIENTS
428demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800429weston_simple_egl_SOURCES = clients/simple-egl.c
430nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800431 protocol/xdg-shell-protocol.c \
432 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800433weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800434weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
435endif
436
437noinst_LTLIBRARIES += libtoytoolkit.la
438
439libtoytoolkit_la_SOURCES = \
440 clients/window.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800441 clients/window.h
442
443nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100444 protocol/text-cursor-position-protocol.c \
445 protocol/text-cursor-position-client-protocol.h \
446 protocol/scaler-protocol.c \
447 protocol/scaler-client-protocol.h \
448 protocol/workspaces-protocol.c \
449 protocol/workspaces-client-protocol.h \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400450 protocol/presentation_timing-protocol.c \
451 protocol/presentation_timing-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100452 protocol/xdg-shell-protocol.c \
453 protocol/xdg-shell-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500454
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800455BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
456
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800457
458libtoytoolkit_la_LIBADD = \
459 $(CLIENT_LIBS) \
460 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800461 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800462libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800463
464weston_flower_SOURCES = clients/flower.c
465weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800466weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800467
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100468weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800469 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800470nodist_weston_screenshooter_SOURCES = \
471 protocol/screenshooter-protocol.c \
472 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800473weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800474weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800475
476weston_terminal_SOURCES = clients/terminal.c
477weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800478weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800479
480weston_image_SOURCES = clients/image.c
481weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800482weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800483
Pekka Paalanen461e93c2014-08-20 11:58:47 +0300484weston_cliptest_SOURCES = \
485 clients/cliptest.c \
486 src/vertex-clipping.c \
487 src/vertex-clipping.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800488weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800489weston_cliptest_LDADD = libtoytoolkit.la
490
491weston_dnd_SOURCES = clients/dnd.c
492weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800493weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800494
495weston_smoke_SOURCES = clients/smoke.c
496weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800497weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800498
499weston_resizor_SOURCES = clients/resizor.c
500weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800501weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800502
503weston_scaler_SOURCES = clients/scaler.c
504weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800505weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800506
507if HAVE_CAIRO_GLESV2
508demo_clients += weston-nested weston-nested-client
509
510weston_nested_SOURCES = clients/nested.c
511weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800512weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800513
514weston_nested_client_SOURCES = clients/nested-client.c
515weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800516weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800517endif
518
519weston_eventdemo_SOURCES = clients/eventdemo.c
520weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800521weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800522
523weston_clickdot_SOURCES = clients/clickdot.c
524weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800525weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800526
527weston_transformed_SOURCES = clients/transformed.c
528weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800529weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800530
531weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500532nodist_weston_fullscreen_SOURCES = \
533 protocol/fullscreen-shell-protocol.c \
534 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800535weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800536weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800537
538weston_stacking_SOURCES = clients/stacking.c
539weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800540weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800541
542weston_calibrator_SOURCES = clients/calibrator.c \
543 shared/matrix.c \
544 shared/matrix.h
545weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800546weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800547
548if BUILD_SUBSURFACES_CLIENT
549demo_clients += weston-subsurfaces
550weston_subsurfaces_SOURCES = clients/subsurfaces.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800551weston_subsurfaces_CFLAGS = \
552 $(AM_CFLAGS) \
553 $(SIMPLE_EGL_CLIENT_CFLAGS) \
554 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800555weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
556endif
557
558if HAVE_PANGO
559demo_clients += weston-editor
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800560weston_editor_SOURCES = clients/editor.c
561nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100562 protocol/text-protocol.c \
563 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800564weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800565weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800566endif
567
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800568weston_keyboard_SOURCES = clients/keyboard.c
569nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100570 protocol/desktop-shell-client-protocol.h \
571 protocol/desktop-shell-protocol.c \
572 protocol/input-method-protocol.c \
573 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800574weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800575weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800576
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800577weston_simple_im_SOURCES = clients/weston-simple-im.c
578nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100579 protocol/input-method-protocol.c \
580 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800581weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800582weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800583
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800584weston_info_SOURCES = clients/weston-info.c
Pekka Paalanen93a6afd2014-09-23 22:08:44 -0400585nodist_weston_info_SOURCES = \
586 protocol/presentation_timing-protocol.c \
587 protocol/presentation_timing-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800588weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200589weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800590
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800591weston_desktop_shell_SOURCES = clients/desktop-shell.c
592nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100593 protocol/desktop-shell-client-protocol.h \
594 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800595weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800596weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800597
598if BUILD_FULL_GL_CLIENTS
599demo_clients += weston-gears
600weston_gears_SOURCES = clients/gears.c
601weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800602weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800603
604if HAVE_GLU
605libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100606weston_screensaver_SOURCES = \
607 clients/wscreensaver.c \
608 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100609 clients/wscreensaver-glue.c \
610 clients/wscreensaver-glue.h \
611 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800612 clients/matrix3.xpm
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800613nodist_weston_screensaver_SOURCES = \
614 protocol/desktop-shell-client-protocol.h \
615 protocol/desktop-shell-protocol.c
616
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800617weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800618weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800619
620endif
621
622endif
623
624endif
625
626BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100627 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800628 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100629 protocol/text-cursor-position-client-protocol.h \
630 protocol/text-cursor-position-protocol.c \
631 protocol/text-protocol.c \
632 protocol/text-client-protocol.h \
633 protocol/input-method-protocol.c \
634 protocol/input-method-client-protocol.h \
635 protocol/desktop-shell-client-protocol.h \
636 protocol/desktop-shell-protocol.c \
637 protocol/scaler-client-protocol.h \
638 protocol/scaler-protocol.c \
639 protocol/workspaces-client-protocol.h \
640 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500641 protocol/fullscreen-shell-protocol.c \
642 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100643 protocol/xdg-shell-protocol.c \
644 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800645
646
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800647westondatadir = $(datadir)/weston
648dist_westondata_DATA = \
649 data/wayland.svg \
650 data/wayland.png \
651 data/pattern.png \
652 data/terminal.png \
653 data/border.png \
654 data/icon_window.png \
655 data/sign_close.png \
656 data/sign_maximize.png \
657 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800658
659
660if BUILD_WCAP_TOOLS
661bin_PROGRAMS += wcap-decode
662
663wcap_decode_SOURCES = \
664 wcap/main.c \
665 wcap/wcap-decode.c \
666 wcap/wcap-decode.h
667
668wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
669wcap_decode_LDADD = $(WCAP_LIBS)
670endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800671
672
673if ENABLE_DESKTOP_SHELL
674
675module_LTLIBRARIES += desktop-shell.la
676
677desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100678 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800679 -I$(top_srcdir)/shared \
680 -I$(top_srcdir)/src \
681 -I$(top_builddir)/src \
682 -I$(top_builddir)/desktop-shell \
683 -DDATADIR='"$(datadir)"' \
684 -DMODULEDIR='"$(moduledir)"' \
685 -DLIBEXECDIR='"$(libexecdir)"' \
686 -DIN_WESTON
687
688desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800689desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800690desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
691desktop_shell_la_SOURCES = \
692 desktop-shell/shell.h \
693 desktop-shell/shell.c \
694 desktop-shell/exposay.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800695 desktop-shell/input-panel.c
696nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100697 protocol/desktop-shell-protocol.c \
698 protocol/desktop-shell-server-protocol.h \
699 protocol/xdg-shell-protocol.c \
700 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800701
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800702BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800703endif
704
Jason Ekstrand946a9482014-04-02 19:53:47 -0500705if ENABLE_FULLSCREEN_SHELL
706
707module_LTLIBRARIES += fullscreen-shell.la
708
709fullscreen_shell_la_CPPFLAGS = \
710 -I$(top_builddir)/protocol \
711 -I$(top_srcdir)/shared \
712 -I$(top_srcdir)/src \
713 -I$(top_builddir)/src \
714 -DIN_WESTON
715
716fullscreen_shell_la_LDFLAGS = -module -avoid-version
717fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
718fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
719fullscreen_shell_la_SOURCES = \
720 fullscreen-shell/fullscreen-shell.c
721nodist_fullscreen_shell_la_SOURCES = \
722 protocol/fullscreen-shell-protocol.c \
723 protocol/fullscreen-shell-server-protocol.h
724
725BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
726endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800727
Jason Ekstrand47928d82014-04-02 19:54:01 -0500728if ENABLE_SCREEN_SHARING
729
730module_LTLIBRARIES += screen-share.la
731
732screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
733screen_share_la_LDFLAGS = -module -avoid-version
734screen_share_la_LIBADD = \
735 $(COMPOSITOR_LIBS) \
736 $(SCREEN_SHARE_LIBS) \
737 libshared-cairo.la
738screen_share_la_CFLAGS = \
739 $(COMPOSITOR_CFLAGS) \
740 $(SCREEN_SHARE_CFLAGS) \
741 $(GCC_CFLAGS)
742screen_share_la_SOURCES = \
743 src/screen-share.c
744nodist_screen_share_la_SOURCES = \
745 protocol/fullscreen-shell-protocol.c \
746 protocol/fullscreen-shell-client-protocol.h
747
748endif
749
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800750if ENABLE_XWAYLAND
751
752module_LTLIBRARIES += xwayland.la
753
754xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100755 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800756 -I$(top_srcdir)/shared \
757 -I$(top_srcdir)/src \
758 -I$(top_builddir)/src \
759 -I$(top_builddir)/xwayland \
760 -DDATADIR='"$(datadir)"' \
761 -DMODULEDIR='"$(moduledir)"' \
762 -DLIBEXECDIR='"$(libexecdir)"' \
763 -DXSERVER_PATH='"@XSERVER_PATH@"'
764
765xwayland_la_LDFLAGS = -module -avoid-version
766xwayland_la_LIBADD = \
767 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800768 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800769xwayland_la_CFLAGS = \
770 $(GCC_CFLAGS) \
771 $(COMPOSITOR_CFLAGS) \
772 $(PIXMAN_CFLAGS) \
773 $(CAIRO_CFLAGS)
774xwayland_la_SOURCES = \
775 xwayland/xwayland.h \
776 xwayland/window-manager.c \
777 xwayland/selection.c \
778 xwayland/dnd.c \
779 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800780 xwayland/hash.c \
781 xwayland/hash.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800782endif
783
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800784
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800785#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800786# Shared utilities
787#
788
789noinst_LTLIBRARIES += libshared.la libshared-cairo.la
790
791libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
792
793libshared_la_SOURCES = \
794 shared/config-parser.c \
795 shared/option-parser.c \
796 shared/config-parser.h \
797 shared/os-compatibility.c \
798 shared/os-compatibility.h
799
800libshared_cairo_la_CFLAGS = \
801 -DDATADIR='"$(datadir)"' \
802 $(GCC_CFLAGS) \
803 $(COMPOSITOR_CFLAGS) \
804 $(PIXMAN_CFLAGS) \
805 $(CAIRO_CFLAGS) \
806 $(PNG_CFLAGS) \
807 $(WEBP_CFLAGS)
808
809libshared_cairo_la_LIBADD = \
810 $(PIXMAN_LIBS) \
811 $(CAIRO_LIBS) \
812 $(PNG_LIBS) \
813 $(WEBP_LIBS) \
814 $(JPEG_LIBS)
815
816libshared_cairo_la_SOURCES = \
817 $(libshared_la_SOURCES) \
818 shared/image-loader.c \
819 shared/image-loader.h \
820 shared/cairo-util.c \
821 shared/frame.c \
822 shared/cairo-util.h
823
824
825#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800826# tests subdirectory
827#
828
829TESTS = $(shared_tests) $(module_tests) $(weston_tests)
830
831shared_tests = \
832 config-parser.test \
833 vertex-clip.test
834
835module_tests = \
836 surface-test.la \
837 surface-global-test.la
838
839weston_tests = \
840 bad_buffer.weston \
841 keyboard.weston \
842 event.weston \
843 button.weston \
844 text.weston \
845 subsurface.weston
846
847
848AM_TESTS_ENVIRONMENT = \
849 abs_builddir='$(abs_builddir)'; export abs_builddir;
850
851TEST_EXTENSIONS = .la .weston
852LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
853WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
854
855clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +0300856 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800857
858# To remove when automake 1.11 support is dropped
859export abs_builddir
860
861noinst_LTLIBRARIES += \
862 weston-test.la \
863 $(module_tests) \
864 libtest-runner.la \
865 libtest-client.la
866
867noinst_PROGRAMS += \
868 $(setbacklight) \
869 $(shared_tests) \
870 $(weston_tests) \
871 matrix-test
872
873test_module_ldflags = \
874 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
875
876surface_global_test_la_SOURCES = tests/surface-global-test.c
877surface_global_test_la_LDFLAGS = $(test_module_ldflags)
878surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
879
880surface_test_la_SOURCES = tests/surface-test.c
881surface_test_la_LDFLAGS = $(test_module_ldflags)
882surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
883
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800884weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800885weston_test_la_LDFLAGS = $(test_module_ldflags)
886weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800887weston_test_la_SOURCES = tests/weston-test.c
888nodist_weston_test_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100889 protocol/wayland-test-protocol.c \
890 protocol/wayland-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800891
892if ENABLE_EGL
893weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
894weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
895endif
896
897libtest_runner_la_SOURCES = \
898 tests/weston-test-runner.c \
899 tests/weston-test-runner.h
900libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
901
902config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800903config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800904
905vertex_clip_test_SOURCES = \
906 tests/vertex-clip-test.c \
907 src/vertex-clipping.c \
908 src/vertex-clipping.h
909vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
910
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100911libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800912 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800913 tests/weston-test-client-helper.h
914nodist_libtest_client_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100915 protocol/wayland-test-protocol.c \
916 protocol/wayland-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800917libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800918libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800919
920bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800921bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800922bad_buffer_weston_LDADD = libtest-client.la
923
924keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800925keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800926keyboard_weston_LDADD = libtest-client.la
927
928event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800929event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800930event_weston_LDADD = libtest-client.la
931
932button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800933button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800934button_weston_LDADD = libtest-client.la
935
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800936text_weston_SOURCES = tests/text-test.c
937nodist_text_weston_SOURCES = \
938 protocol/text-protocol.c \
939 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800940text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800941text_weston_LDADD = libtest-client.la
942
943subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800944subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800945subsurface_weston_LDADD = libtest-client.la
946
947if ENABLE_EGL
948weston_tests += buffer-count.weston
949buffer_count_weston_SOURCES = tests/buffer-count-test.c
950buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
951buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
952endif
953
954if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +0300955weston_tests += xwayland-test.weston
956xwayland_test_weston_SOURCES = tests/xwayland-test.c
957xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
958xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800959endif
960
961matrix_test_SOURCES = \
962 tests/matrix-test.c \
963 shared/matrix.c \
964 shared/matrix.h
965matrix_test_CPPFLAGS = -DUNIT_TEST
966matrix_test_LDADD = -lm -lrt
967
968if BUILD_SETBACKLIGHT
969noinst_PROGRAMS += setbacklight
970setbacklight_SOURCES = \
971 tests/setbacklight.c \
972 src/libbacklight.c \
973 src/libbacklight.h
974setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
975setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
976endif
977
978EXTRA_DIST += tests/weston-tests-env
979
980BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100981 protocol/wayland-test-protocol.c \
982 protocol/wayland-test-server-protocol.h \
983 protocol/wayland-test-client-protocol.h \
984 protocol/text-protocol.c \
985 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800986
Kristian Høgsbergcd312752014-02-01 00:38:15 -0800987EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800988 protocol/desktop-shell.xml \
989 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800990 protocol/text.xml \
991 protocol/input-method.xml \
992 protocol/workspaces.xml \
993 protocol/text-cursor-position.xml \
994 protocol/wayland-test.xml \
995 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -0500996 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400997 protocol/presentation_timing.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800998 protocol/scaler.xml
999
Kristian Høgsberg68c5c102014-01-27 22:33:04 -08001000man_MANS = weston.1 weston.ini.5
1001
1002if ENABLE_DRM_COMPOSITOR
1003man_MANS += weston-drm.7
1004endif
1005
1006MAN_SUBSTS = \
1007 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1008 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1009 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1010 -e 's|__version__|$(PACKAGE_VERSION)|g'
1011
1012SUFFIXES = .1 .5 .7 .man
1013
1014%.1 %.5 %.7 : man/%.man
1015 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1016
1017EXTRA_DIST += \
1018 man/weston.man \
1019 man/weston-drm.man \
1020 man/weston.ini.man
1021
1022CLEANFILES += $(man_MANS)
1023
1024
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001025protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1026 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001027
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001028protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1029 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001030
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001031protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1032 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@