summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-09-15 14:16:22 +0800
committerChia-I Wu <olvaffe@gmail.com>2009-09-15 14:16:22 +0800
commite2ba90a9cc762cf00a168f0a59d31e7dc52fc42e (patch)
treefe3206d7602ad935296884742980f3c4d30bd867 /configs
parent11a4292d4eb515813b82b8d688a318adef66b3e6 (diff)
parentb4b8800315637d9218a81c76f09df7d601710d29 (diff)
Merge commit 'eee/mesa-es' into android
Diffstat (limited to 'configs')
-rw-r--r--configs/autoconf.in29
-rw-r--r--configs/beos6
-rw-r--r--configs/darwin18
-rw-r--r--configs/darwin-x86ppc33
-rw-r--r--configs/default46
-rw-r--r--configs/freebsd-dri3
-rw-r--r--configs/freebsd-dri-amd644
-rw-r--r--configs/freebsd-dri-x864
-rw-r--r--configs/linux3
-rw-r--r--configs/linux-cell67
-rw-r--r--configs/linux-cell-debug10
-rw-r--r--configs/linux-directfb6
-rw-r--r--configs/linux-dri35
-rw-r--r--configs/linux-dri-ppc2
-rw-r--r--configs/linux-dri-x867
-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-indirect4
-rw-r--r--configs/linux-llvm42
-rw-r--r--configs/linux-osmesa2
-rw-r--r--configs/linux-osmesa-static37
-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-static4
-rw-r--r--configs/linux-x866
-rw-r--r--configs/linux-x86-644
-rw-r--r--configs/linux-x86-64-debug1
-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-static6
-rw-r--r--configs/mine82
-rw-r--r--configs/mine-dri5
-rw-r--r--configs/sunos5-gcc4
44 files changed, 520 insertions, 130 deletions
diff --git a/configs/autoconf.in b/configs/autoconf.in
index 4a89716ab6..83737e3a7d 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -20,10 +20,12 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
LDFLAGS = @LDFLAGS@
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
+RADEON_CFLAGS = @RADEON_CFLAGS@
+RADEON_LDFLAGS = @RADEON_LDFLAGS@
# Assembler
-ASM_SOURCES = @ASM_SOURCES@
-ASM_API = @ASM_API@
+MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
+GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@
# Misc tools and flags
MAKE = @MAKE@
@@ -31,6 +33,7 @@ SHELL = @SHELL@
MKLIB_OPTIONS = @MKLIB_OPTIONS@
MKDEP = @MKDEP@
MKDEP_OPTIONS = @MKDEP_OPTIONS@
+INSTALL = @INSTALL@
# Python and flags (generally only needed by the developers)
PYTHON2 = python
@@ -50,16 +53,32 @@ GLUT_LIB_NAME = @GLUT_LIB_NAME@
GLW_LIB_NAME = @GLW_LIB_NAME@
OSMESA_LIB_NAME = @OSMESA_LIB_NAME@
+# Globs used to install the lib and all symlinks
+GL_LIB_GLOB = @GL_LIB_GLOB@
+GLU_LIB_GLOB = @GLU_LIB_GLOB@
+GLUT_LIB_GLOB = @GLUT_LIB_GLOB@
+GLW_LIB_GLOB = @GLW_LIB_GLOB@
+OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@
+
# Directories to build
LIB_DIR = @LIB_DIR@
SRC_DIRS = @SRC_DIRS@
GLU_DIRS = @GLU_DIRS@
DRIVER_DIRS = @DRIVER_DIRS@
+GALLIUM_DIRS = @GALLIUM_DIRS@
+GALLIUM_AUXILIARY_DIRS = @GALLIUM_AUXILIARY_DIRS@
+GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@
+GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@
+GALLIUM_WINSYS_DRM_DIRS = @GALLIUM_WINSYS_DRM_DIRS@
+GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@
+GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
+GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
+
# Which subdirs under $(TOP)/progs/ to enter:
PROGRAM_DIRS = @PROGRAM_DIRS@
# Driver specific build vars
-DRI_DIRS = @DRI_DIRS@
+DRI_DIRS = @DRI_DIRS@
WINDOW_SYSTEM = @WINDOW_SYSTEM@
USING_EGL = @USING_EGL@
@@ -74,6 +93,7 @@ MOTIF_CFLAGS = @MOTIF_CFLAGS@
GL_LIB_DEPS = $(EXTRA_LIB_PATH) @GL_LIB_DEPS@
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \
$(EXTRA_LIB_PATH) @OSMESA_LIB_DEPS@
+EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @EGL_LIB_DEPS@
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLU_MESA_DEPS@ \
$(EXTRA_LIB_PATH) @GLU_LIB_DEPS@
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLUT_MESA_DEPS@ \
@@ -106,6 +126,9 @@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
+# Xorg driver install directory (for xorg state-tracker)
+XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@
+
# pkg-config substitutions
GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
diff --git a/configs/beos b/configs/beos
index 9974b7b220..69a8fd4269 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 glew
GLU_DIRS = sgi
DRIVER_DIRS = beos
PROGRAM_DIRS = beos samples redbook demos tests
diff --git a/configs/darwin b/configs/darwin
index 77edf1a7b9..213c397287 100644
--- a/configs/darwin
+++ b/configs/darwin
@@ -6,9 +6,11 @@ CONFIG_NAME = darwin
INSTALL_DIR = /usr/X11
+X11_DIR = $(INSTALL_DIR)
+
# Compiler and flags
CC = gcc
-CXX = gcc
+CXX = g++
PIC_FLAGS = -fPIC
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS \
@@ -21,9 +23,9 @@ DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
ARCH_FLAGS += $(RC_CFLAGS)
CFLAGS = -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
- -I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
+ -I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
CXXFLAGS = -ggdb3 -Os -Wall -fno-strict-aliasing \
- -I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
+ -I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
# Library names (actual file names)
GL_LIB_NAME = libGL.dylib
@@ -39,15 +41,15 @@ GLUT_LIB_GLOB = libglut.*dylib
GLW_LIB_GLOB = libGLw.*dylib
OSMESA_LIB_GLOB = libOSMesa.*dylib
-GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
+GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
-GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
-GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXt
-APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now:
-SRC_DIRS = glx/x11 mesa glu glut/glx
+SRC_DIRS = glx/x11 mesa glu glut/glx glew
GLU_DIRS = sgi
DRIVER_DIRS = osmesa
#DRIVER_DIRS = dri
diff --git a/configs/darwin-x86ppc b/configs/darwin-x86ppc
new file mode 100644
index 0000000000..3d82e3040a
--- /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 glew
+
diff --git a/configs/default b/configs/default
index 7b79cf2c1b..9e4bb08ea9 100644
--- a/configs/default
+++ b/configs/default
@@ -9,7 +9,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
-MESA_MINOR=3
+MESA_MINOR=7
MESA_TINY=0
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
@@ -19,11 +19,16 @@ DRM_SOURCE_PATH=$(TOP)/../drm
# Compiler and flags
CC = cc
CXX = CC
+HOST_CC = $(CC)
CFLAGS = -O
CXXFLAGS = -O
LDFLAGS =
GLU_CFLAGS =
+# Compiler for building demos/tests/etc
+APP_CC = $(CC)
+APP_CXX = $(CXX)
+
# Misc tools and flags
SHELL = /bin/sh
MKLIB = $(SHELL) $(TOP)/bin/mklib
@@ -31,7 +36,10 @@ MKLIB_OPTIONS =
MKDEP = makedepend
MKDEP_OPTIONS = -fdepend
MAKE = make
-INSTALL = $(SHELL) $(TOP)/bin/minstall
+
+# Use MINSTALL for installing libraries, INSTALL for everything else
+MINSTALL = $(SHELL) $(TOP)/bin/minstall
+INSTALL = $(MINSTALL)
# Tools for regenerating glapi (generally only needed by the developers)
PYTHON2 = python
@@ -43,6 +51,7 @@ INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
GL_LIB = GL
GLU_LIB = GLU
GLUT_LIB = glut
+GLEW_LIB = GLEW
GLW_LIB = GLw
OSMESA_LIB = OSMesa
@@ -51,6 +60,7 @@ OSMESA_LIB = OSMesa
GL_LIB_NAME = lib$(GL_LIB).so
GLU_LIB_NAME = lib$(GLU_LIB).so
GLUT_LIB_NAME = lib$(GLUT_LIB).so
+GLEW_LIB_NAME = lib$(GLEW_LIB).a
GLW_LIB_NAME = lib$(GLW_LIB).so
OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
@@ -62,7 +72,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 +82,35 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2
# Directories to build
LIB_DIR = lib
-SRC_DIRS = mesa glu glut/glx glw
+SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw
GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa
# Which subdirs under $(TOP)/progs/ to enter:
PROGRAM_DIRS = demos redbook samples glsl xdemos
+# EGL directories
+EGL_DRIVERS_DIRS = demo
+
+# Gallium directories and
+GALLIUM_DIRS = auxiliary drivers state_trackers
+GALLIUM_AUXILIARY_DIRS = rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices
+GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
+GALLIUM_DRIVERS_DIRS = softpipe i915simple failover trace identity
+GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
+GALLIUM_WINSYS_DIRS = xlib egl_xlib
+GALLIUM_WINSYS_DRM_DIRS =
+GALLIUM_STATE_TRACKERS_DIRS = glx
+
# 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
+EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -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
@@ -100,6 +125,9 @@ DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
+# Xorg driver install directory (for xorg state-tracker)
+XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
+
# pkg-config substitutions
GL_PC_REQ_PRIV =
GL_PC_LIB_PRIV =
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index 9d9215483d..0ec25f916e 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 glew glw
DRIVER_DIRS = dri
PROGRAM_DIRS =
WINDOW_SYSTEM=dri
diff --git a/configs/freebsd-dri-amd64 b/configs/freebsd-dri-amd64
index 39341b9701..bb6c361398 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 af0d27ff47..9475437fc5 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 b/configs/linux
index 15700a1a3b..73a6b61b2f 100644
--- a/configs/linux
+++ b/configs/linux
@@ -22,7 +22,8 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
X11_INCLUDES = -I/usr/X11R6/include
-CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
+CFLAGS = -Wall -Wmissing-prototypes -Wdeclaration-after-statement \
+ $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
$(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
diff --git a/configs/linux-cell b/configs/linux-cell
new file mode 100644
index 0000000000..19d435fecc
--- /dev/null
+++ b/configs/linux-cell
@@ -0,0 +1,67 @@
+# linux-cell (non-debug build)
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = linux-cell
+
+
+# Omiting other gallium drivers:
+GALLIUM_DRIVERS_DIRS = cell softpipe trace
+
+
+# Compiler and flags
+CC = ppu32-gcc
+CXX = ppu32-g++
+HOST_CC = gcc
+APP_CC = gcc
+APP_CXX = g++
+
+OPT_FLAGS = -O3
+
+# Cell SDK location
+## For SDK 2.1: (plus, remove -DSPU_MAIN_PARAM_LONG_LONG below)
+#SDK = /opt/ibm/cell-sdk/prototype/sysroot/usr
+## For SDK 3.0:
+SDK = /opt/cell/sdk/usr
+
+
+CFLAGS = $(OPT_FLAGS) -Wall -Winline -Wmissing-prototypes \
+ -fPIC -m32 -std=c99 -mabi=altivec -maltivec \
+ -I. -I$(SDK)/include \
+ -DGALLIUM_CELL -DUSE_XSHM -D_BSD_SOURCE -D_SVID_SOURCE
+
+CXXFLAGS = $(CFLAGS)
+
+# Omitting glw here:
+SRC_DIRS = gallium mesa gallium/winsys glu glut/glx glew
+
+# Build no traditional Mesa drivers:
+DRIVER_DIRS =
+
+
+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
+
+
+CELL_SPU_LIB = $(TOP)/src/gallium/drivers/cell/spu/g3d_spu.a
+
+
+### 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) \
+ -DSPU_MAIN_PARAM_LONG_LONG \
+ -include spu_intrinsics.h
+
+SPU_LFLAGS = -L$(SDK)/spu/lib -Wl,-N -lmisc -lm
+
+SPU_AR = ppu-ar
+SPU_AR_FLAGS = -qcs
+
+SPU_EMBED = ppu32-embedspu
+SPU_EMBED_FLAGS = -m32
diff --git a/configs/linux-cell-debug b/configs/linux-cell-debug
new file mode 100644
index 0000000000..42f3245edc
--- /dev/null
+++ b/configs/linux-cell-debug
@@ -0,0 +1,10 @@
+# linux-cell-debug
+
+include $(TOP)/configs/linux-cell
+
+# just override name and OPT_FLAGS here:
+
+CONFIG_NAME = linux-cell-debug
+
+OPT_FLAGS = -g -DDEBUG
+
diff --git a/configs/linux-directfb b/configs/linux-directfb
index 2a9843e93c..9ae3de96d1 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 glew
GLU_DIRS = sgi
DRIVER_DIRS = directfb
PROGRAM_DIRS = demos directfb
diff --git a/configs/linux-dri b/configs/linux-dri
index 8c325c7d34..0998ba8549 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,37 +38,30 @@ 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'
-
-USING_EGL=0
-
# Directories
-ifeq ($(USING_EGL), 1)
-SRC_DIRS = egl glx/x11 mesa glu glut/glx glw
-PROGRAM_DIRS = egl xdemos
-else
-SRC_DIRS = glx/x11 mesa glu glut/glx glw
-PROGRAM_DIRS = xdemos
-endif
+SRC_DIRS := glx/x11 egl $(SRC_DIRS)
+PROGRAM_DIRS := egl $(PROGRAM_DIRS)
+
+# EGL directories
+EGL_DRIVERS_DIRS = demo glx
DRIVER_DIRS = dri
-WINDOW_SYSTEM=dri
+WINDOW_SYSTEM = dri
+GALLIUM_WINSYS_DIRS = drm
+GALLIUM_WINSYS_DRM_DIRS = intel
+GALLIUM_STATE_TRACKERS_DIRS = egl
-# 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
+ savage sis tdfx trident unichrome ffb swrast
diff --git a/configs/linux-dri-ppc b/configs/linux-dri-ppc
index fb87688065..a3a3ca83cb 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 f9b164d27a..4e7d45d35a 100644
--- a/configs/linux-dri-x86
+++ b/configs/linux-dri-x86
@@ -5,10 +5,9 @@ include $(TOP)/configs/linux-dri
CONFIG_NAME = linux-dri-x86
-# Add -m32 to CFLAGS:
-ARCH_FLAGS = -m32
+ARCH_FLAGS = -m32 -mmmx -msse -msse2
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 2272c830da..ceab05d5db 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 6d11f1744c..e9c15a82e4 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 glew glw
+PROGRAM_DIRS = egl
else
-SRC_DIRS = glx/x11 mesa glu glut/glx glw
+SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw
PROGRAM_DIRS = xdemos
endif
diff --git a/configs/linux-egl b/configs/linux-egl
new file mode 100644
index 0000000000..e906806f4b
--- /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 69d10127c8..0b03c33afa 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 glew
DRIVER_DIRS = fbdev osmesa
PROGRAM_DIRS = fbdev demos redbook samples
diff --git a/configs/linux-icc b/configs/linux-icc
index 978a45af70..d90a1dab3d 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 0c957568c2..384db3bfe4 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 17c7126e11..4b81383c07 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
@@ -47,7 +47,7 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
# Directories
-SRC_DIRS = glx/x11 glu glut/glx glw
+SRC_DIRS = glx/x11 glu glut/glx glew glw
DRIVER_DIRS =
PROGRAM_DIRS =
WINDOW_SYSTEM=dri
diff --git a/configs/linux-llvm b/configs/linux-llvm
new file mode 100644
index 0000000000..19b53cc546
--- /dev/null
+++ b/configs/linux-llvm
@@ -0,0 +1,42 @@
+# -*-makefile-*-
+# Configuration for Linux and LLVM with debugging info
+# Builds the llvmpipe gallium driver
+
+include $(TOP)/configs/linux
+
+CONFIG_NAME = linux-llvm
+
+#GALLIUM_AUXILIARY_DIRS += gallivm
+
+# Add llvmpipe driver
+GALLIUM_DRIVERS_DIRS += llvmpipe
+
+OPT_FLAGS = -g -ansi -pedantic
+DEFINES += -DDEBUG -DDEBUG_MATH -DGALLIUM_LLVMPIPE -DHAVE_UDIS86
+
+# override -std=c99
+CFLAGS += -std=gnu99
+
+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 backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
+ LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation)
+ LLVM_LIBS = $(shell llvm-config --libs backend bitreader engine ipo interpreter instrumentation)
+ MKLIB_OPTIONS=-cplusplus
+else
+ LLVM_CFLAGS=
+ LLVM_CXXFLAGS=
+endif
+
+LD = g++
+GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -lstdc++ -ludis86
diff --git a/configs/linux-osmesa b/configs/linux-osmesa
index 504980b22d..c112642f89 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-osmesa-static b/configs/linux-osmesa-static
new file mode 100644
index 0000000000..a03e63eb75
--- /dev/null
+++ b/configs/linux-osmesa-static
@@ -0,0 +1,37 @@
+# Configuration for building static libOSMesa.a on Linux, no Xlib driver
+# This doesn't really have any Linux dependencies, so it should be usable
+# on other (gcc-based) systems.
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = linux-osmesa
+
+# Compiler and flags
+CC = gcc -m32
+CXX = g++ -m32
+CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
+CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+
+MKLIB_OPTIONS = -static
+
+# Library names (actual file names)
+GL_LIB_NAME = libGL.a
+GLU_LIB_NAME = libGLU.a
+GLUT_LIB_NAME = libglut.a
+GLW_LIB_NAME = libGLw.a
+OSMESA_LIB_NAME = libOSMesa.a
+
+# Directories
+SRC_DIRS = mesa glu
+DRIVER_DIRS = osmesa
+PROGRAM_DIRS = osdemos
+
+
+# Dependencies
+GL_LIB_DEPS =
+OSMESA_LIB_DEPS =
+GLU_LIB_DEPS =
+GLUT_LIB_DEPS =
+GLW_LIB_DEPS =
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
+ $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm
diff --git a/configs/linux-osmesa16 b/configs/linux-osmesa16
index e8eaa83236..b3c8da0991 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 8ce674f3f9..146aeb85a6 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 6d37f5ce6f..5804ef8e5f 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 75b245779a..e3895dd8be 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 e01f2c8a39..247a2d489a 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 glew
DRIVER_DIRS = dri
PROGRAM_DIRS = miniglx
diff --git a/configs/linux-solo-x86 b/configs/linux-solo-x86
index e37b9fb428..a9bf388260 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 9925afc19b..346d438c28 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 1ee16be73f..907904bda4 100644
--- a/configs/linux-static
+++ b/configs/linux-static
@@ -22,5 +22,5 @@ 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) \
+ -l$(GL_LIB) -lm -L/usr/X11R6/lib/ -lX11 -lXext -lXmu -lXi -lpthread
diff --git a/configs/linux-x86 b/configs/linux-x86
index 18fa06101d..5970b185ce 100644
--- a/configs/linux-x86
+++ b/configs/linux-x86
@@ -4,6 +4,8 @@ include $(TOP)/configs/linux
CONFIG_NAME = linux-x86
+ARCH_FLAGS = -m32 -mmmx -msse -msse2
+
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 67c0391836..c2441e09d0 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-debug b/configs/linux-x86-64-debug
index 46e72c990a..6f631c0e87 100644
--- a/configs/linux-x86-64-debug
+++ b/configs/linux-x86-64-debug
@@ -4,4 +4,5 @@ include $(TOP)/configs/linux-x86-64
CONFIG_NAME = linux-x86-64-debug
+OPT_FLAGS = -g
DEFINES += -DDEBUG -DDEBUG_MATH
diff --git a/configs/linux-x86-64-profile b/configs/linux-x86-64-profile
new file mode 100644
index 0000000000..6eb9c6844b
--- /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 611abf075d..626d579ac0 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 941efc1e59..603b2bf758 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 0000000000..987b5f0cf9
--- /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 645196c09f..16c8731c1d 100644
--- a/configs/linux-x86-static
+++ b/configs/linux-x86-static
@@ -20,5 +20,7 @@ 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) \
+ -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread -lstdc++ -lm
diff --git a/configs/mine b/configs/mine
new file mode 100644
index 0000000000..e53b61942b
--- /dev/null
+++ b/configs/mine
@@ -0,0 +1,82 @@
+# -*-makefile-*-
+# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = mine
+
+# Compiler and flags
+CC = ccache gcc
+CXX = ccache g++
+
+#MKDEP = /usr/X11R6/bin/makedepend
+#MKDEP = gcc -M
+#MKDEP_OPTIONS = -MF depend
+
+OPT_FLAGS = -O0 -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 \
+ -DGLX_DIRECT_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)
+
+GLUT_CFLAGS = -fexceptions
+
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
+MESA_ASM_SOURCES =
+
+# Library/program dependencies
+EXTRA_LIB_PATH=-L/usr/X11R6/lib
+
+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)
+
+
+# Directories
+SRC_DIRS = egl mesa gallium gallium/winsys
+PROGRAM_DIRS := egl openvg/demos demos xdemos
+
+# EGL directories
+EGL_DRIVERS_DIRS = glx xdri
+
+ifeq ($(USE_DRI),yes)
+DEFINES += -DIN_DRI_DRIVER -DGLX_INDIRECT_RENDERING
+
+LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
+LIBDRM_LIB = $(shell pkg-config --libs libdrm)
+
+SRC_DIRS := glx/x11 $(SRC_DIRS)
+DRIVER_DIRS = dri
+WINDOW_SYSTEM = dri
+DRI_DIRS = i915
+
+GALLIUM_WINSYS_DIRS = drm egl_xlib
+GALLIUM_WINSYS_DRM_DIRS = intel
+GALLIUM_STATE_TRACKERS_DIRS = egl glx vega
+
+else
+
+DRIVER_DIRS =
+WINDOW_SYSTEM =
+DRI_DIRS =
+
+GALLIUM_WINSYS_DIRS = egl_xlib xlib
+GALLIUM_STATE_TRACKERS_DIRS = glx vega
+
+endif
diff --git a/configs/mine-dri b/configs/mine-dri
new file mode 100644
index 0000000000..03ee9399f3
--- /dev/null
+++ b/configs/mine-dri
@@ -0,0 +1,5 @@
+# -*-makefile-*-
+# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
+
+USE_DRI = yes
+include $(TOP)/configs/mine
diff --git a/configs/sunos5-gcc b/configs/sunos5-gcc
index c5e443fc75..571ff24a2b 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) \