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 = [
43 for s in mapi_sources:
44 o = env.SharedObject(s[:-2], '../mapi/' + s)
45 glapi_sources.append(o)
50 if env['gcc'] and env['platform'] != 'windows':
51 if env['machine'] == 'x86':
52 env.Append(CPPDEFINES = [
58 elif env['machine'] == 'x86_64':
59 env.Append(CPPDEFINES = [
65 elif env['machine'] == 'sparc':
66 env.Append(CPPDEFINES = [
75 if env['toolchain'] == 'crossmingw':
76 # compile these files without -gstabs option
77 glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_dispatch.c")
78 glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_getproc.c")
80 glapi = env.ConvenienceLibrary(
82 source = glapi_sources,