blob: e515736ad19ab3edc49e0360cd6678f0dab10ce6 [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
Neil Robertse3de16e2013-11-22 16:46:00 +000011EXTRA_DIST = weston.ini.in wayland-scanner.mk
12
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øgsbergf9bc6f62014-01-27 22:26:29 -080020all-local : weston.ini validate-protocol-xml
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 \
30 -DDATADIR='"$(datadir)"' \
31 -DMODULEDIR='"$(moduledir)"' \
Kristian Høgsberge73eccd2014-01-31 16:15:11 -080032 -DLIBEXECDIR='"$(libexecdir)"' \
33 -DBINDIR='"$(bindir)"'
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080034
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080035CLEANFILES = weston.ini $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080036
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080037bin_PROGRAMS += weston
38
39weston_LDFLAGS = -export-dynamic
40weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
41weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
42weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -080043 $(DLOPEN_LIBS) -lm libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080044
45weston_SOURCES = \
46 src/git-version.h \
47 src/log.c \
48 src/compositor.c \
49 src/compositor.h \
50 src/input.c \
51 src/data-device.c \
52 src/filter.c \
53 src/filter.h \
54 src/screenshooter.c \
55 src/screenshooter-protocol.c \
56 src/screenshooter-server-protocol.h \
57 src/clipboard.c \
58 src/text-cursor-position-protocol.c \
59 src/text-cursor-position-server-protocol.h \
60 src/zoom.c \
61 src/text-backend.c \
62 src/text-protocol.c \
63 src/text-server-protocol.h \
64 src/input-method-protocol.c \
65 src/input-method-server-protocol.h \
66 src/workspaces-protocol.c \
67 src/workspaces-server-protocol.h \
68 src/scaler-protocol.c \
69 src/scaler-server-protocol.h \
70 src/bindings.c \
71 src/animation.c \
72 src/noop-renderer.c \
73 src/pixman-renderer.c \
74 src/pixman-renderer.h \
75 shared/matrix.c \
76 shared/matrix.h \
77 shared/zalloc.h \
78 src/weston-egl-ext.h
79
80noinst_LTLIBRARIES += \
81 libsession-helper.la
82
83libsession_helper_la_SOURCES = \
84 src/weston-launch.h \
85 src/launcher-util.c \
86 src/launcher-util.h
87libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
88libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
89
90if ENABLE_DBUS
91if HAVE_SYSTEMD_LOGIN
92libsession_helper_la_SOURCES += \
93 src/dbus.h \
94 src/dbus.c \
95 src/logind-util.h \
96 src/logind-util.c
97libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
98libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
99endif
100endif
101
102src/git-version.h : .FORCE
103 $(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)')\"" > $@-new; \
104 cmp -s $@ $@-new || cp $@-new $@; \
105 rm $@-new)
106
107.FORCE :
108
109if BUILD_WESTON_LAUNCH
110bin_PROGRAMS += weston-launch
111weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
112weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
113weston_launch_CFLAGS= \
114 $(GCC_CFLAGS) \
115 $(PAM_CFLAGS) \
116 $(SYSTEMD_LOGIN_CFLAGS) \
117 $(LIBDRM_CFLAGS)
118weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
119
120if ENABLE_SETUID_INSTALL
121install-exec-hook:
122 chown root $(DESTDIR)$(bindir)/weston-launch
123 chmod u+s $(DESTDIR)$(bindir)/weston-launch
124endif
125
126endif # BUILD_WESTON_LAUNCH
127
128pkgconfigdir = $(libdir)/pkgconfig
129pkgconfig_DATA = src/weston.pc
130
131westonincludedir = $(includedir)/weston
132westoninclude_HEADERS = \
133 src/version.h \
134 src/compositor.h \
135 shared/matrix.h \
136 shared/config-parser.h \
137 shared/zalloc.h
138
139if ENABLE_EGL
140module_LTLIBRARIES += gl-renderer.la
141gl_renderer_la_LDFLAGS = -module -avoid-version
142gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
143gl_renderer_la_CFLAGS = \
144 $(COMPOSITOR_CFLAGS) \
145 $(EGL_CFLAGS) \
146 $(GCC_CFLAGS)
147gl_renderer_la_SOURCES = \
148 src/gl-renderer.h \
149 src/gl-renderer.c \
150 src/vertex-clipping.c \
151 src/vertex-clipping.h
152endif
153
154if ENABLE_X11_COMPOSITOR
155module_LTLIBRARIES += x11-backend.la
156x11_backend_la_LDFLAGS = -module -avoid-version
157x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800158 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800159x11_backend_la_CFLAGS = \
160 $(COMPOSITOR_CFLAGS) \
161 $(EGL_CFLAGS) \
162 $(PIXMAN_CFLAGS) \
163 $(CAIRO_CFLAGS) \
164 $(X11_COMPOSITOR_CFLAGS) \
165 $(GCC_CFLAGS)
166x11_backend_la_SOURCES = src/compositor-x11.c
167endif
168
169if ENABLE_DRM_COMPOSITOR
170module_LTLIBRARIES += drm-backend.la
171drm_backend_la_LDFLAGS = -module -avoid-version
172drm_backend_la_LIBADD = \
173 $(COMPOSITOR_LIBS) \
174 $(DRM_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800175 libshared.la -lrt \
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800176 libsession-helper.la
177drm_backend_la_CFLAGS = \
178 $(COMPOSITOR_CFLAGS) \
179 $(EGL_CFLAGS) \
180 $(DRM_COMPOSITOR_CFLAGS) \
181 $(GCC_CFLAGS)
182drm_backend_la_SOURCES = \
183 src/compositor-drm.c \
184 src/udev-seat.c \
185 src/udev-seat.h \
186 src/evdev.c \
187 src/evdev.h \
188 src/evdev-touchpad.c \
189 src/libbacklight.c \
190 src/libbacklight.h
191
192if ENABLE_VAAPI_RECORDER
193drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
194drm_backend_la_LIBADD += $(LIBVA_LIBS)
195drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
196endif
197endif
198
199if ENABLE_WAYLAND_COMPOSITOR
200module_LTLIBRARIES += wayland-backend.la
201wayland_backend_la_LDFLAGS = -module -avoid-version
202wayland_backend_la_LIBADD = \
203 $(COMPOSITOR_LIBS) \
204 $(WAYLAND_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800205 libshared-cairo.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800206wayland_backend_la_CFLAGS = \
207 $(COMPOSITOR_CFLAGS) \
208 $(EGL_CFLAGS) \
209 $(PIXMAN_CFLAGS) \
210 $(CAIRO_CFLAGS) \
211 $(WAYLAND_COMPOSITOR_CFLAGS) \
212 $(GCC_CFLAGS)
213wayland_backend_la_SOURCES = src/compositor-wayland.c
214endif
215
216if ENABLE_RPI_COMPOSITOR
217if INSTALL_RPI_COMPOSITOR
218module_LTLIBRARIES += rpi-backend.la
219else
220noinst_LTLIBRARIES += rpi-backend.la
221endif
222
223rpi_backend_la_LDFLAGS = -module -avoid-version
224rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
225 $(RPI_COMPOSITOR_LIBS) \
226 $(RPI_BCM_HOST_LIBS) \
227 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800228 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800229rpi_backend_la_CFLAGS = \
230 $(GCC_CFLAGS) \
231 $(COMPOSITOR_CFLAGS) \
232 $(RPI_COMPOSITOR_CFLAGS) \
233 $(RPI_BCM_HOST_CFLAGS)
234rpi_backend_la_SOURCES = \
235 src/compositor-rpi.c \
236 src/rpi-renderer.c \
237 src/rpi-renderer.h \
238 src/rpi-bcm-stubs.h \
239 src/udev-seat.c \
240 src/udev-seat.h \
241 src/evdev.c \
242 src/evdev.h \
243 src/evdev-touchpad.c
244
245if ENABLE_EGL
246rpi_backend_la_LIBADD += $(EGL_LIBS)
247rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
248endif
249
250endif
251
252if ENABLE_HEADLESS_COMPOSITOR
253module_LTLIBRARIES += headless-backend.la
254headless_backend_la_LDFLAGS = -module -avoid-version
255headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800256 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800257headless_backend_la_CFLAGS = \
258 $(COMPOSITOR_CFLAGS) \
259 $(GCC_CFLAGS)
260headless_backend_la_SOURCES = src/compositor-headless.c
261endif
262
263if ENABLE_FBDEV_COMPOSITOR
264module_LTLIBRARIES += fbdev-backend.la
265fbdev_backend_la_LDFLAGS = -module -avoid-version
266fbdev_backend_la_LIBADD = \
267 $(COMPOSITOR_LIBS) \
268 $(FBDEV_COMPOSITOR_LIBS) \
269 libsession-helper.la \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800270 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800271fbdev_backend_la_CFLAGS = \
272 $(COMPOSITOR_CFLAGS) \
273 $(EGL_CFLAGS) \
274 $(FBDEV_COMPOSITOR_CFLAGS) \
275 $(PIXMAN_CFLAGS) \
276 $(GCC_CFLAGS)
277fbdev_backend_la_SOURCES = \
278 src/compositor-fbdev.c \
279 src/udev-seat.c \
280 src/udev-seat.h \
281 src/evdev.c \
282 src/evdev.h \
283 src/evdev-touchpad.c
284endif
285
286if ENABLE_RDP_COMPOSITOR
287module_LTLIBRARIES += rdp-backend.la
288rdp_backend_la_LDFLAGS = -module -avoid-version
289rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
290 $(RDP_COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800291 libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800292rdp_backend_la_CFLAGS = \
293 $(COMPOSITOR_CFLAGS) \
294 $(RDP_COMPOSITOR_CFLAGS) \
295 $(GCC_CFLAGS)
296rdp_backend_la_SOURCES = src/compositor-rdp.c
297endif
298
299if HAVE_LCMS
300module_LTLIBRARIES += cms-static.la
301cms_static_la_LDFLAGS = -module -avoid-version
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800302cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -0800303cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
304cms_static_la_SOURCES = \
305 src/cms-static.c \
306 src/cms-helper.c \
307 src/cms-helper.h
308if ENABLE_COLORD
309module_LTLIBRARIES += cms-colord.la
310cms_colord_la_LDFLAGS = -module -avoid-version
311cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
312cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
313cms_colord_la_SOURCES = \
314 src/cms-colord.c \
315 src/cms-helper.c \
316 src/cms-helper.h
317endif
318endif
319
320noinst_PROGRAMS += spring-tool
321spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
322spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
323spring_tool_SOURCES = \
324 src/spring-tool.c \
325 src/animation.c \
326 shared/matrix.c \
327 shared/matrix.h \
328 src/compositor.h
329
330BUILT_SOURCES += \
331 src/screenshooter-server-protocol.h \
332 src/screenshooter-protocol.c \
333 src/text-cursor-position-server-protocol.h \
334 src/text-cursor-position-protocol.c \
335 src/text-protocol.c \
336 src/text-server-protocol.h \
337 src/input-method-protocol.c \
338 src/input-method-server-protocol.h \
339 src/workspaces-server-protocol.h \
340 src/workspaces-protocol.c \
341 src/scaler-server-protocol.h \
342 src/scaler-protocol.c \
343 src/git-version.h
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800344
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800345if BUILD_CLIENTS
346
347bin_PROGRAMS += weston-terminal weston-info
348
349libexec_PROGRAMS += \
350 weston-desktop-shell \
351 weston-screenshooter \
352 weston-keyboard \
353 weston-simple-im
354
355demo_clients = \
356 weston-flower \
357 weston-image \
358 weston-cliptest \
359 weston-dnd \
360 weston-smoke \
361 weston-resizor \
362 weston-eventdemo \
363 weston-clickdot \
364 weston-transformed \
365 weston-fullscreen \
366 weston-stacking \
367 weston-calibrator \
368 weston-scaler
369
370if INSTALL_DEMO_CLIENTS
371bin_PROGRAMS += $(demo_clients)
372else
373noinst_PROGRAMS += $(demo_clients)
374endif
375
376
377if BUILD_SIMPLE_CLIENTS
378demo_clients += \
379 weston-simple-shm \
380 weston-simple-touch \
381 weston-multi-resource
382
383weston_simple_shm_SOURCES = \
384 clients/simple-shm.c \
385 shared/os-compatibility.c \
386 shared/os-compatibility.h
387weston_simple_shm_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
388weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS)
389
390weston_simple_touch_SOURCES = \
391 clients/simple-touch.c \
392 shared/os-compatibility.c \
393 shared/os-compatibility.h
394weston_simple_touch_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
395weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS)
396
397weston_multi_resource_SOURCES = \
398 clients/multi-resource.c \
399 shared/os-compatibility.c \
400 shared/os-compatibility.h
401weston_multi_resource_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
402weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) -lm
403endif
404
405if BUILD_SIMPLE_EGL_CLIENTS
406demo_clients += weston-simple-egl
407weston_simple_egl_SOURCES = clients/simple-egl.c
408weston_simple_egl_CPPFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS)
409weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
410endif
411
412noinst_LTLIBRARIES += libtoytoolkit.la
413
414libtoytoolkit_la_SOURCES = \
415 clients/window.c \
416 clients/window.h \
417 clients/text-cursor-position-protocol.c \
418 clients/text-cursor-position-client-protocol.h \
419 clients/scaler-protocol.c \
420 clients/scaler-client-protocol.h \
421 clients/workspaces-protocol.c \
422 clients/workspaces-client-protocol.h
423
424libtoytoolkit_la_LIBADD = \
425 $(CLIENT_LIBS) \
426 $(CAIRO_EGL_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800427 libshared-cairo.la -lrt -lm
Kristian Høgsberge73eccd2014-01-31 16:15:11 -0800428libtoytoolkit_la_CFLAGS = $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
429
430weston_flower_SOURCES = clients/flower.c
431weston_flower_LDADD = libtoytoolkit.la
432weston_flower_CFLAGS = $(CLIENT_CFLAGS)
433
434weston_screenshooter_SOURCES = \
435 clients/screenshot.c \
436 clients/screenshooter-protocol.c \
437 clients/screenshooter-client-protocol.h \
438 shared/os-compatibility.c \
439 shared/os-compatibility.h
440weston_screenshooter_LDADD = $(CLIENT_LIBS)
441weston_screenshooter_CFLAGS = $(CLIENT_CFLAGS)
442
443weston_terminal_SOURCES = clients/terminal.c
444weston_terminal_LDADD = libtoytoolkit.la -lutil
445weston_terminal_CFLAGS = $(CLIENT_CFLAGS)
446
447weston_image_SOURCES = clients/image.c
448weston_image_LDADD = libtoytoolkit.la
449weston_image_CFLAGS = $(CLIENT_CFLAGS)
450
451weston_cliptest_SOURCES = clients/cliptest.c
452weston_cliptest_CFLAGS = $(AM_CPPFLAGS) $(CLIENT_CFLAGS)
453weston_cliptest_LDADD = libtoytoolkit.la
454
455weston_dnd_SOURCES = clients/dnd.c
456weston_dnd_LDADD = libtoytoolkit.la
457weston_dnd_CFLAGS = $(CLIENT_CFLAGS)
458
459weston_smoke_SOURCES = clients/smoke.c
460weston_smoke_LDADD = libtoytoolkit.la
461weston_smoke_CFLAGS = $(CLIENT_CFLAGS)
462
463weston_resizor_SOURCES = clients/resizor.c
464weston_resizor_LDADD = libtoytoolkit.la
465weston_resizor_CFLAGS = $(CLIENT_CFLAGS)
466
467weston_scaler_SOURCES = clients/scaler.c
468weston_scaler_LDADD = libtoytoolkit.la
469weston_scaler_CFLAGS = $(CLIENT_CFLAGS)
470
471if HAVE_CAIRO_GLESV2
472demo_clients += weston-nested weston-nested-client
473
474weston_nested_SOURCES = clients/nested.c
475weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
476weston_nested_CFLAGS = $(CLIENT_CFLAGS)
477
478weston_nested_client_SOURCES = clients/nested-client.c
479weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
480endif
481
482weston_eventdemo_SOURCES = clients/eventdemo.c
483weston_eventdemo_LDADD = libtoytoolkit.la
484weston_eventdemo_CFLAGS = $(CLIENT_CFLAGS)
485
486weston_clickdot_SOURCES = clients/clickdot.c
487weston_clickdot_LDADD = libtoytoolkit.la
488weston_clickdot_CFLAGS = $(CLIENT_CFLAGS)
489
490weston_transformed_SOURCES = clients/transformed.c
491weston_transformed_LDADD = libtoytoolkit.la
492weston_transformed_CFLAGS = $(CLIENT_CFLAGS)
493
494weston_fullscreen_SOURCES = clients/fullscreen.c
495weston_fullscreen_LDADD = libtoytoolkit.la
496weston_fullscreen_CFLAGS = $(CLIENT_CFLAGS)
497
498weston_stacking_SOURCES = clients/stacking.c
499weston_stacking_LDADD = libtoytoolkit.la
500weston_stacking_CFLAGS = $(CLIENT_CFLAGS)
501
502weston_calibrator_SOURCES = clients/calibrator.c \
503 shared/matrix.c \
504 shared/matrix.h
505weston_calibrator_LDADD = libtoytoolkit.la
506weston_calibrator_CFLAGS = $(CLIENT_CFLAGS)
507
508if BUILD_SUBSURFACES_CLIENT
509demo_clients += weston-subsurfaces
510weston_subsurfaces_SOURCES = clients/subsurfaces.c
511weston_subsurfaces_CFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS) $(CLIENT_CFLAGS)
512weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
513endif
514
515if HAVE_PANGO
516demo_clients += weston-editor
517weston_editor_SOURCES = \
518 clients/editor.c \
519 clients/text-protocol.c \
520 clients/text-client-protocol.h
521weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
522weston_editor_CFLAGS = $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
523endif
524
525weston_keyboard_SOURCES = \
526 clients/keyboard.c \
527 clients/desktop-shell-client-protocol.h \
528 clients/desktop-shell-protocol.c \
529 clients/input-method-protocol.c \
530 clients/input-method-client-protocol.h
531weston_keyboard_LDADD = libtoytoolkit.la
532weston_keyboard_CFLAGS = $(CLIENT_CFLAGS)
533
534weston_simple_im_SOURCES = \
535 clients/weston-simple-im.c \
536 clients/input-method-protocol.c \
537 clients/input-method-client-protocol.h
538weston_simple_im_LDADD = $(CLIENT_LIBS)
539weston_simple_im_CFLAGS = $(CLIENT_CFLAGS)
540
541weston_info_SOURCES = \
542 clients/weston-info.c \
543 shared/os-compatibility.c \
544 shared/os-compatibility.h
545weston_info_LDADD = $(WESTON_INFO_LIBS)
546
547weston_desktop_shell_SOURCES = \
548 clients/desktop-shell.c \
549 clients/desktop-shell-client-protocol.h \
550 clients/desktop-shell-protocol.c
551weston_desktop_shell_LDADD = libtoytoolkit.la
552weston_desktop_shell_CFLAGS = $(CLIENT_CFLAGS)
553
554if BUILD_FULL_GL_CLIENTS
555demo_clients += weston-gears
556weston_gears_SOURCES = clients/gears.c
557weston_gears_LDADD = libtoytoolkit.la
558weston_gears_CFLAGS = $(CLIENT_CFLAGS)
559
560if HAVE_GLU
561libexec_PROGRAMS += weston-screensaver
562weston_screensaver_SOURCES = \
563 clients/wscreensaver.c \
564 clients/wscreensaver.h \
565 clients/desktop-shell-client-protocol.h \
566 clients/desktop-shell-protocol.c \
567 clients/wscreensaver-glue.c \
568 clients/wscreensaver-glue.h \
569 clients/glmatrix.c \
570 clients/matrix3.xpm
571weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
572weston_screensaver_CFLAGS = $(GLU_CFLAGS) $(CLIENT_CFLAGS)
573
574endif
575
576endif
577
578endif
579
580BUILT_SOURCES += \
581 clients/screenshooter-client-protocol.h \
582 clients/screenshooter-protocol.c \
583 clients/text-cursor-position-client-protocol.h \
584 clients/text-cursor-position-protocol.c \
585 clients/text-protocol.c \
586 clients/text-client-protocol.h \
587 clients/input-method-protocol.c \
588 clients/input-method-client-protocol.h \
589 clients/desktop-shell-client-protocol.h \
590 clients/desktop-shell-protocol.c \
591 clients/scaler-client-protocol.h \
592 clients/scaler-protocol.c \
593 clients/workspaces-client-protocol.h \
594 clients/workspaces-protocol.c
595
596
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800597westondatadir = $(datadir)/weston
598dist_westondata_DATA = \
599 data/wayland.svg \
600 data/wayland.png \
601 data/pattern.png \
602 data/terminal.png \
603 data/border.png \
604 data/icon_window.png \
605 data/sign_close.png \
606 data/sign_maximize.png \
607 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800608
609
610if BUILD_WCAP_TOOLS
611bin_PROGRAMS += wcap-decode
612
613wcap_decode_SOURCES = \
614 wcap/main.c \
615 wcap/wcap-decode.c \
616 wcap/wcap-decode.h
617
618wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
619wcap_decode_LDADD = $(WCAP_LIBS)
620endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800621
622
623if ENABLE_DESKTOP_SHELL
624
625module_LTLIBRARIES += desktop-shell.la
626
627desktop_shell_la_CPPFLAGS = \
628 -I$(top_srcdir)/shared \
629 -I$(top_srcdir)/src \
630 -I$(top_builddir)/src \
631 -I$(top_builddir)/desktop-shell \
632 -DDATADIR='"$(datadir)"' \
633 -DMODULEDIR='"$(moduledir)"' \
634 -DLIBEXECDIR='"$(libexecdir)"' \
635 -DIN_WESTON
636
637desktop_shell_la_LDFLAGS = -module -avoid-version
638desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800639 libshared.la
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800640desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
641desktop_shell_la_SOURCES = \
642 desktop-shell/shell.h \
643 desktop-shell/shell.c \
644 desktop-shell/exposay.c \
645 desktop-shell/input-panel.c \
646 desktop-shell/desktop-shell-protocol.c \
647 desktop-shell/desktop-shell-server-protocol.h \
648 desktop-shell/xdg-shell-protocol.c \
649 desktop-shell/xdg-shell-server-protocol.h
650
651BUILT_SOURCES += \
652 desktop-shell/desktop-shell-protocol.c \
653 desktop-shell/desktop-shell-server-protocol.h \
654 desktop-shell/xdg-shell-protocol.c \
655 desktop-shell/xdg-shell-server-protocol.h
656endif
657
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800658
659if ENABLE_XWAYLAND
660
661module_LTLIBRARIES += xwayland.la
662
663xwayland_la_CPPFLAGS = \
664 -I$(top_srcdir)/shared \
665 -I$(top_srcdir)/src \
666 -I$(top_builddir)/src \
667 -I$(top_builddir)/xwayland \
668 -DDATADIR='"$(datadir)"' \
669 -DMODULEDIR='"$(moduledir)"' \
670 -DLIBEXECDIR='"$(libexecdir)"' \
671 -DXSERVER_PATH='"@XSERVER_PATH@"'
672
673xwayland_la_LDFLAGS = -module -avoid-version
674xwayland_la_LIBADD = \
675 $(XWAYLAND_LIBS) \
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800676 $(top_builddir)/libshared-cairo.la
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800677xwayland_la_CFLAGS = \
678 $(GCC_CFLAGS) \
679 $(COMPOSITOR_CFLAGS) \
680 $(PIXMAN_CFLAGS) \
681 $(CAIRO_CFLAGS)
682xwayland_la_SOURCES = \
683 xwayland/xwayland.h \
684 xwayland/window-manager.c \
685 xwayland/selection.c \
686 xwayland/dnd.c \
687 xwayland/launcher.c \
688 xwayland/xserver-protocol.c \
689 xwayland/xserver-server-protocol.h \
690 xwayland/hash.c \
691 xwayland/hash.h
692
693BUILT_SOURCES += \
694 xwayland/xserver-protocol.c \
695 xwayland/xserver-server-protocol.h
696endif
697
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800698
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800699#
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800700# Shared utilities
701#
702
703noinst_LTLIBRARIES += libshared.la libshared-cairo.la
704
705libshared_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
706
707libshared_la_SOURCES = \
708 shared/config-parser.c \
709 shared/option-parser.c \
710 shared/config-parser.h \
711 shared/os-compatibility.c \
712 shared/os-compatibility.h
713
714libshared_cairo_la_CFLAGS = \
715 -DDATADIR='"$(datadir)"' \
716 $(GCC_CFLAGS) \
717 $(COMPOSITOR_CFLAGS) \
718 $(PIXMAN_CFLAGS) \
719 $(CAIRO_CFLAGS) \
720 $(PNG_CFLAGS) \
721 $(WEBP_CFLAGS)
722
723libshared_cairo_la_LIBADD = \
724 $(PIXMAN_LIBS) \
725 $(CAIRO_LIBS) \
726 $(PNG_LIBS) \
727 $(WEBP_LIBS) \
728 $(JPEG_LIBS)
729
730libshared_cairo_la_SOURCES = \
731 $(libshared_la_SOURCES) \
732 shared/image-loader.c \
733 shared/image-loader.h \
734 shared/cairo-util.c \
735 shared/frame.c \
736 shared/cairo-util.h
737
738
739#
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800740# tests subdirectory
741#
742
743TESTS = $(shared_tests) $(module_tests) $(weston_tests)
744
745shared_tests = \
746 config-parser.test \
747 vertex-clip.test
748
749module_tests = \
750 surface-test.la \
751 surface-global-test.la
752
753weston_tests = \
754 bad_buffer.weston \
755 keyboard.weston \
756 event.weston \
757 button.weston \
758 text.weston \
759 subsurface.weston
760
761
762AM_TESTS_ENVIRONMENT = \
763 abs_builddir='$(abs_builddir)'; export abs_builddir;
764
765TEST_EXTENSIONS = .la .weston
766LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
767WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
768
769clean-local:
770 -rm -rf tests/logs
771
772# To remove when automake 1.11 support is dropped
773export abs_builddir
774
775noinst_LTLIBRARIES += \
776 weston-test.la \
777 $(module_tests) \
778 libtest-runner.la \
779 libtest-client.la
780
781noinst_PROGRAMS += \
782 $(setbacklight) \
783 $(shared_tests) \
784 $(weston_tests) \
785 matrix-test
786
787test_module_ldflags = \
788 -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS)
789
790surface_global_test_la_SOURCES = tests/surface-global-test.c
791surface_global_test_la_LDFLAGS = $(test_module_ldflags)
792surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
793
794surface_test_la_SOURCES = tests/surface-test.c
795surface_test_la_LDFLAGS = $(test_module_ldflags)
796surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
797
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800798weston_test_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800799weston_test_la_LDFLAGS = $(test_module_ldflags)
800weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
801weston_test_la_SOURCES = \
802 tests/weston-test.c \
803 tests/wayland-test-protocol.c \
804 tests/wayland-test-server-protocol.h
805
806if ENABLE_EGL
807weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
808weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)
809endif
810
811libtest_runner_la_SOURCES = \
812 tests/weston-test-runner.c \
813 tests/weston-test-runner.h
814libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
815
816config_parser_test_SOURCES = tests/config-parser-test.c
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800817config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800818
819vertex_clip_test_SOURCES = \
820 tests/vertex-clip-test.c \
821 src/vertex-clipping.c \
822 src/vertex-clipping.h
823vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
824
825libtest_client_la_SOURCES = \
826 tests/weston-test-client-helper.c \
827 tests/weston-test-client-helper.h \
828 tests/wayland-test-protocol.c \
829 tests/wayland-test-client-protocol.h
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800830libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
Kristian Høgsberg1e80afa2014-01-31 14:03:09 -0800831
832bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
833bad_buffer_weston_LDADD = libtest-client.la
834
835keyboard_weston_SOURCES = tests/keyboard-test.c
836keyboard_weston_LDADD = libtest-client.la
837
838event_weston_SOURCES = tests/event-test.c
839event_weston_LDADD = libtest-client.la
840
841button_weston_SOURCES = tests/button-test.c
842button_weston_LDADD = libtest-client.la
843
844text_weston_SOURCES = tests/text-test.c tests/text-protocol.c
845text_weston_LDADD = libtest-client.la
846
847subsurface_weston_SOURCES = tests/subsurface-test.c
848subsurface_weston_LDADD = libtest-client.la
849
850if ENABLE_EGL
851weston_tests += buffer-count.weston
852buffer_count_weston_SOURCES = tests/buffer-count-test.c
853buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS)
854buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
855endif
856
857if ENABLE_XWAYLAND_TEST
858weston_tests += xwayland.weston
859xwayland_weston_SOURCES = tests/xwayland-test.c
860xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
861xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
862endif
863
864matrix_test_SOURCES = \
865 tests/matrix-test.c \
866 shared/matrix.c \
867 shared/matrix.h
868matrix_test_CPPFLAGS = -DUNIT_TEST
869matrix_test_LDADD = -lm -lrt
870
871if BUILD_SETBACKLIGHT
872noinst_PROGRAMS += setbacklight
873setbacklight_SOURCES = \
874 tests/setbacklight.c \
875 src/libbacklight.c \
876 src/libbacklight.h
877setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
878setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
879endif
880
881EXTRA_DIST += tests/weston-tests-env
882
883BUILT_SOURCES += \
884 tests/wayland-test-protocol.c \
885 tests/wayland-test-server-protocol.h \
886 tests/wayland-test-client-protocol.h \
887 tests/text-protocol.c \
888 tests/text-client-protocol.h
889
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800890protocol_sources = \
891 protocol/desktop-shell.xml \
892 protocol/screenshooter.xml \
893 protocol/xserver.xml \
894 protocol/text.xml \
895 protocol/input-method.xml \
896 protocol/workspaces.xml \
897 protocol/text-cursor-position.xml \
898 protocol/wayland-test.xml \
899 protocol/xdg-shell.xml \
900 protocol/scaler.xml
901
902if HAVE_XMLLINT
903.PHONY : validate-protocol-xml
904
905.%.xml.valid : $(top_srcdir)/protocol/%.xml
906 $(AM_V_GEN)$(XMLLINT) --noout --dtdvalid $(dtddir)/wayland.dtd $^ > $@
907
908validate-protocol-xml : $(protocol_sources:protocol/%.xml=.%.xml.valid)
909
910CLEANFILES += $(protocol_sources:protocol/%.xml=.%.xml.valid)
911EXTRA_DIST += $(protocol_sources)
912
913endif
914
915
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800916man_MANS = weston.1 weston.ini.5
917
918if ENABLE_DRM_COMPOSITOR
919man_MANS += weston-drm.7
920endif
921
922MAN_SUBSTS = \
923 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
924 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
925 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
926 -e 's|__version__|$(PACKAGE_VERSION)|g'
927
928SUFFIXES = .1 .5 .7 .man
929
930%.1 %.5 %.7 : man/%.man
931 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
932
933EXTRA_DIST += \
934 man/weston.man \
935 man/weston-drm.man \
936 man/weston.ini.man
937
938CLEANFILES += $(man_MANS)
939
940
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800941wayland_protocoldir = $(top_srcdir)/protocol
942include $(top_srcdir)/wayland-scanner.mk