scons: Aggregate all tiny libraries in a single library.
Makes integration of gallium into out of tree components much easier. No pratical change for components in this tree,
This commit is contained in:
+1
-23
@@ -2,29 +2,7 @@ import os
|
||||
|
||||
Import('*')
|
||||
|
||||
env = env.Clone()
|
||||
|
||||
auxiliaries = []
|
||||
|
||||
Export('auxiliaries')
|
||||
|
||||
|
||||
if llvm:
|
||||
SConscript(['auxiliary/gallivm/SConscript'])
|
||||
|
||||
SConscript([
|
||||
# NOTE: order matters!
|
||||
'auxiliary/util/SConscript',
|
||||
'auxiliary/rtasm/SConscript',
|
||||
'auxiliary/tgsi/SConscript',
|
||||
'auxiliary/cso_cache/SConscript',
|
||||
'auxiliary/translate/SConscript',
|
||||
'auxiliary/draw/SConscript',
|
||||
'auxiliary/pipebuffer/SConscript',
|
||||
'auxiliary/indices/SConscript',
|
||||
'auxiliary/rbug/SConscript',
|
||||
'auxiliary/vl/SConscript',
|
||||
])
|
||||
SConscript('auxiliary/SConscript')
|
||||
|
||||
for driver in env['drivers']:
|
||||
SConscript(os.path.join('drivers', driver, 'SConscript'))
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
Import('*')
|
||||
|
||||
from sys import executable as python_cmd
|
||||
|
||||
env.Append(CPPPATH = [
|
||||
'indices',
|
||||
'util',
|
||||
])
|
||||
|
||||
env.CodeGenerate(
|
||||
target = 'indices/u_indices_gen.c',
|
||||
script = 'indices/u_indices_gen.py',
|
||||
source = [],
|
||||
command = python_cmd + ' $SCRIPT > $TARGET'
|
||||
)
|
||||
|
||||
env.CodeGenerate(
|
||||
target = 'indices/u_unfilled_gen.c',
|
||||
script = 'indices/u_unfilled_gen.py',
|
||||
source = [],
|
||||
command = python_cmd + ' $SCRIPT > $TARGET'
|
||||
)
|
||||
|
||||
env.CodeGenerate(
|
||||
target = 'util/u_format_table.c',
|
||||
script = 'util/u_format_table.py',
|
||||
source = ['util/u_format.csv'],
|
||||
command = 'python $SCRIPT $SOURCE > $TARGET'
|
||||
)
|
||||
|
||||
env.CodeGenerate(
|
||||
target = 'util/u_format_access.c',
|
||||
script = 'util/u_format_access.py',
|
||||
source = ['util/u_format.csv'],
|
||||
command = 'python $SCRIPT $SOURCE > $TARGET'
|
||||
)
|
||||
|
||||
source = [
|
||||
'cso_cache/cso_context.c',
|
||||
'cso_cache/cso_cache.c',
|
||||
'cso_cache/cso_hash.c',
|
||||
'draw/draw_context.c',
|
||||
'draw/draw_pipe.c',
|
||||
'draw/draw_pipe_aaline.c',
|
||||
'draw/draw_pipe_aapoint.c',
|
||||
'draw/draw_pipe_clip.c',
|
||||
'draw/draw_pipe_cull.c',
|
||||
'draw/draw_pipe_flatshade.c',
|
||||
'draw/draw_pipe_offset.c',
|
||||
'draw/draw_pipe_pstipple.c',
|
||||
'draw/draw_pipe_stipple.c',
|
||||
'draw/draw_pipe_twoside.c',
|
||||
'draw/draw_pipe_unfilled.c',
|
||||
'draw/draw_pipe_util.c',
|
||||
'draw/draw_pipe_validate.c',
|
||||
'draw/draw_pipe_vbuf.c',
|
||||
'draw/draw_pipe_wide_line.c',
|
||||
'draw/draw_pipe_wide_point.c',
|
||||
'draw/draw_pt.c',
|
||||
'draw/draw_pt_elts.c',
|
||||
'draw/draw_pt_emit.c',
|
||||
'draw/draw_pt_fetch.c',
|
||||
'draw/draw_pt_fetch_emit.c',
|
||||
'draw/draw_pt_fetch_shade_emit.c',
|
||||
'draw/draw_pt_fetch_shade_pipeline.c',
|
||||
'draw/draw_pt_post_vs.c',
|
||||
'draw/draw_pt_util.c',
|
||||
'draw/draw_pt_varray.c',
|
||||
'draw/draw_pt_vcache.c',
|
||||
'draw/draw_vertex.c',
|
||||
'draw/draw_vs.c',
|
||||
'draw/draw_vs_aos.c',
|
||||
'draw/draw_vs_aos_io.c',
|
||||
'draw/draw_vs_aos_machine.c',
|
||||
'draw/draw_vs_exec.c',
|
||||
'draw/draw_vs_llvm.c',
|
||||
'draw/draw_vs_ppc.c',
|
||||
'draw/draw_vs_sse.c',
|
||||
'draw/draw_vs_varient.c',
|
||||
'draw/draw_gs.c',
|
||||
#'indices/u_indices.c',
|
||||
#'indices/u_unfilled_indices.c',
|
||||
'indices/u_indices_gen.c',
|
||||
'indices/u_unfilled_gen.c',
|
||||
'pipebuffer/pb_buffer_fenced.c',
|
||||
'pipebuffer/pb_buffer_malloc.c',
|
||||
'pipebuffer/pb_bufmgr_alt.c',
|
||||
'pipebuffer/pb_bufmgr_cache.c',
|
||||
'pipebuffer/pb_bufmgr_debug.c',
|
||||
'pipebuffer/pb_bufmgr_fenced.c',
|
||||
'pipebuffer/pb_bufmgr_mm.c',
|
||||
'pipebuffer/pb_bufmgr_ondemand.c',
|
||||
'pipebuffer/pb_bufmgr_pool.c',
|
||||
'pipebuffer/pb_bufmgr_slab.c',
|
||||
'pipebuffer/pb_validate.c',
|
||||
'rbug/rbug_core.c',
|
||||
'rbug/rbug_shader.c',
|
||||
'rbug/rbug_context.c',
|
||||
'rbug/rbug_texture.c',
|
||||
'rbug/rbug_demarshal.c',
|
||||
'rbug/rbug_connection.c',
|
||||
'rtasm/rtasm_cpu.c',
|
||||
'rtasm/rtasm_execmem.c',
|
||||
'rtasm/rtasm_x86sse.c',
|
||||
'rtasm/rtasm_ppc.c',
|
||||
'rtasm/rtasm_ppc_spe.c',
|
||||
'tgsi/tgsi_build.c',
|
||||
'tgsi/tgsi_dump.c',
|
||||
'tgsi/tgsi_dump_c.c',
|
||||
'tgsi/tgsi_exec.c',
|
||||
'tgsi/tgsi_info.c',
|
||||
'tgsi/tgsi_iterate.c',
|
||||
'tgsi/tgsi_parse.c',
|
||||
'tgsi/tgsi_sanity.c',
|
||||
'tgsi/tgsi_scan.c',
|
||||
'tgsi/tgsi_ppc.c',
|
||||
'tgsi/tgsi_sse2.c',
|
||||
'tgsi/tgsi_text.c',
|
||||
'tgsi/tgsi_transform.c',
|
||||
'tgsi/tgsi_ureg.c',
|
||||
'tgsi/tgsi_util.c',
|
||||
'translate/translate_generic.c',
|
||||
'translate/translate_sse.c',
|
||||
'translate/translate.c',
|
||||
'translate/translate_cache.c',
|
||||
'util/u_bitmask.c',
|
||||
'util/u_blit.c',
|
||||
'util/u_blitter.c',
|
||||
'util/u_cache.c',
|
||||
'util/u_cpu_detect.c',
|
||||
'util/u_debug.c',
|
||||
'util/u_debug_dump.c',
|
||||
'util/u_debug_memory.c',
|
||||
'util/u_debug_stack.c',
|
||||
'util/u_debug_symbol.c',
|
||||
'util/u_dl.c',
|
||||
'util/u_draw_quad.c',
|
||||
'util/u_format.c',
|
||||
'util/u_format_access.c',
|
||||
'util/u_format_table.c',
|
||||
'util/u_gen_mipmap.c',
|
||||
'util/u_handle_table.c',
|
||||
'util/u_hash.c',
|
||||
'util/u_hash_table.c',
|
||||
'util/u_keymap.c',
|
||||
'util/u_network.c',
|
||||
'util/u_math.c',
|
||||
'util/u_mm.c',
|
||||
'util/u_rect.c',
|
||||
'util/u_simple_shaders.c',
|
||||
'util/u_snprintf.c',
|
||||
'util/u_stream_stdc.c',
|
||||
'util/u_stream_wd.c',
|
||||
'util/u_surface.c',
|
||||
'util/u_texture.c',
|
||||
'util/u_tile.c',
|
||||
'util/u_time.c',
|
||||
'util/u_timed_winsys.c',
|
||||
'util/u_upload_mgr.c',
|
||||
'util/u_simple_screen.c',
|
||||
'vl/vl_bitstream_parser.c',
|
||||
'vl/vl_mpeg12_mc_renderer.c',
|
||||
'vl/vl_compositor.c',
|
||||
'vl/vl_csc.c',
|
||||
'vl/vl_shader_build.c',
|
||||
]
|
||||
|
||||
if env['llvm']:
|
||||
source += [
|
||||
'gallivm/gallivm.cpp',
|
||||
'gallivm/gallivm_cpu.cpp',
|
||||
'gallivm/instructions.cpp',
|
||||
'gallivm/loweringpass.cpp',
|
||||
'gallivm/tgsitollvm.cpp',
|
||||
'gallivm/storage.cpp',
|
||||
'gallivm/storagesoa.cpp',
|
||||
'gallivm/instructionssoa.cpp',
|
||||
]
|
||||
|
||||
gallium = env.ConvenienceLibrary(
|
||||
target = 'gallium',
|
||||
source = source,
|
||||
)
|
||||
|
||||
Export('gallium')
|
||||
@@ -1,11 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
cso_cache = env.ConvenienceLibrary(
|
||||
target = 'cso_cache',
|
||||
source = [
|
||||
'cso_context.c',
|
||||
'cso_cache.c',
|
||||
'cso_hash.c',
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, cso_cache)
|
||||
@@ -1,47 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
draw = env.ConvenienceLibrary(
|
||||
target = 'draw',
|
||||
source = [
|
||||
'draw_context.c',
|
||||
'draw_pipe.c',
|
||||
'draw_pipe_aaline.c',
|
||||
'draw_pipe_aapoint.c',
|
||||
'draw_pipe_clip.c',
|
||||
'draw_pipe_cull.c',
|
||||
'draw_pipe_flatshade.c',
|
||||
'draw_pipe_offset.c',
|
||||
'draw_pipe_pstipple.c',
|
||||
'draw_pipe_stipple.c',
|
||||
'draw_pipe_twoside.c',
|
||||
'draw_pipe_unfilled.c',
|
||||
'draw_pipe_util.c',
|
||||
'draw_pipe_validate.c',
|
||||
'draw_pipe_vbuf.c',
|
||||
'draw_pipe_wide_line.c',
|
||||
'draw_pipe_wide_point.c',
|
||||
'draw_pt.c',
|
||||
'draw_pt_elts.c',
|
||||
'draw_pt_emit.c',
|
||||
'draw_pt_fetch.c',
|
||||
'draw_pt_fetch_emit.c',
|
||||
'draw_pt_fetch_shade_emit.c',
|
||||
'draw_pt_fetch_shade_pipeline.c',
|
||||
'draw_pt_post_vs.c',
|
||||
'draw_pt_util.c',
|
||||
'draw_pt_varray.c',
|
||||
'draw_pt_vcache.c',
|
||||
'draw_vertex.c',
|
||||
'draw_vs.c',
|
||||
'draw_vs_aos.c',
|
||||
'draw_vs_aos_io.c',
|
||||
'draw_vs_aos_machine.c',
|
||||
'draw_vs_exec.c',
|
||||
'draw_vs_llvm.c',
|
||||
'draw_vs_ppc.c',
|
||||
'draw_vs_sse.c',
|
||||
'draw_vs_varient.c',
|
||||
'draw_gs.c'
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, draw)
|
||||
@@ -1,16 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
gallivm = env.ConvenienceLibrary(
|
||||
target = 'gallivm',
|
||||
source = [
|
||||
'gallivm.cpp',
|
||||
'gallivm_cpu.cpp',
|
||||
'instructions.cpp',
|
||||
'loweringpass.cpp',
|
||||
'tgsitollvm.cpp',
|
||||
'storage.cpp',
|
||||
'storagesoa.cpp',
|
||||
'instructionssoa.cpp',
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, gallivm)
|
||||
@@ -1,28 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
from sys import executable as python_cmd
|
||||
|
||||
env.CodeGenerate(
|
||||
target = 'u_indices_gen.c',
|
||||
script = 'u_indices_gen.py',
|
||||
source = [],
|
||||
command = python_cmd + ' $SCRIPT > $TARGET'
|
||||
)
|
||||
|
||||
env.CodeGenerate(
|
||||
target = 'u_unfilled_gen.c',
|
||||
script = 'u_unfilled_gen.py',
|
||||
source = [],
|
||||
command = python_cmd + ' $SCRIPT > $TARGET'
|
||||
)
|
||||
|
||||
indices = env.ConvenienceLibrary(
|
||||
target = 'indices',
|
||||
source = [
|
||||
# 'u_indices.c',
|
||||
# 'u_unfilled_indices.c',
|
||||
'u_indices_gen.c',
|
||||
'u_unfilled_gen.c',
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, indices)
|
||||
@@ -1,19 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
pipebuffer = env.ConvenienceLibrary(
|
||||
target = 'pipebuffer',
|
||||
source = [
|
||||
'pb_buffer_fenced.c',
|
||||
'pb_buffer_malloc.c',
|
||||
'pb_bufmgr_alt.c',
|
||||
'pb_bufmgr_cache.c',
|
||||
'pb_bufmgr_debug.c',
|
||||
'pb_bufmgr_fenced.c',
|
||||
'pb_bufmgr_mm.c',
|
||||
'pb_bufmgr_ondemand.c',
|
||||
'pb_bufmgr_pool.c',
|
||||
'pb_bufmgr_slab.c',
|
||||
'pb_validate.c',
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, pipebuffer)
|
||||
@@ -1,14 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
rbug = env.ConvenienceLibrary(
|
||||
target = 'rbug',
|
||||
source = [
|
||||
'rbug_core.c',
|
||||
'rbug_shader.c',
|
||||
'rbug_context.c',
|
||||
'rbug_texture.c',
|
||||
'rbug_demarshal.c',
|
||||
'rbug_connection.c',
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, rbug)
|
||||
@@ -1,13 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
rtasm = env.ConvenienceLibrary(
|
||||
target = 'rtasm',
|
||||
source = [
|
||||
'rtasm_cpu.c',
|
||||
'rtasm_execmem.c',
|
||||
'rtasm_x86sse.c',
|
||||
'rtasm_ppc.c',
|
||||
'rtasm_ppc_spe.c',
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, rtasm)
|
||||
@@ -1,23 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
tgsi = env.ConvenienceLibrary(
|
||||
target = 'tgsi',
|
||||
source = [
|
||||
'tgsi_build.c',
|
||||
'tgsi_dump.c',
|
||||
'tgsi_dump_c.c',
|
||||
'tgsi_exec.c',
|
||||
'tgsi_info.c',
|
||||
'tgsi_iterate.c',
|
||||
'tgsi_parse.c',
|
||||
'tgsi_sanity.c',
|
||||
'tgsi_scan.c',
|
||||
'tgsi_ppc.c',
|
||||
'tgsi_sse2.c',
|
||||
'tgsi_text.c',
|
||||
'tgsi_transform.c',
|
||||
'tgsi_ureg.c',
|
||||
'tgsi_util.c',
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, tgsi)
|
||||
@@ -1,12 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
translate = env.ConvenienceLibrary(
|
||||
target = 'translate',
|
||||
source = [
|
||||
'translate_generic.c',
|
||||
'translate_sse.c',
|
||||
'translate.c',
|
||||
'translate_cache.c',
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, translate)
|
||||
@@ -1,61 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
env.Clone()
|
||||
|
||||
env.Append(CPPPATH = ['.'])
|
||||
|
||||
env.CodeGenerate(
|
||||
target = 'u_format_table.c',
|
||||
script = 'u_format_table.py',
|
||||
source = ['u_format.csv'],
|
||||
command = 'python $SCRIPT $SOURCE > $TARGET'
|
||||
)
|
||||
|
||||
env.CodeGenerate(
|
||||
target = 'u_format_access.c',
|
||||
script = 'u_format_access.py',
|
||||
source = ['u_format.csv'],
|
||||
command = 'python $SCRIPT $SOURCE > $TARGET'
|
||||
)
|
||||
|
||||
util = env.ConvenienceLibrary(
|
||||
target = 'util',
|
||||
source = [
|
||||
'u_bitmask.c',
|
||||
'u_blit.c',
|
||||
'u_blitter.c',
|
||||
'u_cache.c',
|
||||
'u_cpu_detect.c',
|
||||
'u_debug.c',
|
||||
'u_debug_dump.c',
|
||||
'u_debug_memory.c',
|
||||
'u_debug_stack.c',
|
||||
'u_debug_symbol.c',
|
||||
'u_dl.c',
|
||||
'u_draw_quad.c',
|
||||
'u_format.c',
|
||||
'u_format_access.c',
|
||||
'u_format_table.c',
|
||||
'u_gen_mipmap.c',
|
||||
'u_handle_table.c',
|
||||
'u_hash.c',
|
||||
'u_hash_table.c',
|
||||
'u_keymap.c',
|
||||
'u_network.c',
|
||||
'u_math.c',
|
||||
'u_mm.c',
|
||||
'u_rect.c',
|
||||
'u_simple_shaders.c',
|
||||
'u_snprintf.c',
|
||||
'u_stream_stdc.c',
|
||||
'u_stream_wd.c',
|
||||
'u_surface.c',
|
||||
'u_texture.c',
|
||||
'u_tile.c',
|
||||
'u_time.c',
|
||||
'u_timed_winsys.c',
|
||||
'u_upload_mgr.c',
|
||||
'u_simple_screen.c',
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, util)
|
||||
@@ -1,13 +0,0 @@
|
||||
Import('*')
|
||||
|
||||
vl = env.ConvenienceLibrary(
|
||||
target = 'vl',
|
||||
source = [
|
||||
'vl_bitstream_parser.c',
|
||||
'vl_mpeg12_mc_renderer.c',
|
||||
'vl_compositor.c',
|
||||
'vl_csc.c',
|
||||
'vl_shader_build.c',
|
||||
])
|
||||
|
||||
auxiliaries.insert(0, vl)
|
||||
@@ -74,7 +74,7 @@ llvmpipe = env.ConvenienceLibrary(
|
||||
|
||||
env = env.Clone()
|
||||
|
||||
env.Prepend(LIBS = [llvmpipe] + auxiliaries)
|
||||
env.Prepend(LIBS = [llvmpipe] + gallium)
|
||||
|
||||
tests = [
|
||||
'format',
|
||||
|
||||
@@ -43,5 +43,5 @@ if 'python' in env['statetrackers']:
|
||||
source = [
|
||||
'st_hardpipe_winsys.c',
|
||||
],
|
||||
LIBS = [pyst, softpipe, trace] + auxiliaries + env['LIBS'],
|
||||
LIBS = [pyst, softpipe, trace] + gallium + env['LIBS'],
|
||||
)
|
||||
|
||||
@@ -14,6 +14,6 @@ drivers = [
|
||||
env.LoadableModule(
|
||||
target ='i965_dri.so',
|
||||
source = COMMON_GALLIUM_SOURCES,
|
||||
LIBS = drivers + mesa + auxiliaries + env['LIBS'],
|
||||
LIBS = drivers + mesa + gallium + env['LIBS'],
|
||||
SHLIBPREFIX = '',
|
||||
)
|
||||
|
||||
@@ -15,6 +15,6 @@ drivers = [
|
||||
env.LoadableModule(
|
||||
target ='i915_dri.so',
|
||||
source = COMMON_GALLIUM_SOURCES,
|
||||
LIBS = drivers + mesa + auxiliaries + env['LIBS'],
|
||||
LIBS = drivers + mesa + gallium + env['LIBS'],
|
||||
SHLIBPREFIX = '',
|
||||
)
|
||||
|
||||
@@ -13,5 +13,5 @@ drivers = [
|
||||
env.SharedLibrary(
|
||||
target ='radeon_dri.so',
|
||||
source = COMMON_GALLIUM_SOURCES,
|
||||
LIBS = st_dri + radeonwinsys + mesa + drivers + auxiliaries + env['LIBS'],
|
||||
LIBS = st_dri + radeonwinsys + mesa + drivers + gallium + env['LIBS'],
|
||||
)
|
||||
|
||||
@@ -29,5 +29,5 @@ if env['platform'] == 'linux':
|
||||
env.SharedLibrary(
|
||||
target ='_gallium',
|
||||
source = sources,
|
||||
LIBS = [pyst] + drivers + auxiliaries + env['LIBS'],
|
||||
LIBS = [pyst] + drivers + gallium + env['LIBS'],
|
||||
)
|
||||
|
||||
@@ -48,7 +48,7 @@ if env['platform'] == 'linux':
|
||||
svgadrm,
|
||||
svga,
|
||||
mesa,
|
||||
auxiliaries,
|
||||
gallium,
|
||||
])
|
||||
|
||||
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
|
||||
|
||||
@@ -38,7 +38,7 @@ if env['platform'] == 'linux':
|
||||
st_xorg,
|
||||
svgadrm,
|
||||
svga,
|
||||
auxiliaries,
|
||||
gallium,
|
||||
])
|
||||
|
||||
sources = [
|
||||
|
||||
@@ -45,5 +45,5 @@ if env['platform'] == 'windows':
|
||||
env.SharedLibrary(
|
||||
target ='opengl32',
|
||||
source = sources,
|
||||
LIBS = wgl + glapi + mesa + drivers + auxiliaries + glsl + env['LIBS'],
|
||||
LIBS = wgl + glapi + mesa + drivers + gallium + glsl + env['LIBS'],
|
||||
)
|
||||
|
||||
@@ -46,7 +46,7 @@ if env['platform'] == 'linux' \
|
||||
libgl = env.SharedLibrary(
|
||||
target ='GL',
|
||||
source = sources,
|
||||
LIBS = st_xlib + glapi + mesa + glsl + drivers + auxiliaries + env['LIBS'],
|
||||
LIBS = st_xlib + glapi + mesa + glsl + drivers + gallium + env['LIBS'],
|
||||
)
|
||||
|
||||
env.InstallSharedLibrary(libgl, version=(1, 5))
|
||||
|
||||
Reference in New Issue
Block a user