revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / mesa / src / mapi / vgapi / SConscript
blobee6d9fb827cef12aaa800035f2327b4ce7688f0b
1 #######################################################################
2 # SConscript for vgapi
4 from sys import executable as python_cmd
6 Import('*')
8 if env['platform'] != 'winddk':
10         env = env.Clone()
12         vgapi_header = env.CodeGenerate(
13                 target = '#src/mapi/vgapi/vgapi_tmp.h',
14                 script = '../mapi/mapi_abi.py',
15                 source = 'vgapi.csv',
16                 command = python_cmd + ' $SCRIPT --printer vgapi --mode lib $SOURCE > $TARGET'
17         )
19         env.Append(CPPDEFINES = [
20                 'MAPI_ABI_HEADER=\\"vgapi/vgapi_tmp.h\\"',
21                 'MAPI_DLL_EXPORTS',
22                 'KHRONOS_DLL_EXPORTS',
23         ])
25         env.Append(CPPPATH = [
26                 '#/include',
27                 '#/src/mapi',
28         ])
30         mapi_sources = [
31                 'entry.c',
32                 'mapi.c',
33                 'stub.c',
34                 'table.c',
35                 'u_current.c',
36                 'u_execmem.c',
37                 'u_thread.c',
38         ]
40         vgapi_objects = []
41         for s in mapi_sources:
42                 o = env.SharedObject(s[:-2], '../mapi/' + s)
43                 vgapi_objects.append(o)
45         env.Depends(vgapi_objects, vgapi_header)
47         # libOpenVG.dll
48         env['LIBPREFIX'] = 'lib'
49         env['SHLIBPREFIX'] = 'lib'
51         openvg = env.SharedLibrary(
52                 target = 'OpenVG',
53                 source = vgapi_objects,
54         )
56         env.InstallSharedLibrary(openvg, version=(1, 0, 0))
58         if env['platform'] == 'windows':
59             openvg = env.FindIxes(openvg, 'LIBPREFIX', 'LIBSUFFIX')
60         else:
61             openvg = env.FindIxes(openvg, 'SHLIBPREFIX', 'SHLIBSUFFIX')
63         Export(['openvg'])