1# Copyright © 2019 Intel Corporation 2 3# Permission is hereby granted, free of charge, to any person obtaining a 4# copy of this software and/or associated documentation files (the 5# "Materials"), to deal in the Materials without restriction, including 6# without limitation the rights to use, copy, modify, merge, publish, 7# distribute, sublicense, and/or sell copies of the Materials, and to 8# permit persons to whom the Materials are furnished to do so, subject to 9# the following conditions: 10 11# The above copyright notice and this permission notice shall be included 12# unaltered in all copies or substantial portions of the Materials. 13# Any additions, deletions, or changes to the original source files 14# must be clearly indicated in accompanying documentation. 15 16# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 23 24 25foreach t : [['glapi_mapi_tmp.h', 'gldispatch'], 26 ['g_glapi_mapi_gl_tmp.h', 'gl'], 27 ['g_glapi_mapi_opengl_tmp.h', 'opengl'], 28 ['g_glapi_mapi_glesv1_tmp.h', 'glesv1'], 29 ['g_glapi_mapi_glesv2_tmp.h', 'glesv2']] 30 file = t[0] 31 target = t[1] 32 var = file.underscorify() 33 34 _t = custom_target( 35 file, 36 input : ['gen_gldispatch_mapi.py', 'xml/gl.xml', 'xml/gl_other.xml'], 37 output : file, 38 command : [prog_py, '@INPUT0@', target, '@INPUT1@', '@INPUT2@'], 39 depend_files : files('genCommon.py'), 40 capture : true, 41 ) 42 43 set_variable(var, _t) 44endforeach 45 46foreach target : ['header', 'source'] 47 ext = target == 'header' ? 'h' : 'c' 48 _t = custom_target( 49 'g_egldispatchstubs.' + ext, 50 input : ['gen_egl_dispatch.py', 'xml/egl.xml'], 51 output : ['g_egldispatchstubs.' + ext], 52 command : [ 53 prog_py, '@INPUT0@', target, '@INPUT1@', 54 ], 55 depend_files : files('genCommon.py', 'eglFunctionList.py'), 56 capture : true, 57 ) 58 59 set_variable('g_egldispatchstubs_' + ext, _t) 60endforeach 61 62g_libglglxwrapper_c = custom_target( 63 'g_libglglxwrapper.c', 64 input : ['gen_libgl_glxstubs.py', 'xml/glx.xml', 'xml/glx_other.xml'], 65 output : ['g_libglglxwrapper.c'], 66 command : [prog_py, '@INPUT@'], 67 depend_files : files('genCommon.py'), 68 capture : true, 69) 70 71