1 #######################################################################
9 env.Append(CPPDEFINES = [
13 if env['platform'] == 'windows':
14 env.Append(CPPDEFINES = [
15 '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
16 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
19 env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS'])
21 # prevent _glapi_* from being declared __declspec(dllimport)
22 env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
24 env.Append(CPPPATH = [
42 for s in mapi_sources:
43 o = env.SharedObject(s[:-2], '../mapi/' + s)
44 glapi_sources.append(o)
49 if env['gcc'] and env['platform'] not in ('darwin', 'windows'):
50 if env['machine'] == 'x86':
51 env.Append(CPPDEFINES = [
57 elif env['machine'] == 'x86_64':
58 env.Append(CPPDEFINES = [
64 elif env['machine'] == 'sparc':
65 env.Append(CPPDEFINES = [
74 if env['toolchain'] == 'crossmingw':
75 # compile these files without -gstabs option
76 glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_dispatch.c")
77 glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_getproc.c")
79 glapi = env.ConvenienceLibrary(
81 source = glapi_sources,