mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2025-02-26 13:17:47 +00:00
support an 'embedded' platform target which turns off most parts of the
build.
This commit is contained in:
parent
46f453b298
commit
dea98eb792
13
SConstruct
13
SConstruct
@ -38,6 +38,9 @@ if common.default_platform in ('linux', 'freebsd', 'darwin'):
|
||||
elif common.default_platform in ('winddk',):
|
||||
default_drivers = 'softpipe,svga,i915,i965,trace,identity'
|
||||
default_winsys = 'all'
|
||||
elif common.default_platform in ('embedded',):
|
||||
default_drivers = 'softpipe,llvmpipe'
|
||||
default_winsys = 'xlib'
|
||||
else:
|
||||
default_drivers = 'all'
|
||||
default_winsys = 'all'
|
||||
@ -83,7 +86,7 @@ platform = env['platform']
|
||||
# derived options
|
||||
x86 = machine == 'x86'
|
||||
ppc = machine == 'ppc'
|
||||
gcc = platform in ('linux', 'freebsd', 'darwin')
|
||||
gcc = platform in ('linux', 'freebsd', 'darwin', 'embedded')
|
||||
msvc = platform in ('windows', 'winddk')
|
||||
|
||||
Export([
|
||||
@ -114,7 +117,7 @@ if env['msvc']:
|
||||
|
||||
|
||||
# Posix
|
||||
if platform in ('posix', 'linux', 'freebsd', 'darwin'):
|
||||
if platform in ('posix', 'linux', 'freebsd', 'darwin', 'embedded'):
|
||||
env.Append(CPPDEFINES = [
|
||||
'_POSIX_SOURCE',
|
||||
('_POSIX_C_SOURCE', '199309L'),
|
||||
@ -132,9 +135,13 @@ if platform in ('posix', 'linux', 'freebsd', 'darwin'):
|
||||
env.Append(LIBS = [
|
||||
'm',
|
||||
'pthread',
|
||||
'expat',
|
||||
'dl',
|
||||
])
|
||||
if platform != 'embedded':
|
||||
env.Append(LIBS = [
|
||||
'expat',
|
||||
])
|
||||
|
||||
|
||||
|
||||
# DRI
|
||||
|
@ -59,9 +59,8 @@ def AddOptions(opts):
|
||||
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
|
||||
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
|
||||
opts.Add(EnumOption('platform', 'target platform', default_platform,
|
||||
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin')))
|
||||
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded')))
|
||||
opts.Add(EnumOption('toolchain', 'compiler toolchain', 'default',
|
||||
allowed_values=('default', 'crossmingw', 'winsdk', 'winddk')))
|
||||
opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
|
||||
opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))
|
||||
|
||||
|
@ -15,38 +15,39 @@ if progs_env['platform'] == 'windows':
|
||||
'gdi32',
|
||||
])
|
||||
|
||||
# OpenGL
|
||||
if progs_env['platform'] == 'windows':
|
||||
progs_env.Prepend(LIBS = ['glu32', 'opengl32'])
|
||||
else:
|
||||
progs_env.Prepend(LIBS = ['GLU', 'GL'])
|
||||
if platform != 'embedded':
|
||||
# OpenGL
|
||||
if progs_env['platform'] == 'windows':
|
||||
progs_env.Prepend(LIBS = ['glu32', 'opengl32'])
|
||||
else:
|
||||
progs_env.Prepend(LIBS = ['GLU', 'GL'])
|
||||
|
||||
# Glut
|
||||
progs_env.Prepend(LIBS = [glut])
|
||||
# Glut
|
||||
progs_env.Prepend(LIBS = [glut])
|
||||
|
||||
# GLEW
|
||||
progs_env.Prepend(LIBS = [glew])
|
||||
# GLEW
|
||||
progs_env.Prepend(LIBS = [glew])
|
||||
|
||||
progs_env.Prepend(CPPPATH = [
|
||||
'#progs/util',
|
||||
])
|
||||
progs_env.Prepend(CPPPATH = [
|
||||
'#progs/util',
|
||||
])
|
||||
|
||||
progs_env.Prepend(LIBS = [
|
||||
util,
|
||||
])
|
||||
progs_env.Prepend(LIBS = [
|
||||
util,
|
||||
])
|
||||
|
||||
Export('progs_env')
|
||||
Export('progs_env')
|
||||
|
||||
SConscript([
|
||||
'demos/SConscript',
|
||||
'glsl/SConscript',
|
||||
'redbook/SConscript',
|
||||
'samples/SConscript',
|
||||
'tests/SConscript',
|
||||
'trivial/SConscript',
|
||||
'vp/SConscript',
|
||||
'vpglsl/SConscript',
|
||||
'fp/SConscript',
|
||||
'wgl/SConscript',
|
||||
'perf/SConscript',
|
||||
])
|
||||
SConscript([
|
||||
'demos/SConscript',
|
||||
'glsl/SConscript',
|
||||
'redbook/SConscript',
|
||||
'samples/SConscript',
|
||||
'tests/SConscript',
|
||||
'trivial/SConscript',
|
||||
'vp/SConscript',
|
||||
'vpglsl/SConscript',
|
||||
'fp/SConscript',
|
||||
'wgl/SConscript',
|
||||
'perf/SConscript',
|
||||
])
|
||||
|
@ -8,5 +8,6 @@ if 'mesa' in env['statetrackers']:
|
||||
|
||||
SConscript('gallium/winsys/SConscript')
|
||||
|
||||
SConscript('glut/glx/SConscript')
|
||||
SConscript('glew/SConscript')
|
||||
if platform != 'embedded':
|
||||
SConscript('glut/glx/SConscript')
|
||||
SConscript('glew/SConscript')
|
||||
|
@ -8,9 +8,10 @@ for driver in env['drivers']:
|
||||
SConscript(os.path.join('drivers', driver, 'SConscript'))
|
||||
|
||||
SConscript('state_trackers/python/SConscript')
|
||||
SConscript('state_trackers/glx/xlib/SConscript')
|
||||
SConscript('state_trackers/dri/SConscript')
|
||||
SConscript('state_trackers/xorg/SConscript')
|
||||
if platform != 'embedded':
|
||||
SConscript('state_trackers/glx/xlib/SConscript')
|
||||
SConscript('state_trackers/dri/SConscript')
|
||||
SConscript('state_trackers/xorg/SConscript')
|
||||
|
||||
if platform == 'windows':
|
||||
SConscript('state_trackers/wgl/SConscript')
|
||||
|
Loading…
x
Reference in New Issue
Block a user