summaryrefslogtreecommitdiffstats
path: root/src/mapi/glapi/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapi/glapi/SConscript')
-rw-r--r--src/mapi/glapi/SConscript72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript
new file mode 100644
index 00000000000..15c08255c39
--- /dev/null
+++ b/src/mapi/glapi/SConscript
@@ -0,0 +1,72 @@
+#######################################################################
+# SConscript for Mesa
+
+
+Import('*')
+
+if env['platform'] != 'winddk':
+
+ env = env.Clone()
+
+ env.Append(CPPDEFINES = [
+ 'MAPI_GLAPI_CURRENT',
+ ])
+
+ env.Append(CPPPATH = [
+ '#/src/mapi',
+ '#/src/mesa',
+ ])
+
+ glapi_sources = [
+ 'glapi_dispatch.c',
+ 'glapi_entrypoint.c',
+ 'glapi_getproc.c',
+ 'glapi_nop.c',
+ 'glthread.c',
+ ]
+
+ glapi_sources += [
+ '../mapi/u_current.c',
+ '../mapi/u_execmem.c',
+ '../mapi/u_thread.c',
+ ]
+
+ #
+ # Assembly sources
+ #
+ if gcc and env['machine'] == 'x86':
+ env.Append(CPPDEFINES = [
+ 'USE_X86_ASM',
+ 'USE_MMX_ASM',
+ 'USE_3DNOW_ASM',
+ 'USE_SSE_ASM',
+ ])
+ glapi_sources += [
+ 'glapi_x86.S',
+ ]
+ elif gcc and env['machine'] == 'x86_64':
+ env.Append(CPPDEFINES = [
+ 'USE_X86_64_ASM',
+ ])
+ glapi_sources += [
+ 'glapi_x86-64.S'
+ ]
+ elif gcc and env['machine'] == 'ppc':
+ env.Append(CPPDEFINES = [
+ 'USE_PPC_ASM',
+ 'USE_VMX_ASM',
+ ])
+ glapi_sources += [
+ ]
+ elif gcc and env['machine'] == 'sparc':
+ glapi_sources += [
+ 'glapi_sparc.S'
+ ]
+ else:
+ pass
+
+ glapi = env.ConvenienceLibrary(
+ target = 'glapi',
+ source = glapi_sources,
+ )
+ Export('glapi')