blob: 6c56f97774ef859a47cffed0beee7aee05327280 [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øgsbergbc00dbe2014-01-27 21:56:12 -08003moduledir = $(libdir)/weston
4module_LTLIBRARIES =
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -08005noinst_LTLIBRARIES =
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -08006BUILT_SOURCES =
Kristian Høgsberge895f142014-01-27 21:46:30 -08007
Kristian Høgsberg2ba10df2013-12-03 16:38:15 -08008SUBDIRS = \
9 shared \
Kristian Høgsberg2ba10df2013-12-03 16:38:15 -080010 clients \
Kristian Høgsberg68c5c102014-01-27 22:33:04 -080011 tests
Kristian Høgsberg61cfa662012-05-26 13:19:22 -040012
Kristian Høgsberg850f24c2012-02-09 09:20:44 -050013DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
Kristian Høgsberg24639cc2013-02-25 13:03:15 -050014
Neil Robertse3de16e2013-11-22 16:46:00 +000015EXTRA_DIST = weston.ini.in wayland-scanner.mk
16
17weston.ini : $(srcdir)/weston.ini.in
18 $(AM_V_GEN)$(SED) \
19 -e 's|@bindir[@]|$(bindir)|g' \
20 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
21 -e 's|@libexecdir[@]|$(libexecdir)|g' \
22 $< > $@
23
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -080024all-local : weston.ini validate-protocol-xml
Kristian Høgsberg98463742013-12-16 23:12:46 -080025
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080026AM_CPPFLAGS = \
27 -I$(top_builddir)/src \
28 -I$(top_srcdir)/shared \
29 -DDATADIR='"$(datadir)"' \
30 -DMODULEDIR='"$(moduledir)"' \
31 -DLIBEXECDIR='"$(libexecdir)"'
32
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -080033CLEANFILES = weston.ini $(BUILT_SOURCES)
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -080034
Kristian Høgsbergb7e3ef42014-01-27 23:05:52 -080035bin_PROGRAMS += weston
36
37weston_LDFLAGS = -export-dynamic
38weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
39weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
40weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
41 $(DLOPEN_LIBS) -lm shared/libshared.la
42
43weston_SOURCES = \
44 src/git-version.h \
45 src/log.c \
46 src/compositor.c \
47 src/compositor.h \
48 src/input.c \
49 src/data-device.c \
50 src/filter.c \
51 src/filter.h \
52 src/screenshooter.c \
53 src/screenshooter-protocol.c \
54 src/screenshooter-server-protocol.h \
55 src/clipboard.c \
56 src/text-cursor-position-protocol.c \
57 src/text-cursor-position-server-protocol.h \
58 src/zoom.c \
59 src/text-backend.c \
60 src/text-protocol.c \
61 src/text-server-protocol.h \
62 src/input-method-protocol.c \
63 src/input-method-server-protocol.h \
64 src/workspaces-protocol.c \
65 src/workspaces-server-protocol.h \
66 src/scaler-protocol.c \
67 src/scaler-server-protocol.h \
68 src/bindings.c \
69 src/animation.c \
70 src/noop-renderer.c \
71 src/pixman-renderer.c \
72 src/pixman-renderer.h \
73 shared/matrix.c \
74 shared/matrix.h \
75 shared/zalloc.h \
76 src/weston-egl-ext.h
77
78noinst_LTLIBRARIES += \
79 libsession-helper.la
80
81libsession_helper_la_SOURCES = \
82 src/weston-launch.h \
83 src/launcher-util.c \
84 src/launcher-util.h
85libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
86libsession_helper_la_LIBADD = $(LIBDRM_LIBS)
87
88if ENABLE_DBUS
89if HAVE_SYSTEMD_LOGIN
90libsession_helper_la_SOURCES += \
91 src/dbus.h \
92 src/dbus.c \
93 src/logind-util.h \
94 src/logind-util.c
95libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS)
96libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS)
97endif
98endif
99
100src/git-version.h : .FORCE
101 $(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; \
102 cmp -s $@ $@-new || cp $@-new $@; \
103 rm $@-new)
104
105.FORCE :
106
107if BUILD_WESTON_LAUNCH
108bin_PROGRAMS += weston-launch
109weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
110weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
111weston_launch_CFLAGS= \
112 $(GCC_CFLAGS) \
113 $(PAM_CFLAGS) \
114 $(SYSTEMD_LOGIN_CFLAGS) \
115 $(LIBDRM_CFLAGS)
116weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
117
118if ENABLE_SETUID_INSTALL
119install-exec-hook:
120 chown root $(DESTDIR)$(bindir)/weston-launch
121 chmod u+s $(DESTDIR)$(bindir)/weston-launch
122endif
123
124endif # BUILD_WESTON_LAUNCH
125
126pkgconfigdir = $(libdir)/pkgconfig
127pkgconfig_DATA = src/weston.pc
128
129westonincludedir = $(includedir)/weston
130westoninclude_HEADERS = \
131 src/version.h \
132 src/compositor.h \
133 shared/matrix.h \
134 shared/config-parser.h \
135 shared/zalloc.h
136
137if ENABLE_EGL
138module_LTLIBRARIES += gl-renderer.la
139gl_renderer_la_LDFLAGS = -module -avoid-version
140gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
141gl_renderer_la_CFLAGS = \
142 $(COMPOSITOR_CFLAGS) \
143 $(EGL_CFLAGS) \
144 $(GCC_CFLAGS)
145gl_renderer_la_SOURCES = \
146 src/gl-renderer.h \
147 src/gl-renderer.c \
148 src/vertex-clipping.c \
149 src/vertex-clipping.h
150endif
151
152if ENABLE_X11_COMPOSITOR
153module_LTLIBRARIES += x11-backend.la
154x11_backend_la_LDFLAGS = -module -avoid-version
155x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
156 shared/libshared-cairo.la
157x11_backend_la_CFLAGS = \
158 $(COMPOSITOR_CFLAGS) \
159 $(EGL_CFLAGS) \
160 $(PIXMAN_CFLAGS) \
161 $(CAIRO_CFLAGS) \
162 $(X11_COMPOSITOR_CFLAGS) \
163 $(GCC_CFLAGS)
164x11_backend_la_SOURCES = src/compositor-x11.c
165endif
166
167if ENABLE_DRM_COMPOSITOR
168module_LTLIBRARIES += drm-backend.la
169drm_backend_la_LDFLAGS = -module -avoid-version
170drm_backend_la_LIBADD = \
171 $(COMPOSITOR_LIBS) \
172 $(DRM_COMPOSITOR_LIBS) \
173 shared/libshared.la -lrt \
174 libsession-helper.la
175drm_backend_la_CFLAGS = \
176 $(COMPOSITOR_CFLAGS) \
177 $(EGL_CFLAGS) \
178 $(DRM_COMPOSITOR_CFLAGS) \
179 $(GCC_CFLAGS)
180drm_backend_la_SOURCES = \
181 src/compositor-drm.c \
182 src/udev-seat.c \
183 src/udev-seat.h \
184 src/evdev.c \
185 src/evdev.h \
186 src/evdev-touchpad.c \
187 src/libbacklight.c \
188 src/libbacklight.h
189
190if ENABLE_VAAPI_RECORDER
191drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h
192drm_backend_la_LIBADD += $(LIBVA_LIBS)
193drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
194endif
195endif
196
197if ENABLE_WAYLAND_COMPOSITOR
198module_LTLIBRARIES += wayland-backend.la
199wayland_backend_la_LDFLAGS = -module -avoid-version
200wayland_backend_la_LIBADD = \
201 $(COMPOSITOR_LIBS) \
202 $(WAYLAND_COMPOSITOR_LIBS) \
203 shared/libshared-cairo.la
204wayland_backend_la_CFLAGS = \
205 $(COMPOSITOR_CFLAGS) \
206 $(EGL_CFLAGS) \
207 $(PIXMAN_CFLAGS) \
208 $(CAIRO_CFLAGS) \
209 $(WAYLAND_COMPOSITOR_CFLAGS) \
210 $(GCC_CFLAGS)
211wayland_backend_la_SOURCES = src/compositor-wayland.c
212endif
213
214if ENABLE_RPI_COMPOSITOR
215if INSTALL_RPI_COMPOSITOR
216module_LTLIBRARIES += rpi-backend.la
217else
218noinst_LTLIBRARIES += rpi-backend.la
219endif
220
221rpi_backend_la_LDFLAGS = -module -avoid-version
222rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
223 $(RPI_COMPOSITOR_LIBS) \
224 $(RPI_BCM_HOST_LIBS) \
225 libsession-helper.la \
226 shared/libshared.la
227rpi_backend_la_CFLAGS = \
228 $(GCC_CFLAGS) \
229 $(COMPOSITOR_CFLAGS) \
230 $(RPI_COMPOSITOR_CFLAGS) \
231 $(RPI_BCM_HOST_CFLAGS)
232rpi_backend_la_SOURCES = \
233 src/compositor-rpi.c \
234 src/rpi-renderer.c \
235 src/rpi-renderer.h \
236 src/rpi-bcm-stubs.h \
237 src/udev-seat.c \
238 src/udev-seat.h \
239 src/evdev.c \
240 src/evdev.h \
241 src/evdev-touchpad.c
242
243if ENABLE_EGL
244rpi_backend_la_LIBADD += $(EGL_LIBS)
245rpi_backend_la_CFLAGS += $(EGL_CFLAGS)
246endif
247
248endif
249
250if ENABLE_HEADLESS_COMPOSITOR
251module_LTLIBRARIES += headless-backend.la
252headless_backend_la_LDFLAGS = -module -avoid-version
253headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
254 shared/libshared.la
255headless_backend_la_CFLAGS = \
256 $(COMPOSITOR_CFLAGS) \
257 $(GCC_CFLAGS)
258headless_backend_la_SOURCES = src/compositor-headless.c
259endif
260
261if ENABLE_FBDEV_COMPOSITOR
262module_LTLIBRARIES += fbdev-backend.la
263fbdev_backend_la_LDFLAGS = -module -avoid-version
264fbdev_backend_la_LIBADD = \
265 $(COMPOSITOR_LIBS) \
266 $(FBDEV_COMPOSITOR_LIBS) \
267 libsession-helper.la \
268 shared/libshared.la
269fbdev_backend_la_CFLAGS = \
270 $(COMPOSITOR_CFLAGS) \
271 $(EGL_CFLAGS) \
272 $(FBDEV_COMPOSITOR_CFLAGS) \
273 $(PIXMAN_CFLAGS) \
274 $(GCC_CFLAGS)
275fbdev_backend_la_SOURCES = \
276 src/compositor-fbdev.c \
277 src/udev-seat.c \
278 src/udev-seat.h \
279 src/evdev.c \
280 src/evdev.h \
281 src/evdev-touchpad.c
282endif
283
284if ENABLE_RDP_COMPOSITOR
285module_LTLIBRARIES += rdp-backend.la
286rdp_backend_la_LDFLAGS = -module -avoid-version
287rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
288 $(RDP_COMPOSITOR_LIBS) \
289 shared/libshared.la
290rdp_backend_la_CFLAGS = \
291 $(COMPOSITOR_CFLAGS) \
292 $(RDP_COMPOSITOR_CFLAGS) \
293 $(GCC_CFLAGS)
294rdp_backend_la_SOURCES = src/compositor-rdp.c
295endif
296
297if HAVE_LCMS
298module_LTLIBRARIES += cms-static.la
299cms_static_la_LDFLAGS = -module -avoid-version
300cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) shared/libshared.la
301cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
302cms_static_la_SOURCES = \
303 src/cms-static.c \
304 src/cms-helper.c \
305 src/cms-helper.h
306if ENABLE_COLORD
307module_LTLIBRARIES += cms-colord.la
308cms_colord_la_LDFLAGS = -module -avoid-version
309cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
310cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
311cms_colord_la_SOURCES = \
312 src/cms-colord.c \
313 src/cms-helper.c \
314 src/cms-helper.h
315endif
316endif
317
318noinst_PROGRAMS += spring-tool
319spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
320spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm
321spring_tool_SOURCES = \
322 src/spring-tool.c \
323 src/animation.c \
324 shared/matrix.c \
325 shared/matrix.h \
326 src/compositor.h
327
328BUILT_SOURCES += \
329 src/screenshooter-server-protocol.h \
330 src/screenshooter-protocol.c \
331 src/text-cursor-position-server-protocol.h \
332 src/text-cursor-position-protocol.c \
333 src/text-protocol.c \
334 src/text-server-protocol.h \
335 src/input-method-protocol.c \
336 src/input-method-server-protocol.h \
337 src/workspaces-server-protocol.h \
338 src/workspaces-protocol.c \
339 src/scaler-server-protocol.h \
340 src/scaler-protocol.c \
341 src/git-version.h
Kristian Høgsberg5b9f9f82014-01-27 21:40:28 -0800342
343westondatadir = $(datadir)/weston
344dist_westondata_DATA = \
345 data/wayland.svg \
346 data/wayland.png \
347 data/pattern.png \
348 data/terminal.png \
349 data/border.png \
350 data/icon_window.png \
351 data/sign_close.png \
352 data/sign_maximize.png \
353 data/sign_minimize.png
Kristian Høgsberge895f142014-01-27 21:46:30 -0800354
355
356if BUILD_WCAP_TOOLS
357bin_PROGRAMS += wcap-decode
358
359wcap_decode_SOURCES = \
360 wcap/main.c \
361 wcap/wcap-decode.c \
362 wcap/wcap-decode.h
363
364wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
365wcap_decode_LDADD = $(WCAP_LIBS)
366endif
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800367
368
369if ENABLE_DESKTOP_SHELL
370
371module_LTLIBRARIES += desktop-shell.la
372
373desktop_shell_la_CPPFLAGS = \
374 -I$(top_srcdir)/shared \
375 -I$(top_srcdir)/src \
376 -I$(top_builddir)/src \
377 -I$(top_builddir)/desktop-shell \
378 -DDATADIR='"$(datadir)"' \
379 -DMODULEDIR='"$(moduledir)"' \
380 -DLIBEXECDIR='"$(libexecdir)"' \
381 -DIN_WESTON
382
383desktop_shell_la_LDFLAGS = -module -avoid-version
384desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) \
385 shared/libshared.la
386desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
387desktop_shell_la_SOURCES = \
388 desktop-shell/shell.h \
389 desktop-shell/shell.c \
390 desktop-shell/exposay.c \
391 desktop-shell/input-panel.c \
392 desktop-shell/desktop-shell-protocol.c \
393 desktop-shell/desktop-shell-server-protocol.h \
394 desktop-shell/xdg-shell-protocol.c \
395 desktop-shell/xdg-shell-server-protocol.h
396
397BUILT_SOURCES += \
398 desktop-shell/desktop-shell-protocol.c \
399 desktop-shell/desktop-shell-server-protocol.h \
400 desktop-shell/xdg-shell-protocol.c \
401 desktop-shell/xdg-shell-server-protocol.h
402endif
403
Kristian Høgsberg058bd322014-01-27 21:59:55 -0800404
405if ENABLE_XWAYLAND
406
407module_LTLIBRARIES += xwayland.la
408
409xwayland_la_CPPFLAGS = \
410 -I$(top_srcdir)/shared \
411 -I$(top_srcdir)/src \
412 -I$(top_builddir)/src \
413 -I$(top_builddir)/xwayland \
414 -DDATADIR='"$(datadir)"' \
415 -DMODULEDIR='"$(moduledir)"' \
416 -DLIBEXECDIR='"$(libexecdir)"' \
417 -DXSERVER_PATH='"@XSERVER_PATH@"'
418
419xwayland_la_LDFLAGS = -module -avoid-version
420xwayland_la_LIBADD = \
421 $(XWAYLAND_LIBS) \
422 $(top_builddir)/shared/libshared-cairo.la
423xwayland_la_CFLAGS = \
424 $(GCC_CFLAGS) \
425 $(COMPOSITOR_CFLAGS) \
426 $(PIXMAN_CFLAGS) \
427 $(CAIRO_CFLAGS)
428xwayland_la_SOURCES = \
429 xwayland/xwayland.h \
430 xwayland/window-manager.c \
431 xwayland/selection.c \
432 xwayland/dnd.c \
433 xwayland/launcher.c \
434 xwayland/xserver-protocol.c \
435 xwayland/xserver-server-protocol.h \
436 xwayland/hash.c \
437 xwayland/hash.h
438
439BUILT_SOURCES += \
440 xwayland/xserver-protocol.c \
441 xwayland/xserver-server-protocol.h
442endif
443
Kristian Høgsbergf9bc6f62014-01-27 22:26:29 -0800444
445protocol_sources = \
446 protocol/desktop-shell.xml \
447 protocol/screenshooter.xml \
448 protocol/xserver.xml \
449 protocol/text.xml \
450 protocol/input-method.xml \
451 protocol/workspaces.xml \
452 protocol/text-cursor-position.xml \
453 protocol/wayland-test.xml \
454 protocol/xdg-shell.xml \
455 protocol/scaler.xml
456
457if HAVE_XMLLINT
458.PHONY : validate-protocol-xml
459
460.%.xml.valid : $(top_srcdir)/protocol/%.xml
461 $(AM_V_GEN)$(XMLLINT) --noout --dtdvalid $(dtddir)/wayland.dtd $^ > $@
462
463validate-protocol-xml : $(protocol_sources:protocol/%.xml=.%.xml.valid)
464
465CLEANFILES += $(protocol_sources:protocol/%.xml=.%.xml.valid)
466EXTRA_DIST += $(protocol_sources)
467
468endif
469
470
Kristian Høgsberg68c5c102014-01-27 22:33:04 -0800471man_MANS = weston.1 weston.ini.5
472
473if ENABLE_DRM_COMPOSITOR
474man_MANS += weston-drm.7
475endif
476
477MAN_SUBSTS = \
478 -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
479 -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
480 -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
481 -e 's|__version__|$(PACKAGE_VERSION)|g'
482
483SUFFIXES = .1 .5 .7 .man
484
485%.1 %.5 %.7 : man/%.man
486 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
487
488EXTRA_DIST += \
489 man/weston.man \
490 man/weston-drm.man \
491 man/weston.ini.man
492
493CLEANFILES += $(man_MANS)
494
495
Kristian Høgsbergbc00dbe2014-01-27 21:56:12 -0800496wayland_protocoldir = $(top_srcdir)/protocol
497include $(top_srcdir)/wayland-scanner.mk