1# Copyright © 2017-2019 Intel Corporation 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_libcrocus = files( 22 'gen4_blorp_exec.h', 23 'driinfo_crocus.h', 24 'crocus_batch.c', 25 'crocus_batch.h', 26 'crocus_blit.c', 27 'crocus_bufmgr.c', 28 'crocus_bufmgr.h', 29 'crocus_clear.c', 30 'crocus_context.c', 31 'crocus_context.h', 32 'crocus_draw.c', 33 'crocus_fence.c', 34 'crocus_fence.h', 35 'crocus_fine_fence.c', 36 'crocus_fine_fence.h', 37 'crocus_formats.c', 38 'crocus_genx_macros.h', 39 'crocus_genx_protos.h', 40 'crocus_monitor.c', 41 'crocus_perf.c', 42 'crocus_perf.h', 43 'crocus_performance_query.c', 44 'crocus_pipe.h', 45 'crocus_pipe_control.c', 46 'crocus_program.c', 47 'crocus_program_cache.c', 48 'crocus_resolve.c', 49 'crocus_resource.c', 50 'crocus_resource.h', 51 'crocus_screen.c', 52 'crocus_screen.h', 53 'crocus_disk_cache.c', 54) 55 56crocus_per_hw_ver_libs = [] 57foreach v : ['40', '45', '50', '60', '70', '75', '80'] 58 crocus_per_hw_ver_libs += static_library( 59 'crocus_per_hw_ver@0@'.format(v), 60 ['crocus_blorp.c', 'crocus_query.c', 'crocus_state.c', 'crocus_blt.c', gen_xml_pack], 61 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_intel], 62 c_args : [ 63 no_override_init_args, sse2_args, 64 '-DGFX_VERx10=@0@'.format(v), 65 ], 66 gnu_symbol_visibility : 'hidden', 67 dependencies : [dep_libdrm, dep_valgrind, idep_genxml, idep_nir_headers, idep_intel_dev, idep_intel_blorp_elk], 68 ) 69endforeach 70 71libcrocus = static_library( 72 'crocus', 73 [files_libcrocus, gen_xml_pack], 74 include_directories : [ 75 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_intel, 76 inc_gallium_drivers, 77 # these should not be necessary, but main/macros.h... 78 inc_mesa, inc_mapi 79 ], 80 c_args : [sse2_args], 81 cpp_args : [sse2_args], 82 gnu_symbol_visibility : 'hidden', 83 dependencies : [ 84 dep_libdrm, dep_valgrind, idep_genxml, 85 idep_libintel_common, idep_nir_headers, 86 idep_intel_dev, idep_intel_blorp_elk, idep_intel_decoder_elk, 87 ], 88 link_with : [ 89 crocus_per_hw_ver_libs, libintel_compiler_elk, libisl, 90 libintel_perf 91 ], 92) 93 94driver_crocus = declare_dependency( 95 compile_args : '-DGALLIUM_CROCUS', 96 link_with : [libcrocus, libcrocuswinsys], 97) 98