diff options
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] |
18 | indent_style = space | 18 | indent_style = space |
19 | indent_size = 2 | 19 | indent_size = 2 |
20 | |||
21 | [{meson.build,meson_options.txt}] | ||
22 | indent_style = space | ||
23 | indent_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 | |||
7 | indent_size = 8 | 7 | indent_size = 8 |
8 | tab_width = 8 | 8 | tab_width = 8 |
9 | insert_final_newline = true | 9 | insert_final_newline = true |
10 | |||
11 | [meson.build] | ||
12 | indent_style = space | ||
13 | indent_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 | |||
22 | datadir_amdgpu = join_paths(get_option('datadir'), 'libdrm', 'amdgpu.ids') | ||
23 | |||
24 | libdrm_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 | |||
45 | install_headers('amdgpu.h', subdir : 'libdrm') | ||
46 | |||
47 | pkg.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 | |||
56 | ext_libdrm_amdgpu = declare_dependency( | ||
57 | link_with : [libdrm, libdrm_amdgpu], | ||
58 | include_directories : [inc_drm, include_directories('.')], | ||
59 | ) | ||
60 | |||
61 | test( | ||
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 | |||
21 | if with_amdgpu | ||
22 | install_data( | ||
23 | 'amdgpu.ids', | ||
24 | install_mode : 'rw-r--r--', | ||
25 | install_dir : datadir_amdgpu, | ||
26 | ) | ||
27 | endif | ||
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 | |||
22 | libdrm_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 | |||
39 | install_headers('etnaviv_drmif.h', subdir : 'libdrm') | ||
40 | |||
41 | pkg.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 | |||
50 | ext_libdrm_etnaviv = declare_dependency( | ||
51 | link_with : [libdrm, libdrm_etnaviv], | ||
52 | include_directories : [inc_drm, include_directories('.')], | ||
53 | ) | ||
54 | |||
55 | test( | ||
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 | |||
21 | libdrm_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 | |||
32 | install_headers('exynos_drmif.h', subdir : 'libdrm') | ||
33 | install_headers('exynos_drm.h', 'exynos_fimg2d.h', subdir : 'exynos') | ||
34 | |||
35 | ext_libdrm_exynos = declare_dependency( | ||
36 | link_with : [libdrm, libdrm_exynos], | ||
37 | include_directories : [inc_drm, include_directories('.')], | ||
38 | ) | ||
39 | |||
40 | pkg.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 | |||
49 | test( | ||
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 | |||
21 | files_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 | |||
33 | if 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 | ) | ||
40 | endif | ||
41 | |||
42 | libdrm_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 | |||
53 | ext_libdrm_freedreno = declare_dependency( | ||
54 | link_with : [libdrm, libdrm_freedreno], | ||
55 | include_directories : [inc_drm, include_directories('.')], | ||
56 | ) | ||
57 | |||
58 | install_headers( | ||
59 | 'freedreno_drmif.h', 'freedreno_ringbuffer.h', | ||
60 | subdir : 'freedreno' | ||
61 | ) | ||
62 | |||
63 | pkg.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 | |||
72 | test( | ||
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 | |||
21 | libdrm_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 | |||
38 | ext_libdrm_intel = declare_dependency( | ||
39 | link_with : [libdrm, libdrm_intel], | ||
40 | include_directories : [inc_drm, include_directories('.')], | ||
41 | ) | ||
42 | |||
43 | install_headers( | ||
44 | 'intel_bufmgr.h', 'intel_aub.h', 'intel_debug.h', | ||
45 | subdir : 'libdrm', | ||
46 | ) | ||
47 | |||
48 | pkg.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 | |||
57 | test_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 | |||
65 | test( | ||
66 | 'gen4-3d.batch', | ||
67 | prog_bash, | ||
68 | args : files('tests/gen4-3d.batch.sh'), | ||
69 | workdir : meson.current_build_dir(), | ||
70 | ) | ||
71 | test( | ||
72 | 'gen45-3d.batch', | ||
73 | prog_bash, | ||
74 | args : files('tests/gm45-3d.batch.sh'), | ||
75 | workdir : meson.current_build_dir(), | ||
76 | ) | ||
77 | test( | ||
78 | 'gen5-3d.batch', | ||
79 | prog_bash, | ||
80 | args : files('tests/gen5-3d.batch.sh'), | ||
81 | workdir : meson.current_build_dir(), | ||
82 | ) | ||
83 | test( | ||
84 | 'gen6-3d.batch', | ||
85 | prog_bash, | ||
86 | args : files('tests/gen6-3d.batch.sh'), | ||
87 | workdir : meson.current_build_dir(), | ||
88 | ) | ||
89 | test( | ||
90 | 'gen7-3d.batch', | ||
91 | prog_bash, | ||
92 | args : files('tests/gen7-3d.batch.sh'), | ||
93 | workdir : meson.current_build_dir(), | ||
94 | ) | ||
95 | test( | ||
96 | 'gen7-2d-copy.batch', | ||
97 | prog_bash, | ||
98 | args : files('tests/gen7-2d-copy.batch.sh'), | ||
99 | workdir : meson.current_build_dir(), | ||
100 | ) | ||
101 | test( | ||
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 | |||
21 | libkms_include = [inc_root, inc_drm] | ||
22 | files_libkms = files( | ||
23 | 'linux.c', | ||
24 | 'dumb.c', | ||
25 | 'api.c', | ||
26 | ) | ||
27 | if with_vmwgfx | ||
28 | files_libkms += files('vmwgfx.c') | ||
29 | endif | ||
30 | if with_intel | ||
31 | files_libkms += files('intel.c') | ||
32 | endif | ||
33 | if with_nouveau | ||
34 | files_libkms += files('nouveau.c') | ||
35 | endif | ||
36 | if with_radeon | ||
37 | files_libkms += files('radeon.c') | ||
38 | endif | ||
39 | if with_exynos | ||
40 | files_libkms += files('exynos.c') | ||
41 | libkms_include += include_directories('../exynos') | ||
42 | endif | ||
43 | |||
44 | libkms = 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 | |||
54 | ext_libkms = declare_dependency( | ||
55 | link_with : [libdrm, libkms], | ||
56 | include_directories : [libkms_include], | ||
57 | ) | ||
58 | |||
59 | install_headers('libkms.h', subdir : 'libkms') | ||
60 | |||
61 | pkg.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 | |||
70 | test( | ||
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 | |||
21 | xsltproc_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 | |||
29 | xmls = [ | ||
30 | ['drm', '7'], ['drm-kms', '7'], ['drm-memory', '7'], ['drmAvailable', '3'], | ||
31 | ['drmHandleEvent', '3'], ['drmModeGetResources', '3'] | ||
32 | ] | ||
33 | foreach 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 | ) | ||
45 | endforeach | ||
46 | |||
47 | foreach 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 | ) | ||
67 | endforeach | ||
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 | |||
21 | project( | ||
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 | |||
30 | pkg = import('pkgconfig') | ||
31 | |||
32 | with_udev = get_option('udev') | ||
33 | with_freedreno_kgsl = get_option('freedreno-kgsl') | ||
34 | with_install_tests = get_option('install-test-programs') | ||
35 | with_cairo_tests = get_option('cairo-tests') | ||
36 | with_valgrind = get_option('valgrind') | ||
37 | |||
38 | config = configuration_data() | ||
39 | |||
40 | # TODO: openbsd is guess, the others are correct | ||
41 | if ['freebsd', 'dragonfly', 'netbsd', 'openbsd'].contains(host_machine.system()) | ||
42 | dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4') | ||
43 | else | ||
44 | dep_pthread_stubs = [] | ||
45 | endif | ||
46 | dep_threads = dependency('threads') | ||
47 | |||
48 | cc = meson.get_compiler('c') | ||
49 | |||
50 | # Check for atomics | ||
51 | intel_atomics = false | ||
52 | lib_atomics = false | ||
53 | |||
54 | if 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 | ||
61 | elif cc.has_header('atomic_ops.h') | ||
62 | lib_atomics = true | ||
63 | with_atomics = true | ||
64 | elif cc.has_function('atomic_cas_uint') | ||
65 | with_atomics = true | ||
66 | else | ||
67 | with_atomics = false | ||
68 | endif | ||
69 | |||
70 | config.set10('HAVE_LIBDRM_ATOMIC_PRIMITIVES', intel_atomics) | ||
71 | config.set10('HAVE_LIB_ATOMIC_OPS', lib_atomics) | ||
72 | |||
73 | with_intel = false | ||
74 | _intel = get_option('intel') | ||
75 | if _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 | ||
81 | endif | ||
82 | |||
83 | with_radeon = false | ||
84 | _radeon = get_option('radeon') | ||
85 | if _radeon != 'false' | ||
86 | if _radeon == 'true' and not with_atomics | ||
87 | error('libdrm_radeon requires atomics.') | ||
88 | endif | ||
89 | with_radeon = true | ||
90 | endif | ||
91 | |||
92 | with_amdgpu = false | ||
93 | _amdgpu = get_option('amdgpu') | ||
94 | if _amdgpu != 'false' | ||
95 | if _amdgpu == 'true' and not with_atomics | ||
96 | error('libdrm_amdgpu requires atomics.') | ||
97 | endif | ||
98 | with_amdgpu = true | ||
99 | endif | ||
100 | |||
101 | with_nouveau = false | ||
102 | _nouveau = get_option('nouveau') | ||
103 | if _nouveau != 'false' | ||
104 | if _nouveau == 'true' and not with_atomics | ||
105 | error('libdrm_nouveau requires atomics.') | ||
106 | endif | ||
107 | with_nouveau = true | ||
108 | endif | ||
109 | |||
110 | with_vmwgfx = false | ||
111 | _vmwgfx = get_option('vmwgfx') | ||
112 | if _vmwgfx != 'false' | ||
113 | with_vmwgfx = true | ||
114 | endif | ||
115 | |||
116 | with_omap = false | ||
117 | _omap = get_option('omap') | ||
118 | if _omap == 'true' | ||
119 | if not with_atomics | ||
120 | error('libdrm_omap requires atomics.') | ||
121 | endif | ||
122 | with_omap = true | ||
123 | endif | ||
124 | |||
125 | with_freedreno = false | ||
126 | _freedreno = get_option('freedreno') | ||
127 | if _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 | ||
133 | endif | ||
134 | |||
135 | with_tegra = false | ||
136 | _tegra = get_option('tegra') | ||
137 | if _tegra == 'true' | ||
138 | if not with_atomics | ||
139 | error('libdrm_tegra requires atomics.') | ||
140 | endif | ||
141 | with_tegra = true | ||
142 | endif | ||
143 | |||
144 | with_etnaviv = false | ||
145 | _etnaviv = get_option('etnaviv') | ||
146 | if _etnaviv == 'true' | ||
147 | if not with_atomics | ||
148 | error('libdrm_etnaviv requires atomics.') | ||
149 | endif | ||
150 | with_etnaviv = true | ||
151 | endif | ||
152 | |||
153 | with_exynos = get_option('exynos') == 'true' | ||
154 | |||
155 | with_vc4 = false | ||
156 | _vc4 = get_option('vc4') | ||
157 | if _vc4 != 'false' | ||
158 | with_vc4 = _vc4 == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family()) | ||
159 | endif | ||
160 | |||
161 | # XXX: Aparently only freebsd and dragonfly bsd actually need this (and | ||
162 | # gnu/kfreebsd), not openbsd and netbsd | ||
163 | with_libkms = false | ||
164 | _libkms = get_option('libkms') | ||
165 | if _libkms != 'false' | ||
166 | with_libkms = _libkms == 'true' or ['linux', 'freebsd', 'dragonfly'].contains(host_machine.system()) | ||
167 | endif | ||
168 | |||
169 | if with_udev | ||
170 | dep_udev = dependency('udev') | ||
171 | config.set10('UDEV', true) | ||
172 | else | ||
173 | dep_udev = [] | ||
174 | endif | ||
175 | |||
176 | # Among others FreeBSD does not have a separate dl library. | ||
177 | if not cc.has_function('dlsym') | ||
178 | dep_dl = cc.find_library('dl', required : with_nouveau) | ||
179 | else | ||
180 | dep_dl = [] | ||
181 | endif | ||
182 | # clock_gettime might require -rt, or it might not. find out | ||
183 | if not cc.has_function('clock_gettime', prefix : '#define _GNU_SOURCE\n#include <time.h>') | ||
184 | # XXX: untested | ||
185 | dep_rt = cc.find_library('rt') | ||
186 | else | ||
187 | dep_rt = [] | ||
188 | endif | ||
189 | dep_m = cc.find_library('m', required : false) | ||
190 | if cc.has_header('sys/sysctl.h') | ||
191 | config.set10('HAVE_SYS_SYSCTL_H', true) | ||
192 | endif | ||
193 | if cc.has_header('sys/select.h') | ||
194 | config.set10('HAVE_SYS_SELECT_H', true) | ||
195 | endif | ||
196 | if cc.has_header_symbol('sys/sysmacros.h', 'major') | ||
197 | config.set10('MAJOR_IN_SYSMACROS', true) | ||
198 | elif cc.has_header_symbol('sys/mkdev.h', 'major') | ||
199 | config.set10('MAJOR_IN_MKDEV', true) | ||
200 | endif | ||
201 | if cc.has_function('open_memstream') | ||
202 | config.set10('HAVE_OPEN_MEMSTREAM', true) | ||
203 | endif | ||
204 | |||
205 | warn_c_args = [] | ||
206 | foreach 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 | ||
216 | endforeach | ||
217 | # GCC will never error for -Wno-*, so check for -W* then add -Wno-* to the list | ||
218 | # of options | ||
219 | foreach 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 | ||
224 | endforeach | ||
225 | |||
226 | |||
227 | dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel) | ||
228 | dep_cunit = dependency('cunit', version : '>= 2.1', required : false) | ||
229 | dep_cairo = dependency('cairo', required : with_cairo_tests == 'true') | ||
230 | dep_valgrind = dependency('valgrind', required : with_valgrind == 'true') | ||
231 | |||
232 | with_man_pages = get_option('man-pages') | ||
233 | prog_xslt = find_program('xsltproc', required : with_man_pages == 'true') | ||
234 | prog_sed = find_program('sed', required : with_man_pages == 'true') | ||
235 | manpage_style = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl' | ||
236 | if 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 | ||
243 | endif | ||
244 | with_man_pages = with_man_pages != 'false' and prog_xslt.found() and prog_sed.found() | ||
245 | |||
246 | # Used for tets | ||
247 | prog_bash = find_program('bash') | ||
248 | |||
249 | if cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));''', | ||
250 | name : 'compiler supports __attribute__(("hidden"))') | ||
251 | config.set10('HAVE_VISIBILITY', true) | ||
252 | endif | ||
253 | |||
254 | foreach 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 | ||
262 | endforeach | ||
263 | if 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) | ||
268 | endif | ||
269 | if dep_cairo.found() | ||
270 | config.set10('HAVE_CAIRO', true) | ||
271 | endif | ||
272 | if dep_valgrind.found() | ||
273 | config.set10('HAVE_VALGRIND', true) | ||
274 | endif | ||
275 | |||
276 | config.set10('_GNU_SOURCE', true) | ||
277 | config_file = configure_file( | ||
278 | configuration : config, | ||
279 | output : 'config.h', | ||
280 | ) | ||
281 | add_project_arguments('-DHAVE_CONFIG_H', language : 'c') | ||
282 | |||
283 | inc_root = include_directories('.') | ||
284 | inc_drm = include_directories('include/drm') | ||
285 | |||
286 | libdrm = 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 | |||
301 | ext_libdrm = declare_dependency( | ||
302 | link_with : libdrm, | ||
303 | include_directories : inc_drm, | ||
304 | ) | ||
305 | |||
306 | install_headers('libsync.h', 'xf86drm.h', 'xf86drmMode.h') | ||
307 | install_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 | ) | ||
318 | if with_vmwgfx | ||
319 | install_headers('include/drm/vmwgfx_drm.h', subdir : 'libdrm') | ||
320 | endif | ||
321 | |||
322 | pkg.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 | |||
330 | if with_libkms | ||
331 | subdir('libkms') | ||
332 | endif | ||
333 | if with_intel | ||
334 | subdir('intel') | ||
335 | endif | ||
336 | if with_nouveau | ||
337 | subdir('nouveau') | ||
338 | endif | ||
339 | if with_radeon | ||
340 | subdir('radeon') | ||
341 | endif | ||
342 | if with_amdgpu | ||
343 | subdir('amdgpu') | ||
344 | endif | ||
345 | if with_omap | ||
346 | subdir('omap') | ||
347 | endif | ||
348 | if with_exynos | ||
349 | subdir('exynos') | ||
350 | endif | ||
351 | if with_freedreno | ||
352 | subdir('freedreno') | ||
353 | endif | ||
354 | if with_tegra | ||
355 | subdir('tegra') | ||
356 | endif | ||
357 | if with_vc4 | ||
358 | subdir('vc4') | ||
359 | endif | ||
360 | if with_etnaviv | ||
361 | subdir('etnaviv') | ||
362 | endif | ||
363 | if with_man_pages | ||
364 | subdir('man') | ||
365 | endif | ||
366 | subdir('data') | ||
367 | subdir('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 | |||
21 | option( | ||
22 | 'libkms', | ||
23 | type : 'combo', | ||
24 | value : 'auto', | ||
25 | choices : ['true', 'false', 'auto'], | ||
26 | description : 'Build libkms mm abstraction library.', | ||
27 | ) | ||
28 | option( | ||
29 | 'intel', | ||
30 | type : 'combo', | ||
31 | value : 'auto', | ||
32 | choices : ['true', 'false', 'auto'], | ||
33 | description : '''Enable support for Intel's KMS API.''', | ||
34 | ) | ||
35 | option( | ||
36 | 'radeon', | ||
37 | type : 'combo', | ||
38 | value : 'auto', | ||
39 | choices : ['true', 'false', 'auto'], | ||
40 | description : '''Enable support for radeons's KMS API.''', | ||
41 | ) | ||
42 | option( | ||
43 | 'amdgpu', | ||
44 | type : 'combo', | ||
45 | value : 'auto', | ||
46 | choices : ['true', 'false', 'auto'], | ||
47 | description : '''Enable support for amdgpu's KMS API.''', | ||
48 | ) | ||
49 | option( | ||
50 | 'nouveau', | ||
51 | type : 'combo', | ||
52 | value : 'auto', | ||
53 | choices : ['true', 'false', 'auto'], | ||
54 | description : '''Enable support for nouveau's KMS API.''', | ||
55 | ) | ||
56 | option( | ||
57 | 'vmwgfx', | ||
58 | type : 'combo', | ||
59 | value : 'true', | ||
60 | choices : ['true', 'false', 'auto'], | ||
61 | description : '''Enable support for vmgfx's KMS API.''', | ||
62 | ) | ||
63 | option( | ||
64 | 'omap', | ||
65 | type : 'combo', | ||
66 | value : 'false', | ||
67 | choices : ['true', 'false', 'auto'], | ||
68 | description : '''Enable support for OMAP's experimental KMS API.''', | ||
69 | ) | ||
70 | option( | ||
71 | 'exynos', | ||
72 | type : 'combo', | ||
73 | value : 'false', | ||
74 | choices : ['true', 'false', 'auto'], | ||
75 | description : '''Enable support for EXYNOS's experimental KMS API.''', | ||
76 | ) | ||
77 | option( | ||
78 | 'freedreno', | ||
79 | type : 'combo', | ||
80 | value : 'auto', | ||
81 | choices : ['true', 'false', 'auto'], | ||
82 | description : '''Enable support for freedreno's KMS API.''', | ||
83 | ) | ||
84 | option( | ||
85 | 'tegra', | ||
86 | type : 'combo', | ||
87 | value : 'false', | ||
88 | choices : ['true', 'false', 'auto'], | ||
89 | description : '''Enable support for Tegra's experimental KMS API.''', | ||
90 | ) | ||
91 | option( | ||
92 | 'vc4', | ||
93 | type : 'combo', | ||
94 | value : 'auto', | ||
95 | choices : ['true', 'false', 'auto'], | ||
96 | description : '''Enable support for vc4's KMS API.''', | ||
97 | ) | ||
98 | option( | ||
99 | 'etnaviv', | ||
100 | type : 'combo', | ||
101 | value : 'false', | ||
102 | choices : ['true', 'false', 'auto'], | ||
103 | description : '''Enable support for etnaviv's experimental KMS API.''', | ||
104 | ) | ||
105 | option( | ||
106 | 'cairo-tests', | ||
107 | type : 'combo', | ||
108 | value : 'auto', | ||
109 | choices : ['true', 'false', 'auto'], | ||
110 | description : 'Enable support for Cairo rendering in tests.', | ||
111 | ) | ||
112 | option( | ||
113 | 'man-pages', | ||
114 | type : 'combo', | ||
115 | value : 'auto', | ||
116 | choices : ['true', 'false', 'auto'], | ||
117 | description : 'Enable manpage generation and installation.', | ||
118 | ) | ||
119 | option( | ||
120 | 'valgrind', | ||
121 | type : 'combo', | ||
122 | value : 'auto', | ||
123 | choices : ['true', 'false', 'auto'], | ||
124 | description : 'Build libdrm with valgrind support.', | ||
125 | ) | ||
126 | option( | ||
127 | 'freedreno-kgsl', | ||
128 | type : 'boolean', | ||
129 | value : false, | ||
130 | description : 'Enable support for freedreno to use downstream android kernel API.', | ||
131 | ) | ||
132 | option( | ||
133 | 'install-test-programs', | ||
134 | type : 'boolean', | ||
135 | value : false, | ||
136 | description : 'Install test programs.', | ||
137 | ) | ||
138 | option( | ||
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 | |||
22 | libdrm_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 | |||
33 | ext_libdrm_nouveau = declare_dependency( | ||
34 | link_with : [libdrm, libdrm_nouveau], | ||
35 | include_directories : [inc_drm, include_directories('.')], | ||
36 | ) | ||
37 | |||
38 | install_headers('nouveau.h', subdir : 'libdrm/nouveau') | ||
39 | install_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 | |||
45 | pkg.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 | |||
54 | test( | ||
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 | |||
21 | libdrm_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 | |||
32 | ext_libdrm_omap = declare_dependency( | ||
33 | link_with : [libdrm, libdrm_omap], | ||
34 | include_directories : [inc_drm, include_directories('.')], | ||
35 | ) | ||
36 | |||
37 | install_headers('omap_drmif.h', subdir : 'libdrm') | ||
38 | install_headers('omap_drm.h', subdir : 'omap') | ||
39 | |||
40 | pkg.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 | |||
49 | test( | ||
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 | |||
22 | libdrm_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 | |||
39 | ext_libdrm_radeon = declare_dependency( | ||
40 | link_with : [libdrm, libdrm_radeon], | ||
41 | include_directories : [inc_drm, include_directories('.')], | ||
42 | ) | ||
43 | |||
44 | install_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 | |||
50 | pkg.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 | |||
59 | test( | ||
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 | |||
21 | libdrm_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 | |||
32 | ext_libdrm_tegra = declare_dependency( | ||
33 | link_with : [libdrm, libdrm_tegra], | ||
34 | include_directories : [inc_drm, include_directories('.')], | ||
35 | ) | ||
36 | |||
37 | install_headers('tegra.h', subdir : 'libdrm') | ||
38 | |||
39 | pkg.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 | |||
48 | test( | ||
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 | |||
21 | if 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 | ) | ||
34 | endif | ||
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 | |||
21 | inc_etnaviv_tests = [inc_root, inc_drm, include_directories('../../etnaviv')] | ||
22 | |||
23 | etnaviv_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 | |||
31 | etnaviv_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 | |||
39 | etnaviv_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 | |||
21 | inc_exynos = include_directories('../../exynos') | ||
22 | |||
23 | if 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 | ) | ||
34 | endif | ||
35 | |||
36 | exynos_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 | |||
46 | exynos_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 | |||
22 | libkms_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 | |||
33 | kms_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 | |||
42 | kms_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 | |||
21 | kmstest = 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 | |||
21 | inc_tests = include_directories('.') | ||
22 | |||
23 | subdir('util') | ||
24 | subdir('kms') | ||
25 | subdir('modeprint') | ||
26 | subdir('proptest') | ||
27 | subdir('modetest') | ||
28 | subdir('vbltest') | ||
29 | if with_libkms | ||
30 | subdir('kmstest') | ||
31 | endif | ||
32 | if with_radeon | ||
33 | subdir('radeon') | ||
34 | endif | ||
35 | if with_amdgpu | ||
36 | subdir('amdgpu') | ||
37 | endif | ||
38 | if with_exynos | ||
39 | subdir('exynos') | ||
40 | endif | ||
41 | if with_tegra | ||
42 | subdir('tegra') | ||
43 | endif | ||
44 | if with_etnaviv | ||
45 | subdir('etnaviv') | ||
46 | endif | ||
47 | if with_nouveau | ||
48 | subdir('nouveau') | ||
49 | endif | ||
50 | |||
51 | drmsl = 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 | |||
59 | hash = 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 | |||
67 | random = 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 | |||
75 | drmdevice = 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 | |||
83 | test('random', random, timeout : 240) | ||
84 | test('hash', hash) | ||
85 | test('drmsl', drmsl) | ||
86 | test('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 | |||
21 | modeprint = 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 | |||
21 | modetest = 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 | |||
21 | threaded = 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 | |||
30 | test('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 | |||
21 | proptest = 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 | |||
21 | radeon_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 | |||
21 | openclose = 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 | |||
22 | libutil = 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 | |||
21 | vbltest = 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 | |||
21 | install_headers('vc4_packet.h', 'vc4_qpu_defines.h', subdir : 'libdrm') | ||
22 | |||
23 | pkg.generate( | ||
24 | name : 'libdrm_vc4', | ||
25 | version : meson.project_version(), | ||
26 | requires_private : 'libdrm', | ||
27 | description : 'Userspace interface to vc4 kernel DRM services', | ||
28 | ) | ||