mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 06:30:24 +01:00
It appears that scons implicit dependency scanners fail to chain dependencies of generated headers when these are outside the build tree. This patch ensures generated source files are _always_ put in the build tree. I'm not 100% this will fix all depency issues, but from my experiments it does seem to fix this. NOTE: For this to be effective it is necessary to clean the source tree from generated header/source files. Reviewed-by: Brian Paul <brianp@vmware.com>
61 lines
1.3 KiB
Python
61 lines
1.3 KiB
Python
#######################################################################
|
|
# SConscript for vgapi
|
|
|
|
from sys import executable as python_cmd
|
|
|
|
Import('*')
|
|
|
|
env = env.Clone()
|
|
|
|
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(CPPDEFINES = [
|
|
'MAPI_ABI_HEADER=\\"vgapi/vgapi_tmp.h\\"',
|
|
'MAPI_DLL_EXPORTS',
|
|
'KHRONOS_DLL_EXPORTS',
|
|
])
|
|
|
|
env.Append(CPPPATH = [
|
|
'#/include',
|
|
'#/src/mapi',
|
|
Dir('..'), # vgapi/vgapi_tmp.h build path
|
|
])
|
|
|
|
mapi_sources = [
|
|
'entry.c',
|
|
'mapi.c',
|
|
'stub.c',
|
|
'table.c',
|
|
'u_current.c',
|
|
'u_execmem.c',
|
|
]
|
|
|
|
vgapi_objects = []
|
|
for s in mapi_sources:
|
|
o = env.SharedObject(s[:-2], '../mapi/' + s)
|
|
vgapi_objects.append(o)
|
|
|
|
env.Depends(vgapi_objects, vgapi_header)
|
|
|
|
# libOpenVG.dll
|
|
env['LIBPREFIX'] = 'lib'
|
|
env['SHLIBPREFIX'] = 'lib'
|
|
|
|
openvg = env.SharedLibrary(
|
|
target = 'OpenVG',
|
|
source = vgapi_objects,
|
|
)
|
|
|
|
env.InstallSharedLibrary(openvg, version=(1, 0, 0))
|
|
|
|
if env['platform'] == 'windows':
|
|
openvg = env.FindIxes(openvg, 'LIBPREFIX', 'LIBSUFFIX')
|
|
else:
|
|
openvg = env.FindIxes(openvg, 'SHLIBPREFIX', 'SHLIBSUFFIX')
|
|
|
|
Export(['openvg'])
|