])
if not env['embedded']:
+ SConscript([
+ 'state_trackers/osmesa/SConscript',
+ 'targets/osmesa/SConscript',
+ ])
+
if env['x11']:
SConscript([
'state_trackers/glx/xlib/SConscript',
noinst_LTLIBRARIES = libosmesa.la
libosmesa_la_SOURCES = $(C_SOURCES)
+
+EXTRA_DIST = SConscript
--- /dev/null
+import os
+
+Import('*')
+
+env = env.Clone()
+
+env.Append(CPPPATH = [
+ '#src/mapi',
+ '#src/mesa',
+ '.',
+])
+
+if env['platform'] == 'windows':
+ env.AppendUnique(CPPDEFINES = [
+ 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
+ 'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
+ ])
+ if not env['gles']:
+ # prevent _glapi_* from being declared __declspec(dllimport)
+ env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
+
+st_osmesa = env.ConvenienceLibrary(
+ target ='st_osmesa',
+ source = env.ParseSourceList('Makefile.sources', 'C_SOURCES'),
+)
+Export('st_osmesa')
endif
EXTRA_lib@OSMESA_LIB@_la_DEPENDENCIES = osmesa.sym
-EXTRA_DIST = osmesa.sym
+EXTRA_DIST = \
+ osmesa.sym \
+ osmesa.def \
+ osmesa.mingw.def \
+ SConscript
include $(top_srcdir)/install-gallium-links.mk
--- /dev/null
+Import('*')
+
+env = env.Clone()
+
+env.Prepend(CPPPATH = [
+ '#src/mapi',
+ '#src/mesa',
+ #Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
+])
+
+env.Prepend(LIBS = [
+ st_osmesa,
+ ws_null,
+ glapi,
+ mesa,
+ gallium,
+ trace,
+ glsl,
+ mesautil,
+ softpipe
+])
+
+env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_SOFTPIPE'])
+
+sources = ['target.c']
+
+if env['llvm']:
+ env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
+ env.Prepend(LIBS = [llvmpipe])
+
+if env['platform'] == 'windows':
+ if env['gcc'] and env['machine'] != 'x86_64':
+ sources += ['osmesa.mingw.def']
+ else:
+ sources += ['osmesa.def']
+
+gallium_osmesa = env.SharedLibrary(
+ target ='osmesa',
+ source = sources,
+ LIBS = env['LIBS'],
+)
+
+env.Alias('osmesa', gallium_osmesa)
--- /dev/null
+;DESCRIPTION 'Mesa OSMesa lib for Win32'
+VERSION 4.1
+
+EXPORTS
+ OSMesaCreateContext
+ OSMesaCreateContextExt
+ OSMesaDestroyContext
+ OSMesaMakeCurrent
+ OSMesaGetCurrentContext
+ OSMesaPixelStore
+ OSMesaGetIntegerv
+ OSMesaGetDepthBuffer
+ OSMesaGetColorBuffer
+ OSMesaGetProcAddress
+ OSMesaColorClamp
+ OSMesaPostprocess
--- /dev/null
+EXPORTS
+ OSMesaCreateContext = OSMesaCreateContext@8
+ OSMesaCreateContextExt = OSMesaCreateContextExt@20
+ OSMesaDestroyContext = OSMesaDestroyContext@4
+ OSMesaMakeCurrent = OSMesaMakeCurrent@20
+ OSMesaGetCurrentContext = OSMesaGetCurrentContext@0
+ OSMesaPixelStore = OSMesaPixelStore@8
+ OSMesaGetIntegerv = OSMesaGetIntegerv@8
+ OSMesaGetDepthBuffer = OSMesaGetDepthBuffer@20
+ OSMesaGetColorBuffer = OSMesaGetColorBuffer@20
+ OSMesaGetProcAddress = OSMesaGetProcAddress@4
+ OSMesaColorClamp = OSMesaColorClamp@4
+ OSMesaPostprocess = OSMesaPostprocess@12