1Import('*') 2 3env = env.Clone() 4 5env.Prepend(CPPPATH = [ 6 '#src/mapi', 7 '#src/mesa', 8]) 9 10env.AppendUnique(CPPDEFINES = [ 11 '_GDI32_', # prevent wgl* being declared __declspec(dllimport) 12 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers 13]) 14if not env['gles']: 15 # prevent _glapi_* from being declared __declspec(dllimport) 16 env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS']) 17 18env.Prepend(LIBS = [ 19 glapi, 20 mesa, 21 glsl, 22 'gdi32', 23 'user32', 24 'kernel32', 25]) 26 27sources = [ 28 'mesa.def', 29 'wgl.c', 30 'wmesa.c', 31] 32 33mesagdi = env.SharedLibrary( 34 target = 'opengl32', 35 source = sources, 36) 37 38env.Alias('mesagdi', mesagdi) 39