Enables building stock Mesa under the Haiku operating system.
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
opts.Add(EnumOption('platform', 'target platform', host_platform,
- allowed_values=('linux', 'windows', 'darwin', 'cygwin', 'sunos', 'freebsd8')))
+ allowed_values=('linux', 'windows', 'darwin', 'cygwin', 'sunos', 'freebsd8', 'haiku')))
opts.Add(BoolOption('embedded', 'embedded build', 'no'))
opts.Add('toolchain', 'compiler toolchain', default_toolchain)
opts.Add(BoolOption('gles', 'EXPERIMENTAL: enable OpenGL ES support', 'no'))
cppdefines += ['_DEBUG']
if platform == 'windows':
cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER']
+ if platform == 'haiku':
+ cppdefines += ['BEOS_THREADS']
if env['embedded']:
cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED']
env.Append(CPPDEFINES = cppdefines)
SConscript('mapi/vgapi/SConscript')
if not env['embedded']:
- if env['platform'] not in ['windows', 'darwin']:
+ if env['platform'] not in ['windows', 'darwin', 'haiku']:
SConscript('glx/SConscript')
- if env['platform'] not in ['darwin']:
+ if env['platform'] not in ['darwin', 'haiku']:
SConscript('egl/main/SConscript')
+ if env['platform'] not in ['darwin']:
SConscript('glu/sgi/SConscript')
if env['gles']:
# Drivers
#
+# These are common and work across all platforms
SConscript([
'drivers/galahad/SConscript',
'drivers/identity/SConscript',
- 'drivers/llvmpipe/SConscript',
'drivers/rbug/SConscript',
'drivers/softpipe/SConscript',
- 'drivers/svga/SConscript',
'drivers/trace/SConscript',
])
+# These drivers do not build on Haiku
+if env['platform'] not in ['haiku']:
+ SConscript([
+ 'drivers/llvmpipe/SConscript',
+ 'drivers/svga/SConscript',
+ ])
+
if not env['msvc']:
# These drivers do not build on MSVC compilers
SConscript([
if not env['embedded']:
SConscript('state_trackers/vega/SConscript')
- if env['platform'] not in ['darwin']:
+ if env['platform'] not in ['darwin', 'haiku']:
SConscript('state_trackers/egl/SConscript')
if env['x11']:
])
if not env['embedded']:
- if env['platform'] not in ['darwin']:
+ if env['platform'] not in ['darwin', 'haiku']:
SConscript([
'targets/egl-static/SConscript'
])
])
target = 'glu'
-glu = env.SharedLibrary(
- target = target,
- source = sources
-)
+if env['platform'] == 'haiku':
+ glu = env.StaticLibrary(
+ target = target,
+ source = sources
+ )
+else:
+ glu = env.SharedLibrary(
+ target = target,
+ source = sources
+ )
+ env.Alias('glu', env.InstallSharedLibrary(glu, version=(1, 3, 0)))
-env.Alias('glu', env.InstallSharedLibrary(glu, version=(1, 3, 0)))
if env['platform'] == 'windows':
glu = env.FindIxes(glu, 'LIBPREFIX', 'LIBSUFFIX')