glapi: Force frame pointer elimination on Windows.
[mesa.git] / src / mapi / glapi / SConscript
index c4ac080aaa85eb7f591cad16a3133eb6182096e2..97ebfe638aeca58afc269ff703e3570242c9e6de 100644 (file)
@@ -16,6 +16,7 @@ if env['platform'] == 'windows':
     env.Append(CPPDEFINES = [
         '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
         'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
+        'KHRONOS_DLL_EXPORTS', # declare gl* as __declspec(dllexport) in Khronos headers
     ])
     if env['gles']:
         env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS'])
@@ -34,7 +35,6 @@ glapi_sources = [
     'glapi_entrypoint.c',
     'glapi_getproc.c',
     'glapi_nop.c',
-    'glthread.c',
     'glapi.c',
 ]
 
@@ -52,6 +52,7 @@ for s in mapi_sources:
 if (env['gcc'] or env['clang']) and \
    env['platform'] not in ('cygwin', 'darwin', 'windows'):
     GLAPI = '#src/mapi/glapi/'
+    sources = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml')
 
     if env['machine'] == 'x86':
         env.Append(CPPDEFINES = [
@@ -63,7 +64,7 @@ if (env['gcc'] or env['clang']) and \
         env.CodeGenerate(
             target = 'glapi_x86.S',
             script = GLAPI + 'gen/gl_x86_asm.py',
-            source = GLAPI + 'gen/gl_and_es_API.xml',
+            source = sources,
             command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
             )
     elif env['machine'] == 'x86_64':
@@ -76,7 +77,7 @@ if (env['gcc'] or env['clang']) and \
         env.CodeGenerate(
             target = 'glapi_x86-64.S',
             script = GLAPI + 'gen/gl_x86-64_asm.py',
-            source = GLAPI + 'gen/gl_and_es_API.xml',
+            source = sources,
             command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
             )
     elif env['machine'] == 'sparc':
@@ -89,7 +90,7 @@ if (env['gcc'] or env['clang']) and \
         env.CodeGenerate(
             target = 'glapi_sparc.S',
             script = GLAPI + 'gen/gl_SPARC_asm.py',
-            source = GLAPI + 'gen/gl_and_es_API.xml',
+            source = sources,
             command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
             )
     else: