summaryrefslogtreecommitdiff
path: root/src/legacy
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2017-10-22 18:40:24 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2018-02-06 13:12:33 +0000
commit781fd07e5518b21b5d910e0c58108a517903fda3 (patch)
tree74d3f45ddbbbba880cd6a5397de505a4a13d8c76 /src/legacy
parenta3a9e99b527936502a10aed7559799b2aa1e186e (diff)
meson: Add meson build system
Allow building the driver with meson. Could probably use plenty of cleanups, but at least it gives me a working driver. And I think I managed to make it build everything that autotools builds. Quite a few compiler warnings were suppressed as well. Might want to look at those at some point. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'src/legacy')
-rw-r--r--src/legacy/i810/meson.build49
-rw-r--r--src/legacy/i810/xvmc/meson.build15
2 files changed, 64 insertions, 0 deletions
diff --git a/src/legacy/i810/meson.build b/src/legacy/i810/meson.build
new file mode 100644
index 00000000..8d0f3193
--- /dev/null
+++ b/src/legacy/i810/meson.build
@@ -0,0 +1,49 @@
+i810_sources = [
+ 'i810_accel.c',
+ 'i810_cursor.c',
+ 'i810_driver.c',
+ 'i810_memory.c',
+ 'i810_video.c',
+ 'i810_wmark.c',
+]
+
+xorg = dependency('xorg-server', required : true)
+
+i810_deps = [
+ dependency('libdrm', required : true),
+ dependency('pciaccess', required : true),
+ xorg,
+]
+
+if cc.has_header('xaa.h', dependencies : xorg)
+ config.set('HAVE_XAA_H', 1)
+ i810_sources += 'i810_xaa.c'
+endif
+
+if cc.has_header('dgaproc.h', dependencies : xorg)
+ config.set('HAVE_DGAPROC_H', 1)
+ i810_sources += 'i810_dga.c'
+endif
+
+if with_dri1
+ i810_sources += 'i810_dri.c'
+ i810_deps += dependency('xf86driproto', required : true)
+
+ if with_xvmc
+ i810_sources += 'i810_hwmc.c'
+ endif
+endif
+
+i810 = static_library('legacy_i810',
+ sources : i810_sources,
+ dependencies : i810_deps,
+ include_directories : inc,
+ c_args : [
+ '-Wno-unused-parameter',
+ '-Wno-sign-compare',
+ ],
+ install : false)
+
+if with_xvmc
+ subdir('xvmc')
+endif
diff --git a/src/legacy/i810/xvmc/meson.build b/src/legacy/i810/xvmc/meson.build
new file mode 100644
index 00000000..cd05f3ef
--- /dev/null
+++ b/src/legacy/i810/xvmc/meson.build
@@ -0,0 +1,15 @@
+shared_library('I810XvMC',
+ soversion : '1',
+ version : '1.0.0',
+ sources : 'I810XvMC.c',
+ dependencies : [
+ dependency('x11', required : true),
+ dependency('xvmc', required : true),
+ dependency('xorg-server', required : true),
+ dependency('libdrm', required : true),
+ ],
+ c_args : [
+ '-Wno-unused-parameter',
+ '-Wno-sign-compare',
+ ],
+ install : true)