blob: b1dcc21ab340f1d3ce5816dd01f40c6172006735 [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
585weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200586weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800587
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800588weston_desktop_shell_SOURCES = clients/desktop-shell.c
589nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100590 protocol/desktop-shell-client-protocol.h \
591 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800592weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800593weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800594
595if BUILD_FULL_GL_CLIENTS
596demo_clients += weston-gears
597weston_gears_SOURCES = clients/gears.c
598weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800599weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800600
601if HAVE_GLU
602libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100603weston_screensaver_SOURCES = \
604 clients/wscreensaver.c \
605 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100606 clients/wscreensaver-glue.c \
607 clients/wscreensaver-glue.h \
608 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800609 clients/matrix3.xpm
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800610nodist_weston_screensaver_SOURCES = \
611 protocol/desktop-shell-client-protocol.h \
612 protocol/desktop-shell-protocol.c
613
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800614weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800615weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800616
617endif
618
619endif
620
621endif
622
623BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100624 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800625 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100626 protocol/text-cursor-position-client-protocol.h \
627 protocol/text-cursor-position-protocol.c \
628 protocol/text-protocol.c \
629 protocol/text-client-protocol.h \
630 protocol/input-method-protocol.c \
631 protocol/input-method-client-protocol.h \
632 protocol/desktop-shell-client-protocol.h \
633 protocol/desktop-shell-protocol.c \
634 protocol/scaler-client-protocol.h \
635 protocol/scaler-protocol.c \
636 protocol/workspaces-client-protocol.h \
637 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500638 protocol/fullscreen-shell-protocol.c \
639 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100640 protocol/xdg-shell-protocol.c \
641 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800642
643
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800644westondatadir = $(datadir)/weston
645dist_westondata_DATA = \
646 data/wayland.svg \
647 data/wayland.png \
648 data/pattern.png \
649 data/terminal.png \
650 data/border.png \
651 data/icon_window.png \
652 data/sign_close.png \
653 data/sign_maximize.png \
654 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800655
656
657if BUILD_WCAP_TOOLS
658bin_PROGRAMS += wcap-decode
659
660wcap_decode_SOURCES = \
661 wcap/main.c \
662 wcap/wcap-decode.c \
663 wcap/wcap-decode.h
664
665wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
666wcap_decode_LDADD = $(WCAP_LIBS)
667endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800668
669
670if ENABLE_DESKTOP_SHELL
671
672module_LTLIBRARIES += desktop-shell.la
673
674desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100675 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800676 -I$(top_srcdir)/shared \
677 -I$(top_srcdir)/src \
678 -I$(top_builddir)/src \
679 -I$(top_builddir)/desktop-shell \
680 -DDATADIR='"$(datadir)"' \
681 -DMODULEDIR='"$(moduledir)"' \
682 -DLIBEXECDIR='"$(libexecdir)"' \
683 -DIN_WESTON
684
685desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800686desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800687desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
688desktop_shell_la_SOURCES = \
689 desktop-shell/shell.h \
690 desktop-shell/shell.c \
691 desktop-shell/exposay.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800692 desktop-shell/input-panel.c
693nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100694 protocol/desktop-shell-protocol.c \
695 protocol/desktop-shell-server-protocol.h \
696 protocol/xdg-shell-protocol.c \
697 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800698
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800699BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800700endif
701
Jason Ekstrand946a9482014-04-02 19:53:47 -0500702if ENABLE_FULLSCREEN_SHELL
703
704module_LTLIBRARIES += fullscreen-shell.la
705
706fullscreen_shell_la_CPPFLAGS = \
707 -I$(top_builddir)/protocol \
708 -I$(top_srcdir)/shared \
709 -I$(top_srcdir)/src \
710 -I$(top_builddir)/src \
711 -DIN_WESTON
712
713fullscreen_shell_la_LDFLAGS = -module -avoid-version
714fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
715fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
716fullscreen_shell_la_SOURCES = \
717 fullscreen-shell/fullscreen-shell.c
718nodist_fullscreen_shell_la_SOURCES = \
719 protocol/fullscreen-shell-protocol.c \
720 protocol/fullscreen-shell-server-protocol.h
721
722BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
723endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800724
Jason Ekstrand47928d82014-04-02 19:54:01 -0500725if ENABLE_SCREEN_SHARING
726
727module_LTLIBRARIES += screen-share.la
728
729screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
730screen_share_la_LDFLAGS = -module -avoid-version
731screen_share_la_LIBADD = \
732 $(COMPOSITOR_LIBS) \
733 $(SCREEN_SHARE_LIBS) \
734 libshared-cairo.la
735screen_share_la_CFLAGS = \
736 $(COMPOSITOR_CFLAGS) \
737 $(SCREEN_SHARE_CFLAGS) \
738 $(GCC_CFLAGS)
739screen_share_la_SOURCES = \
740 src/screen-share.c
741nodist_screen_share_la_SOURCES = \
742 protocol/fullscreen-shell-protocol.c \
743 protocol/fullscreen-shell-client-protocol.h
744
745endif
746
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800747if ENABLE_XWAYLAND
748
749module_LTLIBRARIES += xwayland.la
750
751xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100752 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800753 -I$(top_srcdir)/shared \
754 -I$(top_srcdir)/src \
755 -I$(top_builddir)/src \
756 -I$(top_builddir)/xwayland \
757 -DDATADIR='"$(datadir)"' \
758 -DMODULEDIR='"$(moduledir)"' \
759 -DLIBEXECDIR='"$(libexecdir)"' \
760 -DXSERVER_PATH='"@XSERVER_PATH@"'
761
762xwayland_la_LDFLAGS = -module -avoid-version
763xwayland_la_LIBADD = \
764 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800765 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800766xwayland_la_CFLAGS = \
767 $(GCC_CFLAGS) \
768 $(COMPOSITOR_CFLAGS) \
769 $(PIXMAN_CFLAGS) \
770 $(CAIRO_CFLAGS)
771xwayland_la_SOURCES = \
772 xwayland/xwayland.h \
773 xwayland/window-manager.c \
774 xwayland/selection.c \
775 xwayland/dnd.c \
776 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800777 xwayland/hash.c \
778 xwayland/hash.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800779endif
780
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800781
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800782#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800783# Shared utilities
784#
785
786noinst_LTLIBRARIES += libshared.la libshared-cairo.la
787
788libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
789
790libshared_la_SOURCES = \
791 shared/config-parser.c \
792 shared/option-parser.c \
793 shared/config-parser.h \
794 shared/os-compatibility.c \
795 shared/os-compatibility.h
796
797libshared_cairo_la_CFLAGS = \
798 -DDATADIR='"$(datadir)"' \
799 $(GCC_CFLAGS) \
800 $(COMPOSITOR_CFLAGS) \
801 $(PIXMAN_CFLAGS) \
802 $(CAIRO_CFLAGS) \
803 $(PNG_CFLAGS) \
804 $(WEBP_CFLAGS)
805
806libshared_cairo_la_LIBADD = \
807 $(PIXMAN_LIBS) \
808 $(CAIRO_LIBS) \
809 $(PNG_LIBS) \
810 $(WEBP_LIBS) \
811 $(JPEG_LIBS)
812
813libshared_cairo_la_SOURCES = \
814 $(libshared_la_SOURCES) \
815 shared/image-loader.c \
816 shared/image-loader.h \
817 shared/cairo-util.c \
818 shared/frame.c \
819 shared/cairo-util.h
820
821
822#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800823# tests subdirectory
824#
825
826TESTS = $(shared_tests) $(module_tests) $(weston_tests)
827
828shared_tests = \
829 config-parser.test \
830 vertex-clip.test
831
832module_tests = \
833 surface-test.la \
834 surface-global-test.la
835
836weston_tests = \
837 bad_buffer.weston \
838 keyboard.weston \
839 event.weston \
840 button.weston \
841 text.weston \
842 subsurface.weston
843
844
845AM_TESTS_ENVIRONMENT = \
846 abs_builddir='$(abs_builddir)'; export abs_builddir;
847
848TEST_EXTENSIONS = .la .weston
849LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
850WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
851
852clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +0300853 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800854
855# To remove when automake 1.11 support is dropped
856export abs_builddir
857
858noinst_LTLIBRARIES += \
859 weston-test.la \
860 $(module_tests) \
861 libtest-runner.la \
862 libtest-client.la
863
864noinst_PROGRAMS += \
865 $(setbacklight) \
866 $(shared_tests) \
867 $(weston_tests) \
868 matrix-test
869
870test_module_ldflags = \
871 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
872
873surface_global_test_la_SOURCES = tests/surface-global-test.c
874surface_global_test_la_LDFLAGS = $(test_module_ldflags)
875surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
876
877surface_test_la_SOURCES = tests/surface-test.c
878surface_test_la_LDFLAGS = $(test_module_ldflags)
879surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
880
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800881weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800882weston_test_la_LDFLAGS = $(test_module_ldflags)
883weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800884weston_test_la_SOURCES = tests/weston-test.c
885nodist_weston_test_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100886 protocol/wayland-test-protocol.c \
887 protocol/wayland-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800888
889if ENABLE_EGL
890weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
891weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
892endif
893
894libtest_runner_la_SOURCES = \
895 tests/weston-test-runner.c \
896 tests/weston-test-runner.h
897libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
898
899config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800900config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800901
902vertex_clip_test_SOURCES = \
903 tests/vertex-clip-test.c \
904 src/vertex-clipping.c \
905 src/vertex-clipping.h
906vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
907
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100908libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800909 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800910 tests/weston-test-client-helper.h
911nodist_libtest_client_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100912 protocol/wayland-test-protocol.c \
913 protocol/wayland-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800914libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800915libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800916
917bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800918bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800919bad_buffer_weston_LDADD = libtest-client.la
920
921keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800922keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800923keyboard_weston_LDADD = libtest-client.la
924
925event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800926event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800927event_weston_LDADD = libtest-client.la
928
929button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800930button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800931button_weston_LDADD = libtest-client.la
932
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800933text_weston_SOURCES = tests/text-test.c
934nodist_text_weston_SOURCES = \
935 protocol/text-protocol.c \
936 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800937text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800938text_weston_LDADD = libtest-client.la
939
940subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800941subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800942subsurface_weston_LDADD = libtest-client.la
943
944if ENABLE_EGL
945weston_tests += buffer-count.weston
946buffer_count_weston_SOURCES = tests/buffer-count-test.c
947buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
948buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
949endif
950
951if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +0300952weston_tests += xwayland-test.weston
953xwayland_test_weston_SOURCES = tests/xwayland-test.c
954xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
955xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800956endif
957
958matrix_test_SOURCES = \
959 tests/matrix-test.c \
960 shared/matrix.c \
961 shared/matrix.h
962matrix_test_CPPFLAGS = -DUNIT_TEST
963matrix_test_LDADD = -lm -lrt
964
965if BUILD_SETBACKLIGHT
966noinst_PROGRAMS += setbacklight
967setbacklight_SOURCES = \
968 tests/setbacklight.c \
969 src/libbacklight.c \
970 src/libbacklight.h
971setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
972setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
973endif
974
975EXTRA_DIST += tests/weston-tests-env
976
977BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100978 protocol/wayland-test-protocol.c \
979 protocol/wayland-test-server-protocol.h \
980 protocol/wayland-test-client-protocol.h \
981 protocol/text-protocol.c \
982 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800983
Kristian Høgsbergcd312752014-02-01 00:38:15 -0800984EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800985 protocol/desktop-shell.xml \
986 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800987 protocol/text.xml \
988 protocol/input-method.xml \
989 protocol/workspaces.xml \
990 protocol/text-cursor-position.xml \
991 protocol/wayland-test.xml \
992 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -0500993 protocol/fullscreen-shell.xml \
Pekka Paalanen7e62d252014-09-23 22:08:42 -0400994 protocol/presentation_timing.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800995 protocol/scaler.xml
996
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800997man_MANS = weston.1 weston.ini.5
998
999if ENABLE_DRM_COMPOSITOR
1000man_MANS += weston-drm.7
1001endif
1002
1003MAN_SUBSTS = \
1004 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
1005 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
1006 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
1007 -e 's|__version__|$(PACKAGE_VERSION)|g'
1008
1009SUFFIXES = .1 .5 .7 .man
1010
1011%.1 %.5 %.7 : man/%.man
1012 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1013
1014EXTRA_DIST += \
1015 man/weston.man \
1016 man/weston-drm.man \
1017 man/weston.ini.man
1018
1019CLEANFILES += $(man_MANS)
1020
1021
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001022protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1023 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001024
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001025protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1026 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001027
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001028protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1029 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@