summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-05-31 12:37:23 +0800
committerChia-I Wu <olv@lunarg.com>2010-05-31 13:27:53 +0800
commit60558b1594e864ce8d44f2fe910075f2e47a164f (patch)
tree035e36277a4ddc70e0784965ad3325d495361a69 /src
parentf6f9d1014b400ac72e463a892c6ae268a31fe26d (diff)
mapi/vgapi: Add SConscript for Windows build.
Diffstat (limited to 'src')
-rw-r--r--src/SConscript1
-rw-r--r--src/mapi/vgapi/SConscript55
2 files changed, 56 insertions, 0 deletions
diff --git a/src/SConscript b/src/SConscript
index b8a0024812..9eda35e7c5 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -4,6 +4,7 @@ SConscript('glsl/SConscript')
SConscript('mapi/glapi/SConscript')
if 'egl' in env['statetrackers']:
+ SConscript('mapi/vgapi/SConscript')
SConscript('egl/main/SConscript')
if 'mesa' in env['statetrackers']:
diff --git a/src/mapi/vgapi/SConscript b/src/mapi/vgapi/SConscript
new file mode 100644
index 0000000000..f000c6105b
--- /dev/null
+++ b/src/mapi/vgapi/SConscript
@@ -0,0 +1,55 @@
+#######################################################################
+# SConscript for vgapi
+
+from sys import executable as python_cmd
+
+Import('*')
+
+if env['platform'] != 'winddk':
+
+ env = env.Clone()
+
+ vgapi_header = env.CodeGenerate(
+ target = '#src/mapi/vgapi/vgapi_tmp.h',
+ script = '../mapi/mapi_abi.py',
+ source = 'vgapi.csv',
+ command = python_cmd + ' $SCRIPT -i vgapi/vgapi_defines.h $SOURCE > $TARGET'
+ )
+
+ env.Append(CPPDEFINES = [
+ 'MAPI_ABI_HEADER=\\"vgapi/vgapi_tmp.h\\"',
+ 'KHRONOS_DLL_EXPORTS',
+ ])
+
+ env.Append(CPPPATH = [
+ '#/include',
+ '#/src/mapi',
+ ])
+
+ mapi_sources = [
+ 'entry.c',
+ 'mapi.c',
+ 'stub.c',
+ 'table.c',
+ 'u_current.c',
+ 'u_execmem.c',
+ 'u_thread.c',
+ ]
+
+ vgapi_objects = []
+ for s in mapi_sources:
+ o = env.Object(s[:-2], '../mapi/' + s)
+ vgapi_objects.append(o)
+
+ env.Depends(vgapi_objects, vgapi_header)
+
+ openvg = env.SharedLibrary(
+ target = 'libOpenVG',
+ source = vgapi_objects,
+ )
+
+ env.InstallSharedLibrary(openvg, version=(1, 0, 0))
+
+ vgapi = [env.FindIxes(openvg, 'LIBPREFIX', 'LIBSUFFIX')]
+
+ Export(['vgapi', 'vgapi_header'])