diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-09-05 14:36:14 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-09-08 17:06:04 +0200 |
commit | 9a7d8509efe4ac509b082cbffa24e52a7697926c (patch) | |
tree | ee097782344880b41f23c0a1571fc28ae6e4e0ce /overlay | |
parent | c3863e1998a5d46492b4ec91dd411e2d561e1472 (diff) |
meson: basic build system support
Why?
Because it's fast.
Like really, really fast.
Some data (from a snb laptop, so rather lower-powered):
- Incremental build after $ touch lib/igt_core.c with meson: 0.6s
It notices that the symbol list of the libigt.so hasn't changed and
doesn't bother re-linking the almost 300 binaries we have. make -j 6
for the same scenario takes 44s.
- Incremental build with nothing changed: make: 0.7s, meson: 0.2s This
means stuff like --disable-git-hash is entirely pointless with
meson, it's faster than a make ever can be (with 0.6s).
- Reconfigure stage: ninja reconfigure 0.8s vs. ./configure 8.6s)
- Running tests, after a full build: ninja test 6s vs. make check 24s
- Full build (i.e. including ./autogen.sh respectively meson build),
including tests, from a pristine git checkout. automake 2m49s vs.
meson 44s.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Daniel Stone <daniel@fooishbar.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'overlay')
-rw-r--r-- | overlay/meson.build | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/overlay/meson.build b/overlay/meson.build new file mode 100644 index 00000000..a4b778ca --- /dev/null +++ b/overlay/meson.build @@ -0,0 +1,59 @@ +gpu_overlay_src = [ + 'chart.c', + 'config.c', + 'cpu-top.c', + 'debugfs.c', + 'gem-interrupts.c', + 'gem-objects.c', + 'gpu-top.c', + 'gpu-perf.c', + 'gpu-freq.c', + 'igfx.c', + 'overlay.c', + 'perf.c', + 'power.c', + 'rc6.c', +] + +xv = dependency('xv', required : false) +x11 = dependency('x11', required : false) +xext = dependency('xext', required : false) +dri2proto = dependency('dri2proto', version : '>= 2.6', required : false) +cairo_xlib = dependency('cairo-xlib', required : false) +xrandr = dependency('xrandr', version : '>=1.3', required : false) + +gpu_overlay_deps = [ realtime, cairo, pciaccess, libdrm, libdrm_intel ] + +both_x11_src = '' + +gpu_overlay_cflags = [] +if xv.found() and x11.found() and xext.found() and dri2proto.found() + both_x11_src = 'x11/position.c' + gpu_overlay_src += [ + 'x11/dri2.c', + 'x11/dri2.h', + 'x11/rgb2yuv.c', + 'x11/rgb2yuv.h', + 'x11/x11-overlay.c', + ] + gpu_overlay_deps += [ xv, x11, xext, dri2proto ] + gpu_overlay_cflags += [ '-DHAVE_OVERLAY_XVLIB' ] +endif + +if cairo_xlib.found() and xrandr.found() and dri2proto.found() + both_x11_src = 'x11/position.c' + gpu_overlay_src += 'x11/x11-window.c' + gpu_overlay_deps += [ cairo_xlib, dri2proto ] + gpu_overlay_cflags += [ '-DHAVE_OVERLAY_XLIB' ] +endif + +gpu_overlay_src += both_x11_src + +gpu_overlay_src += 'kms/kms-overlay.c' + +if xrandr.found() and cairo.found() + executable('intel_gpu_overlay', gpu_overlay_src, + include_directories : inc, + c_args : gpu_overlay_cflags, + dependencies : gpu_overlay_deps) +endif |