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>main
parent
f115de819b
commit
5f7deb5078
|
@ -17,3 +17,7 @@ indent_style = tab
|
|||
[*.m4]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[{meson.build,meson_options.txt}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
|
|
@ -7,3 +7,7 @@ indent_style = tab
|
|||
indent_size = 8
|
||||
tab_width = 8
|
||||
insert_final_newline = true
|
||||
|
||||
[meson.build]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
|
||||
datadir_amdgpu = join_paths(get_option('datadir'), 'libdrm', 'amdgpu.ids')
|
||||
|
||||
libdrm_amdgpu = shared_library(
|
||||
'drm_amdgpu',
|
||||
[
|
||||
files(
|
||||
'amdgpu_asic_id.c', 'amdgpu_bo.c', 'amdgpu_cs.c', 'amdgpu_device.c',
|
||||
'amdgpu_gpu_info.c', 'amdgpu_vamgr.c', 'amdgpu_vm.c', 'util_hash.c',
|
||||
'util_hash_table.c',
|
||||
),
|
||||
config_file,
|
||||
],
|
||||
c_args : [
|
||||
warn_c_args,
|
||||
'-DAMDGPU_ASIC_ID_TABLE="@0@"'.format(datadir_amdgpu),
|
||||
],
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
dependencies : dep_pthread_stubs,
|
||||
version : '1.0.0',
|
||||
install : true,
|
||||
)
|
||||
|
||||
install_headers('amdgpu.h', subdir : 'libdrm')
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm_amdgpu',
|
||||
libraries : libdrm_amdgpu,
|
||||
subdirs : ['.', 'libdrm'],
|
||||
version : meson.project_version(),
|
||||
requires_private : 'libdrm',
|
||||
description : 'Userspace interface to kernel DRM services for amdgpu',
|
||||
)
|
||||
|
||||
ext_libdrm_amdgpu = declare_dependency(
|
||||
link_with : [libdrm, libdrm_amdgpu],
|
||||
include_directories : [inc_drm, include_directories('.')],
|
||||
)
|
||||
|
||||
test(
|
||||
'amdgpu-symbol-check',
|
||||
prog_bash,
|
||||
args : [files('amdgpu-symbol-check'), libdrm_amdgpu]
|
||||
)
|
|
@ -0,0 +1,27 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
if with_amdgpu
|
||||
install_data(
|
||||
'amdgpu.ids',
|
||||
install_mode : 'rw-r--r--',
|
||||
install_dir : datadir_amdgpu,
|
||||
)
|
||||
endif
|
|
@ -0,0 +1,59 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
|
||||
libdrm_etnaviv = shared_library(
|
||||
'drm_etnaviv',
|
||||
[
|
||||
files(
|
||||
'etnaviv_device.c', 'etnaviv_gpu.c', 'etnaviv_bo.c', 'etnaviv_bo_cache.c',
|
||||
'etnaviv_perfmon.c', 'etnaviv_pipe.c', 'etnaviv_cmd_stream.c',
|
||||
),
|
||||
config_file
|
||||
],
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
c_args : warn_c_args,
|
||||
dependencies : [dep_pthread_stubs, dep_rt],
|
||||
version : '1.0.0',
|
||||
install : true,
|
||||
)
|
||||
|
||||
install_headers('etnaviv_drmif.h', subdir : 'libdrm')
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm_etnaviv',
|
||||
libraries : libdrm_etnaviv,
|
||||
subdirs : ['.', 'libdrm'],
|
||||
version : meson.project_version(),
|
||||
requires_private : 'libdrm',
|
||||
description : 'Userspace interface to Tegra kernel DRM services',
|
||||
)
|
||||
|
||||
ext_libdrm_etnaviv = declare_dependency(
|
||||
link_with : [libdrm, libdrm_etnaviv],
|
||||
include_directories : [inc_drm, include_directories('.')],
|
||||
)
|
||||
|
||||
test(
|
||||
'etnaviv-symbol-check',
|
||||
prog_bash,
|
||||
args : [files('etnaviv-symbol-check'), libdrm_etnaviv]
|
||||
)
|
|
@ -0,0 +1,53 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
libdrm_exynos = shared_library(
|
||||
'drm_exynos',
|
||||
[files('exynos_drm.c', 'exynos_fimg2d.c'), config_file],
|
||||
c_args : warn_c_args,
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
dependencies : [dep_pthread_stubs],
|
||||
version : '1.0.0',
|
||||
install : true,
|
||||
)
|
||||
|
||||
install_headers('exynos_drmif.h', subdir : 'libdrm')
|
||||
install_headers('exynos_drm.h', 'exynos_fimg2d.h', subdir : 'exynos')
|
||||
|
||||
ext_libdrm_exynos = declare_dependency(
|
||||
link_with : [libdrm, libdrm_exynos],
|
||||
include_directories : [inc_drm, include_directories('.')],
|
||||
)
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm_exynos',
|
||||
libraries : libdrm_exynos,
|
||||
subdirs : ['.', 'libdrm', 'exynos'],
|
||||
version : '0.7',
|
||||
requires_private : 'libdrm',
|
||||
description : 'Userspace interface to exynos kernel DRM services',
|
||||
)
|
||||
|
||||
test(
|
||||
'exynos-symbol-check',
|
||||
prog_bash,
|
||||
args : [files('exynos-symbol-check'), libdrm_exynos]
|
||||
)
|
|
@ -0,0 +1,76 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
files_freedreno = files(
|
||||
'freedreno_device.c',
|
||||
'freedreno_pipe.c',
|
||||
'freedreno_ringbuffer.c',
|
||||
'freedreno_bo.c',
|
||||
'freedreno_bo_cache.c',
|
||||
'msm/msm_bo.c',
|
||||
'msm/msm_device.c',
|
||||
'msm/msm_pipe.c',
|
||||
'msm/msm_ringbuffer.c',
|
||||
)
|
||||
|
||||
if with_freedreno_kgsl
|
||||
files_freedreno += files(
|
||||
'kgsl/kgsl_bo.c',
|
||||
'kgsl/kgsl_device.c',
|
||||
'kgsl/kgsl_pipe.c',
|
||||
'kgsl/kgsl_ringbuffer.c',
|
||||
)
|
||||
endif
|
||||
|
||||
libdrm_freedreno = shared_library(
|
||||
'drm_freedreno',
|
||||
[files_freedreno, config_file],
|
||||
c_args : warn_c_args,
|
||||
include_directories : [inc_root, inc_drm],
|
||||
dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt],
|
||||
link_with : libdrm,
|
||||
version : '1.0.0',
|
||||
install : true,
|
||||
)
|
||||
|
||||
ext_libdrm_freedreno = declare_dependency(
|
||||
link_with : [libdrm, libdrm_freedreno],
|
||||
include_directories : [inc_drm, include_directories('.')],
|
||||
)
|
||||
|
||||
install_headers(
|
||||
'freedreno_drmif.h', 'freedreno_ringbuffer.h',
|
||||
subdir : 'freedreno'
|
||||
)
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm_freedreno',
|
||||
libraries : libdrm_freedreno,
|
||||
subdirs : ['.', 'libdrm', 'freedreno'],
|
||||
version : '0.7',
|
||||
requires_private : 'libdrm',
|
||||
description : 'Userspace interface to freedreno kernel DRM services',
|
||||
)
|
||||
|
||||
test(
|
||||
'freedreno-symbol-check',
|
||||
prog_bash,
|
||||
args : [files('freedreno-symbol-check'), libdrm_freedreno]
|
||||
)
|
|
@ -0,0 +1,105 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
libdrm_intel = shared_library(
|
||||
'drm_intel',
|
||||
[
|
||||
files(
|
||||
'intel_bufmgr.c', 'intel_bufmgr_fake.c', 'intel_bufmgr_gem.c',
|
||||
'intel_decode.c', 'mm.c',
|
||||
),
|
||||
config_file,
|
||||
],
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind],
|
||||
c_args : warn_c_args,
|
||||
version : '1.0.0',
|
||||
install : true,
|
||||
)
|
||||
|
||||
ext_libdrm_intel = declare_dependency(
|
||||
link_with : [libdrm, libdrm_intel],
|
||||
include_directories : [inc_drm, include_directories('.')],
|
||||
)
|
||||
|
||||
install_headers(
|
||||
'intel_bufmgr.h', 'intel_aub.h', 'intel_debug.h',
|
||||
subdir : 'libdrm',
|
||||
)
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm_intel',
|
||||
libraries : libdrm_intel,
|
||||
subdirs : ['.', 'libdrm'],
|
||||
version : meson.project_version(),
|
||||
requires : 'libdrm',
|
||||
description : 'Userspace interface to intel kernel DRM services',
|
||||
)
|
||||
|
||||
test_decode = executable(
|
||||
'test_decode',
|
||||
files('test_decode.c'),
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : [libdrm, libdrm_intel],
|
||||
c_args : warn_c_args,
|
||||
)
|
||||
|
||||
test(
|
||||
'gen4-3d.batch',
|
||||
prog_bash,
|
||||
args : files('tests/gen4-3d.batch.sh'),
|
||||
workdir : meson.current_build_dir(),
|
||||
)
|
||||
test(
|
||||
'gen45-3d.batch',
|
||||
prog_bash,
|
||||
args : files('tests/gm45-3d.batch.sh'),
|
||||
workdir : meson.current_build_dir(),
|
||||
)
|
||||
test(
|
||||
'gen5-3d.batch',
|
||||
prog_bash,
|
||||
args : files('tests/gen5-3d.batch.sh'),
|
||||
workdir : meson.current_build_dir(),
|
||||
)
|
||||
test(
|
||||
'gen6-3d.batch',
|
||||
prog_bash,
|
||||
args : files('tests/gen6-3d.batch.sh'),
|
||||
workdir : meson.current_build_dir(),
|
||||
)
|
||||
test(
|
||||
'gen7-3d.batch',
|
||||
prog_bash,
|
||||
args : files('tests/gen7-3d.batch.sh'),
|
||||
workdir : meson.current_build_dir(),
|
||||
)
|
||||
test(
|
||||
'gen7-2d-copy.batch',
|
||||
prog_bash,
|
||||
args : files('tests/gen7-2d-copy.batch.sh'),
|
||||
workdir : meson.current_build_dir(),
|
||||
)
|
||||
test(
|
||||
'intel-symbol-check',
|
||||
prog_bash,
|
||||
args : [files('intel-symbol-check'), libdrm_intel]
|
||||
)
|
|
@ -0,0 +1,74 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
libkms_include = [inc_root, inc_drm]
|
||||
files_libkms = files(
|
||||
'linux.c',
|
||||
'dumb.c',
|
||||
'api.c',
|
||||
)
|
||||
if with_vmwgfx
|
||||
files_libkms += files('vmwgfx.c')
|
||||
endif
|
||||
if with_intel
|
||||
files_libkms += files('intel.c')
|
||||
endif
|
||||
if with_nouveau
|
||||
files_libkms += files('nouveau.c')
|
||||
endif
|
||||
if with_radeon
|
||||
files_libkms += files('radeon.c')
|
||||
endif
|
||||
if with_exynos
|
||||
files_libkms += files('exynos.c')
|
||||
libkms_include += include_directories('../exynos')
|
||||
endif
|
||||
|
||||
libkms = shared_library(
|
||||
'kms',
|
||||
[files_libkms, config_file],
|
||||
c_args : warn_c_args,
|
||||
include_directories : libkms_include,
|
||||
link_with : libdrm,
|
||||
version : '1.0.0',
|
||||
install : true,
|
||||
)
|
||||
|
||||
ext_libkms = declare_dependency(
|
||||
link_with : [libdrm, libkms],
|
||||
include_directories : [libkms_include],
|
||||
)
|
||||
|
||||
install_headers('libkms.h', subdir : 'libkms')
|
||||
|
||||
pkg.generate(
|
||||
name : 'libkms',
|
||||
libraries : libkms,
|
||||
subdirs : ['libkms'],
|
||||
version : '1.0.0',
|
||||
requires_private : 'libdrm',
|
||||
description : 'Library that abstracts away the different mm interfaces for kernel drivers',
|
||||
)
|
||||
|
||||
test(
|
||||
'kms-symbol-check',
|
||||
prog_bash,
|
||||
args : [files('kms-symbol-check'), libkms]
|
||||
)
|
|
@ -0,0 +1,67 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
xsltproc_args = [
|
||||
'--stringparam', 'man.authors.section.enabled', '0',
|
||||
'--stringparam', 'man.copyright.section.enabled', '0',
|
||||
'--stringparam', 'funcsynopsis.style', 'ansi',
|
||||
'--stringparam', 'man.output.quietly', '1',
|
||||
'--nonet', manpage_style,
|
||||
]
|
||||
|
||||
xmls = [
|
||||
['drm', '7'], ['drm-kms', '7'], ['drm-memory', '7'], ['drmAvailable', '3'],
|
||||
['drmHandleEvent', '3'], ['drmModeGetResources', '3']
|
||||
]
|
||||
foreach x : xmls
|
||||
m = x[0]
|
||||
s = x[1]
|
||||
custom_target(
|
||||
m,
|
||||
input : files('@0@.xml'.format(m)),
|
||||
output : '@0@.@1@'.format(m, s),
|
||||
command : [prog_xslt, '-o', '@OUTPUT@', xsltproc_args, '@INPUT0@'],
|
||||
install : true,
|
||||
install_dir : join_paths(get_option('mandir'), 'man@0@'.format(s)),
|
||||
build_by_default : true,
|
||||
)
|
||||
endforeach
|
||||
|
||||
foreach x : ['drm-mm', 'drm-gem', 'drm-ttm']
|
||||
gen = custom_target(
|
||||
'gen-@0@'.format(x),
|
||||
input : 'drm-memory.xml',
|
||||
output : '@0@.xml'.format(x),
|
||||
command : [
|
||||
prog_sed, '-e', 's@^\.so \([a-z_]\+\)\.\([0-9]\)$$@\.so man\2\/\1\.\2@',
|
||||
'@INPUT@',
|
||||
],
|
||||
capture : true,
|
||||
)
|
||||
custom_target(
|
||||
'@0@.7'.format(x),
|
||||
input : gen,
|
||||
output : '@0@.7'.format(x, '7'),
|
||||
command : [prog_xslt, '-o', '@OUTPUT@', xsltproc_args, '@INPUT@'],
|
||||
install : true,
|
||||
install_dir : join_paths(get_option('mandir'), 'man7'),
|
||||
build_by_default : true,
|
||||
)
|
||||
endforeach
|
|
@ -0,0 +1,367 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
project(
|
||||
'libdrm',
|
||||
['c'],
|
||||
version : '2.4.89',
|
||||
license : 'MIT',
|
||||
meson_version : '>= 0.42',
|
||||
default_options : ['buildtype=debugoptimized', 'c_std=gnu99'],
|
||||
)
|
||||
|
||||
pkg = import('pkgconfig')
|
||||
|
||||
with_udev = get_option('udev')
|
||||
with_freedreno_kgsl = get_option('freedreno-kgsl')
|
||||
with_install_tests = get_option('install-test-programs')
|
||||
with_cairo_tests = get_option('cairo-tests')
|
||||
with_valgrind = get_option('valgrind')
|
||||
|
||||
config = configuration_data()
|
||||
|
||||
# TODO: openbsd is guess, the others are correct
|
||||
if ['freebsd', 'dragonfly', 'netbsd', 'openbsd'].contains(host_machine.system())
|
||||
dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
|
||||
else
|
||||
dep_pthread_stubs = []
|
||||
endif
|
||||
dep_threads = dependency('threads')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
# Check for atomics
|
||||
intel_atomics = false
|
||||
lib_atomics = false
|
||||
|
||||
if cc.compiles('''
|
||||
int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); }
|
||||
int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); }
|
||||
''',
|
||||
name : 'Intel Atomics')
|
||||
intel_atomics = true
|
||||
with_atomics = true
|
||||
elif cc.has_header('atomic_ops.h')
|
||||
lib_atomics = true
|
||||
with_atomics = true
|
||||
elif cc.has_function('atomic_cas_uint')
|
||||
with_atomics = true
|
||||
else
|
||||
with_atomics = false
|
||||
endif
|
||||
|
||||
config.set10('HAVE_LIBDRM_ATOMIC_PRIMITIVES', intel_atomics)
|
||||
config.set10('HAVE_LIB_ATOMIC_OPS', lib_atomics)
|
||||
|
||||
with_intel = false
|
||||
_intel = get_option('intel')
|
||||
if _intel != 'false'
|
||||
if _intel == 'true' and not with_atomics
|
||||
error('libdrm_intel requires atomics.')
|
||||
else
|
||||
with_intel = _intel == 'true' or host_machine.cpu_family().startswith('x86')
|
||||
endif
|
||||
endif
|
||||
|
||||
with_radeon = false
|
||||
_radeon = get_option('radeon')
|
||||
if _radeon != 'false'
|
||||
if _radeon == 'true' and not with_atomics
|
||||
error('libdrm_radeon requires atomics.')
|
||||
endif
|
||||
with_radeon = true
|
||||
endif
|
||||
|
||||
with_amdgpu = false
|
||||
_amdgpu = get_option('amdgpu')
|
||||
if _amdgpu != 'false'
|
||||
if _amdgpu == 'true' and not with_atomics
|
||||
error('libdrm_amdgpu requires atomics.')
|
||||
endif
|
||||
with_amdgpu = true
|
||||
endif
|
||||
|
||||
with_nouveau = false
|
||||
_nouveau = get_option('nouveau')
|
||||
if _nouveau != 'false'
|
||||
if _nouveau == 'true' and not with_atomics
|
||||
error('libdrm_nouveau requires atomics.')
|
||||
endif
|
||||
with_nouveau = true
|
||||
endif
|
||||
|
||||
with_vmwgfx = false
|
||||
_vmwgfx = get_option('vmwgfx')
|
||||
if _vmwgfx != 'false'
|
||||
with_vmwgfx = true
|
||||
endif
|
||||
|
||||
with_omap = false
|
||||
_omap = get_option('omap')
|
||||
if _omap == 'true'
|
||||
if not with_atomics
|
||||
error('libdrm_omap requires atomics.')
|
||||
endif
|
||||
with_omap = true
|
||||
endif
|
||||
|
||||
with_freedreno = false
|
||||
_freedreno = get_option('freedreno')
|
||||
if _freedreno != 'false'
|
||||
if _freedreno == 'true' and not with_atomics
|
||||
error('libdrm_freedreno requires atomics.')
|
||||
else
|
||||
with_freedreno = _freedreno == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family())
|
||||
endif
|
||||
endif
|
||||
|
||||
with_tegra = false
|
||||
_tegra = get_option('tegra')
|
||||
if _tegra == 'true'
|
||||
if not with_atomics
|
||||
error('libdrm_tegra requires atomics.')
|
||||
endif
|
||||
with_tegra = true
|
||||
endif
|
||||
|
||||
with_etnaviv = false
|
||||
_etnaviv = get_option('etnaviv')
|
||||
if _etnaviv == 'true'
|
||||
if not with_atomics
|
||||
error('libdrm_etnaviv requires atomics.')
|
||||
endif
|
||||
with_etnaviv = true
|
||||
endif
|
||||
|
||||
with_exynos = get_option('exynos') == 'true'
|
||||
|
||||
with_vc4 = false
|
||||
_vc4 = get_option('vc4')
|
||||
if _vc4 != 'false'
|
||||
with_vc4 = _vc4 == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family())
|
||||
endif
|
||||
|
||||
# XXX: Aparently only freebsd and dragonfly bsd actually need this (and
|
||||
# gnu/kfreebsd), not openbsd and netbsd
|
||||
with_libkms = false
|
||||
_libkms = get_option('libkms')
|
||||
if _libkms != 'false'
|
||||
with_libkms = _libkms == 'true' or ['linux', 'freebsd', 'dragonfly'].contains(host_machine.system())
|
||||
endif
|
||||
|
||||
if with_udev
|
||||
dep_udev = dependency('udev')
|
||||
config.set10('UDEV', true)
|
||||
else
|
||||
dep_udev = []
|
||||
endif
|
||||
|
||||
# Among others FreeBSD does not have a separate dl library.
|
||||
if not cc.has_function('dlsym')
|
||||
dep_dl = cc.find_library('dl', required : with_nouveau)
|
||||
else
|
||||
dep_dl = []
|
||||
endif
|
||||
# clock_gettime might require -rt, or it might not. find out
|
||||
if not cc.has_function('clock_gettime', prefix : '#define _GNU_SOURCE\n#include <time.h>')
|
||||
# XXX: untested
|
||||
dep_rt = cc.find_library('rt')
|
||||
else
|
||||
dep_rt = []
|
||||
endif
|
||||
dep_m = cc.find_library('m', required : false)
|
||||
if cc.has_header('sys/sysctl.h')
|
||||
config.set10('HAVE_SYS_SYSCTL_H', true)
|
||||
endif
|
||||
if cc.has_header('sys/select.h')
|
||||
config.set10('HAVE_SYS_SELECT_H', true)
|
||||
endif
|
||||
if cc.has_header_symbol('sys/sysmacros.h', 'major')
|
||||
config.set10('MAJOR_IN_SYSMACROS', true)
|
||||
elif cc.has_header_symbol('sys/mkdev.h', 'major')
|
||||
config.set10('MAJOR_IN_MKDEV', true)
|
||||
endif
|
||||
if cc.has_function('open_memstream')
|
||||
config.set10('HAVE_OPEN_MEMSTREAM', true)
|
||||
endif
|
||||
|
||||
warn_c_args = []
|
||||
foreach a : ['-Wall', '-Wextra', '-Wsign-compare',
|
||||
'-Werror-implicit-function-declaration', '-Wpointer-arith',
|
||||
'-Wwrite-strings', '-Wstrict-prototypes', '-Wmissing-prototypes',
|
||||
'-Wmissing-declarations', '-Wnested-externs', '-Wpacked',
|
||||
'-Wswitch-enum', '-Wmissing-format-attribute',
|
||||
'-Wstrict-aliasing=2', '-Winit-self', '-Winline', '-Wshadow',
|
||||
'-Wdeclaration-after-statement', '-Wold-style-definition']
|
||||
if cc.has_argument(a)
|
||||
warn_c_args += a
|
||||
endif
|
||||
endforeach
|
||||
# GCC will never error for -Wno-*, so check for -W* then add -Wno-* to the list
|
||||
# of options
|
||||
foreach a : ['unused-parameter', 'attributes', 'long-long',
|
||||
'missing-field-initializers']
|
||||
if cc.has_argument('-W@0@'.format(a))
|
||||
warn_c_args += '-Wno-@0@'.format(a)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
|
||||
dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
|
||||
dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
|
||||
dep_cairo = dependency('cairo', required : with_cairo_tests == 'true')
|
||||
dep_valgrind = dependency('valgrind', required : with_valgrind == 'true')
|
||||
|
||||
with_man_pages = get_option('man-pages')
|
||||
prog_xslt = find_program('xsltproc', required : with_man_pages == 'true')
|
||||
prog_sed = find_program('sed', required : with_man_pages == 'true')
|
||||
manpage_style = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
|
||||
if prog_xslt.found()
|
||||
if run_command(prog_xslt, '--nonet', manpage_style).returncode() != 0
|
||||
if with_man_pages == 'true'
|
||||
error('Manpage style sheet cannot be found')
|
||||
endif
|
||||
with_man_pages = 'false'
|
||||
endif
|
||||
endif
|
||||
with_man_pages = with_man_pages != 'false' and prog_xslt.found() and prog_sed.found()
|
||||
|
||||
# Used for tets
|
||||
prog_bash = find_program('bash')
|
||||
|
||||
if cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));''',
|
||||
name : 'compiler supports __attribute__(("hidden"))')
|
||||
config.set10('HAVE_VISIBILITY', true)
|
||||
endif
|
||||
|
||||
foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
|
||||
[with_nouveau, 'NOUVEAU'], [with_omap, 'OMAP'],
|
||||
[with_exynos, 'EXYNOS'], [with_freedreno, 'FREEDRENO'],
|
||||
[with_tegra, 'TEGRA'], [with_vc4, 'VC4'],
|
||||
[with_etnaviv, 'ETNAVIV']]
|
||||
if t[0]
|
||||
config.set10('HAVE_@0@'.format(t[1]), true)
|
||||
endif
|
||||
endforeach
|
||||
if with_freedreno_kgsl
|
||||
if not with_freedreno
|
||||
error('cannot enable freedreno-kgsl without freedreno support')
|
||||
endif
|
||||
config.set10('HAVE_FREEDRENO_KGSL', true)
|
||||
endif
|
||||
if dep_cairo.found()
|
||||
config.set10('HAVE_CAIRO', true)
|
||||
endif
|
||||
if dep_valgrind.found()
|
||||
config.set10('HAVE_VALGRIND', true)
|
||||
endif
|
||||
|
||||
config.set10('_GNU_SOURCE', true)
|
||||
config_file = configure_file(
|
||||
configuration : config,
|
||||
output : 'config.h',
|
||||
)
|
||||
add_project_arguments('-DHAVE_CONFIG_H', language : 'c')
|
||||
|
||||
inc_root = include_directories('.')
|
||||
inc_drm = include_directories('include/drm')
|
||||
|
||||
libdrm = shared_library(
|
||||
'drm',
|
||||
[files(
|
||||
'xf86drm.c', 'xf86drmHash.c', 'xf86drmRandom.c', 'xf86drmSL.c',
|
||||
'xf86drmMode.c'
|
||||
),
|
||||
config_file,
|
||||
],
|
||||
c_args : warn_c_args,
|
||||
dependencies : [dep_udev, dep_valgrind, dep_rt, dep_m],
|
||||
include_directories : inc_drm,
|
||||
version : '2.4.0',
|
||||
install : true,
|
||||
)
|
||||
|
||||
ext_libdrm = declare_dependency(
|
||||
link_with : libdrm,
|
||||
include_directories : inc_drm,
|
||||
)
|
||||
|
||||
install_headers('libsync.h', 'xf86drm.h', 'xf86drmMode.h')
|
||||
install_headers(
|
||||
'include/drm/drm.h', 'include/drm/drm_fourcc.h', 'include/drm/drm_mode.h',
|
||||
'include/drm/drm_sarea.h', 'include/drm/i915_drm.h',
|
||||
'include/drm/mach64_drm.h', 'include/drm/mga_drm.h',
|
||||
'include/drm/nouveau_drm.h', 'include/drm/qxl_drm.h',
|
||||
'include/drm/r128_drm.h', 'include/drm/radeon_drm.h',
|
||||
'include/drm/amdgpu_drm.h', 'include/drm/savage_drm.h',
|
||||
'include/drm/sis_drm.h', 'include/drm/tegra_drm.h', 'include/drm/vc4_drm.h',
|
||||
'include/drm/via_drm.h', 'include/drm/virtgpu_drm.h',
|
||||
subdir : 'libdrm',
|
||||
)
|
||||
if with_vmwgfx
|
||||
install_headers('include/drm/vmwgfx_drm.h', subdir : 'libdrm')
|
||||
endif
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm',
|
||||
libraries : libdrm,
|
||||
subdirs : ['.', 'libdrm'],
|
||||
version : meson.project_version(),
|
||||
description : 'Userspace interface to kernel DRM services',
|
||||
)
|
||||
|
||||
if with_libkms
|
||||
subdir('libkms')
|
||||
endif
|
||||
if with_intel
|
||||
subdir('intel')
|
||||
endif
|
||||
if with_nouveau
|
||||
subdir('nouveau')
|
||||
endif
|
||||
if with_radeon
|
||||
subdir('radeon')
|
||||
endif
|
||||
if with_amdgpu
|
||||
subdir('amdgpu')
|
||||
endif
|
||||
if with_omap
|
||||
subdir('omap')
|
||||
endif
|
||||
if with_exynos
|
||||
subdir('exynos')
|
||||
endif
|
||||
if with_freedreno
|
||||
subdir('freedreno')
|
||||
endif
|
||||
if with_tegra
|
||||
subdir('tegra')
|
||||
endif
|
||||
if with_vc4
|
||||
subdir('vc4')
|
||||
endif
|
||||
if with_etnaviv
|
||||
subdir('etnaviv')
|
||||
endif
|
||||
if with_man_pages
|
||||
subdir('man')
|
||||
endif
|
||||
subdir('data')
|
||||
subdir('tests')
|
|
@ -0,0 +1,143 @@
|
|||
# Copyright © 2017 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
option(
|
||||
'libkms',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : 'Build libkms mm abstraction library.',
|
||||
)
|
||||
option(
|
||||
'intel',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for Intel's KMS API.''',
|
||||
)
|
||||
option(
|
||||
'radeon',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for radeons's KMS API.''',
|
||||
)
|
||||
option(
|
||||
'amdgpu',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for amdgpu's KMS API.''',
|
||||
)
|
||||
option(
|
||||
'nouveau',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for nouveau's KMS API.''',
|
||||
)
|
||||
option(
|
||||
'vmwgfx',
|
||||
type : 'combo',
|
||||
value : 'true',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for vmgfx's KMS API.''',
|
||||
)
|
||||
option(
|
||||
'omap',
|
||||
type : 'combo',
|
||||
value : 'false',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for OMAP's experimental KMS API.''',
|
||||
)
|
||||
option(
|
||||
'exynos',
|
||||
type : 'combo',
|
||||
value : 'false',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for EXYNOS's experimental KMS API.''',
|
||||
)
|
||||
option(
|
||||
'freedreno',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for freedreno's KMS API.''',
|
||||
)
|
||||
option(
|
||||
'tegra',
|
||||
type : 'combo',
|
||||
value : 'false',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for Tegra's experimental KMS API.''',
|
||||
)
|
||||
option(
|
||||
'vc4',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for vc4's KMS API.''',
|
||||
)
|
||||
option(
|
||||
'etnaviv',
|
||||
type : 'combo',
|
||||
value : 'false',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : '''Enable support for etnaviv's experimental KMS API.''',
|
||||
)
|
||||
option(
|
||||
'cairo-tests',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : 'Enable support for Cairo rendering in tests.',
|
||||
)
|
||||
option(
|
||||
'man-pages',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : 'Enable manpage generation and installation.',
|
||||
)
|
||||
option(
|
||||
'valgrind',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['true', 'false', 'auto'],
|
||||
description : 'Build libdrm with valgrind support.',
|
||||
)
|
||||
option(
|
||||
'freedreno-kgsl',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Enable support for freedreno to use downstream android kernel API.',
|
||||
)
|
||||
option(
|
||||
'install-test-programs',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Install test programs.',
|
||||
)
|
||||
option(
|
||||
'udev',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Enable support for using udev instead of mknod.',
|
||||
)
|
|
@ -0,0 +1,58 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
|
||||
libdrm_nouveau = shared_library(
|
||||
'drm_nouveau',
|
||||
[files( 'nouveau.c', 'pushbuf.c', 'bufctx.c', 'abi16.c'), config_file],
|
||||
c_args : warn_c_args,
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
dependencies : dep_threads,
|
||||
version : '2.0.0',
|
||||
install : true,
|
||||
)
|
||||
|
||||
ext_libdrm_nouveau = declare_dependency(
|
||||
link_with : [libdrm, libdrm_nouveau],
|
||||
include_directories : [inc_drm, include_directories('.')],
|
||||
)
|
||||
|
||||
install_headers('nouveau.h', subdir : 'libdrm/nouveau')
|
||||
install_headers(
|
||||
'nvif/class.h', 'nvif/cl0080.h', 'nvif/cl9097.h', 'nvif/if0002.h',
|
||||
'nvif/if0003.h', 'nvif/ioctl.h', 'nvif/unpack.h',
|
||||
subdir : 'libdrm/nouveau/nvif'
|
||||
)
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm_nouveau',
|
||||
libraries : libdrm_nouveau,
|
||||
subdirs : ['.', 'nouveau'],
|
||||
version : meson.project_version(),
|
||||
requires_private : 'libdrm',
|
||||
description : 'Userspace interface to nouveau kernel DRM services',
|
||||
)
|
||||
|
||||
test(
|
||||
'nouveau-symbol-check',
|
||||
prog_bash,
|
||||
args : [files('nouveau-symbol-check'), libdrm_nouveau]
|
||||
)
|
|
@ -0,0 +1,53 @@
|
|||
# Copyright © 2017 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
libdrm_omap = shared_library(
|
||||
'drm_omap',
|
||||
[files('omap_drm.c'), config_file],
|
||||
include_directories : [inc_root, inc_drm],
|
||||
c_args : warn_c_args,
|
||||
link_with : libdrm,
|
||||
dependencies : [dep_pthread_stubs],
|
||||
version : '1.0.0',
|
||||
install : true,
|
||||
)
|
||||
|
||||
ext_libdrm_omap = declare_dependency(
|
||||
link_with : [libdrm, libdrm_omap],
|
||||
include_directories : [inc_drm, include_directories('.')],
|
||||
)
|
||||
|
||||
install_headers('omap_drmif.h', subdir : 'libdrm')
|
||||
install_headers('omap_drm.h', subdir : 'omap')
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm_omap',
|
||||
libraries : libdrm_omap,
|
||||
subdirs : ['.', 'libdrm', 'omap'],
|
||||
version : '0.6',
|
||||
requires_private : 'libdrm',
|
||||
description : 'Userspace interface to omap kernel DRM services',
|
||||
)
|
||||
|
||||
test(
|
||||
'omap-symbol-check',
|
||||
prog_bash,
|
||||
args : [files('omap-symbol-check'), libdrm_omap]
|
||||
)
|
|
@ -0,0 +1,63 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
|
||||
libdrm_radeon = shared_library(
|
||||
'drm_radeon',
|
||||
[
|
||||
files(
|
||||
'radeon_bo_gem.c', 'radeon_cs_gem.c', 'radeon_cs_space.c', 'radeon_bo.c',
|
||||
'radeon_cs.c', 'radeon_surface.c',
|
||||
),
|
||||
config_file,
|
||||
],
|
||||
c_args : warn_c_args,
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
dependencies : [dep_pthread_stubs],
|
||||
version : '1.0.1',
|
||||
install : true,
|
||||
)
|
||||
|
||||
ext_libdrm_radeon = declare_dependency(
|
||||
link_with : [libdrm, libdrm_radeon],
|
||||
include_directories : [inc_drm, include_directories('.')],
|
||||
)
|
||||
|
||||
install_headers(
|
||||
'radeon_bo.h', 'radeon_cs.h', 'radeon_surface.h', 'radeon_bo_gem.h',
|
||||
'radeon_cs_gem.h', 'radeon_bo_int.h', 'radeon_cs_int.h', 'r600_pci_ids.h',
|
||||
subdir : 'libdrm'
|
||||
)
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm_radeon',
|
||||
libraries : libdrm_radeon,
|
||||
subdirs : ['.', 'libdrm'],
|
||||
version : meson.project_version(),
|
||||
requires_private : 'libdrm',
|
||||
description : 'Userspace interface to kernel DRM services for radeon',
|
||||
)
|
||||
|
||||
test(
|
||||
'radeon-symbol-check',
|
||||
prog_bash,
|
||||
args : [files('radeon-symbol-check'), libdrm_radeon]
|
||||
)
|
|
@ -0,0 +1,52 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
libdrm_tegra = shared_library(
|
||||
'drm_tegra',
|
||||
[files('tegra.c'), config_file],
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
dependencies : [dep_pthread_stubs],
|
||||
c_args : warn_c_args,
|
||||
version : '0.0.0',
|
||||
install : true,
|
||||
)
|
||||
|
||||
ext_libdrm_tegra = declare_dependency(
|
||||
link_with : [libdrm, libdrm_tegra],
|
||||
include_directories : [inc_drm, include_directories('.')],
|
||||
)
|
||||
|
||||
install_headers('tegra.h', subdir : 'libdrm')
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm_tegra',
|
||||
libraries : libdrm_tegra,
|
||||
subdirs : ['.', 'libdrm'],
|
||||
version : meson.project_version(),
|
||||
requires_private : 'libdrm',
|
||||
description : 'Userspace interface to Tegra kernel DRM services',
|
||||
)
|
||||
|
||||
test(
|
||||
'tegra-symbol-check',
|
||||
prog_bash,
|
||||
args : [files('tegra-symbol-check'), libdrm_tegra]
|
||||
)
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
if dep_cunit.found()
|
||||
amdgpu_test = executable(
|
||||
'amdgpu_test',
|
||||
files(
|
||||
'amdgpu_test.c', 'basic_tests.c', 'bo_tests.c', 'cs_tests.c',
|
||||
'vce_tests.c', 'uvd_enc_tests.c', 'vcn_tests.c', 'deadlock_tests.c',
|
||||
'vm_tests.c',
|
||||
),
|
||||
dependencies : [dep_cunit, dep_threads],
|
||||
include_directories : [inc_root, inc_drm, include_directories('../../amdgpu')],
|
||||
link_with : [libdrm, libdrm_amdgpu],
|
||||
install : with_install_tests,
|
||||
)
|
||||
endif
|
|
@ -0,0 +1,45 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
inc_etnaviv_tests = [inc_root, inc_drm, include_directories('../../etnaviv')]
|
||||
|
||||
etnaviv_2d_test = executable(
|
||||
'etnaviv_2d_test',
|
||||
files('etnaviv_2d_test.c', 'write_bmp.c'),
|
||||
include_directories : inc_etnaviv_tests,
|
||||
link_with : [libdrm, libdrm_etnaviv],
|
||||
install : with_install_tests,
|
||||
)
|
||||
|
||||
etnaviv_cmd_stream_test = executable(
|
||||
'etnaviv_cmd_stream_test',
|
||||
files('etnaviv_cmd_stream_test.c'),
|
||||
include_directories : inc_etnaviv_tests,
|
||||
link_with : [libdrm, libdrm_etnaviv],
|
||||
install : with_install_tests,
|
||||
)
|
||||
|
||||
etnaviv_bo_cache_test = executable(
|
||||
'etnaviv_bo_cache_test',
|
||||
files('etnaviv_bo_cache_test.c'),
|
||||
include_directories : inc_etnaviv_tests,
|
||||
link_with : [libdrm, libdrm_etnaviv],
|
||||
install : with_install_tests,
|
||||
)
|
|
@ -0,0 +1,54 @@
|
|||
# Copyright © 2017 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
inc_exynos = include_directories('../../exynos')
|
||||
|
||||
if with_libkms
|
||||
exynos_fimg2d_test = executable(
|
||||
'exynos_fimg2d_test',
|
||||
files('exynos_fimg2d_test.c'),
|
||||
c_args : warn_c_args,
|
||||
include_directories : [inc_root, inc_drm, inc_exynos,
|
||||
include_directories('../../libkms')],
|
||||
link_with : [libdrm, libkms, libdrm_exynos],
|
||||
dependencies : dep_threads,
|
||||
install : with_install_tests,
|
||||
)
|
||||
endif
|
||||
|
||||
exynos_fimg2d_perf = executable(
|
||||
'exynos_fimg2d_perf',
|
||||
files('exynos_fimg2d_perf.c'),
|
||||
c_args : warn_c_args,
|
||||
include_directories : [inc_root, inc_drm, inc_exynos],
|
||||
link_with : [libdrm, libdrm_exynos],
|
||||
dependencies : dep_threads,
|
||||
install : with_install_tests,
|
||||
)
|
||||
|
||||
exynos_fimg2d_event = executable(
|
||||
'exynos_fimg2d_event',
|
||||
files('exynos_fimg2d_event.c'),
|
||||
c_args : warn_c_args,
|
||||
include_directories : [inc_root, inc_drm, inc_exynos],
|
||||
link_with : [libdrm, libdrm_exynos],
|
||||
dependencies : dep_threads,
|
||||
install : with_install_tests,
|
||||
)
|
|
@ -0,0 +1,49 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
|
||||
libkms_test = static_library(
|
||||
'kms-test',
|
||||
files(
|
||||
'libkms-test-crtc.c', 'libkms-test-device.c', 'libkms-test-framebuffer.c',
|
||||
'libkms-test-plane.c', 'libkms-test-screen.c',
|
||||
),
|
||||
include_directories : [inc_root, inc_tests, inc_drm],
|
||||
link_with : libdrm,
|
||||
c_args : warn_c_args,
|
||||
)
|
||||
|
||||
kms_steal_crtc = executable(
|
||||
'kms-steal-crtc',
|
||||
files('kms-steal-crtc.c'),
|
||||
dependencies : dep_cairo,
|
||||
include_directories : [inc_root, inc_tests, inc_drm],
|
||||
link_with : [libkms_test, libutil],
|
||||
install : with_install_tests,
|
||||
)
|
||||
|
||||
kms_universal_planes = executable(
|
||||
'kms-universal-planes',
|
||||
files('kms-universal-planes.c'),
|
||||
dependencies : dep_cairo,
|
||||
include_directories : [inc_root, inc_tests, inc_drm],
|
||||
link_with : [libkms_test],
|
||||
install : with_install_tests,
|
||||
)
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright © 2017 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
kmstest = executable(
|
||||
'kmstest',
|
||||
files('main.c'),
|
||||
c_args : warn_c_args,
|
||||
include_directories : [
|
||||
inc_root, inc_tests, include_directories('../../libkms'), inc_drm,
|
||||
],
|
||||
link_with : [libutil, libkms, libdrm],
|
||||
install : with_install_tests,
|
||||
)
|
|
@ -0,0 +1,86 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
inc_tests = include_directories('.')
|
||||
|
||||
subdir('util')
|
||||
subdir('kms')
|
||||
subdir('modeprint')
|
||||
subdir('proptest')
|
||||
subdir('modetest')
|
||||
subdir('vbltest')
|
||||
if with_libkms
|
||||
subdir('kmstest')
|
||||
endif
|
||||
if with_radeon
|
||||
subdir('radeon')
|
||||
endif
|
||||
if with_amdgpu
|
||||
subdir('amdgpu')
|
||||
endif
|
||||
if with_exynos
|
||||
subdir('exynos')
|
||||
endif
|
||||
if with_tegra
|
||||
subdir('tegra')
|
||||
endif
|
||||
if with_etnaviv
|
||||
subdir('etnaviv')
|
||||
endif
|
||||
if with_nouveau
|
||||
subdir('nouveau')
|
||||
endif
|
||||
|
||||
drmsl = executable(
|
||||
'drmsl',
|
||||
files('drmsl.c'),
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
c_args : warn_c_args,
|
||||
)
|
||||
|
||||
hash = executable(
|
||||
'hash',
|
||||
files('hash.c'),
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
c_args : warn_c_args,
|
||||
)
|
||||
|
||||
random = executable(
|
||||
'random',
|
||||
files('random.c'),
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
c_args : warn_c_args,
|
||||
)
|
||||
|
||||
drmdevice = executable(
|
||||
'drmdevice',
|
||||
files('drmdevice.c'),
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
c_args : warn_c_args,
|
||||
)
|
||||
|
||||
test('random', random, timeout : 240)
|
||||
test('hash', hash)
|
||||
test('drmsl', drmsl)
|
||||
test('drmdevice', drmdevice)
|
|
@ -0,0 +1,29 @@
|
|||
# Copyright © 2017 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
modeprint = executable(
|
||||
'modeprint',
|
||||
files('modeprint.c'),
|
||||
c_args : warn_c_args,
|
||||
include_directories : [inc_root, inc_tests, inc_drm],
|
||||
link_with : libdrm,
|
||||
dependencies : dep_threads,
|
||||
install : with_install_tests,
|
||||
)
|
|
@ -0,0 +1,29 @@
|
|||
# Copyright © 2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
modetest = executable(
|
||||
'modetest',
|
||||
files('buffers.c', 'cursor.c', 'modetest.c'),
|
||||
c_args : [warn_c_args, '-Wno-pointer-arith'],
|
||||
include_directories : [inc_root, inc_tests, inc_drm],
|
||||
dependencies : [dep_threads, dep_cairo],
|
||||
link_with : [libdrm, libutil],
|
||||
install : with_install_tests,
|
||||
)
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright © 2017 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
threaded = executable(
|
||||
'threaded',
|
||||
files('threaded.c'),
|
||||
dependencies : [dep_dl, dep_threads],
|
||||
include_directories : [inc_root, inc_drm, include_directories('../../nouveau')],
|
||||
link_with : [libdrm, libdrm_nouveau],
|
||||
c_args : warn_c_args,
|
||||
)
|
||||
|
||||
test('threaded', threaded)
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright © 2017 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
proptest = executable(
|
||||
'proptest',
|
||||
files('proptest.c'),
|
||||
c_args : warn_c_args,
|
||||
include_directories : [inc_root, inc_tests, inc_drm],
|
||||
link_with : [libdrm, libutil],
|
||||
install : with_install_tests,
|
||||
)
|
|
@ -0,0 +1,27 @@
|
|||
# Copyright © 2017 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
radeon_ttm = executable(
|
||||
'radeon_ttm',
|
||||
files('rbo.c', 'radeon_ttm.c'),
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
c_args : warn_c_args,
|
||||
)
|
|
@ -0,0 +1,27 @@
|
|||
# Copyright © 2017 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
openclose = executable(
|
||||
'openclose',
|
||||
files('openclose.c'),
|
||||
include_directories : [inc_root, inc_drm, include_directories('../../tegra')],
|
||||
c_args : warn_c_args,
|
||||
link_with : [libdrm, libdrm_tegra],
|
||||
)
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
|
||||
libutil = static_library(
|
||||
'util',
|
||||
[files('format.c', 'kms.c', 'pattern.c'), config_file],
|
||||
include_directories : [inc_root, inc_drm],
|
||||
link_with : libdrm,
|
||||
dependencies : dep_cairo
|
||||
)
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright © 2017-2018 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
vbltest = executable(
|
||||
'vbltest',
|
||||
files('vbltest.c'),
|
||||
c_args : warn_c_args,
|
||||
include_directories : [inc_root, inc_tests, inc_drm],
|
||||
link_with : [libdrm, libutil],
|
||||
install : with_install_tests,
|
||||
)
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright © 2017 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
install_headers('vc4_packet.h', 'vc4_qpu_defines.h', subdir : 'libdrm')
|
||||
|
||||
pkg.generate(
|
||||
name : 'libdrm_vc4',
|
||||
version : meson.project_version(),
|
||||
requires_private : 'libdrm',
|
||||
description : 'Userspace interface to vc4 kernel DRM services',
|
||||
)
|
Loading…
Reference in New Issue