aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapi/shared-glapi
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2020-03-27 15:07:32 +0000
committerMarge Bot <[email protected]>2020-03-30 13:38:01 +0000
commit2e92d3381988a85b2a6dcc8d8a8d7158ace9f348 (patch)
treea9e4d318b6fa5064f71d59a96d04b90999cae525 /src/mapi/shared-glapi
parent0f847b18bc91dced5725169e8c96bef6c077db90 (diff)
scons: Prune out unnecessary targets.
This prunes out all targets except libgl-gdi, libgl-xlib, and svga, as suggested by Marek Olšák. libgl-xlib will be remove once I have had time to confirm no automated tests we have rely upon it. There are also a bunch of Makefile.sources which become orphaned as result, that are not taken care of in this change. v2: Prune remainders of swr support. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348>
Diffstat (limited to 'src/mapi/shared-glapi')
-rw-r--r--src/mapi/shared-glapi/SConscript130
1 files changed, 0 insertions, 130 deletions
diff --git a/src/mapi/shared-glapi/SConscript b/src/mapi/shared-glapi/SConscript
deleted file mode 100644
index 81aea74873d..00000000000
--- a/src/mapi/shared-glapi/SConscript
+++ /dev/null
@@ -1,130 +0,0 @@
-#######################################################################
-# SConscript for shared-glapi/es1api/es2api
-
-from sys import executable as python_cmd
-
-Import('*')
-
-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',
- ],
- 'bridge': ['entry.c'],
- }
- mapi_defines = {
- 'glapi': ['MAPI_MODE_GLAPI'],
- 'bridge': ['MAPI_MODE_BRIDGE'],
- }
-
- header_name = '%s-tmp.h' % (printer)
-
- # generate ABI header
- GLAPI = '../glapi/'
- if printer != 'glapi':
- if printer == 'es1api':
- abi_tag = 'glesv1'
- else:
- abi_tag = 'glesv2'
-
- header = env.CodeGenerate(
- target = header_name,
- script = '../new/gen_gldispatch_mapi.py',
- source = GLAPI + 'registry/gl.xml'
- command = python_cmd + ' $SCRIPT ' + \
- '%s $SOURCE > $TARGET' % (abi_tag),
- )
- else:
- header = env.CodeGenerate(
- target = header_name,
- script = '../mapi_abi.py',
- source = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml'),
- command = python_cmd + ' $SCRIPT ' + \
- '--printer %s $SOURCE > $TARGET' % (printer),
- )
-
- cpppath = [
- header[0].dir,
- '#/include',
- '#/src',
- '#/src/mapi',
- ]
-
- cppdefines = mapi_defines[mode] + [
- 'MAPI_ABI_HEADER=\\"%s\\"' % (header_name),
- ]
-
- if env['platform'] == 'windows':
- if mode == 'glapi':
- cppdefines += [
- '_GLAPI_DLL_EXPORTS', # declare _glapi_* as __declspec(dllexport) in glapi.h
- ]
- else:
- cppdefines += [
- '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
- 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
- ]
-
- objects = []
- for s in mapi_sources[mode]:
- o = env.SharedObject(
- target = '%s-%s' % (printer, s[:-2]),
- source = '../' + s,
- CPPPATH = cpppath,
- CPPDEFINES = cppdefines,
- )
- objects.append(o[0])
-
- env.Depends(objects, header)
-
- return objects
-
-env = env.Clone()
-
-env['SHLIBPREFIX'] = 'lib'
-env['LIBPREFIX'] = 'lib'
-
-shared_glapi_objects = mapi_objects(env, 'shared-glapi', 'glapi')
-shared_glapi = env.SharedLibrary(
- target = 'glapi',
- source = shared_glapi_objects,
-)
-
-# manually add LIBPREFIX on windows
-if env['platform'] == 'windows':
- libs = ['libglapi']
-else:
- libs = ['glapi']
-
-es1api_objects = mapi_objects(env, 'es1api', 'bridge')
-es1api = env.SharedLibrary(
- target = 'GLESv1_CM',
- source = es1api_objects,
- LIBPATH = ['.'],
- LIBS = libs,
-)
-
-es2api_objects = mapi_objects(env, 'es2api', 'bridge')
-es2api = env.SharedLibrary(
- target = 'GLESv2',
- source = es2api_objects,
- LIBPATH = ['.'],
- LIBS = libs,
-)
-
-env.InstallSharedLibrary(shared_glapi, version=(0, 0, 0))
-env.InstallSharedLibrary(es1api, version=(1, 0, 0))
-env.InstallSharedLibrary(es2api, version=(2, 0, 0))
-
-if env['platform'] == 'windows':
- shared_glapi = env.FindIxes(shared_glapi, 'LIBPREFIX', 'LIBSUFFIX')
-else:
- shared_glapi = env.FindIxes(shared_glapi, 'SHLIBPREFIX', 'SHLIBSUFFIX')
-
-Export(['shared_glapi'])