1bf215546Sopenharmony_ci# Copyright © 2017 Dylan Baker
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_ci# Permission is hereby granted, free of charge, to any person obtaining a copy
4bf215546Sopenharmony_ci# of this software and associated documentation files (the "Software"), to deal
5bf215546Sopenharmony_ci# in the Software without restriction, including without limitation the rights
6bf215546Sopenharmony_ci# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7bf215546Sopenharmony_ci# copies of the Software, and to permit persons to whom the Software is
8bf215546Sopenharmony_ci# furnished to do so, subject to the following conditions:
9bf215546Sopenharmony_ci
10bf215546Sopenharmony_ci# The above copyright notice and this permission notice shall be included in
11bf215546Sopenharmony_ci# all copies or substantial portions of the Software.
12bf215546Sopenharmony_ci
13bf215546Sopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14bf215546Sopenharmony_ci# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15bf215546Sopenharmony_ci# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16bf215546Sopenharmony_ci# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17bf215546Sopenharmony_ci# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18bf215546Sopenharmony_ci# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19bf215546Sopenharmony_ci# SOFTWARE.
20bf215546Sopenharmony_ci
21bf215546Sopenharmony_cifiles_libnouveau = files(
22bf215546Sopenharmony_ci  'nouveau_buffer.c',
23bf215546Sopenharmony_ci  'nouveau_buffer.h',
24bf215546Sopenharmony_ci  'nouveau_context.h',
25bf215546Sopenharmony_ci  'nouveau_debug.h',
26bf215546Sopenharmony_ci  'nouveau_fence.c',
27bf215546Sopenharmony_ci  'nouveau_fence.h',
28bf215546Sopenharmony_ci  'nouveau_gldefs.h',
29bf215546Sopenharmony_ci  'nouveau_heap.c',
30bf215546Sopenharmony_ci  'nouveau_heap.h',
31bf215546Sopenharmony_ci  'nouveau_mm.c',
32bf215546Sopenharmony_ci  'nouveau_mm.h',
33bf215546Sopenharmony_ci  'nouveau_screen.c',
34bf215546Sopenharmony_ci  'nouveau_screen.h',
35bf215546Sopenharmony_ci  'nouveau_video.c',
36bf215546Sopenharmony_ci  'nouveau_video.h',
37bf215546Sopenharmony_ci  'nouveau_vp3_video_bsp.c',
38bf215546Sopenharmony_ci  'nouveau_vp3_video.c',
39bf215546Sopenharmony_ci  'nouveau_vp3_video.h',
40bf215546Sopenharmony_ci  'nouveau_vp3_video_vp.c',
41bf215546Sopenharmony_ci  'nouveau_winsys.h',
42bf215546Sopenharmony_ci  'nv17_mpeg.xml.h',
43bf215546Sopenharmony_ci  'nv31_mpeg.xml.h',
44bf215546Sopenharmony_ci  'nv_m2mf.xml.h',
45bf215546Sopenharmony_ci  'nv_object.xml.h',
46bf215546Sopenharmony_ci  'nv30/nv01_2d.xml.h',
47bf215546Sopenharmony_ci  'nv30/nv30-40_3d.xml.h',
48bf215546Sopenharmony_ci  'nv30/nv30_clear.c',
49bf215546Sopenharmony_ci  'nv30/nv30_context.c',
50bf215546Sopenharmony_ci  'nv30/nv30_context.h',
51bf215546Sopenharmony_ci  'nv30/nv30_draw.c',
52bf215546Sopenharmony_ci  'nv30/nv30_format.c',
53bf215546Sopenharmony_ci  'nv30/nv30_format.h',
54bf215546Sopenharmony_ci  'nv30/nv30_fragprog.c',
55bf215546Sopenharmony_ci  'nv30/nv30_fragtex.c',
56bf215546Sopenharmony_ci  'nv30/nv30_miptree.c',
57bf215546Sopenharmony_ci  'nv30/nv30_push.c',
58bf215546Sopenharmony_ci  'nv30/nv30_query.c',
59bf215546Sopenharmony_ci  'nv30/nv30_resource.c',
60bf215546Sopenharmony_ci  'nv30/nv30_resource.h',
61bf215546Sopenharmony_ci  'nv30/nv30_screen.c',
62bf215546Sopenharmony_ci  'nv30/nv30_screen.h',
63bf215546Sopenharmony_ci  'nv30/nv30_state.c',
64bf215546Sopenharmony_ci  'nv30/nv30_state.h',
65bf215546Sopenharmony_ci  'nv30/nv30_state_validate.c',
66bf215546Sopenharmony_ci  'nv30/nv30_texture.c',
67bf215546Sopenharmony_ci  'nv30/nv30_transfer.c',
68bf215546Sopenharmony_ci  'nv30/nv30_transfer.h',
69bf215546Sopenharmony_ci  'nv30/nv30_vbo.c',
70bf215546Sopenharmony_ci  'nv30/nv30_vertprog.c',
71bf215546Sopenharmony_ci  'nv30/nv30_vertprog.h',
72bf215546Sopenharmony_ci  'nv30/nv30_winsys.h',
73bf215546Sopenharmony_ci  'nv30/nv40_vertprog.h',
74bf215546Sopenharmony_ci  'nv30/nv40_verttex.c',
75bf215546Sopenharmony_ci  'nv30/nvfx_fragprog.c',
76bf215546Sopenharmony_ci  'nv30/nvfx_shader.h',
77bf215546Sopenharmony_ci  'nv30/nvfx_vertprog.c',
78bf215546Sopenharmony_ci  'nv50/g80_defs.xml.h',
79bf215546Sopenharmony_ci  'nv50/g80_texture.xml.h',
80bf215546Sopenharmony_ci  'nv50/nv50_2d.xml.h',
81bf215546Sopenharmony_ci  'nv50/nv50_3ddefs.xml.h',
82bf215546Sopenharmony_ci  'nv50/nv50_3d.xml.h',
83bf215546Sopenharmony_ci  'nv50/nv50_blit.h',
84bf215546Sopenharmony_ci  'nv50/nv50_compute.c',
85bf215546Sopenharmony_ci  'nv50/nv50_compute.xml.h',
86bf215546Sopenharmony_ci  'nv50/nv50_context.c',
87bf215546Sopenharmony_ci  'nv50/nv50_context.h',
88bf215546Sopenharmony_ci  'nv50/nv50_formats.c',
89bf215546Sopenharmony_ci  'nv50/nv50_miptree.c',
90bf215546Sopenharmony_ci  'nv50/nv50_program.c',
91bf215546Sopenharmony_ci  'nv50/nv50_program.h',
92bf215546Sopenharmony_ci  'nv50/nv50_push.c',
93bf215546Sopenharmony_ci  'nv50/nv50_query.c',
94bf215546Sopenharmony_ci  'nv50/nv50_query.h',
95bf215546Sopenharmony_ci  'nv50/nv50_query_hw.c',
96bf215546Sopenharmony_ci  'nv50/nv50_query_hw.h',
97bf215546Sopenharmony_ci  'nv50/nv50_query_hw_metric.c',
98bf215546Sopenharmony_ci  'nv50/nv50_query_hw_metric.h',
99bf215546Sopenharmony_ci  'nv50/nv50_query_hw_sm.c',
100bf215546Sopenharmony_ci  'nv50/nv50_query_hw_sm.h',
101bf215546Sopenharmony_ci  'nv50/nv50_resource.c',
102bf215546Sopenharmony_ci  'nv50/nv50_resource.h',
103bf215546Sopenharmony_ci  'nv50/nv50_screen.c',
104bf215546Sopenharmony_ci  'nv50/nv50_screen.h',
105bf215546Sopenharmony_ci  'nv50/nv50_shader_state.c',
106bf215546Sopenharmony_ci  'nv50/nv50_state.c',
107bf215546Sopenharmony_ci  'nv50/nv50_stateobj.h',
108bf215546Sopenharmony_ci  'nv50/nv50_stateobj_tex.h',
109bf215546Sopenharmony_ci  'nv50/nv50_state_validate.c',
110bf215546Sopenharmony_ci  'nv50/nv50_surface.c',
111bf215546Sopenharmony_ci  'nv50/nv50_tex.c',
112bf215546Sopenharmony_ci  'nv50/nv50_transfer.c',
113bf215546Sopenharmony_ci  'nv50/nv50_transfer.h',
114bf215546Sopenharmony_ci  'nv50/nv50_vbo.c',
115bf215546Sopenharmony_ci  'nv50/nv50_winsys.h',
116bf215546Sopenharmony_ci  'nv50/nv84_video_bsp.c',
117bf215546Sopenharmony_ci  'nv50/nv84_video.c',
118bf215546Sopenharmony_ci  'nv50/nv84_video.h',
119bf215546Sopenharmony_ci  'nv50/nv84_video_vp.c',
120bf215546Sopenharmony_ci  'nv50/nv98_video_bsp.c',
121bf215546Sopenharmony_ci  'nv50/nv98_video.c',
122bf215546Sopenharmony_ci  'nv50/nv98_video.h',
123bf215546Sopenharmony_ci  'nv50/nv98_video_ppp.c',
124bf215546Sopenharmony_ci  'nv50/nv98_video_vp.c',
125bf215546Sopenharmony_ci  'nvc0/cla0c0qmd.h',
126bf215546Sopenharmony_ci  'nvc0/clc0c0qmd.h',
127bf215546Sopenharmony_ci  'nvc0/clc3c0qmd.h',
128bf215546Sopenharmony_ci  'nvc0/drf.h',
129bf215546Sopenharmony_ci  'nvc0/qmd.h',
130bf215546Sopenharmony_ci  'nvc0/qmda0c0.c',
131bf215546Sopenharmony_ci  'nvc0/qmdc0c0.c',
132bf215546Sopenharmony_ci  'nvc0/qmdc3c0.c',
133bf215546Sopenharmony_ci  'nvc0/gm107_texture.xml.h',
134bf215546Sopenharmony_ci  'nvc0/nvc0_3d.xml.h',
135bf215546Sopenharmony_ci  'nvc0/nvc0_compute.c',
136bf215546Sopenharmony_ci  'nvc0/nvc0_compute.xml.h',
137bf215546Sopenharmony_ci  'nvc0/nvc0_context.c',
138bf215546Sopenharmony_ci  'nvc0/nvc0_context.h',
139bf215546Sopenharmony_ci  'nvc0/nvc0_formats.c',
140bf215546Sopenharmony_ci  'nvc0/nvc0_m2mf.xml.h',
141bf215546Sopenharmony_ci  'nvc0/nvc0_macros.h',
142bf215546Sopenharmony_ci  'nvc0/nvc0_miptree.c',
143bf215546Sopenharmony_ci  'nvc0/nvc0_program.c',
144bf215546Sopenharmony_ci  'nvc0/nvc0_program.h',
145bf215546Sopenharmony_ci  'nvc0/nvc0_query.c',
146bf215546Sopenharmony_ci  'nvc0/nvc0_query.h',
147bf215546Sopenharmony_ci  'nvc0/nvc0_query_hw.c',
148bf215546Sopenharmony_ci  'nvc0/nvc0_query_hw.h',
149bf215546Sopenharmony_ci  'nvc0/nvc0_query_hw_metric.c',
150bf215546Sopenharmony_ci  'nvc0/nvc0_query_hw_metric.h',
151bf215546Sopenharmony_ci  'nvc0/nvc0_query_hw_sm.c',
152bf215546Sopenharmony_ci  'nvc0/nvc0_query_hw_sm.h',
153bf215546Sopenharmony_ci  'nvc0/nvc0_query_sw.c',
154bf215546Sopenharmony_ci  'nvc0/nvc0_query_sw.h',
155bf215546Sopenharmony_ci  'nvc0/nvc0_resource.c',
156bf215546Sopenharmony_ci  'nvc0/nvc0_resource.h',
157bf215546Sopenharmony_ci  'nvc0/nvc0_screen.c',
158bf215546Sopenharmony_ci  'nvc0/nvc0_screen.h',
159bf215546Sopenharmony_ci  'nvc0/nvc0_shader_state.c',
160bf215546Sopenharmony_ci  'nvc0/nvc0_state.c',
161bf215546Sopenharmony_ci  'nvc0/nvc0_stateobj.h',
162bf215546Sopenharmony_ci  'nvc0/nvc0_state_validate.c',
163bf215546Sopenharmony_ci  'nvc0/nvc0_surface.c',
164bf215546Sopenharmony_ci  'nvc0/nvc0_tex.c',
165bf215546Sopenharmony_ci  'nvc0/nvc0_transfer.c',
166bf215546Sopenharmony_ci  'nvc0/nvc0_vbo.c',
167bf215546Sopenharmony_ci  'nvc0/nvc0_vbo_translate.c',
168bf215546Sopenharmony_ci  'nvc0/nvc0_video_bsp.c',
169bf215546Sopenharmony_ci  'nvc0/nvc0_video.c',
170bf215546Sopenharmony_ci  'nvc0/nvc0_video.h',
171bf215546Sopenharmony_ci  'nvc0/nvc0_video_ppp.c',
172bf215546Sopenharmony_ci  'nvc0/nvc0_video_vp.c',
173bf215546Sopenharmony_ci  'nvc0/nvc0_winsys.h',
174bf215546Sopenharmony_ci  'nvc0/nve4_compute.c',
175bf215546Sopenharmony_ci  'nvc0/nve4_compute.h',
176bf215546Sopenharmony_ci  'nvc0/nve4_compute.xml.h',
177bf215546Sopenharmony_ci  'nvc0/nve4_copy.xml.h',
178bf215546Sopenharmony_ci  'nvc0/nve4_p2mf.xml.h',
179bf215546Sopenharmony_ci)
180bf215546Sopenharmony_ci
181bf215546Sopenharmony_cilibnouveau = static_library(
182bf215546Sopenharmony_ci  'nouveau',
183bf215546Sopenharmony_ci  files_libnouveau,
184bf215546Sopenharmony_ci  include_directories : [
185bf215546Sopenharmony_ci    inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_mapi, inc_mesa,
186bf215546Sopenharmony_ci  ],
187bf215546Sopenharmony_ci  gnu_symbol_visibility : 'hidden',
188bf215546Sopenharmony_ci  dependencies : [dep_libdrm, idep_nouveau_codegen, dep_libdrm_nouveau, idep_mesautil, idep_nir_headers],
189bf215546Sopenharmony_ci)
190bf215546Sopenharmony_ci
191bf215546Sopenharmony_cinouveau_compiler = executable(
192bf215546Sopenharmony_ci  'nouveau_compiler',
193bf215546Sopenharmony_ci  'nouveau_compiler.c',
194bf215546Sopenharmony_ci  dependencies : [dep_libdrm, dep_libdrm_nouveau, idep_mesautil, idep_nir, idep_nouveau_codegen],
195bf215546Sopenharmony_ci  include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux],
196bf215546Sopenharmony_ci  link_with : [libnouveau_codegen, libnouveau, libgallium],
197bf215546Sopenharmony_ci  build_by_default : with_tools.contains('nouveau'),
198bf215546Sopenharmony_ci  install : with_tools.contains('nouveau'),
199bf215546Sopenharmony_ci)
200bf215546Sopenharmony_ci
201bf215546Sopenharmony_cidriver_nouveau = declare_dependency(
202bf215546Sopenharmony_ci  compile_args : '-DGALLIUM_NOUVEAU',
203bf215546Sopenharmony_ci  dependencies : [idep_nir, idep_nouveau_codegen],
204bf215546Sopenharmony_ci  link_with : [libnouveauwinsys, libnouveau_codegen, libnouveau],
205bf215546Sopenharmony_ci)
206