summaryrefslogtreecommitdiffstats
path: root/configs
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-09-11 16:05:15 +0100
committerKeith Whitwell <[email protected]>2008-09-11 16:05:15 +0100
commit0397b2bb41b0f337af2949a15bcd7d0e7e8a7dc1 (patch)
tree732c93d74ed806942a13bf15575a61aa4f001253 /configs
parent80af50b35b5a4e8890e15b28940576f8a1ac1476 (diff)
parente6887a5752774c18cf527477fdd3e57e4893ff3b (diff)
Merge branch 'gallium-0.1' into gallium-0.2
A first attempt at moving gallium onto a branch directly off master... It will be interesting to see how much work this takes to get running. Have resolved the conflicts semi-arbitarily, not compiled or tested. Conflicts: .gitignore Makefile configs/config.mgw configs/darwin configs/darwin-x86ppc configs/default configs/freebsd-dri configs/linux-dri configs/linux-dri-xcb configs/linux-fbdev configs/linux-static configs/linux-x86-64-static configs/linux-x86-static doxygen/Makefile include/GL/gl.h progs/demos/Makefile progs/demos/descrip.mms progs/demos/texenv.c progs/egl/.gitignore progs/egl/Makefile progs/glsl/.gitignore progs/glsl/Makefile progs/glsl/convolutions.c progs/samples/Makefile.mgw progs/tests/.gitignore progs/trivial/.gitignore progs/trivial/point-param.c progs/trivial/tri.c progs/xdemos/.gitignore progs/xdemos/glthreads.c src/egl/drivers/demo/Makefile src/egl/drivers/dri/Makefile src/egl/main/Makefile src/glu/Makefile src/glu/sgi/Makefile src/glu/sgi/Makefile.mgw src/glut/glx/Makefile.mgw src/glut/os2/WarpWin.cpp src/glut/os2/glut_cindex.cpp src/glut/os2/glut_gamemode.cpp src/glut/os2/glut_win.cpp src/glut/os2/glut_winmisc.cpp src/glut/os2/os2_glx.cpp src/glut/os2/os2_menu.cpp src/glut/os2/os2_winproc.cpp src/glw/Makefile src/glx/x11/dri_glx.c src/glx/x11/glxext.c src/mesa/Makefile src/mesa/Makefile.mgw src/mesa/descrip.mms src/mesa/drivers/beos/Makefile src/mesa/drivers/common/descrip.mms src/mesa/drivers/common/driverfuncs.c src/mesa/drivers/directfb/Makefile src/mesa/drivers/dri/Makefile.template src/mesa/drivers/dri/common/dri_bufmgr.c src/mesa/drivers/dri/common/dri_bufmgr.h src/mesa/drivers/dri/common/dri_util.c src/mesa/drivers/dri/common/extension_helper.h src/mesa/drivers/dri/common/mmio.h src/mesa/drivers/dri/common/utils.c src/mesa/drivers/dri/common/utils.h src/mesa/drivers/dri/glcore/Makefile src/mesa/drivers/dri/i810/i810screen.c src/mesa/drivers/dri/i915/intel_ioctl.c src/mesa/drivers/dri/i915/intel_ioctl.h src/mesa/drivers/dri/i915/intel_screen.c src/mesa/drivers/dri/i915/server/i830_common.h src/mesa/drivers/dri/i915/server/i830_dri.h src/mesa/drivers/dri/i965/intel_screen.c src/mesa/drivers/dri/i965/server/i830_common.h src/mesa/drivers/dri/i965/server/i830_dri.h src/mesa/drivers/dri/mach64/mach64_screen.c src/mesa/drivers/dri/nouveau/nouveau_context.h src/mesa/drivers/dri/nouveau/nouveau_fifo.c src/mesa/drivers/dri/nouveau/nouveau_fifo.h src/mesa/drivers/dri/nouveau/nouveau_screen.c src/mesa/drivers/dri/nouveau/nouveau_screen.h src/mesa/drivers/dri/r128/r128_tex.h src/mesa/drivers/dri/savage/savageioctl.h src/mesa/drivers/fbdev/Makefile src/mesa/drivers/osmesa/Makefile src/mesa/drivers/osmesa/descrip.mms src/mesa/drivers/x11/Makefile src/mesa/drivers/x11/descrip.mms src/mesa/drivers/x11/xm_dd.c src/mesa/glapi/glapi.c src/mesa/glapi/glthread.c src/mesa/main/api_validate.c src/mesa/main/attrib.c src/mesa/main/bufferobj.c src/mesa/main/bufferobj.h src/mesa/main/buffers.c src/mesa/main/config.h src/mesa/main/context.c src/mesa/main/descrip.mms src/mesa/main/drawpix.c src/mesa/main/enums.c src/mesa/main/fbobject.c src/mesa/main/glheader.h src/mesa/main/imports.c src/mesa/main/mipmap.c src/mesa/main/mm.c src/mesa/main/mm.h src/mesa/main/mtypes.h src/mesa/main/points.c src/mesa/main/sources src/mesa/main/state.c src/mesa/main/texcompress_fxt1.c src/mesa/main/texenvprogram.c src/mesa/main/texobj.c src/mesa/main/texstate.c src/mesa/main/texstore.c src/mesa/math/descrip.mms src/mesa/shader/arbprogram.c src/mesa/shader/descrip.mms src/mesa/shader/prog_execute.c src/mesa/shader/prog_statevars.c src/mesa/shader/prog_statevars.h src/mesa/shader/prog_uniform.c src/mesa/shader/program.c src/mesa/shader/program.h src/mesa/shader/shader_api.c src/mesa/shader/slang/descrip.mms src/mesa/shader/slang/library/slang_vertex_builtin_gc.h src/mesa/sources src/mesa/swrast/descrip.mms src/mesa/swrast/s_drawpix.c src/mesa/swrast/s_fragprog.c src/mesa/swrast/s_readpix.c src/mesa/swrast/s_span.c src/mesa/swrast_setup/descrip.mms src/mesa/tnl/descrip.mms src/mesa/tnl/t_context.h src/mesa/tnl/t_vp_build.c src/mesa/tnl/tnl.h src/mesa/vbo/descrip.mms src/mesa/vbo/vbo_context.c src/mesa/vbo/vbo_exec_array.c src/mesa/x86-64/xform4.S src/mesa/x86/rtasm/x86sse.c src/mesa/x86/rtasm/x86sse.h windows/VC6/progs/glut/glut.dsp windows/VC7/mesa/gdi/gdi.vcproj windows/VC7/mesa/glu/glu.vcproj windows/VC7/mesa/mesa.sln windows/VC7/mesa/mesa/mesa.vcproj windows/VC7/mesa/osmesa/osmesa.vcproj windows/VC7/progs/glut/glut.vcproj windows/VC8/mesa/gdi/gdi.vcproj windows/VC8/mesa/glu/glu.vcproj windows/VC8/mesa/mesa.sln windows/VC8/mesa/mesa/mesa.vcproj windows/VC8/progs/glut/glut.vcproj
Diffstat (limited to 'configs')
-rw-r--r--configs/beos6
-rw-r--r--configs/darwin-x86ppc33
-rw-r--r--configs/default28
-rw-r--r--configs/freebsd-dri3
-rw-r--r--configs/freebsd-dri-amd644
-rw-r--r--configs/freebsd-dri-x864
-rw-r--r--configs/linux-cell54
-rw-r--r--configs/linux-directfb6
-rw-r--r--configs/linux-dri32
-rw-r--r--configs/linux-dri-ppc2
-rw-r--r--configs/linux-dri-x864
-rw-r--r--configs/linux-dri-x86-644
-rw-r--r--configs/linux-dri-xcb21
-rw-r--r--configs/linux-egl65
-rw-r--r--configs/linux-fbdev2
-rw-r--r--configs/linux-icc4
-rw-r--r--configs/linux-icc-static4
-rw-r--r--configs/linux-indirect2
-rw-r--r--configs/linux-llvm34
-rw-r--r--configs/linux-osmesa2
-rw-r--r--configs/linux-osmesa162
-rw-r--r--configs/linux-osmesa16-static2
-rw-r--r--configs/linux-osmesa322
-rw-r--r--configs/linux-profile27
-rw-r--r--configs/linux-solo12
-rw-r--r--configs/linux-solo-x864
-rw-r--r--configs/linux-sparc4
-rw-r--r--configs/linux-static6
-rw-r--r--configs/linux-x864
-rw-r--r--configs/linux-x86-644
-rw-r--r--configs/linux-x86-64-profile8
-rw-r--r--configs/linux-x86-64-static7
-rw-r--r--configs/linux-x86-glide4
-rw-r--r--configs/linux-x86-profile8
-rw-r--r--configs/linux-x86-static7
-rw-r--r--configs/sunos5-gcc4
36 files changed, 314 insertions, 105 deletions
diff --git a/configs/beos b/configs/beos
index 9974b7b2201..897c36868fe 100644
--- a/configs/beos
+++ b/configs/beos
@@ -26,8 +26,8 @@ ifeq ($(CPU), x86)
-DUSE_3DNOW_ASM \
-DUSE_SSE_ASM
- ASM_SOURCES = $(X86_SOURCES)
- ASM_API = $(X86_API)
+ MESA_ASM_SOURCES = $(X86_SOURCES)
+ GLAPI_ASM_SOURCES = $(X86_API)
CC = gcc
CXX = g++
@@ -90,7 +90,7 @@ else
endif
# Directories
-SRC_DIRS = mesa glu glut/beos
+SRC_DIRS = gallium mesa glu glut/beos
GLU_DIRS = sgi
DRIVER_DIRS = beos
PROGRAM_DIRS = beos samples redbook demos tests
diff --git a/configs/darwin-x86ppc b/configs/darwin-x86ppc
new file mode 100644
index 00000000000..ebeb25051f1
--- /dev/null
+++ b/configs/darwin-x86ppc
@@ -0,0 +1,33 @@
+# Configuration for Darwin / MacOS X, making dynamic libs
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = darwin
+
+# Compiler and flags
+CC = cc
+CXX = cc
+CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
+ -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
+CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
+ -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
+
+MKLIB_OPTIONS = -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+
+# Library names (actual file names)
+GL_LIB_NAME = libGL.dylib
+GLU_LIB_NAME = libGLU.dylib
+GLUT_LIB_NAME = libglut.dylib
+GLW_LIB_NAME = libGLw.dylib
+OSMESA_LIB_NAME = libOSMesa.dylib
+
+GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
+OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
+GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
+APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+
+# omit glw lib for now:
+SRC_DIRS = gallium mesa glu glut/glx
+
diff --git a/configs/default b/configs/default
index fe655e799b5..76d03f5c5ae 100644
--- a/configs/default
+++ b/configs/default
@@ -19,6 +19,7 @@ DRM_SOURCE_PATH=$(TOP)/../drm
# Compiler and flags
CC = cc
CXX = CC
+HOST_CC = $(CC)
CFLAGS = -O
CXXFLAGS = -O
LDFLAGS =
@@ -62,7 +63,7 @@ GLW_LIB_GLOB = $(GLW_LIB_NAME)*
OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
# Optional assembly language optimization files for libGL
-ASM_SOURCES =
+MESA_ASM_SOURCES =
# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
# order to build the Motif widget too)
@@ -72,20 +73,31 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2
# Directories to build
LIB_DIR = lib
-SRC_DIRS = mesa glu glut/glx glw
+SRC_DIRS = gallium mesa egl gallium/winsys glu glut/glx glw
GLU_DIRS = sgi
-DRIVER_DIRS = x11 osmesa
+DRIVER_DIRS =
# Which subdirs under $(TOP)/progs/ to enter:
PROGRAM_DIRS = demos redbook samples glsl xdemos
+# EGL directories
+EGL_DRIVERS_DIRS = demo
+
+# Gallium directories and
+GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util
+GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
+GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple failover
+GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
+GALLIUM_WINSYS_DIRS = xlib egl_xlib
+
# Library dependencies
#EXTRA_LIB_PATH ?=
-GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
-OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
-GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
-GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXi -lm
-GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
+GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
+OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
+GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
+GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
+APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
# Program dependencies - specific GL/glut libraries added in Makefiles
APP_LIB_DEPS = -lm
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index 9d9215483d9..f7e1fa0c190 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -27,6 +27,7 @@ CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
ASM_SOURCES =
+MESA_ASM_SOURCES =
# Library/program dependencies
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
@@ -40,7 +41,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11
# Directories
-SRC_DIRS = glx/x11 mesa glu glut/glx glw
+SRC_DIRS = glx/x11 gallium mesa glu glut/glx glw
DRIVER_DIRS = dri
PROGRAM_DIRS =
WINDOW_SYSTEM=dri
diff --git a/configs/freebsd-dri-amd64 b/configs/freebsd-dri-amd64
index 39341b9701a..bb6c361398a 100644
--- a/configs/freebsd-dri-amd64
+++ b/configs/freebsd-dri-amd64
@@ -6,5 +6,5 @@ include $(TOP)/configs/freebsd-dri
CONFIG_NAME = freebsd-dri-x86-64
ASM_FLAGS = -DUSE_X86_64_ASM
-ASM_SOURCES = $(X86-64_SOURCES)
-ASM_API = $(X86-64_API)
+MESA_ASM_SOURCES = $(X86-64_SOURCES)
+GLAPI_ASM_SOURCES = $(X86-64_API)
diff --git a/configs/freebsd-dri-x86 b/configs/freebsd-dri-x86
index af0d27ff47d..9475437fc5b 100644
--- a/configs/freebsd-dri-x86
+++ b/configs/freebsd-dri-x86
@@ -9,5 +9,5 @@ CONFIG_NAME = freebsd-dri-x86
PIC_FLAGS =
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
-ASM_SOURCES = $(X86_SOURCES)
-ASM_API = $(X86_API)
+MESA_ASM_SOURCES = $(X86_SOURCES)
+GLAPI_ASM_SOURCES = $(X86_API)
diff --git a/configs/linux-cell b/configs/linux-cell
new file mode 100644
index 00000000000..a701fa73f19
--- /dev/null
+++ b/configs/linux-cell
@@ -0,0 +1,54 @@
+# linux-cell
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = linux-cell
+
+
+GALLIUM_DRIVER_DIRS += cell
+
+
+# Compiler and flags
+CC = ppu32-gcc
+CXX = ppu32-g++
+HOST_CC = gcc
+
+OPT_FLAGS = -g
+
+# Cell SDK location
+SDK = /opt/ibm/cell-sdk/prototype/sysroot/usr
+
+
+CFLAGS = $(OPT_FLAGS) -Wall -Winline -fPIC -m32 -mabi=altivec -maltivec \
+ -I. -I$(SDK)/include \
+ -DGALLIUM_CELL -DUSE_XSHM
+
+CXXFLAGS = $(CFLAGS)
+
+# Omitting glw here:
+SRC_DIRS = gallium mesa gallium/winsys glu glut/glx
+
+
+MKDEP_OPTIONS = -fdepend -Y
+
+
+GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread \
+ -L$(SDK)/lib -m32 -Wl,-m,elf32ppc -R$(SDK)/lib -lspe2
+
+
+
+### SPU stuff
+
+SPU_CC = spu-gcc
+
+SPU_CFLAGS = $(OPT_FLAGS) -W -Wall -Winline -Wmissing-prototypes -Wno-main \
+ -I. -I$(SDK)/spu/include -I$(TOP)/src/mesa/ $(INCLUDE_DIRS) \
+ -include spu_intrinsics.h
+
+SPU_LFLAGS = -L$(SDK)/spu/lib -Wl,-N -lmisc
+
+SPU_AR = ppu-ar
+SPU_AR_FLAGS = -qcs
+
+SPU_EMBED = ppu32-embedspu
+SPU_EMBED_FLAGS = -m32
diff --git a/configs/linux-directfb b/configs/linux-directfb
index 2a9843e93c2..b1fb914a2dc 100644
--- a/configs/linux-directfb
+++ b/configs/linux-directfb
@@ -21,12 +21,12 @@ HAVE_X86 = $(shell uname -m | grep 'i[3-6]86' >/dev/null && echo yes)
ifeq ($(HAVE_X86), yes)
CFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
CXXFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
- ASM_SOURCES = $(X86_SOURCES)
- ASM_API = $(X86_API)
+ MESA_ASM_SOURCES = $(X86_SOURCES)
+ GLAPI_ASM_SOURCES = $(X86_API)
endif
# Directories
-SRC_DIRS = mesa glu glut/directfb
+SRC_DIRS = gallium mesa glu glut/directfb
GLU_DIRS = sgi
DRIVER_DIRS = directfb
PROGRAM_DIRS = demos directfb
diff --git a/configs/linux-dri b/configs/linux-dri
index 8c325c7d345..ac940c0f07a 100644
--- a/configs/linux-dri
+++ b/configs/linux-dri
@@ -13,7 +13,7 @@ CXX = g++
#MKDEP = gcc -M
#MKDEP_OPTIONS = -MF depend
-OPT_FLAGS = -O -g
+OPT_FLAGS = -O2 -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
@@ -38,23 +38,21 @@ GLUT_CFLAGS = -fexceptions
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
-ASM_SOURCES =
+MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
-LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
-LIBDRM_LIB = `pkg-config --libs libdrm`
+LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
+LIBDRM_LIB = $(shell pkg-config --libs libdrm)
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -lpthread -ldl $(LIBDRM_LIB)
-# This is now 0 by default since it seems to confuse the hell out of people
-# and generate a lot of extra noise on bugzilla. If you need to build with
-# EGL, do 'make linux-dri USING_EGL=1'
+# Directories
+SRC_DIRS := glx/x11 egl $(SRC_DIRS)
-USING_EGL=0
# Directories
ifeq ($(USING_EGL), 1)
@@ -65,10 +63,20 @@ SRC_DIRS = glx/x11 mesa glu glut/glx glw
PROGRAM_DIRS = xdemos
endif
-DRIVER_DIRS = dri
-WINDOW_SYSTEM=dri
+# EGL directories
+EGL_DRIVERS_DIRS = demo dri xdri
+
+DRIVER_DIRS =
+WINDOW_SYSTEM = dri
+GALLIUM_WINSYS_DIRS = drm egl_xlib
# gamma are missing because they have not been converted to use the new
# interface.
-DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
- savage sis tdfx trident unichrome ffb
+
+# XXX: need to figure out a way for gallium and non-gallium builds to
+# coexist:
+#
+
+#DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
+# savage sis tdfx trident unichrome ffb
+DRI_DIRS = intel
diff --git a/configs/linux-dri-ppc b/configs/linux-dri-ppc
index fb87688065f..a3a3ca83cb3 100644
--- a/configs/linux-dri-ppc
+++ b/configs/linux-dri-ppc
@@ -9,7 +9,7 @@ OPT_FLAGS = -Os -mcpu=603
PIC_FLAGS = -fPIC
ASM_FLAGS = -DUSE_PPC_ASM -DUSE_VMX_ASM
-ASM_SOURCES = $(PPC_SOURCES)
+MESA_ASM_SOURCES = $(PPC_SOURCES)
# Build only the drivers for cards that exist on PowerPC. At some point MGA
# will be added, but not yet.
diff --git a/configs/linux-dri-x86 b/configs/linux-dri-x86
index f9b164d27ab..4eedfa52f7e 100644
--- a/configs/linux-dri-x86
+++ b/configs/linux-dri-x86
@@ -9,6 +9,6 @@ CONFIG_NAME = linux-dri-x86
ARCH_FLAGS = -m32
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
-ASM_SOURCES = $(X86_SOURCES)
-ASM_API = $(X86_API)
+MESA_ASM_SOURCES = $(X86_SOURCES)
+GLAPI_ASM_SOURCES = $(X86_API)
diff --git a/configs/linux-dri-x86-64 b/configs/linux-dri-x86-64
index 2272c830da3..ceab05d5db4 100644
--- a/configs/linux-dri-x86-64
+++ b/configs/linux-dri-x86-64
@@ -8,8 +8,8 @@ CONFIG_NAME = linux-dri-x86-64
ARCH_FLAGS = -m64
ASM_FLAGS = -DUSE_X86_64_ASM
-ASM_SOURCES = $(X86-64_SOURCES)
-ASM_API = $(X86-64_API)
+MESA_ASM_SOURCES = $(X86-64_SOURCES)
+GLAPI_ASM_SOURCES = $(X86-64_API)
LIB_DIR = lib64
diff --git a/configs/linux-dri-xcb b/configs/linux-dri-xcb
index 6d11f1744c9..d7b00a266ed 100644
--- a/configs/linux-dri-xcb
+++ b/configs/linux-dri-xcb
@@ -25,7 +25,7 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
-DHAVE_ALIAS -DUSE_XCB -DHAVE_POSIX_MEMALIGN
-X11_INCLUDES = `pkg-config --cflags-only-I x11` `pkg-config --cflags-only-I xcb` `pkg-config --cflags-only-I x11-xcb` `pkg-config --cflags-only-I xcb-glx`
+X11_INCLUDES = $(shell pkg-config --cflags-only-I x11) $(shell pkg-config --cflags-only-I xcb) $(shell pkg-config --cflags-only-I x11-xcb) $(shell pkg-config --cflags-only-I xcb-glx)
CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
$(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math
@@ -36,17 +36,16 @@ CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
-ASM_SOURCES =
+MESA_ASM_SOURCES =
# Library/program dependencies
-EXTRA_LIB_PATH=`pkg-config --libs-only-L x11`
+EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11)
-LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
-LIBDRM_LIB = `pkg-config --libs libdrm`
+LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
+LIBDRM_LIB = $(shell pkg-config --libs libdrm)
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
-GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
- -lm -lpthread -ldl $(LIBDRM_LIB) `pkg-config --libs xcb` \
- `pkg-config --libs x11-xcb` `pkg-config --libs xcb-glx`
+GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
+ $(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx)
# This is now 0 by default since it seems to confuse the hell out of people
@@ -57,10 +56,10 @@ USING_EGL=0
# Directories
ifeq ($(USING_EGL), 1)
-SRC_DIRS = egl glx/x11 mesa glu glut/glx glw
-PROGRAM_DIRS = egl xdemos
+SRC_DIRS = egl glx/x11 gallium mesa glu glut/glx glw
+PROGRAM_DIRS = egl
else
-SRC_DIRS = glx/x11 mesa glu glut/glx glw
+SRC_DIRS = glx/x11 gallium mesa glu glut/glx glw
PROGRAM_DIRS = xdemos
endif
diff --git a/configs/linux-egl b/configs/linux-egl
new file mode 100644
index 00000000000..e906806f4b8
--- /dev/null
+++ b/configs/linux-egl
@@ -0,0 +1,65 @@
+# -*-makefile-*-
+# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = linux-dri
+
+# Compiler and flags
+CC = gcc
+CXX = g++
+
+#MKDEP = /usr/X11R6/bin/makedepend
+#MKDEP = gcc -M
+#MKDEP_OPTIONS = -MF depend
+
+OPT_FLAGS = -O -g
+PIC_FLAGS = -fPIC
+
+# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
+ARCH_FLAGS ?=
+
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
+ -D_BSD_SOURCE -D_GNU_SOURCE \
+ -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
+ -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
+ -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
+
+X11_INCLUDES = -I/usr/X11R6/include
+
+CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
+ $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
+
+CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
+
+
+MESA_ASM_SOURCES =
+
+# Library/program dependencies
+EXTRA_LIB_PATH=-L/usr/X11R6/lib
+
+LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
+LIBDRM_LIB = $(shell pkg-config --libs libdrm)
+DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
+GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
+ -lm -lpthread -ldl \
+ $(LIBDRM_LIB)
+
+
+# This is now 0 by default since it seems to confuse the hell out of people
+# and generate a lot of extra noise on bugzilla. If you need to build with
+# EGL, do 'make linux-dri USING_EGL=1'
+
+USING_EGL=0
+
+# Directories
+SRC_DIRS = gallium mesa gallium/winsys glu egl
+PROGRAM_DIRS = egl
+
+DRIVER_DIRS = dri
+WINDOW_SYSTEM = dri
+GALLIUM_WINSYS_DIRS = egl_drm
+
+# gamma are missing because they have not been converted to use the new
+# interface.
+DRI_DIRS = intel
diff --git a/configs/linux-fbdev b/configs/linux-fbdev
index 69d10127c8e..f54c73695a3 100644
--- a/configs/linux-fbdev
+++ b/configs/linux-fbdev
@@ -9,7 +9,7 @@ CFLAGS = -O3 -ffast-math -ansi -pedantic -fPIC -D_POSIX_C_SOURCE=199309L -D_SVID
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
-SRC_DIRS = mesa glu glut/fbdev
+SRC_DIRS = gallium mesa glu glut/fbdev
DRIVER_DIRS = fbdev osmesa
PROGRAM_DIRS = fbdev demos redbook samples
diff --git a/configs/linux-icc b/configs/linux-icc
index 978a45af70b..d90a1dab3d4 100644
--- a/configs/linux-icc
+++ b/configs/linux-icc
@@ -16,7 +16,7 @@ GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-ASM_SOURCES = $(X86_SOURCES)
-ASM_API = $(X86_API)
+MESA_ASM_SOURCES = $(X86_SOURCES)
+GLAPI_ASM_SOURCES = $(X86_API)
diff --git a/configs/linux-icc-static b/configs/linux-icc-static
index 0c957568c22..384db3bfe48 100644
--- a/configs/linux-icc-static
+++ b/configs/linux-icc-static
@@ -23,5 +23,5 @@ GL_LIB_DEPS =
GLUT_LIB_DEPS =
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -lpthread -lcxa -lunwind
-ASM_SOURCES = $(X86_SOURCES)
-ASM_API = $(X86_API)
+MESA_ASM_SOURCES = $(X86_SOURCES)
+GLAPI_ASM_SOURCES = $(X86_API)
diff --git a/configs/linux-indirect b/configs/linux-indirect
index 17c7126e115..310ae6dde63 100644
--- a/configs/linux-indirect
+++ b/configs/linux-indirect
@@ -37,7 +37,7 @@ CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
-ASM_SOURCES =
+MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
diff --git a/configs/linux-llvm b/configs/linux-llvm
new file mode 100644
index 00000000000..44e200e8565
--- /dev/null
+++ b/configs/linux-llvm
@@ -0,0 +1,34 @@
+# -*-makefile-*-
+# Configuration for Linux and LLVM with debugging info
+
+include $(TOP)/configs/linux
+
+CONFIG_NAME = linux-llvm
+
+GALLIUM_AUXILIARY_DIRS += gallivm
+
+OPT_FLAGS = -g -ansi -pedantic
+DEFINES += -DDEBUG -DDEBUG_MATH -DMESA_LLVM=1
+
+LLVM_VERSION := $(shell llvm-config --version)
+
+ifeq ($(LLVM_VERSION),)
+ $(warning Could not find LLVM! Make Sure 'llvm-config' is in the path)
+ MESA_LLVM=0
+else
+ MESA_LLVM=1
+ $(info Using LLVM version: $(LLVM_VERSION))
+endif
+
+ifeq ($(MESA_LLVM),1)
+# LLVM_CFLAGS=`llvm-config --cflags`
+ LLVM_CXXFLAGS=`llvm-config --cxxflags` -Wno-long-long
+ LLVM_LDFLAGS=`llvm-config --ldflags`
+ LLVM_LIBS=`llvm-config --libs`
+ MKLIB_OPTIONS=-cplusplus
+else
+ LLVM_CFLAGS=
+ LLVM_CXXFLAGS=
+endif
+
+GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
diff --git a/configs/linux-osmesa b/configs/linux-osmesa
index 504980b22d7..c112642f899 100644
--- a/configs/linux-osmesa
+++ b/configs/linux-osmesa
@@ -17,7 +17,7 @@ CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
# Directories
-SRC_DIRS = mesa glu
+SRC_DIRS = gallium mesa glu
DRIVER_DIRS = osmesa
PROGRAM_DIRS = osdemos
diff --git a/configs/linux-osmesa16 b/configs/linux-osmesa16
index e8eaa832366..b3c8da09916 100644
--- a/configs/linux-osmesa16
+++ b/configs/linux-osmesa16
@@ -20,7 +20,7 @@ OSMESA_LIB_NAME = libOSMesa16.so
# Directories
-SRC_DIRS = mesa glu
+SRC_DIRS = gallium mesa glu
DRIVER_DIRS = osmesa
PROGRAM_DIRS =
diff --git a/configs/linux-osmesa16-static b/configs/linux-osmesa16-static
index 8ce674f3f97..146aeb85a6f 100644
--- a/configs/linux-osmesa16-static
+++ b/configs/linux-osmesa16-static
@@ -22,7 +22,7 @@ OSMESA_LIB_NAME = libOSMesa16.a
# Directories
-SRC_DIRS = mesa glu
+SRC_DIRS = gallium mesa glu
DRIVER_DIRS = osmesa
PROGRAM_DIRS =
diff --git a/configs/linux-osmesa32 b/configs/linux-osmesa32
index 6d37f5ce6f1..5804ef8e5f7 100644
--- a/configs/linux-osmesa32
+++ b/configs/linux-osmesa32
@@ -20,7 +20,7 @@ OSMESA_LIB_NAME = libOSMesa32.so
# Directories
-SRC_DIRS = mesa glu
+SRC_DIRS = gallium mesa glu
DRIVER_DIRS = osmesa
PROGRAM_DIRS =
diff --git a/configs/linux-profile b/configs/linux-profile
index 75b245779af..e3895dd8bef 100644
--- a/configs/linux-profile
+++ b/configs/linux-profile
@@ -1,29 +1,8 @@
# Configuration for profiling on Linux with gprof
-include $(TOP)/configs/default
+include $(TOP)/configs/linux-static
CONFIG_NAME = linux-profile
-# Compiler and flags
-CC = gcc
-CXX = g++
-
-CFLAGS = -pg -O -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG
-
-CXXFLAGS = -pg -O -ansi -pedantic -Wall -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG
-
-GLUT_CFLAGS = -fexceptions
-
-# Need to have -L/usr/X11R6/lib in these:
-GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11
-
-# Need to make static libs for profiling:
-MKLIB_OPTIONS = -static
-GL_LIB_NAME = lib$(GL_LIB).a
-GLU_LIB_NAME = lib$(GLU_LIB).a
-GLUT_LIB_NAME = lib$(GLUT_LIB).a
-GLW_LIB_NAME = lib$(GLW_LIB).a
-OSMESA_LIB_NAME = lib$(OSMesa).a
-APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
+OPT_FLAGS = -pg -g -O2
+DEFINES += -DNDEBUG
diff --git a/configs/linux-solo b/configs/linux-solo
index e01f2c8a39d..4be7680ca59 100644
--- a/configs/linux-solo
+++ b/configs/linux-solo
@@ -16,10 +16,10 @@ PIC_FLAGS = -fPIC
ARCH_FLAGS ?=
# DRM and pciaccess
-LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
-LIBDRM_LIB = `pkg-config --libs libdrm`
-PCIACCESS_CFLAGS = `pkg-config --cflags pciaccess`
-PCIACCESS_LIB = `pkg-config --libs pciaccess`
+LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
+LIBDRM_LIB = $(shell pkg-config --libs libdrm)
+PCIACCESS_CFLAGS = $(shell pkg-config --cflags pciaccess)
+PCIACCESS_LIB = $(shell pkg-config --libs pciaccess)
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
@@ -36,7 +36,7 @@ CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
-ASM_SOURCES =
+MESA_ASM_SOURCES =
# Library/program dependencies
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(TOP)/$(LIB_DIR) $(PCIACCESS_LIB)
@@ -46,7 +46,7 @@ GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
# Directories
-SRC_DIRS = glx/mini mesa glu glut/mini
+SRC_DIRS = glx/mini gallium mesa glu glut/mini
DRIVER_DIRS = dri
PROGRAM_DIRS = miniglx
diff --git a/configs/linux-solo-x86 b/configs/linux-solo-x86
index e37b9fb428d..a9bf3882602 100644
--- a/configs/linux-solo-x86
+++ b/configs/linux-solo-x86
@@ -6,5 +6,5 @@ include $(TOP)/configs/linux-solo
CONFIG_NAME = linux-solo-x86
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
-ASM_SOURCES = $(X86_SOURCES)
-ASM_API = $(X86_API)
+MESA_ASM_SOURCES = $(X86_SOURCES)
+GLAPI_ASM_SOURCES = $(X86_API)
diff --git a/configs/linux-sparc b/configs/linux-sparc
index 9925afc19b6..346d438c283 100644
--- a/configs/linux-sparc
+++ b/configs/linux-sparc
@@ -5,5 +5,5 @@ include $(TOP)/configs/linux
CONFIG_NAME = linux-sparc
#ASM_FLAGS = -DUSE_SPARC_ASM
-#ASM_SOURCES = $(SPARC_SOURCES)
-#ASM_API = $(SPARC_API)
+#MESA_ASM_SOURCES = $(SPARC_SOURCES)
+#GLAPI_ASM_SOURCES = $(SPARC_API)
diff --git a/configs/linux-static b/configs/linux-static
index 1ee16be73f2..2fc39ff83ef 100644
--- a/configs/linux-static
+++ b/configs/linux-static
@@ -22,5 +22,7 @@ GLUT_LIB_DEPS =
GLW_LIB_DEPS =
# Need to specify all libraries we may need
-APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread \
- -lstdc++ -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -Wl,--start-group \
+ -l$(GL_LIB) $(TOP)/src/mesa/pipe/softpipe/libsoftpipe.a -Wl,--end-group -lm \
+ -L/usr/X11R6/lib/ -lX11 -lXext -lXmu -lXi -lpthread
+
diff --git a/configs/linux-x86 b/configs/linux-x86
index 18fa06101de..a4cf4e8d624 100644
--- a/configs/linux-x86
+++ b/configs/linux-x86
@@ -5,5 +5,5 @@ include $(TOP)/configs/linux
CONFIG_NAME = linux-x86
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
-ASM_SOURCES = $(X86_SOURCES)
-ASM_API = $(X86_API)
+MESA_ASM_SOURCES = $(X86_SOURCES)
+GLAPI_ASM_SOURCES = $(X86_API)
diff --git a/configs/linux-x86-64 b/configs/linux-x86-64
index 67c03918362..c2441e09d07 100644
--- a/configs/linux-x86-64
+++ b/configs/linux-x86-64
@@ -6,8 +6,8 @@ CONFIG_NAME = linux-x86-64
ARCH_FLAGS = -m64
-ASM_SOURCES = $(X86-64_SOURCES)
-ASM_API = $(X86-64_API)
+MESA_ASM_SOURCES = $(X86-64_SOURCES)
+GLAPI_ASM_SOURCES = $(X86-64_API)
ASM_FLAGS = -DUSE_X86_64_ASM
LIB_DIR = lib64
diff --git a/configs/linux-x86-64-profile b/configs/linux-x86-64-profile
new file mode 100644
index 00000000000..6eb9c6844b3
--- /dev/null
+++ b/configs/linux-x86-64-profile
@@ -0,0 +1,8 @@
+# Configuration for profiling on Linux for 64-bit X86 (Opteron) with gprof
+
+include $(TOP)/configs/linux-x86-64-static
+
+CONFIG_NAME = linux-x86-64-profile
+
+OPT_FLAGS = -pg -g -O2
+DEFINES += -DNDEBUG
diff --git a/configs/linux-x86-64-static b/configs/linux-x86-64-static
index 611abf075d1..626d579ac0e 100644
--- a/configs/linux-x86-64-static
+++ b/configs/linux-x86-64-static
@@ -20,5 +20,8 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread \
- -lstdc++ -lm
+
+# Need to specify all libraries we may need
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -Wl,--start-group \
+ -l$(GL_LIB) $(TOP)/src/mesa/pipe/softpipe/libsoftpipe.a -Wl,--end-group \
+ $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread -lstdc++ -lm
diff --git a/configs/linux-x86-glide b/configs/linux-x86-glide
index 941efc1e598..603b2bf758b 100644
--- a/configs/linux-x86-glide
+++ b/configs/linux-x86-glide
@@ -18,8 +18,8 @@ GLUT_CFLAGS = -fexceptions
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
-ASM_SOURCES = $(X86_SOURCES)
-ASM_API = $(X86_API)
+MESA_ASM_SOURCES = $(X86_SOURCES)
+GLAPI_ASM_SOURCES = $(X86_API)
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread
diff --git a/configs/linux-x86-profile b/configs/linux-x86-profile
new file mode 100644
index 00000000000..987b5f0cf9a
--- /dev/null
+++ b/configs/linux-x86-profile
@@ -0,0 +1,8 @@
+# Configuration for profiling on Linux with x86 optimizations with gprof
+
+include $(TOP)/configs/linux-x86-static
+
+CONFIG_NAME = linux-x86-profile
+
+OPT_FLAGS = -pg -g -O2
+DEFINES += -DNDEBUG
diff --git a/configs/linux-x86-static b/configs/linux-x86-static
index 645196c09fa..65c92cf3524 100644
--- a/configs/linux-x86-static
+++ b/configs/linux-x86-static
@@ -20,5 +20,8 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread \
- -lstdc++ -lm
+
+# Need to specify all libraries we may need
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -Wl,--start-group \
+ -l$(GL_LIB) $(TOP)/src/mesa/pipe/softpipe/libsoftpipe.a -Wl,--end-group \
+ $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread -lstdc++ -lm
diff --git a/configs/sunos5-gcc b/configs/sunos5-gcc
index c5e443fc75e..571ff24a2b1 100644
--- a/configs/sunos5-gcc
+++ b/configs/sunos5-gcc
@@ -16,8 +16,8 @@ ARCH_FLAGS ?=
DEFINES = -D_REENTRANT -DUSE_XSHM
-ASM_SOURCES = $(SPARC_SOURCES)
-ASM_API = $(SPARC_API)
+MESA_ASM_SOURCES = $(SPARC_SOURCES)
+GLAPI_ASM_SOURCES = $(SPARC_API)
ASM_FLAGS = -DUSE_SPARC_ASM
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \