def mapi_objects(env, printer, mode):
"""Return mapi objects built for the given printer and mode."""
mapi_sources = {
- 'glapi': ['entry.c', 'mapi_glapi.c', 'stub.c', 'table.c',
- 'u_current.c', 'u_execmem.c', 'u_thread.c'],
+ 'glapi': [
+ 'entry.c',
+ 'mapi_glapi.c',
+ 'stub.c',
+ 'table.c',
+ 'u_current.c',
+ 'u_execmem.c',
+ ],
'bridge': ['entry.c'],
}
mapi_defines = {
header_name = '%s-tmp.h' % (printer)
# generate ABI header
+ GLAPI = '../glapi/'
header = env.CodeGenerate(
target = header_name,
- script = '../mapi/mapi_abi.py',
- source = '../glapi/gen/gl_and_es_API.xml',
+ script = '../mapi_abi.py',
+ source = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml'),
command = python_cmd + ' $SCRIPT ' + \
'--printer %s --mode lib $SOURCE > $TARGET' % (printer),
)
cpppath = [
header[0].dir,
'#/include',
+ '#/src',
'#/src/mapi',
]
-
+
cppdefines = mapi_defines[mode] + [
'MAPI_ABI_HEADER=\\"%s\\"' % (header_name),
]
for s in mapi_sources[mode]:
o = env.SharedObject(
target = '%s-%s' % (printer, s[:-2]),
- source = '../mapi/' + s,
+ source = '../' + s,
CPPPATH = cpppath,
CPPDEFINES = cppdefines,
)