diff options
author | José Fonseca <[email protected]> | 2011-11-09 07:05:52 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-11-29 17:34:56 +0000 |
commit | 10b07665be5cff9fa9f03b0f7db459f3b380570d (patch) | |
tree | ebe9bcbf6586abbf27b9b4ae827fc459cedf05e0 /src/mapi/glapi/SConscript | |
parent | 57f8e26ca87a2846f192682c84eccbf8b4500bfc (diff) |
Remove windows kernel support code.
Not actively used.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mapi/glapi/SConscript')
-rw-r--r-- | src/mapi/glapi/SConscript | 142 |
1 files changed, 70 insertions, 72 deletions
diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript index fdd65790013..dad7d597299 100644 --- a/src/mapi/glapi/SConscript +++ b/src/mapi/glapi/SConscript @@ -4,83 +4,81 @@ Import('*') -if env['platform'] != 'winddk': +env = env.Clone() - env = env.Clone() - +env.Append(CPPDEFINES = [ + 'MAPI_MODE_UTIL', +]) + +if env['platform'] == 'windows': env.Append(CPPDEFINES = [ - 'MAPI_MODE_UTIL', + '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers + 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers ]) + if env['gles']: + env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS']) + else: + # prevent _glapi_* from being declared __declspec(dllimport) + env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS']) + +env.Append(CPPPATH = [ + '#/src/mapi', + '#/src/mesa', +]) + +glapi_sources = [ + 'glapi_dispatch.c', + 'glapi_entrypoint.c', + 'glapi_getproc.c', + 'glapi_nop.c', + 'glthread.c', + 'glapi.c', +] - if env['platform'] == 'windows': +mapi_sources = [ + 'u_current.c', + 'u_execmem.c', + 'u_thread.c', +] +for s in mapi_sources: + o = env.SharedObject(s[:-2], '../mapi/' + s) + glapi_sources.append(o) + +# +# Assembly sources +# +if env['gcc'] and env['platform'] != 'windows': + if env['machine'] == 'x86': env.Append(CPPDEFINES = [ - '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers - 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers + 'USE_X86_ASM', ]) - if env['gles']: - env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS']) - else: - # prevent _glapi_* from being declared __declspec(dllimport) - env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS']) - - env.Append(CPPPATH = [ - '#/src/mapi', - '#/src/mesa', - ]) - - glapi_sources = [ - 'glapi_dispatch.c', - 'glapi_entrypoint.c', - 'glapi_getproc.c', - 'glapi_nop.c', - 'glthread.c', - 'glapi.c', - ] - - mapi_sources = [ - 'u_current.c', - 'u_execmem.c', - 'u_thread.c', - ] - for s in mapi_sources: - o = env.SharedObject(s[:-2], '../mapi/' + s) - glapi_sources.append(o) + glapi_sources += [ + 'glapi_x86.S', + ] + elif env['machine'] == 'x86_64': + env.Append(CPPDEFINES = [ + 'USE_X86_64_ASM', + ]) + glapi_sources += [ + 'glapi_x86-64.S' + ] + elif env['machine'] == 'sparc': + env.Append(CPPDEFINES = [ + 'USE_SPARC_ASM', + ]) + glapi_sources += [ + 'glapi_sparc.S' + ] + else: + pass - # - # Assembly sources - # - if env['gcc'] and env['platform'] != 'windows': - if env['machine'] == 'x86': - env.Append(CPPDEFINES = [ - 'USE_X86_ASM', - ]) - glapi_sources += [ - 'glapi_x86.S', - ] - elif env['machine'] == 'x86_64': - env.Append(CPPDEFINES = [ - 'USE_X86_64_ASM', - ]) - glapi_sources += [ - 'glapi_x86-64.S' - ] - elif env['machine'] == 'sparc': - env.Append(CPPDEFINES = [ - 'USE_SPARC_ASM', - ]) - glapi_sources += [ - 'glapi_sparc.S' - ] - else: - pass - - if env['toolchain'] == 'crossmingw': - # compile these files without -gstabs option - glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_dispatch.c") - glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_getproc.c") +if env['toolchain'] == 'crossmingw': + # compile these files without -gstabs option + glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_dispatch.c") + glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_getproc.c") - glapi = env.ConvenienceLibrary( - target = 'glapi', - source = glapi_sources, - ) - Export('glapi') +glapi = env.ConvenienceLibrary( + target = 'glapi', + source = glapi_sources, +) +Export('glapi') |