Commit 33ceb671 authored by José Fonseca's avatar José Fonseca

Update scons build for new code layout.

parent 9df478d2
......@@ -108,7 +108,10 @@ env.Append(CPPPATH = [
'#/include',
'#/src/mesa',
'#/src/mesa/main',
'#/src/mesa/pipe',
'#/src/gallium/include/pipe',
'#/src/gallium/include',
'#/src/gallium/auxiliary',
'#/src/gallium/drivers',
])
......@@ -222,7 +225,7 @@ build_dir = os.path.join(build_topdir, build_subdir)
# http://www.scons.org/wiki/SimultaneousVariantBuilds
SConscript(
'src/mesa/SConscript',
'src/SConscript',
build_dir = build_dir,
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
)
Import('*')
SConscript([
'gallium/SConscript',
'mesa/SConscript',
'gallium/winsys/SConscript',
])
Import('*')
#env = env.Clone()
env = env.Clone()
auxiliaries = []
Export('auxiliaries')
SConscript([
'softpipe/SConscript',
'i915simple/SConscript',
'i965simple/SConscript',
# NOTE: order matters!
'auxiliary/util/SConscript',
'auxiliary/tgsi/SConscript',
'auxiliary/cso_cache/SConscript',
'auxiliary/draw/SConscript',
#'auxiliary/llvm/SConscript',
'auxiliary/pipebuffer/SConscript',
'drivers/softpipe/SConscript',
'drivers/i915simple/SConscript',
'drivers/i965simple/SConscript',
'drivers/failover/SConscript',
#'drivers/cell/SConscript',
])
Import('*')
cso_cache = env.ConvenienceLibrary(
target = 'cso_cache',
source = [
'cso_cache.c',
'cso_hash.c',
])
auxiliaries.insert(0, cso_cache)
Import('*')
draw = env.ConvenienceLibrary(
target = 'draw',
source = [
'draw_clip.c',
'draw_vs_exec.c',
'draw_vs_sse.c',
'draw_vs_llvm.c',
'draw_context.c',
'draw_cull.c',
'draw_debug.c',
'draw_flatshade.c',
'draw_offset.c',
'draw_prim.c',
'draw_stipple.c',
'draw_twoside.c',
'draw_unfilled.c',
'draw_validate.c',
'draw_vbuf.c',
'draw_vertex.c',
'draw_vertex_cache.c',
'draw_vertex_fetch.c',
'draw_vertex_shader.c',
'draw_vf.c',
'draw_vf_generic.c',
'draw_vf_sse.c',
'draw_wide_prims.c',
])
auxiliaries.insert(0, draw)
Import('*')
pipebuffer = env.ConvenienceLibrary(
target = 'pipebuffer',
source = [
'pb_buffer_fenced.c',
'pb_buffer_malloc.c',
'pb_bufmgr_fenced.c',
'pb_bufmgr_mm.c',
'pb_bufmgr_pool.c',
'pb_winsys.c',
])
auxiliaries.insert(0, pipebuffer)
Import('*')
tgsi = env.ConvenienceLibrary(
target = 'tgsi',
source = [
'exec/tgsi_exec.c',
'exec/tgsi_sse2.c',
'util/tgsi_build.c',
'util/tgsi_dump.c',
'util/tgsi_parse.c',
'util/tgsi_util.c',
])
auxiliaries.insert(0, tgsi)
Import('*')
util = env.ConvenienceLibrary(
target = 'util',
source = [
'p_debug.c',
'p_tile.c',
'p_util.c',
])
auxiliaries.insert(0, util)
Import('*')
env = env.Clone()
failover = env.ConvenienceLibrary(
target = 'failover',
source = [
'fo_state.c',
'fo_state_emit.c',
'fo_context.c',
])
Export('failover')
Import('*')
if dri:
SConscript([
'dri/SConscript',
])
else:
SConscript([
'xlib/SConscript',
])
......@@ -6,6 +6,9 @@ drienv.Replace(CPPPATH = [
'#src/mesa/drivers/dri/common',
'#include',
'#include/GL/internal',
'#src/gallium/include',
'#src/gallium/auxiliary',
'#src/gallium/drivers',
'#src/mesa',
'#src/mesa/main',
'#src/mesa/glapi',
......@@ -21,15 +24,15 @@ drienv.Replace(CPPPATH = [
drienv.ParseConfig('pkg-config --cflags --libs libdrm')
COMMON_GALLIUM_SOURCES = [
'../common/utils.c',
'../common/vblank.c',
'../common/dri_util.c',
'../common/xmlconfig.c',
'#src/mesa/drivers/dri/common/utils.c',
'#src/mesa/drivers/dri/common/vblank.c',
'#src/mesa/drivers/dri/common/dri_util.c',
'#src/mesa/drivers/dri/common/xmlconfig.c',
]
COMMON_BM_SOURCES = [
'../common/dri_bufmgr.c',
'../common/dri_drmpool.c',
'#src/mesa/drivers/dri/common/dri_bufmgr.c',
'#src/mesa/drivers/dri/common/dri_drmpool.c',
]
Export([
......@@ -44,5 +47,5 @@ Export([
# $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
SConscript([
'intel_winsys/SConscript',
'intel/SConscript',
])
......@@ -9,11 +9,6 @@ env.Append(CPPPATH = [
#MINIGLX_SOURCES = server/intel_dri.c
pipe_drivers = [
softpipe,
i915simple
]
DRIVER_SOURCES = [
'intel_winsys_pipe.c',
'intel_winsys_softpipe.c',
......@@ -31,11 +26,14 @@ sources = \
COMMON_BM_SOURCES + \
DRIVER_SOURCES
# DRIVER_DEFINES = -I../intel $(shell pkg-config libdrm --atleast-version=2.3.1 \
# && echo "-DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP")
drivers = [
softpipe,
i915simple
]
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
env.SharedLibrary(
target ='i915tex_dri.so',
source = sources,
LIBS = pipe_drivers + env['LIBS'],
LIBS = mesa + drivers + auxiliaries + env['LIBS'],
)
\ No newline at end of file
#######################################################################
# SConscript for xlib winsys
Import('*')
sources = [
'glxapi.c',
'fakeglx.c',
'xfonts.c',
'xm_api.c',
'xm_winsys.c',
'xm_winsys_aub.c',
'brw_aub.c',
]
drivers = [
softpipe,
i915simple,
i965simple,
]
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
env.SharedLibrary(
target ='GL',
source = sources,
LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'],
)
#######################################################################
# SConscript for mesa
#
# TODO: Split this into per-module SConscripts
# SConscript for Mesa
Import('*')
......@@ -116,53 +114,6 @@ VF_SOURCES = [
'vf/vf_sse.c',
]
DRAW_SOURCES = [
'pipe/draw/draw_clip.c',
'pipe/draw/draw_context.c',
'pipe/draw/draw_cull.c',
'pipe/draw/draw_debug.c',
'pipe/draw/draw_flatshade.c',
'pipe/draw/draw_offset.c',
'pipe/draw/draw_prim.c',
'pipe/draw/draw_stipple.c',
'pipe/draw/draw_twoside.c',
'pipe/draw/draw_unfilled.c',
'pipe/draw/draw_validate.c',
'pipe/draw/draw_vbuf.c',
'pipe/draw/draw_vertex.c',
'pipe/draw/draw_vertex_cache.c',
'pipe/draw/draw_vertex_fetch.c',
'pipe/draw/draw_vertex_shader.c',
'pipe/draw/draw_vertex_shader_llvm.c',
'pipe/draw/draw_vf.c',
'pipe/draw/draw_vf_generic.c',
'pipe/draw/draw_vf_sse.c',
'pipe/draw/draw_wide_prims.c',
]
TGSIEXEC_SOURCES = [
'pipe/tgsi/exec/tgsi_exec.c',
'pipe/tgsi/exec/tgsi_sse2.c',
]
TGSIUTIL_SOURCES = [
'pipe/tgsi/util/tgsi_build.c',
'pipe/tgsi/util/tgsi_dump.c',
'pipe/tgsi/util/tgsi_parse.c',
'pipe/tgsi/util/tgsi_util.c',
]
STATECACHE_SOURCES = [
'pipe/cso_cache/cso_hash.c',
'pipe/cso_cache/cso_cache.c',
]
PIPEUTIL_SOURCES = [
'pipe/util/p_debug.c',
'pipe/util/p_tile.c',
'pipe/util/p_util.c',
]
STATETRACKER_SOURCES = [
'state_tracker/st_atom.c',
'state_tracker/st_atom_blend.c',
......@@ -311,126 +262,25 @@ else:
ASM_SOURCES = []
API_SOURCES = []
#######################################################################
# Driver sources
X11_DRIVER_SOURCES = [
'pipe/xlib/glxapi.c',
'pipe/xlib/fakeglx.c',
'pipe/xlib/xfonts.c',
'pipe/xlib/xm_api.c',
'pipe/xlib/xm_winsys.c',
'pipe/xlib/xm_winsys_aub.c',
'pipe/xlib/brw_aub.c',
]
OSMESA_DRIVER_SOURCES = [
'drivers/osmesa/osmesa.c',
]
GLIDE_DRIVER_SOURCES = [
'drivers/glide/fxapi.c',
'drivers/glide/fxdd.c',
'drivers/glide/fxddspan.c',
'drivers/glide/fxddtex.c',
'drivers/glide/fxsetup.c',
'drivers/glide/fxtexman.c',
'drivers/glide/fxtris.c',
'drivers/glide/fxvb.c',
'drivers/glide/fxglidew.c',
'drivers/glide/fxg.c',
]
SVGA_DRIVER_SOURCES = [
'drivers/svga/svgamesa.c',
'drivers/svga/svgamesa8.c',
'drivers/svga/svgamesa15.c',
'drivers/svga/svgamesa16.c',
'drivers/svga/svgamesa24.c',
'drivers/svga/svgamesa32.c',
]
FBDEV_DRIVER_SOURCES = [
'drivers/fbdev/glfbdev.c',
]
### All the core C sources
SOLO_SOURCES = \
MAIN_SOURCES + \
MATH_SOURCES + \
VBO_SOURCES + \
VF_SOURCES + \
DRAW_SOURCES + \
TGSIEXEC_SOURCES + \
TGSIUTIL_SOURCES + \
PIPEUTIL_SOURCES + \
STATECACHE_SOURCES + \
STATETRACKER_SOURCES + \
SHADER_SOURCES + \
ASM_SOURCES + \
SLANG_SOURCES
CORE_SOURCES = \
GLAPI_SOURCES + API_SOURCES + \
SOLO_SOURCES
ALL_SOURCES = \
GLAPI_SOURCES + API_SOURCES + \
SOLO_SOURCES + \
ASM_SOURCES + \
X11_DRIVER_SOURCES + \
FBDEV_DRIVER_SOURCES + \
OSMESA_DRIVER_SOURCES
######################################################################
# Gallium sources
SConscript([
'pipe/SConscript',
])
######################################################################
# libGL
mesa = env.ConvenienceLibrary(
target = 'mesa',
source = SOLO_SOURCES,
)
Export('mesa')
if not dri:
STAND_ALONE_DRIVER_SOURCES = \
CORE_SOURCES + \
X11_DRIVER_SOURCES
Import(
'softpipe',
'i915simple',
'i965simple'
glapi = env.ConvenienceLibrary(
target = 'glapi',
source = GLAPI_SOURCES + API_SOURCES,
)
pipe_drivers = [
softpipe,
i965simple
]
env.SharedLibrary(
target ='GL',
source = STAND_ALONE_DRIVER_SOURCES,
LIBS = [softpipe, i965simple] + env['LIBS'],
)
######################################################################
# Driver sources
if dri:
mesa = env.ConvenienceLibrary(
target = 'mesa',
source = SOLO_SOURCES,
)
env.Prepend(LIBS = [mesa])
SConscript([
'drivers/dri/SConscript',
])
Export('glapi')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment