1# Copyright © 2017 Dylan Baker 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 21files_libnouveau = files( 22 'nouveau_buffer.c', 23 'nouveau_buffer.h', 24 'nouveau_context.h', 25 'nouveau_debug.h', 26 'nouveau_fence.c', 27 'nouveau_fence.h', 28 'nouveau_gldefs.h', 29 'nouveau_heap.c', 30 'nouveau_heap.h', 31 'nouveau_mm.c', 32 'nouveau_mm.h', 33 'nouveau_screen.c', 34 'nouveau_screen.h', 35 'nouveau_video.c', 36 'nouveau_video.h', 37 'nouveau_vp3_video_bsp.c', 38 'nouveau_vp3_video.c', 39 'nouveau_vp3_video.h', 40 'nouveau_vp3_video_vp.c', 41 'nouveau_winsys.h', 42 'nv17_mpeg.xml.h', 43 'nv31_mpeg.xml.h', 44 'nv_m2mf.xml.h', 45 'nv_object.xml.h', 46 'nv30/nv01_2d.xml.h', 47 'nv30/nv30-40_3d.xml.h', 48 'nv30/nv30_clear.c', 49 'nv30/nv30_context.c', 50 'nv30/nv30_context.h', 51 'nv30/nv30_draw.c', 52 'nv30/nv30_format.c', 53 'nv30/nv30_format.h', 54 'nv30/nv30_fragprog.c', 55 'nv30/nv30_fragtex.c', 56 'nv30/nv30_miptree.c', 57 'nv30/nv30_push.c', 58 'nv30/nv30_query.c', 59 'nv30/nv30_resource.c', 60 'nv30/nv30_resource.h', 61 'nv30/nv30_screen.c', 62 'nv30/nv30_screen.h', 63 'nv30/nv30_state.c', 64 'nv30/nv30_state.h', 65 'nv30/nv30_state_validate.c', 66 'nv30/nv30_texture.c', 67 'nv30/nv30_transfer.c', 68 'nv30/nv30_transfer.h', 69 'nv30/nv30_vbo.c', 70 'nv30/nv30_vertprog.c', 71 'nv30/nv30_vertprog.h', 72 'nv30/nv30_winsys.h', 73 'nv30/nv40_vertprog.h', 74 'nv30/nv40_verttex.c', 75 'nv30/nvfx_fragprog.c', 76 'nv30/nvfx_shader.h', 77 'nv30/nvfx_vertprog.c', 78 'nv50/g80_defs.xml.h', 79 'nv50/g80_texture.xml.h', 80 'nv50/nv50_2d.xml.h', 81 'nv50/nv50_3ddefs.xml.h', 82 'nv50/nv50_3d.xml.h', 83 'nv50/nv50_blit.h', 84 'nv50/nv50_compute.c', 85 'nv50/nv50_compute.xml.h', 86 'nv50/nv50_context.c', 87 'nv50/nv50_context.h', 88 'nv50/nv50_formats.c', 89 'nv50/nv50_miptree.c', 90 'nv50/nv50_program.c', 91 'nv50/nv50_program.h', 92 'nv50/nv50_push.c', 93 'nv50/nv50_query.c', 94 'nv50/nv50_query.h', 95 'nv50/nv50_query_hw.c', 96 'nv50/nv50_query_hw.h', 97 'nv50/nv50_query_hw_metric.c', 98 'nv50/nv50_query_hw_metric.h', 99 'nv50/nv50_query_hw_sm.c', 100 'nv50/nv50_query_hw_sm.h', 101 'nv50/nv50_resource.c', 102 'nv50/nv50_resource.h', 103 'nv50/nv50_screen.c', 104 'nv50/nv50_screen.h', 105 'nv50/nv50_shader_state.c', 106 'nv50/nv50_state.c', 107 'nv50/nv50_stateobj.h', 108 'nv50/nv50_stateobj_tex.h', 109 'nv50/nv50_state_validate.c', 110 'nv50/nv50_surface.c', 111 'nv50/nv50_tex.c', 112 'nv50/nv50_transfer.c', 113 'nv50/nv50_transfer.h', 114 'nv50/nv50_vbo.c', 115 'nv50/nv50_winsys.h', 116 'nv50/nv84_video_bsp.c', 117 'nv50/nv84_video.c', 118 'nv50/nv84_video.h', 119 'nv50/nv84_video_vp.c', 120 'nv50/nv98_video_bsp.c', 121 'nv50/nv98_video.c', 122 'nv50/nv98_video.h', 123 'nv50/nv98_video_ppp.c', 124 'nv50/nv98_video_vp.c', 125 'nvc0/cla0c0qmd.h', 126 'nvc0/clc0c0qmd.h', 127 'nvc0/clc3c0qmd.h', 128 'nvc0/drf.h', 129 'nvc0/qmd.h', 130 'nvc0/qmda0c0.c', 131 'nvc0/qmdc0c0.c', 132 'nvc0/qmdc3c0.c', 133 'nvc0/gm107_texture.xml.h', 134 'nvc0/nvc0_3d.xml.h', 135 'nvc0/nvc0_compute.c', 136 'nvc0/nvc0_compute.xml.h', 137 'nvc0/nvc0_context.c', 138 'nvc0/nvc0_context.h', 139 'nvc0/nvc0_formats.c', 140 'nvc0/nvc0_m2mf.xml.h', 141 'nvc0/nvc0_macros.h', 142 'nvc0/nvc0_miptree.c', 143 'nvc0/nvc0_program.c', 144 'nvc0/nvc0_program.h', 145 'nvc0/nvc0_query.c', 146 'nvc0/nvc0_query.h', 147 'nvc0/nvc0_query_hw.c', 148 'nvc0/nvc0_query_hw.h', 149 'nvc0/nvc0_query_hw_metric.c', 150 'nvc0/nvc0_query_hw_metric.h', 151 'nvc0/nvc0_query_hw_sm.c', 152 'nvc0/nvc0_query_hw_sm.h', 153 'nvc0/nvc0_query_sw.c', 154 'nvc0/nvc0_query_sw.h', 155 'nvc0/nvc0_resource.c', 156 'nvc0/nvc0_resource.h', 157 'nvc0/nvc0_screen.c', 158 'nvc0/nvc0_screen.h', 159 'nvc0/nvc0_shader_state.c', 160 'nvc0/nvc0_state.c', 161 'nvc0/nvc0_stateobj.h', 162 'nvc0/nvc0_state_validate.c', 163 'nvc0/nvc0_surface.c', 164 'nvc0/nvc0_tex.c', 165 'nvc0/nvc0_transfer.c', 166 'nvc0/nvc0_vbo.c', 167 'nvc0/nvc0_vbo_translate.c', 168 'nvc0/nvc0_video_bsp.c', 169 'nvc0/nvc0_video.c', 170 'nvc0/nvc0_video.h', 171 'nvc0/nvc0_video_ppp.c', 172 'nvc0/nvc0_video_vp.c', 173 'nvc0/nvc0_winsys.h', 174 'nvc0/nve4_compute.c', 175 'nvc0/nve4_compute.h', 176 'nvc0/nve4_compute.xml.h', 177 'nvc0/nve4_copy.xml.h', 178 'nvc0/nve4_p2mf.xml.h', 179) 180 181libnouveau = static_library( 182 'nouveau', 183 files_libnouveau, 184 include_directories : [ 185 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_mapi, inc_mesa, 186 ], 187 gnu_symbol_visibility : 'hidden', 188 dependencies : [dep_libdrm, idep_nouveau_codegen, dep_libdrm_nouveau, idep_mesautil, idep_nir_headers], 189) 190 191nouveau_compiler = executable( 192 'nouveau_compiler', 193 'nouveau_compiler.c', 194 dependencies : [dep_libdrm, dep_libdrm_nouveau, idep_mesautil, idep_nir, idep_nouveau_codegen], 195 include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux], 196 link_with : [libnouveau_codegen, libnouveau, libgallium], 197 build_by_default : with_tools.contains('nouveau'), 198 install : with_tools.contains('nouveau'), 199) 200 201driver_nouveau = declare_dependency( 202 compile_args : '-DGALLIUM_NOUVEAU', 203 dependencies : [idep_nir, idep_nouveau_codegen], 204 link_with : [libnouveauwinsys, libnouveau_codegen, libnouveau], 205) 206