Kristian Høgsberg | e895f14 | 2014-01-27 21:46:30 -0800 | [diff] [blame] | 1 | bin_PROGRAMS = |
Kristian Høgsberg | b7e3ef4 | 2014-01-27 23:05:52 -0800 | [diff] [blame] | 2 | noinst_PROGRAMS = |
Kristian Høgsberg | bc00dbe | 2014-01-27 21:56:12 -0800 | [diff] [blame] | 3 | moduledir = $(libdir)/weston |
| 4 | module_LTLIBRARIES = |
Kristian Høgsberg | b7e3ef4 | 2014-01-27 23:05:52 -0800 | [diff] [blame] | 5 | noinst_LTLIBRARIES = |
Kristian Høgsberg | bc00dbe | 2014-01-27 21:56:12 -0800 | [diff] [blame] | 6 | BUILT_SOURCES = |
Kristian Høgsberg | e895f14 | 2014-01-27 21:46:30 -0800 | [diff] [blame] | 7 | |
Kristian Høgsberg | 2ba10df | 2013-12-03 16:38:15 -0800 | [diff] [blame] | 8 | SUBDIRS = \ |
| 9 | shared \ |
Kristian Høgsberg | 1e80afa | 2014-01-31 14:03:09 -0800 | [diff] [blame^] | 10 | clients |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 11 | |
Kristian Høgsberg | 850f24c | 2012-02-09 09:20:44 -0500 | [diff] [blame] | 12 | DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install |
Kristian Høgsberg | 24639cc | 2013-02-25 13:03:15 -0500 | [diff] [blame] | 13 | |
Neil Roberts | e3de16e | 2013-11-22 16:46:00 +0000 | [diff] [blame] | 14 | EXTRA_DIST = weston.ini.in wayland-scanner.mk |
| 15 | |
| 16 | weston.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øgsberg | f9bc6f6 | 2014-01-27 22:26:29 -0800 | [diff] [blame] | 23 | all-local : weston.ini validate-protocol-xml |
Kristian Høgsberg | 9846374 | 2013-12-16 23:12:46 -0800 | [diff] [blame] | 24 | |
Kristian Høgsberg | 1e80afa | 2014-01-31 14:03:09 -0800 | [diff] [blame^] | 25 | AM_CFLAGS = $(GCC_CFLAGS) |
| 26 | |
Kristian Høgsberg | b7e3ef4 | 2014-01-27 23:05:52 -0800 | [diff] [blame] | 27 | AM_CPPFLAGS = \ |
Kristian Høgsberg | 1e80afa | 2014-01-31 14:03:09 -0800 | [diff] [blame^] | 28 | -I$(top_srcdir)/src \ |
Kristian Høgsberg | b7e3ef4 | 2014-01-27 23:05:52 -0800 | [diff] [blame] | 29 | -I$(top_builddir)/src \ |
Kristian Høgsberg | 1e80afa | 2014-01-31 14:03:09 -0800 | [diff] [blame^] | 30 | -I$(top_builddir)/tests \ |
Kristian Høgsberg | b7e3ef4 | 2014-01-27 23:05:52 -0800 | [diff] [blame] | 31 | -I$(top_srcdir)/shared \ |
| 32 | -DDATADIR='"$(datadir)"' \ |
| 33 | -DMODULEDIR='"$(moduledir)"' \ |
| 34 | -DLIBEXECDIR='"$(libexecdir)"' |
| 35 | |
Kristian Høgsberg | bc00dbe | 2014-01-27 21:56:12 -0800 | [diff] [blame] | 36 | CLEANFILES = weston.ini $(BUILT_SOURCES) |
Kristian Høgsberg | 5b9f9f8 | 2014-01-27 21:40:28 -0800 | [diff] [blame] | 37 | |
Kristian Høgsberg | b7e3ef4 | 2014-01-27 23:05:52 -0800 | [diff] [blame] | 38 | bin_PROGRAMS += weston |
| 39 | |
| 40 | weston_LDFLAGS = -export-dynamic |
| 41 | weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON |
| 42 | weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) |
| 43 | weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \ |
| 44 | $(DLOPEN_LIBS) -lm shared/libshared.la |
| 45 | |
| 46 | weston_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 \ |
| 53 | src/filter.c \ |
| 54 | src/filter.h \ |
| 55 | src/screenshooter.c \ |
| 56 | src/screenshooter-protocol.c \ |
| 57 | src/screenshooter-server-protocol.h \ |
| 58 | src/clipboard.c \ |
| 59 | src/text-cursor-position-protocol.c \ |
| 60 | src/text-cursor-position-server-protocol.h \ |
| 61 | src/zoom.c \ |
| 62 | src/text-backend.c \ |
| 63 | src/text-protocol.c \ |
| 64 | src/text-server-protocol.h \ |
| 65 | src/input-method-protocol.c \ |
| 66 | src/input-method-server-protocol.h \ |
| 67 | src/workspaces-protocol.c \ |
| 68 | src/workspaces-server-protocol.h \ |
| 69 | src/scaler-protocol.c \ |
| 70 | src/scaler-server-protocol.h \ |
| 71 | src/bindings.c \ |
| 72 | src/animation.c \ |
| 73 | src/noop-renderer.c \ |
| 74 | src/pixman-renderer.c \ |
| 75 | src/pixman-renderer.h \ |
| 76 | shared/matrix.c \ |
| 77 | shared/matrix.h \ |
| 78 | shared/zalloc.h \ |
| 79 | src/weston-egl-ext.h |
| 80 | |
| 81 | noinst_LTLIBRARIES += \ |
| 82 | libsession-helper.la |
| 83 | |
| 84 | libsession_helper_la_SOURCES = \ |
| 85 | src/weston-launch.h \ |
| 86 | src/launcher-util.c \ |
| 87 | src/launcher-util.h |
| 88 | libsession_helper_la_CFLAGS = $(GCC_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS) |
| 89 | libsession_helper_la_LIBADD = $(LIBDRM_LIBS) |
| 90 | |
| 91 | if ENABLE_DBUS |
| 92 | if HAVE_SYSTEMD_LOGIN |
| 93 | libsession_helper_la_SOURCES += \ |
| 94 | src/dbus.h \ |
| 95 | src/dbus.c \ |
| 96 | src/logind-util.h \ |
| 97 | src/logind-util.c |
| 98 | libsession_helper_la_CFLAGS += $(SYSTEMD_LOGIN_CFLAGS) $(DBUS_CFLAGS) |
| 99 | libsession_helper_la_LIBADD += $(SYSTEMD_LOGIN_LIBS) $(DBUS_LIBS) |
| 100 | endif |
| 101 | endif |
| 102 | |
| 103 | src/git-version.h : .FORCE |
| 104 | $(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; \ |
| 105 | cmp -s $@ $@-new || cp $@-new $@; \ |
| 106 | rm $@-new) |
| 107 | |
| 108 | .FORCE : |
| 109 | |
| 110 | if BUILD_WESTON_LAUNCH |
| 111 | bin_PROGRAMS += weston-launch |
| 112 | weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h |
| 113 | weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"' |
| 114 | weston_launch_CFLAGS= \ |
| 115 | $(GCC_CFLAGS) \ |
| 116 | $(PAM_CFLAGS) \ |
| 117 | $(SYSTEMD_LOGIN_CFLAGS) \ |
| 118 | $(LIBDRM_CFLAGS) |
| 119 | weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS) |
| 120 | |
| 121 | if ENABLE_SETUID_INSTALL |
| 122 | install-exec-hook: |
| 123 | chown root $(DESTDIR)$(bindir)/weston-launch |
| 124 | chmod u+s $(DESTDIR)$(bindir)/weston-launch |
| 125 | endif |
| 126 | |
| 127 | endif # BUILD_WESTON_LAUNCH |
| 128 | |
| 129 | pkgconfigdir = $(libdir)/pkgconfig |
| 130 | pkgconfig_DATA = src/weston.pc |
| 131 | |
| 132 | westonincludedir = $(includedir)/weston |
| 133 | westoninclude_HEADERS = \ |
| 134 | src/version.h \ |
| 135 | src/compositor.h \ |
| 136 | shared/matrix.h \ |
| 137 | shared/config-parser.h \ |
| 138 | shared/zalloc.h |
| 139 | |
| 140 | if ENABLE_EGL |
| 141 | module_LTLIBRARIES += gl-renderer.la |
| 142 | gl_renderer_la_LDFLAGS = -module -avoid-version |
| 143 | gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS) |
| 144 | gl_renderer_la_CFLAGS = \ |
| 145 | $(COMPOSITOR_CFLAGS) \ |
| 146 | $(EGL_CFLAGS) \ |
| 147 | $(GCC_CFLAGS) |
| 148 | gl_renderer_la_SOURCES = \ |
| 149 | src/gl-renderer.h \ |
| 150 | src/gl-renderer.c \ |
| 151 | src/vertex-clipping.c \ |
| 152 | src/vertex-clipping.h |
| 153 | endif |
| 154 | |
| 155 | if ENABLE_X11_COMPOSITOR |
| 156 | module_LTLIBRARIES += x11-backend.la |
| 157 | x11_backend_la_LDFLAGS = -module -avoid-version |
| 158 | x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \ |
| 159 | shared/libshared-cairo.la |
| 160 | x11_backend_la_CFLAGS = \ |
| 161 | $(COMPOSITOR_CFLAGS) \ |
| 162 | $(EGL_CFLAGS) \ |
| 163 | $(PIXMAN_CFLAGS) \ |
| 164 | $(CAIRO_CFLAGS) \ |
| 165 | $(X11_COMPOSITOR_CFLAGS) \ |
| 166 | $(GCC_CFLAGS) |
| 167 | x11_backend_la_SOURCES = src/compositor-x11.c |
| 168 | endif |
| 169 | |
| 170 | if ENABLE_DRM_COMPOSITOR |
| 171 | module_LTLIBRARIES += drm-backend.la |
| 172 | drm_backend_la_LDFLAGS = -module -avoid-version |
| 173 | drm_backend_la_LIBADD = \ |
| 174 | $(COMPOSITOR_LIBS) \ |
| 175 | $(DRM_COMPOSITOR_LIBS) \ |
| 176 | shared/libshared.la -lrt \ |
| 177 | libsession-helper.la |
| 178 | drm_backend_la_CFLAGS = \ |
| 179 | $(COMPOSITOR_CFLAGS) \ |
| 180 | $(EGL_CFLAGS) \ |
| 181 | $(DRM_COMPOSITOR_CFLAGS) \ |
| 182 | $(GCC_CFLAGS) |
| 183 | drm_backend_la_SOURCES = \ |
| 184 | src/compositor-drm.c \ |
| 185 | src/udev-seat.c \ |
| 186 | src/udev-seat.h \ |
| 187 | src/evdev.c \ |
| 188 | src/evdev.h \ |
| 189 | src/evdev-touchpad.c \ |
| 190 | src/libbacklight.c \ |
| 191 | src/libbacklight.h |
| 192 | |
| 193 | if ENABLE_VAAPI_RECORDER |
| 194 | drm_backend_la_SOURCES += src/vaapi-recorder.c src/vaapi-recorder.h |
| 195 | drm_backend_la_LIBADD += $(LIBVA_LIBS) |
| 196 | drm_backend_la_CFLAGS += $(LIBVA_CFLAGS) |
| 197 | endif |
| 198 | endif |
| 199 | |
| 200 | if ENABLE_WAYLAND_COMPOSITOR |
| 201 | module_LTLIBRARIES += wayland-backend.la |
| 202 | wayland_backend_la_LDFLAGS = -module -avoid-version |
| 203 | wayland_backend_la_LIBADD = \ |
| 204 | $(COMPOSITOR_LIBS) \ |
| 205 | $(WAYLAND_COMPOSITOR_LIBS) \ |
| 206 | shared/libshared-cairo.la |
| 207 | wayland_backend_la_CFLAGS = \ |
| 208 | $(COMPOSITOR_CFLAGS) \ |
| 209 | $(EGL_CFLAGS) \ |
| 210 | $(PIXMAN_CFLAGS) \ |
| 211 | $(CAIRO_CFLAGS) \ |
| 212 | $(WAYLAND_COMPOSITOR_CFLAGS) \ |
| 213 | $(GCC_CFLAGS) |
| 214 | wayland_backend_la_SOURCES = src/compositor-wayland.c |
| 215 | endif |
| 216 | |
| 217 | if ENABLE_RPI_COMPOSITOR |
| 218 | if INSTALL_RPI_COMPOSITOR |
| 219 | module_LTLIBRARIES += rpi-backend.la |
| 220 | else |
| 221 | noinst_LTLIBRARIES += rpi-backend.la |
| 222 | endif |
| 223 | |
| 224 | rpi_backend_la_LDFLAGS = -module -avoid-version |
| 225 | rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS) \ |
| 226 | $(RPI_COMPOSITOR_LIBS) \ |
| 227 | $(RPI_BCM_HOST_LIBS) \ |
| 228 | libsession-helper.la \ |
| 229 | shared/libshared.la |
| 230 | rpi_backend_la_CFLAGS = \ |
| 231 | $(GCC_CFLAGS) \ |
| 232 | $(COMPOSITOR_CFLAGS) \ |
| 233 | $(RPI_COMPOSITOR_CFLAGS) \ |
| 234 | $(RPI_BCM_HOST_CFLAGS) |
| 235 | rpi_backend_la_SOURCES = \ |
| 236 | src/compositor-rpi.c \ |
| 237 | src/rpi-renderer.c \ |
| 238 | src/rpi-renderer.h \ |
| 239 | src/rpi-bcm-stubs.h \ |
| 240 | src/udev-seat.c \ |
| 241 | src/udev-seat.h \ |
| 242 | src/evdev.c \ |
| 243 | src/evdev.h \ |
| 244 | src/evdev-touchpad.c |
| 245 | |
| 246 | if ENABLE_EGL |
| 247 | rpi_backend_la_LIBADD += $(EGL_LIBS) |
| 248 | rpi_backend_la_CFLAGS += $(EGL_CFLAGS) |
| 249 | endif |
| 250 | |
| 251 | endif |
| 252 | |
| 253 | if ENABLE_HEADLESS_COMPOSITOR |
| 254 | module_LTLIBRARIES += headless-backend.la |
| 255 | headless_backend_la_LDFLAGS = -module -avoid-version |
| 256 | headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) \ |
| 257 | shared/libshared.la |
| 258 | headless_backend_la_CFLAGS = \ |
| 259 | $(COMPOSITOR_CFLAGS) \ |
| 260 | $(GCC_CFLAGS) |
| 261 | headless_backend_la_SOURCES = src/compositor-headless.c |
| 262 | endif |
| 263 | |
| 264 | if ENABLE_FBDEV_COMPOSITOR |
| 265 | module_LTLIBRARIES += fbdev-backend.la |
| 266 | fbdev_backend_la_LDFLAGS = -module -avoid-version |
| 267 | fbdev_backend_la_LIBADD = \ |
| 268 | $(COMPOSITOR_LIBS) \ |
| 269 | $(FBDEV_COMPOSITOR_LIBS) \ |
| 270 | libsession-helper.la \ |
| 271 | shared/libshared.la |
| 272 | fbdev_backend_la_CFLAGS = \ |
| 273 | $(COMPOSITOR_CFLAGS) \ |
| 274 | $(EGL_CFLAGS) \ |
| 275 | $(FBDEV_COMPOSITOR_CFLAGS) \ |
| 276 | $(PIXMAN_CFLAGS) \ |
| 277 | $(GCC_CFLAGS) |
| 278 | fbdev_backend_la_SOURCES = \ |
| 279 | src/compositor-fbdev.c \ |
| 280 | src/udev-seat.c \ |
| 281 | src/udev-seat.h \ |
| 282 | src/evdev.c \ |
| 283 | src/evdev.h \ |
| 284 | src/evdev-touchpad.c |
| 285 | endif |
| 286 | |
| 287 | if ENABLE_RDP_COMPOSITOR |
| 288 | module_LTLIBRARIES += rdp-backend.la |
| 289 | rdp_backend_la_LDFLAGS = -module -avoid-version |
| 290 | rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \ |
| 291 | $(RDP_COMPOSITOR_LIBS) \ |
| 292 | shared/libshared.la |
| 293 | rdp_backend_la_CFLAGS = \ |
| 294 | $(COMPOSITOR_CFLAGS) \ |
| 295 | $(RDP_COMPOSITOR_CFLAGS) \ |
| 296 | $(GCC_CFLAGS) |
| 297 | rdp_backend_la_SOURCES = src/compositor-rdp.c |
| 298 | endif |
| 299 | |
| 300 | if HAVE_LCMS |
| 301 | module_LTLIBRARIES += cms-static.la |
| 302 | cms_static_la_LDFLAGS = -module -avoid-version |
| 303 | cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) shared/libshared.la |
| 304 | cms_static_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS) |
| 305 | cms_static_la_SOURCES = \ |
| 306 | src/cms-static.c \ |
| 307 | src/cms-helper.c \ |
| 308 | src/cms-helper.h |
| 309 | if ENABLE_COLORD |
| 310 | module_LTLIBRARIES += cms-colord.la |
| 311 | cms_colord_la_LDFLAGS = -module -avoid-version |
| 312 | cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS) |
| 313 | cms_colord_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS) |
| 314 | cms_colord_la_SOURCES = \ |
| 315 | src/cms-colord.c \ |
| 316 | src/cms-helper.c \ |
| 317 | src/cms-helper.h |
| 318 | endif |
| 319 | endif |
| 320 | |
| 321 | noinst_PROGRAMS += spring-tool |
| 322 | spring_tool_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) |
| 323 | spring_tool_LDADD = $(COMPOSITOR_LIBS) -lm |
| 324 | spring_tool_SOURCES = \ |
| 325 | src/spring-tool.c \ |
| 326 | src/animation.c \ |
| 327 | shared/matrix.c \ |
| 328 | shared/matrix.h \ |
| 329 | src/compositor.h |
| 330 | |
| 331 | BUILT_SOURCES += \ |
| 332 | src/screenshooter-server-protocol.h \ |
| 333 | src/screenshooter-protocol.c \ |
| 334 | src/text-cursor-position-server-protocol.h \ |
| 335 | src/text-cursor-position-protocol.c \ |
| 336 | src/text-protocol.c \ |
| 337 | src/text-server-protocol.h \ |
| 338 | src/input-method-protocol.c \ |
| 339 | src/input-method-server-protocol.h \ |
| 340 | src/workspaces-server-protocol.h \ |
| 341 | src/workspaces-protocol.c \ |
| 342 | src/scaler-server-protocol.h \ |
| 343 | src/scaler-protocol.c \ |
| 344 | src/git-version.h |
Kristian Høgsberg | 5b9f9f8 | 2014-01-27 21:40:28 -0800 | [diff] [blame] | 345 | |
| 346 | westondatadir = $(datadir)/weston |
| 347 | dist_westondata_DATA = \ |
| 348 | data/wayland.svg \ |
| 349 | data/wayland.png \ |
| 350 | data/pattern.png \ |
| 351 | data/terminal.png \ |
| 352 | data/border.png \ |
| 353 | data/icon_window.png \ |
| 354 | data/sign_close.png \ |
| 355 | data/sign_maximize.png \ |
| 356 | data/sign_minimize.png |
Kristian Høgsberg | e895f14 | 2014-01-27 21:46:30 -0800 | [diff] [blame] | 357 | |
| 358 | |
| 359 | if BUILD_WCAP_TOOLS |
| 360 | bin_PROGRAMS += wcap-decode |
| 361 | |
| 362 | wcap_decode_SOURCES = \ |
| 363 | wcap/main.c \ |
| 364 | wcap/wcap-decode.c \ |
| 365 | wcap/wcap-decode.h |
| 366 | |
| 367 | wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS) |
| 368 | wcap_decode_LDADD = $(WCAP_LIBS) |
| 369 | endif |
Kristian Høgsberg | bc00dbe | 2014-01-27 21:56:12 -0800 | [diff] [blame] | 370 | |
| 371 | |
| 372 | if ENABLE_DESKTOP_SHELL |
| 373 | |
| 374 | module_LTLIBRARIES += desktop-shell.la |
| 375 | |
| 376 | desktop_shell_la_CPPFLAGS = \ |
| 377 | -I$(top_srcdir)/shared \ |
| 378 | -I$(top_srcdir)/src \ |
| 379 | -I$(top_builddir)/src \ |
| 380 | -I$(top_builddir)/desktop-shell \ |
| 381 | -DDATADIR='"$(datadir)"' \ |
| 382 | -DMODULEDIR='"$(moduledir)"' \ |
| 383 | -DLIBEXECDIR='"$(libexecdir)"' \ |
| 384 | -DIN_WESTON |
| 385 | |
| 386 | desktop_shell_la_LDFLAGS = -module -avoid-version |
| 387 | desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) \ |
| 388 | shared/libshared.la |
| 389 | desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) |
| 390 | desktop_shell_la_SOURCES = \ |
| 391 | desktop-shell/shell.h \ |
| 392 | desktop-shell/shell.c \ |
| 393 | desktop-shell/exposay.c \ |
| 394 | desktop-shell/input-panel.c \ |
| 395 | desktop-shell/desktop-shell-protocol.c \ |
| 396 | desktop-shell/desktop-shell-server-protocol.h \ |
| 397 | desktop-shell/xdg-shell-protocol.c \ |
| 398 | desktop-shell/xdg-shell-server-protocol.h |
| 399 | |
| 400 | BUILT_SOURCES += \ |
| 401 | desktop-shell/desktop-shell-protocol.c \ |
| 402 | desktop-shell/desktop-shell-server-protocol.h \ |
| 403 | desktop-shell/xdg-shell-protocol.c \ |
| 404 | desktop-shell/xdg-shell-server-protocol.h |
| 405 | endif |
| 406 | |
Kristian Høgsberg | 058bd32 | 2014-01-27 21:59:55 -0800 | [diff] [blame] | 407 | |
| 408 | if ENABLE_XWAYLAND |
| 409 | |
| 410 | module_LTLIBRARIES += xwayland.la |
| 411 | |
| 412 | xwayland_la_CPPFLAGS = \ |
| 413 | -I$(top_srcdir)/shared \ |
| 414 | -I$(top_srcdir)/src \ |
| 415 | -I$(top_builddir)/src \ |
| 416 | -I$(top_builddir)/xwayland \ |
| 417 | -DDATADIR='"$(datadir)"' \ |
| 418 | -DMODULEDIR='"$(moduledir)"' \ |
| 419 | -DLIBEXECDIR='"$(libexecdir)"' \ |
| 420 | -DXSERVER_PATH='"@XSERVER_PATH@"' |
| 421 | |
| 422 | xwayland_la_LDFLAGS = -module -avoid-version |
| 423 | xwayland_la_LIBADD = \ |
| 424 | $(XWAYLAND_LIBS) \ |
| 425 | $(top_builddir)/shared/libshared-cairo.la |
| 426 | xwayland_la_CFLAGS = \ |
| 427 | $(GCC_CFLAGS) \ |
| 428 | $(COMPOSITOR_CFLAGS) \ |
| 429 | $(PIXMAN_CFLAGS) \ |
| 430 | $(CAIRO_CFLAGS) |
| 431 | xwayland_la_SOURCES = \ |
| 432 | xwayland/xwayland.h \ |
| 433 | xwayland/window-manager.c \ |
| 434 | xwayland/selection.c \ |
| 435 | xwayland/dnd.c \ |
| 436 | xwayland/launcher.c \ |
| 437 | xwayland/xserver-protocol.c \ |
| 438 | xwayland/xserver-server-protocol.h \ |
| 439 | xwayland/hash.c \ |
| 440 | xwayland/hash.h |
| 441 | |
| 442 | BUILT_SOURCES += \ |
| 443 | xwayland/xserver-protocol.c \ |
| 444 | xwayland/xserver-server-protocol.h |
| 445 | endif |
| 446 | |
Kristian Høgsberg | f9bc6f6 | 2014-01-27 22:26:29 -0800 | [diff] [blame] | 447 | |
Kristian Høgsberg | 1e80afa | 2014-01-31 14:03:09 -0800 | [diff] [blame^] | 448 | # |
| 449 | # tests subdirectory |
| 450 | # |
| 451 | |
| 452 | TESTS = $(shared_tests) $(module_tests) $(weston_tests) |
| 453 | |
| 454 | shared_tests = \ |
| 455 | config-parser.test \ |
| 456 | vertex-clip.test |
| 457 | |
| 458 | module_tests = \ |
| 459 | surface-test.la \ |
| 460 | surface-global-test.la |
| 461 | |
| 462 | weston_tests = \ |
| 463 | bad_buffer.weston \ |
| 464 | keyboard.weston \ |
| 465 | event.weston \ |
| 466 | button.weston \ |
| 467 | text.weston \ |
| 468 | subsurface.weston |
| 469 | |
| 470 | |
| 471 | AM_TESTS_ENVIRONMENT = \ |
| 472 | abs_builddir='$(abs_builddir)'; export abs_builddir; |
| 473 | |
| 474 | TEST_EXTENSIONS = .la .weston |
| 475 | LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env |
| 476 | WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env |
| 477 | |
| 478 | clean-local: |
| 479 | -rm -rf tests/logs |
| 480 | |
| 481 | # To remove when automake 1.11 support is dropped |
| 482 | export abs_builddir |
| 483 | |
| 484 | noinst_LTLIBRARIES += \ |
| 485 | weston-test.la \ |
| 486 | $(module_tests) \ |
| 487 | libtest-runner.la \ |
| 488 | libtest-client.la |
| 489 | |
| 490 | noinst_PROGRAMS += \ |
| 491 | $(setbacklight) \ |
| 492 | $(shared_tests) \ |
| 493 | $(weston_tests) \ |
| 494 | matrix-test |
| 495 | |
| 496 | test_module_ldflags = \ |
| 497 | -module -avoid-version -rpath $(libdir) $(COMPOSITOR_LIBS) |
| 498 | |
| 499 | surface_global_test_la_SOURCES = tests/surface-global-test.c |
| 500 | surface_global_test_la_LDFLAGS = $(test_module_ldflags) |
| 501 | surface_global_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) |
| 502 | |
| 503 | surface_test_la_SOURCES = tests/surface-test.c |
| 504 | surface_test_la_LDFLAGS = $(test_module_ldflags) |
| 505 | surface_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) |
| 506 | |
| 507 | weston_test_la_LIBADD = $(COMPOSITOR_LIBS) shared/libshared.la |
| 508 | weston_test_la_LDFLAGS = $(test_module_ldflags) |
| 509 | weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) |
| 510 | weston_test_la_SOURCES = \ |
| 511 | tests/weston-test.c \ |
| 512 | tests/wayland-test-protocol.c \ |
| 513 | tests/wayland-test-server-protocol.h |
| 514 | |
| 515 | if ENABLE_EGL |
| 516 | weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS) |
| 517 | weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS) |
| 518 | endif |
| 519 | |
| 520 | libtest_runner_la_SOURCES = \ |
| 521 | tests/weston-test-runner.c \ |
| 522 | tests/weston-test-runner.h |
| 523 | libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) |
| 524 | |
| 525 | config_parser_test_SOURCES = tests/config-parser-test.c |
| 526 | config_parser_test_LDADD = shared/libshared.la libtest-runner.la $(COMPOSITOR_LIBS) |
| 527 | |
| 528 | vertex_clip_test_SOURCES = \ |
| 529 | tests/vertex-clip-test.c \ |
| 530 | src/vertex-clipping.c \ |
| 531 | src/vertex-clipping.h |
| 532 | vertex_clip_test_LDADD = libtest-runner.la -lm -lrt |
| 533 | |
| 534 | libtest_client_la_SOURCES = \ |
| 535 | tests/weston-test-client-helper.c \ |
| 536 | tests/weston-test-client-helper.h \ |
| 537 | tests/wayland-test-protocol.c \ |
| 538 | tests/wayland-test-client-protocol.h |
| 539 | libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) shared/libshared.la libtest-runner.la |
| 540 | |
| 541 | bad_buffer_weston_SOURCES = tests/bad-buffer-test.c |
| 542 | bad_buffer_weston_LDADD = libtest-client.la |
| 543 | |
| 544 | keyboard_weston_SOURCES = tests/keyboard-test.c |
| 545 | keyboard_weston_LDADD = libtest-client.la |
| 546 | |
| 547 | event_weston_SOURCES = tests/event-test.c |
| 548 | event_weston_LDADD = libtest-client.la |
| 549 | |
| 550 | button_weston_SOURCES = tests/button-test.c |
| 551 | button_weston_LDADD = libtest-client.la |
| 552 | |
| 553 | text_weston_SOURCES = tests/text-test.c tests/text-protocol.c |
| 554 | text_weston_LDADD = libtest-client.la |
| 555 | |
| 556 | subsurface_weston_SOURCES = tests/subsurface-test.c |
| 557 | subsurface_weston_LDADD = libtest-client.la |
| 558 | |
| 559 | if ENABLE_EGL |
| 560 | weston_tests += buffer-count.weston |
| 561 | buffer_count_weston_SOURCES = tests/buffer-count-test.c |
| 562 | buffer_count_weston_CFLAGS = $(GCC_CFLAGS) $(EGL_TESTS_CFLAGS) |
| 563 | buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS) |
| 564 | endif |
| 565 | |
| 566 | if ENABLE_XWAYLAND_TEST |
| 567 | weston_tests += xwayland.weston |
| 568 | xwayland_weston_SOURCES = tests/xwayland-test.c |
| 569 | xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS) |
| 570 | xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS) |
| 571 | endif |
| 572 | |
| 573 | matrix_test_SOURCES = \ |
| 574 | tests/matrix-test.c \ |
| 575 | shared/matrix.c \ |
| 576 | shared/matrix.h |
| 577 | matrix_test_CPPFLAGS = -DUNIT_TEST |
| 578 | matrix_test_LDADD = -lm -lrt |
| 579 | |
| 580 | if BUILD_SETBACKLIGHT |
| 581 | noinst_PROGRAMS += setbacklight |
| 582 | setbacklight_SOURCES = \ |
| 583 | tests/setbacklight.c \ |
| 584 | src/libbacklight.c \ |
| 585 | src/libbacklight.h |
| 586 | setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS) |
| 587 | setbacklight_LDADD = $(SETBACKLIGHT_LIBS) |
| 588 | endif |
| 589 | |
| 590 | EXTRA_DIST += tests/weston-tests-env |
| 591 | |
| 592 | BUILT_SOURCES += \ |
| 593 | tests/wayland-test-protocol.c \ |
| 594 | tests/wayland-test-server-protocol.h \ |
| 595 | tests/wayland-test-client-protocol.h \ |
| 596 | tests/text-protocol.c \ |
| 597 | tests/text-client-protocol.h |
| 598 | |
Kristian Høgsberg | f9bc6f6 | 2014-01-27 22:26:29 -0800 | [diff] [blame] | 599 | protocol_sources = \ |
| 600 | protocol/desktop-shell.xml \ |
| 601 | protocol/screenshooter.xml \ |
| 602 | protocol/xserver.xml \ |
| 603 | protocol/text.xml \ |
| 604 | protocol/input-method.xml \ |
| 605 | protocol/workspaces.xml \ |
| 606 | protocol/text-cursor-position.xml \ |
| 607 | protocol/wayland-test.xml \ |
| 608 | protocol/xdg-shell.xml \ |
| 609 | protocol/scaler.xml |
| 610 | |
| 611 | if HAVE_XMLLINT |
| 612 | .PHONY : validate-protocol-xml |
| 613 | |
| 614 | .%.xml.valid : $(top_srcdir)/protocol/%.xml |
| 615 | $(AM_V_GEN)$(XMLLINT) --noout --dtdvalid $(dtddir)/wayland.dtd $^ > $@ |
| 616 | |
| 617 | validate-protocol-xml : $(protocol_sources:protocol/%.xml=.%.xml.valid) |
| 618 | |
| 619 | CLEANFILES += $(protocol_sources:protocol/%.xml=.%.xml.valid) |
| 620 | EXTRA_DIST += $(protocol_sources) |
| 621 | |
| 622 | endif |
| 623 | |
| 624 | |
Kristian Høgsberg | 68c5c10 | 2014-01-27 22:33:04 -0800 | [diff] [blame] | 625 | man_MANS = weston.1 weston.ini.5 |
| 626 | |
| 627 | if ENABLE_DRM_COMPOSITOR |
| 628 | man_MANS += weston-drm.7 |
| 629 | endif |
| 630 | |
| 631 | MAN_SUBSTS = \ |
| 632 | -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \ |
| 633 | -e 's|__weston_modules_dir__|$(pkglibdir)|g' \ |
| 634 | -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \ |
| 635 | -e 's|__version__|$(PACKAGE_VERSION)|g' |
| 636 | |
| 637 | SUFFIXES = .1 .5 .7 .man |
| 638 | |
| 639 | %.1 %.5 %.7 : man/%.man |
| 640 | $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ |
| 641 | |
| 642 | EXTRA_DIST += \ |
| 643 | man/weston.man \ |
| 644 | man/weston-drm.man \ |
| 645 | man/weston.ini.man |
| 646 | |
| 647 | CLEANFILES += $(man_MANS) |
| 648 | |
| 649 | |
Kristian Høgsberg | bc00dbe | 2014-01-27 21:56:12 -0800 | [diff] [blame] | 650 | wayland_protocoldir = $(top_srcdir)/protocol |
| 651 | include $(top_srcdir)/wayland-scanner.mk |