• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2020 Google, Inc
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# Shared cmdstream decoding:
22libfreedreno_cffdec = static_library(
23  'freedreno_cffdec',
24  [
25    'buffers.c',
26    'buffers.h',
27    'cffdec.c',
28    'cffdec.h',
29    'pager.c',
30    'pager.h',
31    'rnnutil.c',
32    'rnnutil.h',
33    'util.h',
34  ],
35  include_directories: [
36    inc_freedreno,
37    inc_freedreno_rnn,
38    inc_include,
39    inc_src,
40  ],
41  c_args : [ no_override_init_args ],
42  gnu_symbol_visibility: 'hidden',
43  dependencies: [],
44  link_with: [
45    libfreedreno_rnn,
46    libfreedreno_ir2,  # for disasm_a2xx
47    libfreedreno_ir3,  # for disasm_a3xx
48  ],
49  build_by_default: false,
50)
51
52if dep_libarchive.found()
53  libfreedreno_io = static_library(
54    'libfreedreno_io',
55    [
56      'io.c',
57      'io.h',
58    ],
59    include_directories: [],
60    c_args : [no_override_init_args],
61    gnu_symbol_visibility: 'hidden',
62    dependencies: [
63      dep_libarchive,
64    ],
65    build_by_default: false,
66  )
67endif
68
69if dep_lua.found() and dep_libarchive.found()
70  cffdump = executable(
71    'cffdump',
72    [
73      'cffdump.c',
74      'script.c',
75      'script.h'
76    ],
77    include_directories: [
78      inc_freedreno,
79      inc_freedreno_rnn,
80      inc_include,
81      inc_src,
82    ],
83    c_args : [no_override_init_args],
84    gnu_symbol_visibility: 'hidden',
85    dependencies: [
86      dep_lua,
87    ],
88    link_with: [
89      libfreedreno_cffdec,
90      libfreedreno_io,
91    ],
92    build_by_default: with_tools.contains('freedreno'),
93    install: install_fd_decode_tools,
94  )
95endif
96
97crashdec = executable(
98  'crashdec',
99  'crashdec.c',
100  include_directories: [
101    inc_freedreno,
102    inc_freedreno_rnn,
103    inc_include,
104    inc_src,
105  ],
106  gnu_symbol_visibility: 'hidden',
107  dependencies: [],
108  link_with: [
109    libfreedreno_cffdec,
110  ],
111  build_by_default: with_tools.contains('freedreno'),
112  install: install_fd_decode_tools,
113)
114
115if dep_libarchive.found()
116  pgmdump = executable(
117    'pgmdump',
118    'pgmdump.c',
119    include_directories: [
120      inc_freedreno,
121      inc_include,
122      inc_src,
123    ],
124    gnu_symbol_visibility: 'hidden',
125    dependencies: [],
126    link_with: [
127      libfreedreno_cffdec,
128      libfreedreno_io,
129      libfreedreno_ir2,  # for disasm_a2xx
130      libfreedreno_ir3,  # for disasm_a3xx
131    ],
132    build_by_default: with_tools.contains('freedreno'),
133    install: false,
134  )
135  pgmdump2 = executable(
136    'pgmdump2',
137    'pgmdump2.c',
138    include_directories: [
139      inc_freedreno,
140      inc_include,
141      inc_src,
142    ],
143    gnu_symbol_visibility: 'hidden',
144    dependencies: [],
145    link_with: [
146      libfreedreno_cffdec,
147      libfreedreno_io,
148      libfreedreno_ir2,  # for disasm_a2xx
149      libfreedreno_ir3,  # for disasm_a3xx
150    ],
151    build_by_default: with_tools.contains('freedreno'),
152    install: false,
153  )
154endif
155