• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2018 Rob Clark
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
21libfreedreno_drm_files = files(
22  'freedreno_bo.c',
23  'freedreno_bo_heap.c',
24  'freedreno_bo_cache.c',
25  'freedreno_device.c',
26  'freedreno_drmif.h',
27  'freedreno_pipe.c',
28  'freedreno_priv.h',
29  'freedreno_ringbuffer.c',
30  'freedreno_ringbuffer.h',
31  'freedreno_ringbuffer_sp.c',
32  'freedreno_ringbuffer_sp.h',
33  'freedreno_ringbuffer_sp_reloc.h',
34)
35libfreedreno_drm_flags = []
36libfreedreno_drm_includes = [
37  inc_freedreno,
38  inc_include,
39  inc_src,
40]
41libfreedreno_drm_deps = [
42  dep_libdrm,
43  dep_valgrind,
44]
45
46libfreedreno_drm_msm_files = files(
47  'msm/msm_bo.c',
48  'msm/msm_device.c',
49  'msm/msm_pipe.c',
50  'msm/msm_priv.h',
51  'msm/msm_ringbuffer.c',
52  'msm/msm_ringbuffer_sp.c',
53)
54libfreedreno_drm_files += libfreedreno_drm_msm_files
55
56libfreedreno_drm_virtio_files = files(
57  'virtio/virtio_bo.c',
58  'virtio/virtio_device.c',
59  'virtio/virtio_pipe.c',
60  'virtio/virtio_priv.h',
61  'virtio/virtio_ringbuffer.c',
62)
63if freedreno_kmds.contains('virtio')
64  libfreedreno_drm_files += libfreedreno_drm_virtio_files
65  libfreedreno_drm_flags += '-DHAVE_FREEDRENO_VIRTIO'
66  libfreedreno_drm_includes += [
67    inc_virtio_gpu,
68    inc_virtio_vdrm,
69  ]
70endif
71
72libfreedreno_drm = static_library(
73  'freedreno_drm',
74  [
75    libfreedreno_drm_files,
76    freedreno_xml_header_files,
77  ],
78  include_directories : libfreedreno_drm_includes,
79  c_args : [no_override_init_args, libfreedreno_drm_flags],
80  gnu_symbol_visibility : 'hidden',
81  dependencies : libfreedreno_drm_deps,
82  # TODO
83  link_with : [libvdrm],
84  build_by_default : false,
85)
86
87