101e04c3fSmrg# Copyright © 2017 Intel Corporation
201e04c3fSmrg
301e04c3fSmrg# Permission is hereby granted, free of charge, to any person obtaining a copy
401e04c3fSmrg# of this software and associated documentation files (the "Software"), to deal
501e04c3fSmrg# in the Software without restriction, including without limitation the rights
601e04c3fSmrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
701e04c3fSmrg# copies of the Software, and to permit persons to whom the Software is
801e04c3fSmrg# furnished to do so, subject to the following conditions:
901e04c3fSmrg
1001e04c3fSmrg# The above copyright notice and this permission notice shall be included in
1101e04c3fSmrg# all copies or substantial portions of the Software.
1201e04c3fSmrg
1301e04c3fSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1401e04c3fSmrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1501e04c3fSmrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1601e04c3fSmrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1701e04c3fSmrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1801e04c3fSmrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1901e04c3fSmrg# SOFTWARE.
2001e04c3fSmrg
2101e04c3fSmrgmain_dispatch_h = custom_target(
2201e04c3fSmrg  'dispatch.h',
2301e04c3fSmrg  input : [files('../../mapi/glapi/gen/gl_table.py'), gl_and_es_api_files],
2401e04c3fSmrg  output : 'dispatch.h',
2501e04c3fSmrg  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@', '-m', 'remap_table'],
2601e04c3fSmrg  depend_files : glapi_gen_depends,
2701e04c3fSmrg  capture : true,
2801e04c3fSmrg)
2901e04c3fSmrg
3001e04c3fSmrgmain_marshal_generated_h = custom_target(
3101e04c3fSmrg  'marshal_generated.h',
3201e04c3fSmrg  input : [files('../../mapi/glapi/gen/gl_marshal_h.py'), gl_and_es_api_files],
3301e04c3fSmrg  output : 'marshal_generated.h',
3401e04c3fSmrg  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
3501e04c3fSmrg  depend_files : files('../../mapi/glapi/gen/marshal_XML.py') + glapi_gen_depends,
3601e04c3fSmrg  capture : true,
3701e04c3fSmrg)
3801e04c3fSmrg
3901e04c3fSmrgmain_remap_helper_h = custom_target(
4001e04c3fSmrg  'remap_helper.h',
4101e04c3fSmrg  input : [files('../../mapi/glapi/gen/remap_helper.py'), gl_and_es_api_files],
4201e04c3fSmrg  output : 'remap_helper.h',
4301e04c3fSmrg  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
4401e04c3fSmrg  depend_files : glapi_gen_depends,
4501e04c3fSmrg  capture : true,
4601e04c3fSmrg)
477ec681f3Smrg
487ec681f3Smrgif _shader_replacement != ''
497ec681f3Smrg  # shader replacement
507ec681f3Smrg  shader_replacement_h = custom_target(
517ec681f3Smrg    'shader_replacement.h',
527ec681f3Smrg    input: [files(_shader_replacement + '/process_shaders.py')],
537ec681f3Smrg    output: 'shader_replacement.h',
547ec681f3Smrg    command: [prog_python, '@INPUT0@', _shader_replacement, '@OUTPUT@'],
557ec681f3Smrg    build_always: true,
567ec681f3Smrg  )
577ec681f3Smrgendif
58