1# Copyright © 2017 Intel Corporation 2# SPDX-License-Identifier: MIT 3 4files_shared_glapi = files( 5 '../entry.c', 6 '../u_current.c', 7 '../u_current.h', 8 'glapi.c', 9 'stub.c', 10 'stub.h', 11 'table.c', 12 'table.h', 13) 14 15shared_glapi_mapi_tmp_h = custom_target( 16 'shared_glapi_mapi_tmp.h', 17 input : [mapi_abi_py, gl_and_es_api_files], 18 output : 'glapi_mapi_tmp.h', 19 command : [prog_python, '@INPUT0@', '--printer', 'shared-glapi', '@INPUT1@'], 20 depend_files : api_xml_files, 21 capture : true, 22) 23 24_glapi_c_args = [] 25if with_platform_windows 26 _glapi_c_args += ['-D_GLAPI_DLL_EXPORTS'] 27endif 28 29libglapi = static_library( 30 'glapi', 31 [files_shared_glapi, shared_glapi_mapi_tmp_h], 32 c_args : [ 33 _glapi_c_args, 34 c_msvc_compat_args, 35 '-DMAPI_MODE_GLAPI', 36 '-DMAPI_ABI_HEADER="@0@"'.format(shared_glapi_mapi_tmp_h.full_path()), 37 gcc_lto_quirk, 38 ], 39 gnu_symbol_visibility : 'hidden', 40 link_args : [ld_args_gc_sections], 41 include_directories : [inc_src, inc_include, inc_mapi], 42 dependencies : [dep_thread, idep_mesautil], 43 install : false, 44) 45libglapi_build_dir = meson.current_build_dir() 46