summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-02-18 10:52:44 +0000
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-02-18 10:52:44 +0000
commit33ceb6716a2166db75659fa66d85fb4cfb9633c7 (patch)
treeedc306739c44982bd932caf16d9622755b36e0e7 /src
parent9df478d2f8269a439024fadf82170814d24acd19 (diff)
Update scons build for new code layout.
Diffstat (limited to 'src')
-rw-r--r--src/SConscript7
-rw-r--r--src/gallium/SConscript23
-rw-r--r--src/gallium/auxiliary/cso_cache/SConscript10
-rw-r--r--src/gallium/auxiliary/draw/SConscript31
-rw-r--r--src/gallium/auxiliary/pipebuffer/SConscript14
-rw-r--r--src/gallium/auxiliary/tgsi/SConscript14
-rw-r--r--src/gallium/auxiliary/util/SConscript11
-rw-r--r--src/gallium/drivers/failover/SConscript13
-rw-r--r--src/gallium/winsys/SConscript10
-rw-r--r--src/gallium/winsys/dri/SConscript (renamed from src/mesa/drivers/dri/SConscript)17
-rw-r--r--src/gallium/winsys/dri/intel/SConscript14
-rw-r--r--src/gallium/winsys/xlib/SConscript28
-rw-r--r--src/mesa/SConscript170
13 files changed, 183 insertions, 179 deletions
diff --git a/src/SConscript b/src/SConscript
new file mode 100644
index 0000000000..5b09943894
--- /dev/null
+++ b/src/SConscript
@@ -0,0 +1,7 @@
+Import('*')
+
+SConscript([
+ 'gallium/SConscript',
+ 'mesa/SConscript',
+ 'gallium/winsys/SConscript',
+])
diff --git a/src/gallium/SConscript b/src/gallium/SConscript
index d9c20e0100..a835f6d661 100644
--- a/src/gallium/SConscript
+++ b/src/gallium/SConscript
@@ -1,9 +1,24 @@
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',
])
diff --git a/src/gallium/auxiliary/cso_cache/SConscript b/src/gallium/auxiliary/cso_cache/SConscript
new file mode 100644
index 0000000000..9751881613
--- /dev/null
+++ b/src/gallium/auxiliary/cso_cache/SConscript
@@ -0,0 +1,10 @@
+Import('*')
+
+cso_cache = env.ConvenienceLibrary(
+ target = 'cso_cache',
+ source = [
+ 'cso_cache.c',
+ 'cso_hash.c',
+ ])
+
+auxiliaries.insert(0, cso_cache)
diff --git a/src/gallium/auxiliary/draw/SConscript b/src/gallium/auxiliary/draw/SConscript
new file mode 100644
index 0000000000..8e3a8caa74
--- /dev/null
+++ b/src/gallium/auxiliary/draw/SConscript
@@ -0,0 +1,31 @@
+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)
diff --git a/src/gallium/auxiliary/pipebuffer/SConscript b/src/gallium/auxiliary/pipebuffer/SConscript
new file mode 100644
index 0000000000..3d41fd84a6
--- /dev/null
+++ b/src/gallium/auxiliary/pipebuffer/SConscript
@@ -0,0 +1,14 @@
+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)
diff --git a/src/gallium/auxiliary/tgsi/SConscript b/src/gallium/auxiliary/tgsi/SConscript
new file mode 100644
index 0000000000..8464bfe944
--- /dev/null
+++ b/src/gallium/auxiliary/tgsi/SConscript
@@ -0,0 +1,14 @@
+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)
diff --git a/src/gallium/auxiliary/util/SConscript b/src/gallium/auxiliary/util/SConscript
new file mode 100644
index 0000000000..b126cf44d6
--- /dev/null
+++ b/src/gallium/auxiliary/util/SConscript
@@ -0,0 +1,11 @@
+Import('*')
+
+util = env.ConvenienceLibrary(
+ target = 'util',
+ source = [
+ 'p_debug.c',
+ 'p_tile.c',
+ 'p_util.c',
+ ])
+
+auxiliaries.insert(0, util)
diff --git a/src/gallium/drivers/failover/SConscript b/src/gallium/drivers/failover/SConscript
new file mode 100644
index 0000000000..f8e9b1b491
--- /dev/null
+++ b/src/gallium/drivers/failover/SConscript
@@ -0,0 +1,13 @@
+Import('*')
+
+env = env.Clone()
+
+failover = env.ConvenienceLibrary(
+ target = 'failover',
+ source = [
+ 'fo_state.c',
+ 'fo_state_emit.c',
+ 'fo_context.c',
+ ])
+
+Export('failover')
diff --git a/src/gallium/winsys/SConscript b/src/gallium/winsys/SConscript
new file mode 100644
index 0000000000..32215d8d58
--- /dev/null
+++ b/src/gallium/winsys/SConscript
@@ -0,0 +1,10 @@
+Import('*')
+
+if dri:
+ SConscript([
+ 'dri/SConscript',
+ ])
+else:
+ SConscript([
+ 'xlib/SConscript',
+ ])
diff --git a/src/mesa/drivers/dri/SConscript b/src/gallium/winsys/dri/SConscript
index d32bd08669..8c56ce917c 100644
--- a/src/mesa/drivers/dri/SConscript
+++ b/src/gallium/winsys/dri/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',
])
diff --git a/src/gallium/winsys/dri/intel/SConscript b/src/gallium/winsys/dri/intel/SConscript
index a7cc10450e..525ba580e8 100644
--- a/src/gallium/winsys/dri/intel/SConscript
+++ b/src/gallium/winsys/dri/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
diff --git a/src/gallium/winsys/xlib/SConscript b/src/gallium/winsys/xlib/SConscript
new file mode 100644
index 0000000000..f8aa5ef945
--- /dev/null
+++ b/src/gallium/winsys/xlib/SConscript
@@ -0,0 +1,28 @@
+#######################################################################
+# 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'],
+)
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index faf8c84872..a828133580 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -1,7 +1,5 @@
#######################################################################
-# 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')