Import('*')
-if env['platform'] in ['windows']:
-
- env = env.Clone()
-
- env.Append(CPPPATH = [
- '#src/mesa',
- '.',
- ])
-
- env.Append(CPPDEFINES = [
- '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
- 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
- 'WIN32_THREADS', # use Win32 thread API
- ])
-
- sources = [
- 'icd/stw_icd.c',
+env = env.Clone()
- 'wgl/stw_wgl.c',
+env.Append(CPPPATH = [
+ '#src/mapi',
+ '#src/mesa',
+ '.',
+])
- 'shared/stw_context.c',
- 'shared/stw_device.c',
- 'shared/stw_framebuffer.c',
- 'shared/stw_pixelformat.c',
- 'shared/stw_extensionsstring.c',
- 'shared/stw_extswapinterval.c',
- 'shared/stw_getprocaddress.c',
- 'shared/stw_extgallium.c',
- 'shared/stw_arbpixelformat.c',
- 'shared/stw_tls.c',
- ]
+env.AppendUnique(CPPDEFINES = [
+ '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
+ 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
+ 'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
+ '_GLAPI_NO_EXPORTS', # prevent _glapi_* from being declared __declspec(dllimport)
+])
- wgl = env.ConvenienceLibrary(
- target ='wgl',
- source = sources,
- )
-
- Export('wgl')
+wgl = env.ConvenienceLibrary(
+ target ='wgl',
+ source = env.ParseSourceList('Makefile.sources', 'C_SOURCES'),
+)
+Export('wgl')