summaryrefslogtreecommitdiff
path: root/src/mapi/glapi/SConscript
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-05-31 10:52:23 +0800
committerChia-I Wu <olv@lunarg.com>2010-05-31 10:53:29 +0800
commitfa97399f422c36938a66c2f9098e28a1326eecbb (patch)
tree70920e400805934439d2293079ce1f1f0c473e4b /src/mapi/glapi/SConscript
parent59f8dca7cf7ce2b21d3bfe59c55bd3927de7f39c (diff)
glapi: Update SConscript for Windows.
Define macros to enable dllexport and thread support. Adjust the output path of mapi sources.
Diffstat (limited to 'src/mapi/glapi/SConscript')
-rw-r--r--src/mapi/glapi/SConscript20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript
index 15c08255c39..27ef5adc27f 100644
--- a/src/mapi/glapi/SConscript
+++ b/src/mapi/glapi/SConscript
@@ -1,5 +1,5 @@
#######################################################################
-# SConscript for Mesa
+# SConscript for glapi
Import('*')
@@ -12,6 +12,13 @@ if env['platform'] != 'winddk':
'MAPI_GLAPI_CURRENT',
])
+ 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
+ 'WIN32_THREADS', # use Win32 thread API
+ ])
+
env.Append(CPPPATH = [
'#/src/mapi',
'#/src/mesa',
@@ -25,11 +32,14 @@ if env['platform'] != 'winddk':
'glthread.c',
]
- glapi_sources += [
- '../mapi/u_current.c',
- '../mapi/u_execmem.c',
- '../mapi/u_thread.c',
+ mapi_sources = [
+ 'u_current.c',
+ 'u_execmem.c',
+ 'u_thread.c',
]
+ for s in mapi_sources:
+ o = env.Object(s[:-2], '../mapi/' + s)
+ glapi_sources.append(o)
#
# Assembly sources