blob: 9fc04eeb77b8ff26aad74c6c469da749f218a40a [file] [log] [blame]
Kristian Høgsberge895f142014-01-27 21:46:30 -08001bin_PROGRAMS =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08002noinst_PROGRAMS =
Kristian Høgsberge73eccd2014-01-31 16:15:11 -08003libexec_PROGRAMS =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08004moduledir = $(libdir)/weston
5module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08006noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08007BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -08008
Kristian Høgsberg850f24c2012-02-09 09:20:44 -05009DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050010
Kristian Høgsberg08229422014-02-01 00:33:04 -080011EXTRA_DIST = weston.ini.in
Neil Robertse3de16e2013-11-22 16:46:00 +000012
13weston.ini : $(srcdir)/weston.ini.in
14 $(AM_V_GEN)$(SED) \
15 -e 's|@bindir[@]|$(bindir)|g' \
16 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
17 -e 's|@libexecdir[@]|$(libexecdir)|g' \
18 $< > $@
19
Kristian Høgsbergcd312752014-02-01 00:38:15 -080020all-local : weston.ini
Kristian Høgsberg98463742013-12-16 23:12:46 -080021
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080022AM_CFLAGS = $(GCC_CFLAGS)
23
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080024AM_CPPFLAGS = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080025 -I$(top_srcdir)/src \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080026 -I$(top_builddir)/src \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080027 -I$(top_builddir)/clients \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -080028 -I$(top_builddir)/tests \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080029 -I$(top_srcdir)/shared \
Quentin Glidic088ba5e2014-02-01 21:39:12 +010030 -I$(top_builddir)/protocol \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080031 -DDATADIR='"$(datadir)"' \
32 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080033 -DLIBEXECDIR='"$(libexecdir)"' \
34 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080035
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080036CLEANFILES = weston.ini $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080037
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080038bin_PROGRAMS += weston
39
40weston_LDFLAGS = -export-dynamic
41weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
42weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
43weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080044 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080045
46weston_SOURCES = \
47 src/git-version.h \
48 src/log.c \
49 src/compositor.c \
50 src/compositor.h \
51 src/input.c \
52 src/data-device.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080053 src/screenshooter.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080054 src/clipboard.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080055 src/zoom.c \
56 src/text-backend.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080057 src/bindings.c \
58 src/animation.c \
59 src/noop-renderer.c \
60 src/pixman-renderer.c \
61 src/pixman-renderer.h \
62 shared/matrix.c \
63 shared/matrix.h \
64 shared/zalloc.h \
65 src/weston-egl-ext.h
66
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -080067nodist_weston_SOURCES = \
68 protocol/screenshooter-protocol.c \
69 protocol/screenshooter-server-protocol.h \
70 protocol/text-cursor-position-protocol.c \
71 protocol/text-cursor-position-server-protocol.h \
72 protocol/text-protocol.c \
73 protocol/text-server-protocol.h \
74 protocol/input-method-protocol.c \
75 protocol/input-method-server-protocol.h \
76 protocol/workspaces-protocol.c \
77 protocol/workspaces-server-protocol.h \
78 protocol/scaler-protocol.c \
79 protocol/scaler-server-protocol.h
80
81BUILT_SOURCES += $(nodist_weston_SOURCES)
82
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -080083# Track this dependency explicitly instead of using BUILT_SOURCES. We
84# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
85# in case we're building from tarballs.
86
87src/compositor.c : $(top_builddir)/src/git-version.h
88
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080089noinst_LTLIBRARIES += \
90 libsession-helper.la
91
92libsession_helper_la_SOURCES = \
93 src/weston-launch.h \
94 src/launcher-util.c \
95 src/launcher-util.h
96libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
97libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
98
99if ENABLE_DBUS
100if HAVE_SYSTEMD_LOGIN
101libsession_helper_la_SOURCES += \
102 src/dbus.h \
103 src/dbus.c \
104 src/logind-util.h \
105 src/logind-util.c
106libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
107libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
108endif
109endif
110
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800111if HAVE_GIT_REPO
112src/git-version.h : $(top_srcdir)/.git/logs/HEAD
113 $(AM_V_GEN)echo "#define BUILD_ID \"$(shell git --git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')\"" > $@
Kristian Høgsberg1d2dd072014-02-03 10:55:51 -0800114else
115src/git-version.h :
116 $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
117
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800118endif
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800119
120.FORCE :
121
122if BUILD_WESTON_LAUNCH
123bin_PROGRAMS += weston-launch
124weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
125weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
126weston_launch_CFLAGS= \
127 $(GCC_CFLAGS) \
128 $(PAM_CFLAGS) \
129 $(SYSTEMD_LOGIN_CFLAGS) \
130 $(LIBDRM_CFLAGS)
131weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
132
133if ENABLE_SETUID_INSTALL
134install-exec-hook:
135 chown root $(DESTDIR)$(bindir)/weston-launch
136 chmod u+s $(DESTDIR)$(bindir)/weston-launch
137endif
138
139endif # BUILD_WESTON_LAUNCH
140
141pkgconfigdir = $(libdir)/pkgconfig
142pkgconfig_DATA = src/weston.pc
143
144westonincludedir = $(includedir)/weston
145westoninclude_HEADERS = \
146 src/version.h \
147 src/compositor.h \
148 shared/matrix.h \
149 shared/config-parser.h \
150 shared/zalloc.h
151
152if ENABLE_EGL
153module_LTLIBRARIES += gl-renderer.la
154gl_renderer_la_LDFLAGS = -module -avoid-version
155gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
156gl_renderer_la_CFLAGS = \
157 $(COMPOSITOR_CFLAGS) \
158 $(EGL_CFLAGS) \
159 $(GCC_CFLAGS)
160gl_renderer_la_SOURCES = \
161 src/gl-renderer.h \
162 src/gl-renderer.c \
163 src/vertex-clipping.c \
164 src/vertex-clipping.h
165endif
166
167if ENABLE_X11_COMPOSITOR
168module_LTLIBRARIES += x11-backend.la
169x11_backend_la_LDFLAGS = -module -avoid-version
170x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800171 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800172x11_backend_la_CFLAGS = \
173 $(COMPOSITOR_CFLAGS) \
174 $(EGL_CFLAGS) \
175 $(PIXMAN_CFLAGS) \
176 $(CAIRO_CFLAGS) \
177 $(X11_COMPOSITOR_CFLAGS) \
178 $(GCC_CFLAGS)
179x11_backend_la_SOURCES = src/compositor-x11.c
180endif
181
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100182INPUT_BACKEND_SOURCES = src/udev-input.h
183
184if ENABLE_LIBINPUT_BACKEND
185INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
186INPUT_BACKEND_SOURCES += \
187 src/libinput-seat.c \
188 src/libinput-seat.h \
189 src/libinput-device.c \
190 src/libinput-device.h
191else
192INPUT_BACKEND_SOURCES += \
193 src/filter.c \
194 src/filter.h \
195 src/udev-seat.c \
196 src/udev-seat.h \
197 src/evdev.c \
198 src/evdev.h \
199 src/evdev-touchpad.c
200endif
201
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800202if ENABLE_DRM_COMPOSITOR
203module_LTLIBRARIES += drm-backend.la
204drm_backend_la_LDFLAGS = -module -avoid-version
205drm_backend_la_LIBADD = \
206 $(COMPOSITOR_LIBS) \
207 $(DRM_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100208 $(INPUT_BACKEND_LIBS) \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100209 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800210 libsession-helper.la
211drm_backend_la_CFLAGS = \
212 $(COMPOSITOR_CFLAGS) \
213 $(EGL_CFLAGS) \
214 $(DRM_COMPOSITOR_CFLAGS) \
215 $(GCC_CFLAGS)
216drm_backend_la_SOURCES = \
217 src/compositor-drm.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100218 $(INPUT_BACKEND_SOURCES) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800219 src/libbacklight.c \
220 src/libbacklight.h
221
222if ENABLE_VAAPI_RECORDER
223drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
224drm_backend_la_LIBADD += $(LIBVA_LIBS)
225drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
226endif
227endif
228
229if ENABLE_WAYLAND_COMPOSITOR
230module_LTLIBRARIES += wayland-backend.la
231wayland_backend_la_LDFLAGS = -module -avoid-version
232wayland_backend_la_LIBADD = \
233 $(COMPOSITOR_LIBS) \
234 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800235 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800236wayland_backend_la_CFLAGS = \
237 $(COMPOSITOR_CFLAGS) \
238 $(EGL_CFLAGS) \
239 $(PIXMAN_CFLAGS) \
240 $(CAIRO_CFLAGS) \
241 $(WAYLAND_COMPOSITOR_CFLAGS) \
242 $(GCC_CFLAGS)
243wayland_backend_la_SOURCES = src/compositor-wayland.c
Jason Ekstrand53ee0dc2014-04-02 19:53:54 -0500244nodist_wayland_backend_la_SOURCES = \
245 protocol/fullscreen-shell-protocol.c \
246 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800247endif
248
249if ENABLE_RPI_COMPOSITOR
250if INSTALL_RPI_COMPOSITOR
251module_LTLIBRARIES += rpi-backend.la
252else
253noinst_LTLIBRARIES += rpi-backend.la
254endif
255
256rpi_backend_la_LDFLAGS = -module -avoid-version
257rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
258 $(RPI_COMPOSITOR_LIBS) \
259 $(RPI_BCM_HOST_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100260 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800261 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800262 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800263rpi_backend_la_CFLAGS = \
264 $(GCC_CFLAGS) \
265 $(COMPOSITOR_CFLAGS) \
266 $(RPI_COMPOSITOR_CFLAGS) \
267 $(RPI_BCM_HOST_CFLAGS)
268rpi_backend_la_SOURCES = \
269 src/compositor-rpi.c \
270 src/rpi-renderer.c \
271 src/rpi-renderer.h \
272 src/rpi-bcm-stubs.h \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100273 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800274
275if ENABLE_EGL
276rpi_backend_la_LIBADD += $(EGL_LIBS)
277rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
278endif
279
280endif
281
282if ENABLE_HEADLESS_COMPOSITOR
283module_LTLIBRARIES += headless-backend.la
284headless_backend_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800285headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
286headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800287headless_backend_la_SOURCES = src/compositor-headless.c
288endif
289
290if ENABLE_FBDEV_COMPOSITOR
291module_LTLIBRARIES += fbdev-backend.la
292fbdev_backend_la_LDFLAGS = -module -avoid-version
293fbdev_backend_la_LIBADD = \
294 $(COMPOSITOR_LIBS) \
295 $(FBDEV_COMPOSITOR_LIBS) \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100296 $(INPUT_BACKEND_LIBS) \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800297 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800298 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800299fbdev_backend_la_CFLAGS = \
300 $(COMPOSITOR_CFLAGS) \
301 $(EGL_CFLAGS) \
302 $(FBDEV_COMPOSITOR_CFLAGS) \
303 $(PIXMAN_CFLAGS) \
304 $(GCC_CFLAGS)
305fbdev_backend_la_SOURCES = \
306 src/compositor-fbdev.c \
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100307 $(INPUT_BACKEND_SOURCES)
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800308endif
309
310if ENABLE_RDP_COMPOSITOR
311module_LTLIBRARIES += rdp-backend.la
312rdp_backend_la_LDFLAGS = -module -avoid-version
313rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
314 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800315 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800316rdp_backend_la_CFLAGS = \
317 $(COMPOSITOR_CFLAGS) \
318 $(RDP_COMPOSITOR_CFLAGS) \
319 $(GCC_CFLAGS)
320rdp_backend_la_SOURCES = src/compositor-rdp.c
321endif
322
323if HAVE_LCMS
324module_LTLIBRARIES += cms-static.la
325cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800326cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800327cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
328cms_static_la_SOURCES = \
329 src/cms-static.c \
330 src/cms-helper.c \
331 src/cms-helper.h
332if ENABLE_COLORD
333module_LTLIBRARIES += cms-colord.la
334cms_colord_la_LDFLAGS = -module -avoid-version
335cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
336cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
337cms_colord_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100338 src/cms-colord.c \
339 src/cms-helper.c \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800340 src/cms-helper.h
341endif
342endif
343
344noinst_PROGRAMS += spring-tool
345spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
346spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
347spring_tool_SOURCES = \
348 src/spring-tool.c \
349 src/animation.c \
350 shared/matrix.c \
351 shared/matrix.h \
352 src/compositor.h
353
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800354if BUILD_CLIENTS
355
356bin_PROGRAMS += weston-terminal weston-info
357
358libexec_PROGRAMS += \
359 weston-desktop-shell \
360 weston-screenshooter \
361 weston-keyboard \
362 weston-simple-im
363
364demo_clients = \
365 weston-flower \
366 weston-image \
367 weston-cliptest \
368 weston-dnd \
369 weston-smoke \
370 weston-resizor \
371 weston-eventdemo \
372 weston-clickdot \
373 weston-transformed \
374 weston-fullscreen \
375 weston-stacking \
376 weston-calibrator \
377 weston-scaler
378
379if INSTALL_DEMO_CLIENTS
380bin_PROGRAMS += $(demo_clients)
381else
382noinst_PROGRAMS += $(demo_clients)
383endif
384
385
386if BUILD_SIMPLE_CLIENTS
387demo_clients += \
388 weston-simple-shm \
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500389 weston-simple-damage \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800390 weston-simple-touch \
391 weston-multi-resource
392
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800393weston_simple_shm_SOURCES = clients/simple-shm.c
394nodist_weston_simple_shm_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800395 protocol/xdg-shell-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500396 protocol/xdg-shell-client-protocol.h \
397 protocol/fullscreen-shell-protocol.c \
398 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800399weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800400weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800401
Jason Ekstrand549a53f2014-04-05 09:22:15 -0500402weston_simple_damage_SOURCES = clients/simple-damage.c
403nodist_weston_simple_damage_SOURCES = \
404 protocol/scaler-protocol.c \
405 protocol/scaler-client-protocol.h \
406 protocol/xdg-shell-protocol.c \
407 protocol/xdg-shell-client-protocol.h \
408 protocol/fullscreen-shell-protocol.c \
409 protocol/fullscreen-shell-client-protocol.h
410weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
411weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
412
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800413weston_simple_touch_SOURCES = clients/simple-touch.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800414weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800415weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800416
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800417weston_multi_resource_SOURCES = clients/multi-resource.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800418weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800419weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800420endif
421
422if BUILD_SIMPLE_EGL_CLIENTS
423demo_clients += weston-simple-egl
Kristian Høgsbergfe84a972014-02-11 14:23:19 -0800424weston_simple_egl_SOURCES = clients/simple-egl.c
425nodist_weston_simple_egl_SOURCES = \
Kristian Høgsbergdfaf65b2014-02-07 17:01:57 -0800426 protocol/xdg-shell-protocol.c \
427 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800428weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800429weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
430endif
431
432noinst_LTLIBRARIES += libtoytoolkit.la
433
434libtoytoolkit_la_SOURCES = \
435 clients/window.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800436 clients/window.h
437
438nodist_libtoytoolkit_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100439 protocol/text-cursor-position-protocol.c \
440 protocol/text-cursor-position-client-protocol.h \
441 protocol/scaler-protocol.c \
442 protocol/scaler-client-protocol.h \
443 protocol/workspaces-protocol.c \
444 protocol/workspaces-client-protocol.h \
445 protocol/xdg-shell-protocol.c \
446 protocol/xdg-shell-client-protocol.h
Jasper St. Pierre0790e392013-12-09 14:58:00 -0500447
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800448BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
449
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800450
451libtoytoolkit_la_LIBADD = \
452 $(CLIENT_LIBS) \
453 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800454 libshared-cairo.la -lrt -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800455libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800456
457weston_flower_SOURCES = clients/flower.c
458weston_flower_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800459weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800460
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100461weston_screenshooter_SOURCES = \
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800462 clients/screenshot.c
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800463nodist_weston_screenshooter_SOURCES = \
464 protocol/screenshooter-protocol.c \
465 protocol/screenshooter-client-protocol.h
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800466weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800467weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800468
469weston_terminal_SOURCES = clients/terminal.c
470weston_terminal_LDADD = libtoytoolkit.la -lutil
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800471weston_terminal_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800472
473weston_image_SOURCES = clients/image.c
474weston_image_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800475weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800476
477weston_cliptest_SOURCES = clients/cliptest.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800478weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800479weston_cliptest_LDADD = libtoytoolkit.la
480
481weston_dnd_SOURCES = clients/dnd.c
482weston_dnd_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800483weston_dnd_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800484
485weston_smoke_SOURCES = clients/smoke.c
486weston_smoke_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800487weston_smoke_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800488
489weston_resizor_SOURCES = clients/resizor.c
490weston_resizor_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800491weston_resizor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800492
493weston_scaler_SOURCES = clients/scaler.c
494weston_scaler_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800495weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800496
497if HAVE_CAIRO_GLESV2
498demo_clients += weston-nested weston-nested-client
499
500weston_nested_SOURCES = clients/nested.c
501weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800502weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800503
504weston_nested_client_SOURCES = clients/nested-client.c
505weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800506weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800507endif
508
509weston_eventdemo_SOURCES = clients/eventdemo.c
510weston_eventdemo_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800511weston_eventdemo_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800512
513weston_clickdot_SOURCES = clients/clickdot.c
514weston_clickdot_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800515weston_clickdot_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800516
517weston_transformed_SOURCES = clients/transformed.c
518weston_transformed_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800519weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800520
521weston_fullscreen_SOURCES = clients/fullscreen.c
Jason Ekstrand2bb72fe2014-04-02 19:53:52 -0500522nodist_weston_fullscreen_SOURCES = \
523 protocol/fullscreen-shell-protocol.c \
524 protocol/fullscreen-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800525weston_fullscreen_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800526weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800527
528weston_stacking_SOURCES = clients/stacking.c
529weston_stacking_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800530weston_stacking_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800531
532weston_calibrator_SOURCES = clients/calibrator.c \
533 shared/matrix.c \
534 shared/matrix.h
535weston_calibrator_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800536weston_calibrator_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800537
538if BUILD_SUBSURFACES_CLIENT
539demo_clients += weston-subsurfaces
540weston_subsurfaces_SOURCES = clients/subsurfaces.c
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800541weston_subsurfaces_CFLAGS = \
542 $(AM_CFLAGS) \
543 $(SIMPLE_EGL_CLIENT_CFLAGS) \
544 $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800545weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
546endif
547
548if HAVE_PANGO
549demo_clients += weston-editor
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800550weston_editor_SOURCES = clients/editor.c
551nodist_weston_editor_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100552 protocol/text-protocol.c \
553 protocol/text-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800554weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800555weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800556endif
557
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800558weston_keyboard_SOURCES = clients/keyboard.c
559nodist_weston_keyboard_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100560 protocol/desktop-shell-client-protocol.h \
561 protocol/desktop-shell-protocol.c \
562 protocol/input-method-protocol.c \
563 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800564weston_keyboard_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800565weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800566
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800567weston_simple_im_SOURCES = clients/weston-simple-im.c
568nodist_weston_simple_im_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100569 protocol/input-method-protocol.c \
570 protocol/input-method-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800571weston_simple_im_LDADD = $(CLIENT_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800572weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800573
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800574weston_info_SOURCES = clients/weston-info.c
575weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
Pekka Paalanen5124b532014-02-03 13:12:34 +0200576weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800577
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800578weston_desktop_shell_SOURCES = clients/desktop-shell.c
579nodist_weston_desktop_shell_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100580 protocol/desktop-shell-client-protocol.h \
581 protocol/desktop-shell-protocol.c
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800582weston_desktop_shell_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800583weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800584
585if BUILD_FULL_GL_CLIENTS
586demo_clients += weston-gears
587weston_gears_SOURCES = clients/gears.c
588weston_gears_LDADD = libtoytoolkit.la
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800589weston_gears_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800590
591if HAVE_GLU
592libexec_PROGRAMS += weston-screensaver
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100593weston_screensaver_SOURCES = \
594 clients/wscreensaver.c \
595 clients/wscreensaver.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100596 clients/wscreensaver-glue.c \
597 clients/wscreensaver-glue.h \
598 clients/glmatrix.c \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800599 clients/matrix3.xpm
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800600nodist_weston_screensaver_SOURCES = \
601 protocol/desktop-shell-client-protocol.h \
602 protocol/desktop-shell-protocol.c
603
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800604weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
Kristian Høgsberge5b4dce2014-02-05 22:00:59 -0800605weston_screensaver_CFLAGS = $(AM_CFLAGS) $(GLU_CFLAGS) $(CLIENT_CFLAGS)
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800606
607endif
608
609endif
610
611endif
612
613BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100614 protocol/screenshooter-protocol.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800615 protocol/screenshooter-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100616 protocol/text-cursor-position-client-protocol.h \
617 protocol/text-cursor-position-protocol.c \
618 protocol/text-protocol.c \
619 protocol/text-client-protocol.h \
620 protocol/input-method-protocol.c \
621 protocol/input-method-client-protocol.h \
622 protocol/desktop-shell-client-protocol.h \
623 protocol/desktop-shell-protocol.c \
624 protocol/scaler-client-protocol.h \
625 protocol/scaler-protocol.c \
626 protocol/workspaces-client-protocol.h \
627 protocol/workspaces-protocol.c \
Jason Ekstrand428c24e2014-04-02 19:53:48 -0500628 protocol/fullscreen-shell-protocol.c \
629 protocol/fullscreen-shell-client-protocol.h \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100630 protocol/xdg-shell-protocol.c \
631 protocol/xdg-shell-client-protocol.h
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800632
633
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800634westondatadir = $(datadir)/weston
635dist_westondata_DATA = \
636 data/wayland.svg \
637 data/wayland.png \
638 data/pattern.png \
639 data/terminal.png \
640 data/border.png \
641 data/icon_window.png \
642 data/sign_close.png \
643 data/sign_maximize.png \
644 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800645
646
647if BUILD_WCAP_TOOLS
648bin_PROGRAMS += wcap-decode
649
650wcap_decode_SOURCES = \
651 wcap/main.c \
652 wcap/wcap-decode.c \
653 wcap/wcap-decode.h
654
655wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
656wcap_decode_LDADD = $(WCAP_LIBS)
657endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800658
659
660if ENABLE_DESKTOP_SHELL
661
662module_LTLIBRARIES += desktop-shell.la
663
664desktop_shell_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100665 -I$(top_builddir)/protocol \
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800666 -I$(top_srcdir)/shared \
667 -I$(top_srcdir)/src \
668 -I$(top_builddir)/src \
669 -I$(top_builddir)/desktop-shell \
670 -DDATADIR='"$(datadir)"' \
671 -DMODULEDIR='"$(moduledir)"' \
672 -DLIBEXECDIR='"$(libexecdir)"' \
673 -DIN_WESTON
674
675desktop_shell_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg4c1bfc92014-02-11 14:21:39 -0800676desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800677desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
678desktop_shell_la_SOURCES = \
679 desktop-shell/shell.h \
680 desktop-shell/shell.c \
681 desktop-shell/exposay.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800682 desktop-shell/input-panel.c
683nodist_desktop_shell_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100684 protocol/desktop-shell-protocol.c \
685 protocol/desktop-shell-server-protocol.h \
686 protocol/xdg-shell-protocol.c \
687 protocol/xdg-shell-server-protocol.h
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800688
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800689BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800690endif
691
Jason Ekstrand946a9482014-04-02 19:53:47 -0500692if ENABLE_FULLSCREEN_SHELL
693
694module_LTLIBRARIES += fullscreen-shell.la
695
696fullscreen_shell_la_CPPFLAGS = \
697 -I$(top_builddir)/protocol \
698 -I$(top_srcdir)/shared \
699 -I$(top_srcdir)/src \
700 -I$(top_builddir)/src \
701 -DIN_WESTON
702
703fullscreen_shell_la_LDFLAGS = -module -avoid-version
704fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
705fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
706fullscreen_shell_la_SOURCES = \
707 fullscreen-shell/fullscreen-shell.c
708nodist_fullscreen_shell_la_SOURCES = \
709 protocol/fullscreen-shell-protocol.c \
710 protocol/fullscreen-shell-server-protocol.h
711
712BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
713endif
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800714
Jason Ekstrand47928d82014-04-02 19:54:01 -0500715if ENABLE_SCREEN_SHARING
716
717module_LTLIBRARIES += screen-share.la
718
719screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
720screen_share_la_LDFLAGS = -module -avoid-version
721screen_share_la_LIBADD = \
722 $(COMPOSITOR_LIBS) \
723 $(SCREEN_SHARE_LIBS) \
724 libshared-cairo.la
725screen_share_la_CFLAGS = \
726 $(COMPOSITOR_CFLAGS) \
727 $(SCREEN_SHARE_CFLAGS) \
728 $(GCC_CFLAGS)
729screen_share_la_SOURCES = \
730 src/screen-share.c
731nodist_screen_share_la_SOURCES = \
732 protocol/fullscreen-shell-protocol.c \
733 protocol/fullscreen-shell-client-protocol.h
734
735endif
736
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800737if ENABLE_XWAYLAND
738
739module_LTLIBRARIES += xwayland.la
740
741xwayland_la_CPPFLAGS = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100742 -I$(top_builddir)/protocol \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800743 -I$(top_srcdir)/shared \
744 -I$(top_srcdir)/src \
745 -I$(top_builddir)/src \
746 -I$(top_builddir)/xwayland \
747 -DDATADIR='"$(datadir)"' \
748 -DMODULEDIR='"$(moduledir)"' \
749 -DLIBEXECDIR='"$(libexecdir)"' \
750 -DXSERVER_PATH='"@XSERVER_PATH@"'
751
752xwayland_la_LDFLAGS = -module -avoid-version
753xwayland_la_LIBADD = \
754 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800755 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800756xwayland_la_CFLAGS = \
757 $(GCC_CFLAGS) \
758 $(COMPOSITOR_CFLAGS) \
759 $(PIXMAN_CFLAGS) \
760 $(CAIRO_CFLAGS)
761xwayland_la_SOURCES = \
762 xwayland/xwayland.h \
763 xwayland/window-manager.c \
764 xwayland/selection.c \
765 xwayland/dnd.c \
766 xwayland/launcher.c \
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800767 xwayland/hash.c \
768 xwayland/hash.h
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800769endif
770
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800771
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800772#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800773# Shared utilities
774#
775
776noinst_LTLIBRARIES += libshared.la libshared-cairo.la
777
778libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
779
780libshared_la_SOURCES = \
781 shared/config-parser.c \
782 shared/option-parser.c \
783 shared/config-parser.h \
784 shared/os-compatibility.c \
785 shared/os-compatibility.h
786
787libshared_cairo_la_CFLAGS = \
788 -DDATADIR='"$(datadir)"' \
789 $(GCC_CFLAGS) \
790 $(COMPOSITOR_CFLAGS) \
791 $(PIXMAN_CFLAGS) \
792 $(CAIRO_CFLAGS) \
793 $(PNG_CFLAGS) \
794 $(WEBP_CFLAGS)
795
796libshared_cairo_la_LIBADD = \
797 $(PIXMAN_LIBS) \
798 $(CAIRO_LIBS) \
799 $(PNG_LIBS) \
800 $(WEBP_LIBS) \
801 $(JPEG_LIBS)
802
803libshared_cairo_la_SOURCES = \
804 $(libshared_la_SOURCES) \
805 shared/image-loader.c \
806 shared/image-loader.h \
807 shared/cairo-util.c \
808 shared/frame.c \
809 shared/cairo-util.h
810
811
812#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800813# tests subdirectory
814#
815
816TESTS = $(shared_tests) $(module_tests) $(weston_tests)
817
818shared_tests = \
819 config-parser.test \
820 vertex-clip.test
821
822module_tests = \
823 surface-test.la \
824 surface-global-test.la
825
826weston_tests = \
827 bad_buffer.weston \
828 keyboard.weston \
829 event.weston \
830 button.weston \
831 text.weston \
832 subsurface.weston
833
834
835AM_TESTS_ENVIRONMENT = \
836 abs_builddir='$(abs_builddir)'; export abs_builddir;
837
838TEST_EXTENSIONS = .la .weston
839LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
840WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
841
842clean-local:
Pekka Paalanen15f85632014-05-12 10:08:57 +0300843 -rm -rf logs
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800844
845# To remove when automake 1.11 support is dropped
846export abs_builddir
847
848noinst_LTLIBRARIES += \
849 weston-test.la \
850 $(module_tests) \
851 libtest-runner.la \
852 libtest-client.la
853
854noinst_PROGRAMS += \
855 $(setbacklight) \
856 $(shared_tests) \
857 $(weston_tests) \
858 matrix-test
859
860test_module_ldflags = \
861 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
862
863surface_global_test_la_SOURCES = tests/surface-global-test.c
864surface_global_test_la_LDFLAGS = $(test_module_ldflags)
865surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
866
867surface_test_la_SOURCES = tests/surface-test.c
868surface_test_la_LDFLAGS = $(test_module_ldflags)
869surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
870
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800871weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800872weston_test_la_LDFLAGS = $(test_module_ldflags)
873weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800874weston_test_la_SOURCES = tests/weston-test.c
875nodist_weston_test_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100876 protocol/wayland-test-protocol.c \
877 protocol/wayland-test-server-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800878
879if ENABLE_EGL
880weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
881weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
882endif
883
884libtest_runner_la_SOURCES = \
885 tests/weston-test-runner.c \
886 tests/weston-test-runner.h
887libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
888
889config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800890config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800891
892vertex_clip_test_SOURCES = \
893 tests/vertex-clip-test.c \
894 src/vertex-clipping.c \
895 src/vertex-clipping.h
896vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
897
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100898libtest_client_la_SOURCES = \
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800899 tests/weston-test-client-helper.c \
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800900 tests/weston-test-client-helper.h
901nodist_libtest_client_la_SOURCES = \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100902 protocol/wayland-test-protocol.c \
903 protocol/wayland-test-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800904libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800905libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800906
907bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800908bad_buffer_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800909bad_buffer_weston_LDADD = libtest-client.la
910
911keyboard_weston_SOURCES = tests/keyboard-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800912keyboard_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800913keyboard_weston_LDADD = libtest-client.la
914
915event_weston_SOURCES = tests/event-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800916event_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800917event_weston_LDADD = libtest-client.la
918
919button_weston_SOURCES = tests/button-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800920button_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800921button_weston_LDADD = libtest-client.la
922
Kristian Høgsbergbece0ee2014-02-01 21:52:17 -0800923text_weston_SOURCES = tests/text-test.c
924nodist_text_weston_SOURCES = \
925 protocol/text-protocol.c \
926 protocol/text-client-protocol.h
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800927text_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800928text_weston_LDADD = libtest-client.la
929
930subsurface_weston_SOURCES = tests/subsurface-test.c
Kristian Høgsberg49fcd002014-02-03 11:05:41 -0800931subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800932subsurface_weston_LDADD = libtest-client.la
933
934if ENABLE_EGL
935weston_tests += buffer-count.weston
936buffer_count_weston_SOURCES = tests/buffer-count-test.c
937buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
938buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
939endif
940
941if ENABLE_XWAYLAND_TEST
Pekka Paalanenf9a26262014-05-07 16:26:29 +0300942weston_tests += xwayland-test.weston
943xwayland_test_weston_SOURCES = tests/xwayland-test.c
944xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
945xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800946endif
947
948matrix_test_SOURCES = \
949 tests/matrix-test.c \
950 shared/matrix.c \
951 shared/matrix.h
952matrix_test_CPPFLAGS = -DUNIT_TEST
953matrix_test_LDADD = -lm -lrt
954
955if BUILD_SETBACKLIGHT
956noinst_PROGRAMS += setbacklight
957setbacklight_SOURCES = \
958 tests/setbacklight.c \
959 src/libbacklight.c \
960 src/libbacklight.h
961setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
962setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
963endif
964
965EXTRA_DIST += tests/weston-tests-env
966
967BUILT_SOURCES += \
Quentin Glidic088ba5e2014-02-01 21:39:12 +0100968 protocol/wayland-test-protocol.c \
969 protocol/wayland-test-server-protocol.h \
970 protocol/wayland-test-client-protocol.h \
971 protocol/text-protocol.c \
972 protocol/text-client-protocol.h
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800973
Kristian Høgsbergcd312752014-02-01 00:38:15 -0800974EXTRA_DIST += \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800975 protocol/desktop-shell.xml \
976 protocol/screenshooter.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800977 protocol/text.xml \
978 protocol/input-method.xml \
979 protocol/workspaces.xml \
980 protocol/text-cursor-position.xml \
981 protocol/wayland-test.xml \
982 protocol/xdg-shell.xml \
Jason Ekstrand27e11672014-04-02 19:53:44 -0500983 protocol/fullscreen-shell.xml \
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800984 protocol/scaler.xml
985
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800986man_MANS = weston.1 weston.ini.5
987
988if ENABLE_DRM_COMPOSITOR
989man_MANS += weston-drm.7
990endif
991
992MAN_SUBSTS = \
993 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
994 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
995 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
996 -e 's|__version__|$(PACKAGE_VERSION)|g'
997
998SUFFIXES = .1 .5 .7 .man
999
1000%.1 %.5 %.7 : man/%.man
1001 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
1002
1003EXTRA_DIST += \
1004 man/weston.man \
1005 man/weston-drm.man \
1006 man/weston.ini.man
1007
1008CLEANFILES += $(man_MANS)
1009
1010
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001011protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
1012 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001013
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001014protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
1015 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
Kristian Høgsberg08229422014-02-01 00:33:04 -08001016
Quentin Glidic088ba5e2014-02-01 21:39:12 +01001017protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
1018 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@