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_pipe_loader = files( 22 'pipe_loader.c', 23 'pipe_loader.h', 24 'pipe_loader_priv.h', 25 'pipe_loader_sw.c', 26 'driinfo_gallium.h', 27) 28 29libpipe_loader_defines = [] 30libpipe_loader_links = [] 31 32if dep_libdrm.found() 33 files_pipe_loader += files('pipe_loader_drm.c') 34 libpipe_loader_links += libloader 35endif 36 37renderonly_drivers_c_args = [] 38if with_gallium_etnaviv 39 renderonly_drivers_c_args += '-DGALLIUM_ETNAVIV' 40endif 41if with_gallium_lima 42 renderonly_drivers_c_args += '-DGALLIUM_LIMA' 43endif 44if with_gallium_v3d 45 renderonly_drivers_c_args += '-DGALLIUM_V3D' 46endif 47if with_gallium_vc4 48 renderonly_drivers_c_args += '-DGALLIUM_VC4' 49endif 50if with_gallium_freedreno 51 renderonly_drivers_c_args += '-DGALLIUM_FREEDRENO' 52endif 53if with_gallium_panfrost 54 renderonly_drivers_c_args += '-DGALLIUM_PANFROST' 55endif 56if with_gallium_asahi 57 renderonly_drivers_c_args += '-DGALLIUM_ASAHI' 58endif 59 60libpipe_loader_static = static_library( 61 'pipe_loader_static', 62 files_pipe_loader, 63 include_directories : [ 64 inc_util, inc_loader, inc_gallium, inc_include, inc_src, inc_gallium_aux, 65 inc_gallium_winsys, inc_gallium_drivers, 66 ], 67 c_args : [libpipe_loader_defines, '-DGALLIUM_STATIC_TARGETS=1', renderonly_drivers_c_args], 68 gnu_symbol_visibility : 'hidden', 69 link_with : [libpipe_loader_links], 70 dependencies : [dep_libdrm, idep_xmlconfig, idep_mesautil], 71 build_by_default : false, 72) 73 74libpipe_loader_dynamic = static_library( 75 'pipe_loader_dynamic', 76 files_pipe_loader, 77 include_directories : [ 78 inc_util, inc_loader, inc_gallium, inc_include, inc_src, inc_gallium_aux, 79 inc_gallium_winsys, inc_gallium_drivers, 80 ], 81 c_args : [ 82 libpipe_loader_defines, 83 '-DPIPE_SEARCH_DIR="@0@"'.format( 84 join_paths(get_option('prefix'), get_option('libdir'), 'gallium-pipe') 85 ) 86 ], 87 gnu_symbol_visibility : 'hidden', 88 link_with : [libpipe_loader_links], 89 dependencies : [dep_libdrm, idep_xmlconfig, idep_mesautil], 90 build_by_default : false, 91) 92