env.Append(CPPPATH = [
'#/src/mapi',
+ Dir('.'),
])
env.Append(CPPDEFINES = [
'VEGA_VERSION_STRING=',
'vgu.c'
]
-api_tmp = env.CodeGenerate(
- target = '#/src/gallium/state_trackers/vega/api_tmp.h',
+api_tmp, = env.CodeGenerate(
+ target = 'api_tmp.h',
script = '#src/mapi/mapi/mapi_abi.py',
source = '#src/mapi/vgapi/vgapi.csv',
command = python_cmd + ' $SCRIPT --printer vgapi --mode app $SOURCE > $TARGET'
)
-env.Depends(vega_sources, api_tmp)
st_vega = env.ConvenienceLibrary(
target = 'st_vega',
'#/src/mesa',
'#/src/mesa/main',
'#src/gallium/state_trackers/glx/xlib',
+ Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
])
env.Append(CPPDEFINES = ['USE_XSHM'])
'xlib.c',
]
-# The sources depend on the python-generated GL API files/headers.
-env.Depends(sources, glapi_headers)
-
if True:
env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE'])
env.Prepend(LIBS = [trace, rbug, galahad, softpipe])
command = python_cmd + ' $SCRIPT -f $SOURCE -m init_c > $TARGET'
)
-headers = []
-
-headers += env.CodeGenerate(
+env.CodeGenerate(
target = 'indirect_size.h',
script = GLAPI + 'gen/glX_proto_size.py',
source = GLAPI + 'gen/gl_API.xml',
command = python_cmd + ' $SCRIPT -f $SOURCE -m size_h --only-set -h _INDIRECT_SIZE_H > $TARGET'
)
-headers += env.CodeGenerate(
+env.CodeGenerate(
target = 'indirect.h',
script = GLAPI + 'gen/glX_proto_send.py',
source = GLAPI + 'gen/gl_API.xml',
)
-env.Depends(sources, headers)
-
-
libgl = env.InstallSharedLibrary(libgl, version=(1, 2))
env.Alias('glx', libgl)
env.Append(CPPPATH = [
'#/src/mapi',
'#/src/mesa',
+ Dir('..'), # src/mapi build path
])
glapi_sources = [
source = glapi_sources,
)
Export('glapi')
-
-
-env.Depends(glapi_sources, glapi_headers)
# Mesa and GLX tree. Other .c and .h files are generated elsewhere
# if they're only used in one place.
-GLAPI = '#src/mapi/glapi/'
-
-glapi_headers = []
-
-glapi_headers += env.CodeGenerate(
- target = '#src/mesa/main/dispatch.h',
- script = GLAPI + 'gen/gl_table.py',
- source = GLAPI + 'gen/gl_and_es_API.xml',
+env.CodeGenerate(
+ target = '../../../mesa/main/dispatch.h',
+ script = 'gl_table.py',
+ source = 'gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -m remap_table -f $SOURCE > $TARGET',
)
-glapi_headers += env.CodeGenerate(
- target = '#src/mapi/glapi/glapitable.h',
- script = GLAPI + 'gen/gl_table.py',
- source = GLAPI + 'gen/gl_and_es_API.xml',
+env.CodeGenerate(
+ target = '../../../mapi/glapi/glapitable.h',
+ script = 'gl_table.py',
+ source = 'gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
)
-glapi_headers += env.CodeGenerate(
- target = '#src/mapi/glapi/glapitemp.h',
- script = GLAPI + 'gen/gl_apitemp.py',
- source = GLAPI + 'gen/gl_and_es_API.xml',
+env.CodeGenerate(
+ target = '../../../mapi/glapi/glapitemp.h',
+ script = 'gl_apitemp.py',
+ source = 'gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
)
-glapi_headers += env.CodeGenerate(
- target = '#src/mapi/glapi/glprocs.h',
- script = GLAPI + 'gen/gl_procs.py',
- source = GLAPI + 'gen/gl_and_es_API.xml',
+env.CodeGenerate(
+ target = '../../../mapi/glapi/glprocs.h',
+ script = 'gl_procs.py',
+ source = 'gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
)
-glapi_headers += env.CodeGenerate(
- target = '#src/mesa/main/remap_helper.h',
- script = GLAPI + 'gen/remap_helper.py',
- source = GLAPI + 'gen/gl_and_es_API.xml',
+env.CodeGenerate(
+ target = '../../../mesa/main/remap_helper.h',
+ script = 'remap_helper.py',
+ source = 'gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
)
-
-env.Export('glapi_headers')
env = env.Clone()
-vgapi_header = env.CodeGenerate(
- target = '#src/mapi/vgapi/vgapi_tmp.h',
+vgapi_header, = env.CodeGenerate(
+ target = 'vgapi_tmp.h',
script = '../mapi/mapi_abi.py',
source = 'vgapi.csv',
command = python_cmd + ' $SCRIPT --printer vgapi --mode lib $SOURCE > $TARGET'
env.Append(CPPPATH = [
'#/include',
'#/src/mapi',
+ Dir('..'), # vgapi/vgapi_tmp.h build path
])
mapi_sources = [
'#/src/mapi',
'#/src/glsl',
'#/src/mesa',
+ Dir('../mapi'), # src/mapi build path
+ Dir('.'), # src/mesa build path
])
enabled_apis = []
program_parse = env.CFile('program/program_parse.tab.c',
'program/program_parse.y')
-# Make program/program_parse.tab.h reacheable from the include path
-env.Append(CPPPATH = [Dir('.').abspath])
-
program_sources = [
'program/arbprogparse.c',
'program/prog_hash_table.c',
enabled_apis += ['ES1', 'ES2']
- # generate GLES sources
- gles_sources = []
-
- # generate GLES headers
- gles_headers = []
-
- env.Depends(gles_sources, gles_headers)
-
- # gles_sources #include gles_headers with full path
- env.Append(CPPPATH = [gles_headers[0].dir.up().up()])
-
- mesa_sources += gles_sources
-
env.Append(CPPDEFINES = ["FEATURE_%s=1" % api for api in enabled_apis])
get_hash_gen_opts = ' '.join(["-a %s" % api for api in enabled_apis])
' -f $SOURCE > $TARGET'
)
-env.Depends(glget_sources, get_hash_header)
-
#
# Assembly sources
#
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
)
-# We also depend on the auto-generated GL API headers
-env.Depends(mesa_sources, glapi_headers)
-
def write_git_sha1_h_file(filename):
"""Mesa looks for a git_sha1.h file at compile time in order to display
env.Prepend(CPPPATH = [
'#src/mapi',
'#src/mesa',
+ Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
])
env.Prepend(LIBS = [
)
env.Alias('osmesa', osmesa)
-
-env.Depends(sources, glapi_headers)
'#/src/mapi',
'#/src/mesa',
'#/src/mesa/main',
+ Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
])
env.Append(CPPDEFINES = ['USE_XSHM'])
'xm_tri.c',
]
-# The sources depend on the python-generated GL API files/headers.
-env.Depends(sources, glapi_headers)
-
# libGL.so.1.6
libgl_1_6 = env.SharedLibrary(
target ='GL',