aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Baker2017-09-13 13:46:13 -0500
committerDylan Baker2018-01-12 11:40:48 -0600
commit5f7deb50787b82038cc35fb1e31b761e33e5a341 (patch)
tree6a9fe255f2c5a8b0ab556118fb0cd3dd9de17634
parentf115de819bc10bb36565f344a66fa619219911b9 (diff)
downloadexternal-libgbm-5f7deb50787b82038cc35fb1e31b761e33e5a341.tar.gz
external-libgbm-5f7deb50787b82038cc35fb1e31b761e33e5a341.tar.xz
external-libgbm-5f7deb50787b82038cc35fb1e31b761e33e5a341.zip
Add meson build system
This patch adds a complete meson build system, including tests and install. It has the necessary hooks to allow it be used as a subproject for other meson based builds such as mesa. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-rw-r--r--.editorconfig4
-rw-r--r--amdgpu/.editorconfig4
-rw-r--r--amdgpu/meson.build65
-rw-r--r--data/meson.build27
-rw-r--r--etnaviv/meson.build59
-rw-r--r--exynos/meson.build53
-rw-r--r--freedreno/meson.build76
-rw-r--r--intel/meson.build105
-rw-r--r--libkms/meson.build74
-rw-r--r--man/meson.build67
-rw-r--r--meson.build367
-rw-r--r--meson_options.txt143
-rw-r--r--nouveau/meson.build58
-rw-r--r--omap/meson.build53
-rw-r--r--radeon/meson.build63
-rw-r--r--tegra/meson.build52
-rw-r--r--tests/amdgpu/meson.build34
-rw-r--r--tests/etnaviv/meson.build45
-rw-r--r--tests/exynos/meson.build54
-rw-r--r--tests/kms/meson.build49
-rw-r--r--tests/kmstest/meson.build30
-rw-r--r--tests/meson.build86
-rw-r--r--tests/modeprint/meson.build29
-rw-r--r--tests/modetest/meson.build29
-rw-r--r--tests/nouveau/meson.build30
-rw-r--r--tests/proptest/meson.build28
-rw-r--r--tests/radeon/meson.build27
-rw-r--r--tests/tegra/meson.build27
-rw-r--r--tests/util/meson.build28
-rw-r--r--tests/vbltest/meson.build28
-rw-r--r--vc4/meson.build28
31 files changed, 1822 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig
index 893b7be0..29b4f393 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -17,3 +17,7 @@ indent_style = tab
17[*.m4] 17[*.m4]
18indent_style = space 18indent_style = space
19indent_size = 2 19indent_size = 2
20
21[{meson.build,meson_options.txt}]
22indent_style = space
23indent_size = 2
diff --git a/amdgpu/.editorconfig b/amdgpu/.editorconfig
index 2528d675..426273fd 100644
--- a/amdgpu/.editorconfig
+++ b/amdgpu/.editorconfig
@@ -7,3 +7,7 @@ indent_style = tab
7indent_size = 8 7indent_size = 8
8tab_width = 8 8tab_width = 8
9insert_final_newline = true 9insert_final_newline = true
10
11[meson.build]
12indent_style = space
13indent_size = 2
diff --git a/amdgpu/meson.build b/amdgpu/meson.build
new file mode 100644
index 00000000..55ab9d1d
--- /dev/null
+++ b/amdgpu/meson.build
@@ -0,0 +1,65 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21
22datadir_amdgpu = join_paths(get_option('datadir'), 'libdrm', 'amdgpu.ids')
23
24libdrm_amdgpu = shared_library(
25 'drm_amdgpu',
26 [
27 files(
28 'amdgpu_asic_id.c', 'amdgpu_bo.c', 'amdgpu_cs.c', 'amdgpu_device.c',
29 'amdgpu_gpu_info.c', 'amdgpu_vamgr.c', 'amdgpu_vm.c', 'util_hash.c',
30 'util_hash_table.c',
31 ),
32 config_file,
33 ],
34 c_args : [
35 warn_c_args,
36 '-DAMDGPU_ASIC_ID_TABLE="@0@"'.format(datadir_amdgpu),
37 ],
38 include_directories : [inc_root, inc_drm],
39 link_with : libdrm,
40 dependencies : dep_pthread_stubs,
41 version : '1.0.0',
42 install : true,
43)
44
45install_headers('amdgpu.h', subdir : 'libdrm')
46
47pkg.generate(
48 name : 'libdrm_amdgpu',
49 libraries : libdrm_amdgpu,
50 subdirs : ['.', 'libdrm'],
51 version : meson.project_version(),
52 requires_private : 'libdrm',
53 description : 'Userspace interface to kernel DRM services for amdgpu',
54)
55
56ext_libdrm_amdgpu = declare_dependency(
57 link_with : [libdrm, libdrm_amdgpu],
58 include_directories : [inc_drm, include_directories('.')],
59)
60
61test(
62 'amdgpu-symbol-check',
63 prog_bash,
64 args : [files('amdgpu-symbol-check'), libdrm_amdgpu]
65)
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 00000000..9c26b66e
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,27 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21if with_amdgpu
22 install_data(
23 'amdgpu.ids',
24 install_mode : 'rw-r--r--',
25 install_dir : datadir_amdgpu,
26 )
27endif
diff --git a/etnaviv/meson.build b/etnaviv/meson.build
new file mode 100644
index 00000000..1767733b
--- /dev/null
+++ b/etnaviv/meson.build
@@ -0,0 +1,59 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21
22libdrm_etnaviv = shared_library(
23 'drm_etnaviv',
24 [
25 files(
26 'etnaviv_device.c', 'etnaviv_gpu.c', 'etnaviv_bo.c', 'etnaviv_bo_cache.c',
27 'etnaviv_perfmon.c', 'etnaviv_pipe.c', 'etnaviv_cmd_stream.c',
28 ),
29 config_file
30 ],
31 include_directories : [inc_root, inc_drm],
32 link_with : libdrm,
33 c_args : warn_c_args,
34 dependencies : [dep_pthread_stubs, dep_rt],
35 version : '1.0.0',
36 install : true,
37)
38
39install_headers('etnaviv_drmif.h', subdir : 'libdrm')
40
41pkg.generate(
42 name : 'libdrm_etnaviv',
43 libraries : libdrm_etnaviv,
44 subdirs : ['.', 'libdrm'],
45 version : meson.project_version(),
46 requires_private : 'libdrm',
47 description : 'Userspace interface to Tegra kernel DRM services',
48)
49
50ext_libdrm_etnaviv = declare_dependency(
51 link_with : [libdrm, libdrm_etnaviv],
52 include_directories : [inc_drm, include_directories('.')],
53)
54
55test(
56 'etnaviv-symbol-check',
57 prog_bash,
58 args : [files('etnaviv-symbol-check'), libdrm_etnaviv]
59)
diff --git a/exynos/meson.build b/exynos/meson.build
new file mode 100644
index 00000000..c96ad4e0
--- /dev/null
+++ b/exynos/meson.build
@@ -0,0 +1,53 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21libdrm_exynos = shared_library(
22 'drm_exynos',
23 [files('exynos_drm.c', 'exynos_fimg2d.c'), config_file],
24 c_args : warn_c_args,
25 include_directories : [inc_root, inc_drm],
26 link_with : libdrm,
27 dependencies : [dep_pthread_stubs],
28 version : '1.0.0',
29 install : true,
30)
31
32install_headers('exynos_drmif.h', subdir : 'libdrm')
33install_headers('exynos_drm.h', 'exynos_fimg2d.h', subdir : 'exynos')
34
35ext_libdrm_exynos = declare_dependency(
36 link_with : [libdrm, libdrm_exynos],
37 include_directories : [inc_drm, include_directories('.')],
38)
39
40pkg.generate(
41 name : 'libdrm_exynos',
42 libraries : libdrm_exynos,
43 subdirs : ['.', 'libdrm', 'exynos'],
44 version : '0.7',
45 requires_private : 'libdrm',
46 description : 'Userspace interface to exynos kernel DRM services',
47)
48
49test(
50 'exynos-symbol-check',
51 prog_bash,
52 args : [files('exynos-symbol-check'), libdrm_exynos]
53)
diff --git a/freedreno/meson.build b/freedreno/meson.build
new file mode 100644
index 00000000..b4035e19
--- /dev/null
+++ b/freedreno/meson.build
@@ -0,0 +1,76 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21files_freedreno = files(
22 'freedreno_device.c',
23 'freedreno_pipe.c',
24 'freedreno_ringbuffer.c',
25 'freedreno_bo.c',
26 'freedreno_bo_cache.c',
27 'msm/msm_bo.c',
28 'msm/msm_device.c',
29 'msm/msm_pipe.c',
30 'msm/msm_ringbuffer.c',
31)
32
33if with_freedreno_kgsl
34 files_freedreno += files(
35 'kgsl/kgsl_bo.c',
36 'kgsl/kgsl_device.c',
37 'kgsl/kgsl_pipe.c',
38 'kgsl/kgsl_ringbuffer.c',
39 )
40endif
41
42libdrm_freedreno = shared_library(
43 'drm_freedreno',
44 [files_freedreno, config_file],
45 c_args : warn_c_args,
46 include_directories : [inc_root, inc_drm],
47 dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt],
48 link_with : libdrm,
49 version : '1.0.0',
50 install : true,
51)
52
53ext_libdrm_freedreno = declare_dependency(
54 link_with : [libdrm, libdrm_freedreno],
55 include_directories : [inc_drm, include_directories('.')],
56)
57
58install_headers(
59 'freedreno_drmif.h', 'freedreno_ringbuffer.h',
60 subdir : 'freedreno'
61)
62
63pkg.generate(
64 name : 'libdrm_freedreno',
65 libraries : libdrm_freedreno,
66 subdirs : ['.', 'libdrm', 'freedreno'],
67 version : '0.7',
68 requires_private : 'libdrm',
69 description : 'Userspace interface to freedreno kernel DRM services',
70)
71
72test(
73 'freedreno-symbol-check',
74 prog_bash,
75 args : [files('freedreno-symbol-check'), libdrm_freedreno]
76)
diff --git a/intel/meson.build b/intel/meson.build
new file mode 100644
index 00000000..ad877274
--- /dev/null
+++ b/intel/meson.build
@@ -0,0 +1,105 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21libdrm_intel = shared_library(
22 'drm_intel',
23 [
24 files(
25 'intel_bufmgr.c', 'intel_bufmgr_fake.c', 'intel_bufmgr_gem.c',
26 'intel_decode.c', 'mm.c',
27 ),
28 config_file,
29 ],
30 include_directories : [inc_root, inc_drm],
31 link_with : libdrm,
32 dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind],
33 c_args : warn_c_args,
34 version : '1.0.0',
35 install : true,
36)
37
38ext_libdrm_intel = declare_dependency(
39 link_with : [libdrm, libdrm_intel],
40 include_directories : [inc_drm, include_directories('.')],
41)
42
43install_headers(
44 'intel_bufmgr.h', 'intel_aub.h', 'intel_debug.h',
45 subdir : 'libdrm',
46)
47
48pkg.generate(
49 name : 'libdrm_intel',
50 libraries : libdrm_intel,
51 subdirs : ['.', 'libdrm'],
52 version : meson.project_version(),
53 requires : 'libdrm',
54 description : 'Userspace interface to intel kernel DRM services',
55)
56
57test_decode = executable(
58 'test_decode',
59 files('test_decode.c'),
60 include_directories : [inc_root, inc_drm],
61 link_with : [libdrm, libdrm_intel],
62 c_args : warn_c_args,
63)
64
65test(
66 'gen4-3d.batch',
67 prog_bash,
68 args : files('tests/gen4-3d.batch.sh'),
69 workdir : meson.current_build_dir(),
70)
71test(
72 'gen45-3d.batch',
73 prog_bash,
74 args : files('tests/gm45-3d.batch.sh'),
75 workdir : meson.current_build_dir(),
76)
77test(
78 'gen5-3d.batch',
79 prog_bash,
80 args : files('tests/gen5-3d.batch.sh'),
81 workdir : meson.current_build_dir(),
82)
83test(
84 'gen6-3d.batch',
85 prog_bash,
86 args : files('tests/gen6-3d.batch.sh'),
87 workdir : meson.current_build_dir(),
88)
89test(
90 'gen7-3d.batch',
91 prog_bash,
92 args : files('tests/gen7-3d.batch.sh'),
93 workdir : meson.current_build_dir(),
94)
95test(
96 'gen7-2d-copy.batch',
97 prog_bash,
98 args : files('tests/gen7-2d-copy.batch.sh'),
99 workdir : meson.current_build_dir(),
100)
101test(
102 'intel-symbol-check',
103 prog_bash,
104 args : [files('intel-symbol-check'), libdrm_intel]
105)
diff --git a/libkms/meson.build b/libkms/meson.build
new file mode 100644
index 00000000..9eff4313
--- /dev/null
+++ b/libkms/meson.build
@@ -0,0 +1,74 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21libkms_include = [inc_root, inc_drm]
22files_libkms = files(
23 'linux.c',
24 'dumb.c',
25 'api.c',
26)
27if with_vmwgfx
28 files_libkms += files('vmwgfx.c')
29endif
30if with_intel
31 files_libkms += files('intel.c')
32endif
33if with_nouveau
34 files_libkms += files('nouveau.c')
35endif
36if with_radeon
37 files_libkms += files('radeon.c')
38endif
39if with_exynos
40 files_libkms += files('exynos.c')
41 libkms_include += include_directories('../exynos')
42endif
43
44libkms = shared_library(
45 'kms',
46 [files_libkms, config_file],
47 c_args : warn_c_args,
48 include_directories : libkms_include,
49 link_with : libdrm,
50 version : '1.0.0',
51 install : true,
52)
53
54ext_libkms = declare_dependency(
55 link_with : [libdrm, libkms],
56 include_directories : [libkms_include],
57)
58
59install_headers('libkms.h', subdir : 'libkms')
60
61pkg.generate(
62 name : 'libkms',
63 libraries : libkms,
64 subdirs : ['libkms'],
65 version : '1.0.0',
66 requires_private : 'libdrm',
67 description : 'Library that abstracts away the different mm interfaces for kernel drivers',
68)
69
70test(
71 'kms-symbol-check',
72 prog_bash,
73 args : [files('kms-symbol-check'), libkms]
74)
diff --git a/man/meson.build b/man/meson.build
new file mode 100644
index 00000000..45eaeda0
--- /dev/null
+++ b/man/meson.build
@@ -0,0 +1,67 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21xsltproc_args = [
22 '--stringparam', 'man.authors.section.enabled', '0',
23 '--stringparam', 'man.copyright.section.enabled', '0',
24 '--stringparam', 'funcsynopsis.style', 'ansi',
25 '--stringparam', 'man.output.quietly', '1',
26 '--nonet', manpage_style,
27]
28
29xmls = [
30 ['drm', '7'], ['drm-kms', '7'], ['drm-memory', '7'], ['drmAvailable', '3'],
31 ['drmHandleEvent', '3'], ['drmModeGetResources', '3']
32]
33foreach x : xmls
34 m = x[0]
35 s = x[1]
36 custom_target(
37 m,
38 input : files('@0@.xml'.format(m)),
39 output : '@0@.@1@'.format(m, s),
40 command : [prog_xslt, '-o', '@OUTPUT@', xsltproc_args, '@INPUT0@'],
41 install : true,
42 install_dir : join_paths(get_option('mandir'), 'man@0@'.format(s)),
43 build_by_default : true,
44 )
45endforeach
46
47foreach x : ['drm-mm', 'drm-gem', 'drm-ttm']
48 gen = custom_target(
49 'gen-@0@'.format(x),
50 input : 'drm-memory.xml',
51 output : '@0@.xml'.format(x),
52 command : [
53 prog_sed, '-e', 's@^\.so \([a-z_]\+\)\.\([0-9]\)$$@\.so man\2\/\1\.\2@',
54 '@INPUT@',
55 ],
56 capture : true,
57 )
58 custom_target(
59 '@0@.7'.format(x),
60 input : gen,
61 output : '@0@.7'.format(x, '7'),
62 command : [prog_xslt, '-o', '@OUTPUT@', xsltproc_args, '@INPUT@'],
63 install : true,
64 install_dir : join_paths(get_option('mandir'), 'man7'),
65 build_by_default : true,
66 )
67endforeach
diff --git a/meson.build b/meson.build
new file mode 100644
index 00000000..05566081
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,367 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21project(
22 'libdrm',
23 ['c'],
24 version : '2.4.89',
25 license : 'MIT',
26 meson_version : '>= 0.42',
27 default_options : ['buildtype=debugoptimized', 'c_std=gnu99'],
28)
29
30pkg = import('pkgconfig')
31
32with_udev = get_option('udev')
33with_freedreno_kgsl = get_option('freedreno-kgsl')
34with_install_tests = get_option('install-test-programs')
35with_cairo_tests = get_option('cairo-tests')
36with_valgrind = get_option('valgrind')
37
38config = configuration_data()
39
40# TODO: openbsd is guess, the others are correct
41if ['freebsd', 'dragonfly', 'netbsd', 'openbsd'].contains(host_machine.system())
42 dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
43else
44 dep_pthread_stubs = []
45endif
46dep_threads = dependency('threads')
47
48cc = meson.get_compiler('c')
49
50# Check for atomics
51intel_atomics = false
52lib_atomics = false
53
54if cc.compiles('''
55 int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); }
56 int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); }
57 ''',
58 name : 'Intel Atomics')
59 intel_atomics = true
60 with_atomics = true
61elif cc.has_header('atomic_ops.h')
62 lib_atomics = true
63 with_atomics = true
64elif cc.has_function('atomic_cas_uint')
65 with_atomics = true
66else
67 with_atomics = false
68endif
69
70config.set10('HAVE_LIBDRM_ATOMIC_PRIMITIVES', intel_atomics)
71config.set10('HAVE_LIB_ATOMIC_OPS', lib_atomics)
72
73with_intel = false
74_intel = get_option('intel')
75if _intel != 'false'
76 if _intel == 'true' and not with_atomics
77 error('libdrm_intel requires atomics.')
78 else
79 with_intel = _intel == 'true' or host_machine.cpu_family().startswith('x86')
80 endif
81endif
82
83with_radeon = false
84_radeon = get_option('radeon')
85if _radeon != 'false'
86 if _radeon == 'true' and not with_atomics
87 error('libdrm_radeon requires atomics.')
88 endif
89 with_radeon = true
90endif
91
92with_amdgpu = false
93_amdgpu = get_option('amdgpu')
94if _amdgpu != 'false'
95 if _amdgpu == 'true' and not with_atomics
96 error('libdrm_amdgpu requires atomics.')
97 endif
98 with_amdgpu = true
99endif
100
101with_nouveau = false
102_nouveau = get_option('nouveau')
103if _nouveau != 'false'
104 if _nouveau == 'true' and not with_atomics
105 error('libdrm_nouveau requires atomics.')
106 endif
107 with_nouveau = true
108endif
109
110with_vmwgfx = false
111_vmwgfx = get_option('vmwgfx')
112if _vmwgfx != 'false'
113 with_vmwgfx = true
114endif
115
116with_omap = false
117_omap = get_option('omap')
118if _omap == 'true'
119 if not with_atomics
120 error('libdrm_omap requires atomics.')
121 endif
122 with_omap = true
123endif
124
125with_freedreno = false
126_freedreno = get_option('freedreno')
127if _freedreno != 'false'
128 if _freedreno == 'true' and not with_atomics
129 error('libdrm_freedreno requires atomics.')
130 else
131 with_freedreno = _freedreno == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family())
132 endif
133endif
134
135with_tegra = false
136_tegra = get_option('tegra')
137if _tegra == 'true'
138 if not with_atomics
139 error('libdrm_tegra requires atomics.')
140 endif
141 with_tegra = true
142endif
143
144with_etnaviv = false
145_etnaviv = get_option('etnaviv')
146if _etnaviv == 'true'
147 if not with_atomics
148 error('libdrm_etnaviv requires atomics.')
149 endif
150 with_etnaviv = true
151endif
152
153with_exynos = get_option('exynos') == 'true'
154
155with_vc4 = false
156_vc4 = get_option('vc4')
157if _vc4 != 'false'
158 with_vc4 = _vc4 == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family())
159endif
160
161# XXX: Aparently only freebsd and dragonfly bsd actually need this (and
162# gnu/kfreebsd), not openbsd and netbsd
163with_libkms = false
164_libkms = get_option('libkms')
165if _libkms != 'false'
166 with_libkms = _libkms == 'true' or ['linux', 'freebsd', 'dragonfly'].contains(host_machine.system())
167endif
168
169if with_udev
170 dep_udev = dependency('udev')
171 config.set10('UDEV', true)
172else
173 dep_udev = []
174endif
175
176# Among others FreeBSD does not have a separate dl library.
177if not cc.has_function('dlsym')
178 dep_dl = cc.find_library('dl', required : with_nouveau)
179else
180 dep_dl = []
181endif
182# clock_gettime might require -rt, or it might not. find out
183if not cc.has_function('clock_gettime', prefix : '#define _GNU_SOURCE\n#include <time.h>')
184 # XXX: untested
185 dep_rt = cc.find_library('rt')
186else
187 dep_rt = []
188endif
189dep_m = cc.find_library('m', required : false)
190if cc.has_header('sys/sysctl.h')
191 config.set10('HAVE_SYS_SYSCTL_H', true)
192endif
193if cc.has_header('sys/select.h')
194 config.set10('HAVE_SYS_SELECT_H', true)
195endif
196if cc.has_header_symbol('sys/sysmacros.h', 'major')
197 config.set10('MAJOR_IN_SYSMACROS', true)
198elif cc.has_header_symbol('sys/mkdev.h', 'major')
199 config.set10('MAJOR_IN_MKDEV', true)
200endif
201if cc.has_function('open_memstream')
202 config.set10('HAVE_OPEN_MEMSTREAM', true)
203endif
204
205warn_c_args = []
206foreach a : ['-Wall', '-Wextra', '-Wsign-compare',
207 '-Werror-implicit-function-declaration', '-Wpointer-arith',
208 '-Wwrite-strings', '-Wstrict-prototypes', '-Wmissing-prototypes',
209 '-Wmissing-declarations', '-Wnested-externs', '-Wpacked',
210 '-Wswitch-enum', '-Wmissing-format-attribute',
211 '-Wstrict-aliasing=2', '-Winit-self', '-Winline', '-Wshadow',
212 '-Wdeclaration-after-statement', '-Wold-style-definition']
213 if cc.has_argument(a)
214 warn_c_args += a
215 endif
216endforeach
217# GCC will never error for -Wno-*, so check for -W* then add -Wno-* to the list
218# of options
219foreach a : ['unused-parameter', 'attributes', 'long-long',
220 'missing-field-initializers']
221 if cc.has_argument('-W@0@'.format(a))
222 warn_c_args += '-Wno-@0@'.format(a)
223 endif
224endforeach
225
226
227dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
228dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
229dep_cairo = dependency('cairo', required : with_cairo_tests == 'true')
230dep_valgrind = dependency('valgrind', required : with_valgrind == 'true')
231
232with_man_pages = get_option('man-pages')
233prog_xslt = find_program('xsltproc', required : with_man_pages == 'true')
234prog_sed = find_program('sed', required : with_man_pages == 'true')
235manpage_style = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
236if prog_xslt.found()
237 if run_command(prog_xslt, '--nonet', manpage_style).returncode() != 0
238 if with_man_pages == 'true'
239 error('Manpage style sheet cannot be found')
240 endif
241 with_man_pages = 'false'
242 endif
243endif
244with_man_pages = with_man_pages != 'false' and prog_xslt.found() and prog_sed.found()
245
246# Used for tets
247prog_bash = find_program('bash')
248
249if cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));''',
250 name : 'compiler supports __attribute__(("hidden"))')
251 config.set10('HAVE_VISIBILITY', true)
252endif
253
254foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
255 [with_nouveau, 'NOUVEAU'], [with_omap, 'OMAP'],
256 [with_exynos, 'EXYNOS'], [with_freedreno, 'FREEDRENO'],
257 [with_tegra, 'TEGRA'], [with_vc4, 'VC4'],
258 [with_etnaviv, 'ETNAVIV']]
259 if t[0]
260 config.set10('HAVE_@0@'.format(t[1]), true)
261 endif
262endforeach
263if with_freedreno_kgsl
264 if not with_freedreno
265 error('cannot enable freedreno-kgsl without freedreno support')
266 endif
267 config.set10('HAVE_FREEDRENO_KGSL', true)
268endif
269if dep_cairo.found()
270 config.set10('HAVE_CAIRO', true)
271endif
272if dep_valgrind.found()
273 config.set10('HAVE_VALGRIND', true)
274endif
275
276config.set10('_GNU_SOURCE', true)
277config_file = configure_file(
278 configuration : config,
279 output : 'config.h',
280)
281add_project_arguments('-DHAVE_CONFIG_H', language : 'c')
282
283inc_root = include_directories('.')
284inc_drm = include_directories('include/drm')
285
286libdrm = shared_library(
287 'drm',
288 [files(
289 'xf86drm.c', 'xf86drmHash.c', 'xf86drmRandom.c', 'xf86drmSL.c',
290 'xf86drmMode.c'
291 ),
292 config_file,
293 ],
294 c_args : warn_c_args,
295 dependencies : [dep_udev, dep_valgrind, dep_rt, dep_m],
296 include_directories : inc_drm,
297 version : '2.4.0',
298 install : true,
299)
300
301ext_libdrm = declare_dependency(
302 link_with : libdrm,
303 include_directories : inc_drm,
304)
305
306install_headers('libsync.h', 'xf86drm.h', 'xf86drmMode.h')
307install_headers(
308 'include/drm/drm.h', 'include/drm/drm_fourcc.h', 'include/drm/drm_mode.h',
309 'include/drm/drm_sarea.h', 'include/drm/i915_drm.h',
310 'include/drm/mach64_drm.h', 'include/drm/mga_drm.h',
311 'include/drm/nouveau_drm.h', 'include/drm/qxl_drm.h',
312 'include/drm/r128_drm.h', 'include/drm/radeon_drm.h',
313 'include/drm/amdgpu_drm.h', 'include/drm/savage_drm.h',
314 'include/drm/sis_drm.h', 'include/drm/tegra_drm.h', 'include/drm/vc4_drm.h',
315 'include/drm/via_drm.h', 'include/drm/virtgpu_drm.h',
316 subdir : 'libdrm',
317)
318if with_vmwgfx
319 install_headers('include/drm/vmwgfx_drm.h', subdir : 'libdrm')
320endif
321
322pkg.generate(
323 name : 'libdrm',
324 libraries : libdrm,
325 subdirs : ['.', 'libdrm'],
326 version : meson.project_version(),
327 description : 'Userspace interface to kernel DRM services',
328)
329
330if with_libkms
331 subdir('libkms')
332endif
333if with_intel
334 subdir('intel')
335endif
336if with_nouveau
337 subdir('nouveau')
338endif
339if with_radeon
340 subdir('radeon')
341endif
342if with_amdgpu
343 subdir('amdgpu')
344endif
345if with_omap
346 subdir('omap')
347endif
348if with_exynos
349 subdir('exynos')
350endif
351if with_freedreno
352 subdir('freedreno')
353endif
354if with_tegra
355 subdir('tegra')
356endif
357if with_vc4
358 subdir('vc4')
359endif
360if with_etnaviv
361 subdir('etnaviv')
362endif
363if with_man_pages
364 subdir('man')
365endif
366subdir('data')
367subdir('tests')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..8af33f1c
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,143 @@
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21option(
22 'libkms',
23 type : 'combo',
24 value : 'auto',
25 choices : ['true', 'false', 'auto'],
26 description : 'Build libkms mm abstraction library.',
27)
28option(
29 'intel',
30 type : 'combo',
31 value : 'auto',
32 choices : ['true', 'false', 'auto'],
33 description : '''Enable support for Intel's KMS API.''',
34)
35option(
36 'radeon',
37 type : 'combo',
38 value : 'auto',
39 choices : ['true', 'false', 'auto'],
40 description : '''Enable support for radeons's KMS API.''',
41)
42option(
43 'amdgpu',
44 type : 'combo',
45 value : 'auto',
46 choices : ['true', 'false', 'auto'],
47 description : '''Enable support for amdgpu's KMS API.''',
48)
49option(
50 'nouveau',
51 type : 'combo',
52 value : 'auto',
53 choices : ['true', 'false', 'auto'],
54 description : '''Enable support for nouveau's KMS API.''',
55)
56option(
57 'vmwgfx',
58 type : 'combo',
59 value : 'true',
60 choices : ['true', 'false', 'auto'],
61 description : '''Enable support for vmgfx's KMS API.''',
62)
63option(
64 'omap',
65 type : 'combo',
66 value : 'false',
67 choices : ['true', 'false', 'auto'],
68 description : '''Enable support for OMAP's experimental KMS API.''',
69)
70option(
71 'exynos',
72 type : 'combo',
73 value : 'false',
74 choices : ['true', 'false', 'auto'],
75 description : '''Enable support for EXYNOS's experimental KMS API.''',
76)
77option(
78 'freedreno',
79 type : 'combo',
80 value : 'auto',
81 choices : ['true', 'false', 'auto'],
82 description : '''Enable support for freedreno's KMS API.''',
83)
84option(
85 'tegra',
86 type : 'combo',
87 value : 'false',
88 choices : ['true', 'false', 'auto'],
89 description : '''Enable support for Tegra's experimental KMS API.''',
90)
91option(
92 'vc4',
93 type : 'combo',
94 value : 'auto',
95 choices : ['true', 'false', 'auto'],
96 description : '''Enable support for vc4's KMS API.''',
97)
98option(
99 'etnaviv',
100 type : 'combo',
101 value : 'false',
102 choices : ['true', 'false', 'auto'],
103 description : '''Enable support for etnaviv's experimental KMS API.''',
104)
105option(
106 'cairo-tests',
107 type : 'combo',
108 value : 'auto',
109 choices : ['true', 'false', 'auto'],
110 description : 'Enable support for Cairo rendering in tests.',
111)
112option(
113 'man-pages',
114 type : 'combo',
115 value : 'auto',
116 choices : ['true', 'false', 'auto'],
117 description : 'Enable manpage generation and installation.',
118)
119option(
120 'valgrind',
121 type : 'combo',
122 value : 'auto',
123 choices : ['true', 'false', 'auto'],
124 description : 'Build libdrm with valgrind support.',
125)
126option(
127 'freedreno-kgsl',
128 type : 'boolean',
129 value : false,
130 description : 'Enable support for freedreno to use downstream android kernel API.',
131)
132option(
133 'install-test-programs',
134 type : 'boolean',
135 value : false,
136 description : 'Install test programs.',
137)
138option(
139 'udev',
140 type : 'boolean',
141 value : false,
142 description : 'Enable support for using udev instead of mknod.',
143)
diff --git a/nouveau/meson.build b/nouveau/meson.build
new file mode 100644
index 00000000..bfecf84b
--- /dev/null
+++ b/nouveau/meson.build
@@ -0,0 +1,58 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21
22libdrm_nouveau = shared_library(
23 'drm_nouveau',
24 [files( 'nouveau.c', 'pushbuf.c', 'bufctx.c', 'abi16.c'), config_file],
25 c_args : warn_c_args,
26 include_directories : [inc_root, inc_drm],
27 link_with : libdrm,
28 dependencies : dep_threads,
29 version : '2.0.0',
30 install : true,
31)
32
33ext_libdrm_nouveau = declare_dependency(
34 link_with : [libdrm, libdrm_nouveau],
35 include_directories : [inc_drm, include_directories('.')],
36)
37
38install_headers('nouveau.h', subdir : 'libdrm/nouveau')
39install_headers(
40 'nvif/class.h', 'nvif/cl0080.h', 'nvif/cl9097.h', 'nvif/if0002.h',
41 'nvif/if0003.h', 'nvif/ioctl.h', 'nvif/unpack.h',
42 subdir : 'libdrm/nouveau/nvif'
43)
44
45pkg.generate(
46 name : 'libdrm_nouveau',
47 libraries : libdrm_nouveau,
48 subdirs : ['.', 'nouveau'],
49 version : meson.project_version(),
50 requires_private : 'libdrm',
51 description : 'Userspace interface to nouveau kernel DRM services',
52)
53
54test(
55 'nouveau-symbol-check',
56 prog_bash,
57 args : [files('nouveau-symbol-check'), libdrm_nouveau]
58)
diff --git a/omap/meson.build b/omap/meson.build
new file mode 100644
index 00000000..1881087f
--- /dev/null
+++ b/omap/meson.build
@@ -0,0 +1,53 @@
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21libdrm_omap = shared_library(
22 'drm_omap',
23 [files('omap_drm.c'), config_file],
24 include_directories : [inc_root, inc_drm],
25 c_args : warn_c_args,
26 link_with : libdrm,
27 dependencies : [dep_pthread_stubs],
28 version : '1.0.0',
29 install : true,
30)
31
32ext_libdrm_omap = declare_dependency(
33 link_with : [libdrm, libdrm_omap],
34 include_directories : [inc_drm, include_directories('.')],
35)
36
37install_headers('omap_drmif.h', subdir : 'libdrm')
38install_headers('omap_drm.h', subdir : 'omap')
39
40pkg.generate(
41 name : 'libdrm_omap',
42 libraries : libdrm_omap,
43 subdirs : ['.', 'libdrm', 'omap'],
44 version : '0.6',
45 requires_private : 'libdrm',
46 description : 'Userspace interface to omap kernel DRM services',
47)
48
49test(
50 'omap-symbol-check',
51 prog_bash,
52 args : [files('omap-symbol-check'), libdrm_omap]
53)
diff --git a/radeon/meson.build b/radeon/meson.build
new file mode 100644
index 00000000..b02166fe
--- /dev/null
+++ b/radeon/meson.build
@@ -0,0 +1,63 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21
22libdrm_radeon = shared_library(
23 'drm_radeon',
24 [
25 files(
26 'radeon_bo_gem.c', 'radeon_cs_gem.c', 'radeon_cs_space.c', 'radeon_bo.c',
27 'radeon_cs.c', 'radeon_surface.c',
28 ),
29 config_file,
30 ],
31 c_args : warn_c_args,
32 include_directories : [inc_root, inc_drm],
33 link_with : libdrm,
34 dependencies : [dep_pthread_stubs],
35 version : '1.0.1',
36 install : true,
37)
38
39ext_libdrm_radeon = declare_dependency(
40 link_with : [libdrm, libdrm_radeon],
41 include_directories : [inc_drm, include_directories('.')],
42)
43
44install_headers(
45 'radeon_bo.h', 'radeon_cs.h', 'radeon_surface.h', 'radeon_bo_gem.h',
46 'radeon_cs_gem.h', 'radeon_bo_int.h', 'radeon_cs_int.h', 'r600_pci_ids.h',
47 subdir : 'libdrm'
48)
49
50pkg.generate(
51 name : 'libdrm_radeon',
52 libraries : libdrm_radeon,
53 subdirs : ['.', 'libdrm'],
54 version : meson.project_version(),
55 requires_private : 'libdrm',
56 description : 'Userspace interface to kernel DRM services for radeon',
57)
58
59test(
60 'radeon-symbol-check',
61 prog_bash,
62 args : [files('radeon-symbol-check'), libdrm_radeon]
63)
diff --git a/tegra/meson.build b/tegra/meson.build
new file mode 100644
index 00000000..99fdd194
--- /dev/null
+++ b/tegra/meson.build
@@ -0,0 +1,52 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21libdrm_tegra = shared_library(
22 'drm_tegra',
23 [files('tegra.c'), config_file],
24 include_directories : [inc_root, inc_drm],
25 link_with : libdrm,
26 dependencies : [dep_pthread_stubs],
27 c_args : warn_c_args,
28 version : '0.0.0',
29 install : true,
30)
31
32ext_libdrm_tegra = declare_dependency(
33 link_with : [libdrm, libdrm_tegra],
34 include_directories : [inc_drm, include_directories('.')],
35)
36
37install_headers('tegra.h', subdir : 'libdrm')
38
39pkg.generate(
40 name : 'libdrm_tegra',
41 libraries : libdrm_tegra,
42 subdirs : ['.', 'libdrm'],
43 version : meson.project_version(),
44 requires_private : 'libdrm',
45 description : 'Userspace interface to Tegra kernel DRM services',
46)
47
48test(
49 'tegra-symbol-check',
50 prog_bash,
51 args : [files('tegra-symbol-check'), libdrm_tegra]
52)
diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build
new file mode 100644
index 00000000..4c1237c6
--- /dev/null
+++ b/tests/amdgpu/meson.build
@@ -0,0 +1,34 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21if dep_cunit.found()
22 amdgpu_test = executable(
23 'amdgpu_test',
24 files(
25 'amdgpu_test.c', 'basic_tests.c', 'bo_tests.c', 'cs_tests.c',
26 'vce_tests.c', 'uvd_enc_tests.c', 'vcn_tests.c', 'deadlock_tests.c',
27 'vm_tests.c',
28 ),
29 dependencies : [dep_cunit, dep_threads],
30 include_directories : [inc_root, inc_drm, include_directories('../../amdgpu')],
31 link_with : [libdrm, libdrm_amdgpu],
32 install : with_install_tests,
33 )
34endif
diff --git a/tests/etnaviv/meson.build b/tests/etnaviv/meson.build
new file mode 100644
index 00000000..8b4a3cfb
--- /dev/null
+++ b/tests/etnaviv/meson.build
@@ -0,0 +1,45 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21inc_etnaviv_tests = [inc_root, inc_drm, include_directories('../../etnaviv')]
22
23etnaviv_2d_test = executable(
24 'etnaviv_2d_test',
25 files('etnaviv_2d_test.c', 'write_bmp.c'),
26 include_directories : inc_etnaviv_tests,
27 link_with : [libdrm, libdrm_etnaviv],
28 install : with_install_tests,
29)
30
31etnaviv_cmd_stream_test = executable(
32 'etnaviv_cmd_stream_test',
33 files('etnaviv_cmd_stream_test.c'),
34 include_directories : inc_etnaviv_tests,
35 link_with : [libdrm, libdrm_etnaviv],
36 install : with_install_tests,
37)
38
39etnaviv_bo_cache_test = executable(
40 'etnaviv_bo_cache_test',
41 files('etnaviv_bo_cache_test.c'),
42 include_directories : inc_etnaviv_tests,
43 link_with : [libdrm, libdrm_etnaviv],
44 install : with_install_tests,
45)
diff --git a/tests/exynos/meson.build b/tests/exynos/meson.build
new file mode 100644
index 00000000..940c3ce4
--- /dev/null
+++ b/tests/exynos/meson.build
@@ -0,0 +1,54 @@
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21inc_exynos = include_directories('../../exynos')
22
23if with_libkms
24 exynos_fimg2d_test = executable(
25 'exynos_fimg2d_test',
26 files('exynos_fimg2d_test.c'),
27 c_args : warn_c_args,
28 include_directories : [inc_root, inc_drm, inc_exynos,
29 include_directories('../../libkms')],
30 link_with : [libdrm, libkms, libdrm_exynos],
31 dependencies : dep_threads,
32 install : with_install_tests,
33 )
34endif
35
36exynos_fimg2d_perf = executable(
37 'exynos_fimg2d_perf',
38 files('exynos_fimg2d_perf.c'),
39 c_args : warn_c_args,
40 include_directories : [inc_root, inc_drm, inc_exynos],
41 link_with : [libdrm, libdrm_exynos],
42 dependencies : dep_threads,
43 install : with_install_tests,
44)
45
46exynos_fimg2d_event = executable(
47 'exynos_fimg2d_event',
48 files('exynos_fimg2d_event.c'),
49 c_args : warn_c_args,
50 include_directories : [inc_root, inc_drm, inc_exynos],
51 link_with : [libdrm, libdrm_exynos],
52 dependencies : dep_threads,
53 install : with_install_tests,
54)
diff --git a/tests/kms/meson.build b/tests/kms/meson.build
new file mode 100644
index 00000000..1f7f724d
--- /dev/null
+++ b/tests/kms/meson.build
@@ -0,0 +1,49 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21
22libkms_test = static_library(
23 'kms-test',
24 files(
25 'libkms-test-crtc.c', 'libkms-test-device.c', 'libkms-test-framebuffer.c',
26 'libkms-test-plane.c', 'libkms-test-screen.c',
27 ),
28 include_directories : [inc_root, inc_tests, inc_drm],
29 link_with : libdrm,
30 c_args : warn_c_args,
31)
32
33kms_steal_crtc = executable(
34 'kms-steal-crtc',
35 files('kms-steal-crtc.c'),
36 dependencies : dep_cairo,
37 include_directories : [inc_root, inc_tests, inc_drm],
38 link_with : [libkms_test, libutil],
39 install : with_install_tests,
40)
41
42kms_universal_planes = executable(
43 'kms-universal-planes',
44 files('kms-universal-planes.c'),
45 dependencies : dep_cairo,
46 include_directories : [inc_root, inc_tests, inc_drm],
47 link_with : [libkms_test],
48 install : with_install_tests,
49)
diff --git a/tests/kmstest/meson.build b/tests/kmstest/meson.build
new file mode 100644
index 00000000..a47d4951
--- /dev/null
+++ b/tests/kmstest/meson.build
@@ -0,0 +1,30 @@
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21kmstest = executable(
22 'kmstest',
23 files('main.c'),
24 c_args : warn_c_args,
25 include_directories : [
26 inc_root, inc_tests, include_directories('../../libkms'), inc_drm,
27 ],
28 link_with : [libutil, libkms, libdrm],
29 install : with_install_tests,
30)
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 00000000..fdf950b7
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,86 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21inc_tests = include_directories('.')
22
23subdir('util')
24subdir('kms')
25subdir('modeprint')
26subdir('proptest')
27subdir('modetest')
28subdir('vbltest')
29if with_libkms
30 subdir('kmstest')
31endif
32if with_radeon
33 subdir('radeon')
34endif
35if with_amdgpu
36 subdir('amdgpu')
37endif
38if with_exynos
39 subdir('exynos')
40endif
41if with_tegra
42 subdir('tegra')
43endif
44if with_etnaviv
45 subdir('etnaviv')
46endif
47if with_nouveau
48 subdir('nouveau')
49endif
50
51drmsl = executable(
52 'drmsl',
53 files('drmsl.c'),
54 include_directories : [inc_root, inc_drm],
55 link_with : libdrm,
56 c_args : warn_c_args,
57)
58
59hash = executable(
60 'hash',
61 files('hash.c'),
62 include_directories : [inc_root, inc_drm],
63 link_with : libdrm,
64 c_args : warn_c_args,
65)
66
67random = executable(
68 'random',
69 files('random.c'),
70 include_directories : [inc_root, inc_drm],
71 link_with : libdrm,
72 c_args : warn_c_args,
73)
74
75drmdevice = executable(
76 'drmdevice',
77 files('drmdevice.c'),
78 include_directories : [inc_root, inc_drm],
79 link_with : libdrm,
80 c_args : warn_c_args,
81)
82
83test('random', random, timeout : 240)
84test('hash', hash)
85test('drmsl', drmsl)
86test('drmdevice', drmdevice)
diff --git a/tests/modeprint/meson.build b/tests/modeprint/meson.build
new file mode 100644
index 00000000..5f0eb24b
--- /dev/null
+++ b/tests/modeprint/meson.build
@@ -0,0 +1,29 @@
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21modeprint = executable(
22 'modeprint',
23 files('modeprint.c'),
24 c_args : warn_c_args,
25 include_directories : [inc_root, inc_tests, inc_drm],
26 link_with : libdrm,
27 dependencies : dep_threads,
28 install : with_install_tests,
29)
diff --git a/tests/modetest/meson.build b/tests/modetest/meson.build
new file mode 100644
index 00000000..2a081845
--- /dev/null
+++ b/tests/modetest/meson.build
@@ -0,0 +1,29 @@
1# Copyright © 2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21modetest = executable(
22 'modetest',
23 files('buffers.c', 'cursor.c', 'modetest.c'),
24 c_args : [warn_c_args, '-Wno-pointer-arith'],
25 include_directories : [inc_root, inc_tests, inc_drm],
26 dependencies : [dep_threads, dep_cairo],
27 link_with : [libdrm, libutil],
28 install : with_install_tests,
29)
diff --git a/tests/nouveau/meson.build b/tests/nouveau/meson.build
new file mode 100644
index 00000000..f5d73c1e
--- /dev/null
+++ b/tests/nouveau/meson.build
@@ -0,0 +1,30 @@
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21threaded = executable(
22 'threaded',
23 files('threaded.c'),
24 dependencies : [dep_dl, dep_threads],
25 include_directories : [inc_root, inc_drm, include_directories('../../nouveau')],
26 link_with : [libdrm, libdrm_nouveau],
27 c_args : warn_c_args,
28)
29
30test('threaded', threaded)
diff --git a/tests/proptest/meson.build b/tests/proptest/meson.build
new file mode 100644
index 00000000..22d7473e
--- /dev/null
+++ b/tests/proptest/meson.build
@@ -0,0 +1,28 @@
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21proptest = executable(
22 'proptest',
23 files('proptest.c'),
24 c_args : warn_c_args,
25 include_directories : [inc_root, inc_tests, inc_drm],
26 link_with : [libdrm, libutil],
27 install : with_install_tests,
28)
diff --git a/tests/radeon/meson.build b/tests/radeon/meson.build
new file mode 100644
index 00000000..9e4f916e
--- /dev/null
+++ b/tests/radeon/meson.build
@@ -0,0 +1,27 @@
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21radeon_ttm = executable(
22 'radeon_ttm',
23 files('rbo.c', 'radeon_ttm.c'),
24 include_directories : [inc_root, inc_drm],
25 link_with : libdrm,
26 c_args : warn_c_args,
27)
diff --git a/tests/tegra/meson.build b/tests/tegra/meson.build
new file mode 100644
index 00000000..9c74ac4a
--- /dev/null
+++ b/tests/tegra/meson.build
@@ -0,0 +1,27 @@
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21openclose = executable(
22 'openclose',
23 files('openclose.c'),
24 include_directories : [inc_root, inc_drm, include_directories('../../tegra')],
25 c_args : warn_c_args,
26 link_with : [libdrm, libdrm_tegra],
27)
diff --git a/tests/util/meson.build b/tests/util/meson.build
new file mode 100644
index 00000000..7fa1a4b7
--- /dev/null
+++ b/tests/util/meson.build
@@ -0,0 +1,28 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21
22libutil = static_library(
23 'util',
24 [files('format.c', 'kms.c', 'pattern.c'), config_file],
25 include_directories : [inc_root, inc_drm],
26 link_with : libdrm,
27 dependencies : dep_cairo
28)
diff --git a/tests/vbltest/meson.build b/tests/vbltest/meson.build
new file mode 100644
index 00000000..ae52ab88
--- /dev/null
+++ b/tests/vbltest/meson.build
@@ -0,0 +1,28 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21vbltest = executable(
22 'vbltest',
23 files('vbltest.c'),
24 c_args : warn_c_args,
25 include_directories : [inc_root, inc_tests, inc_drm],
26 link_with : [libdrm, libutil],
27 install : with_install_tests,
28)
diff --git a/vc4/meson.build b/vc4/meson.build
new file mode 100644
index 00000000..0136987b
--- /dev/null
+++ b/vc4/meson.build
@@ -0,0 +1,28 @@
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21install_headers('vc4_packet.h', 'vc4_qpu_defines.h', subdir : 'libdrm')
22
23pkg.generate(
24 name : 'libdrm_vc4',
25 version : meson.project_version(),
26 requires_private : 'libdrm',
27 description : 'Userspace interface to vc4 kernel DRM services',
28)