Here's a diff that basically gets all the *_dri.so's compiling in the Mesa tree.

Unfortunately, they don't actually work, but I'm looking into that.

Keith
Index: configs/linux-dri
===================================================================
RCS file: /cvs/mesa/Mesa/configs/linux-dri,v
retrieving revision 1.1
diff -u -r1.1 linux-dri
--- a/configs/linux-dri 14 Apr 2004 12:44:07 -0000      1.1
+++ b/configs/linux-dri 29 Apr 2004 10:09:12 -0000
@@ -30,5 +30,11 @@
 PROGRAM_DIRS = 
 WINDOW_SYSTEM=dri
 
-#DRI_DIRS = dri_client gamma i810 i830 mach64 mga r128 r200 radeon sis tdfx
-DRI_DIRS = dri_client  i830
+# This kindof sucks - we only need the header files from here:
+# 
+DRM_SOURCE_PATH=/home/progs/drm
+
+# Only savage missing:
+#
+DRI_DIRS = dri_client ffb gamma i810 i830 mach64 mga r128 r200 radeon sis tdfx 
unichrome
+
Index: include/GL/internal/dri_interface.h
===================================================================
RCS file: /cvs/mesa/Mesa/include/GL/internal/dri_interface.h,v
retrieving revision 1.2
diff -u -r1.2 dri_interface.h
--- a/include/GL/internal/dri_interface.h       15 Apr 2004 01:24:57 -0000      1.2
+++ b/include/GL/internal/dri_interface.h       29 Apr 2004 10:09:12 -0000
@@ -35,6 +35,9 @@
  * \author Ian Romanick <[EMAIL PROTECTED]>
  */
 
+#ifndef DRI_INTERFACE_H
+#define DRI_INTERFACE_H
+
 /* FIXME: With a small amount of work, these two includes can be removed. */
 #include <X11/Xlib.h>
 #include <GL/glx.h>
@@ -497,3 +500,5 @@
      */
     unsigned swap_interval;
 };
+
+#endif
Index: src/mesa/drivers/dri/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- a/src/mesa/drivers/dri/Makefile     14 Apr 2004 12:44:07 -0000      1.3
+++ b/src/mesa/drivers/dri/Makefile     29 Apr 2004 10:09:13 -0000
@@ -14,7 +14,9 @@
 
 
 subdirs:
+       echo $(DRI_DIRS)
        @for dir in $(DRI_DIRS) ; do \
+               echo $$dir ; \
                (cd $$dir ; make) || exit 1; \
        done
 
Index: src/mesa/drivers/dri/Makefile.template
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/Makefile.template,v
retrieving revision 1.3
diff -u -r1.3 Makefile.template
--- a/src/mesa/drivers/dri/Makefile.template    15 Apr 2004 04:50:20 -0000      1.3
+++ b/src/mesa/drivers/dri/Makefile.template    29 Apr 2004 10:09:13 -0000
@@ -21,7 +21,6 @@
 WINOBJ=
 WINLIB=-L$(MESA)/src/glx/mini
 MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini
-MINIGLX_SOURCES = 
 INCLUDES = $(MINIGLX_INCLUDES) \
           -I$(DRM_SOURCE_PATH)/shared \
           $(SHARED_INCLUDES)
@@ -32,12 +31,17 @@
 endif
 
 
+
+
+
 ### Include directories
 SHARED_INCLUDES = \
        -I. \
        -I../common \
        -Iserver \
+       -I$(DRM_SOURCE_PATH)/shared \
        -I$(TOP)/include \
+       -I$(TOP)/include/GL/internal \
        -I$(TOP)/src/mesa \
        -I$(TOP)/src/mesa/main \
        -I$(TOP)/src/mesa/glapi \
@@ -59,7 +63,7 @@
 
 ##### TARGETS #####
 
-default: depend $(LIB_DIR)/$(LIBNAME)
+default: depend symlinks $(LIB_DIR)/$(LIBNAME)
 
 
 #$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
@@ -74,7 +78,6 @@
 
 
 
-
 # Run 'make depend' to update the dependencies if you change
 # what's included by any source file.
 depend: $(C_SOURCES) $(ASM_SOURCES)
@@ -90,6 +93,6 @@
 
 # Remove .o and backup files
 clean:
-       -rm -f *.o */*.o *~ *.o *~ *.so server/*.o
+       -rm -f *.o */*.o *~ *.o *~ *.so server/*.o $(SYMLINKS)
 
 include depend
Index: src/mesa/drivers/dri/dri_client/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/dri_client/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- a/src/mesa/drivers/dri/dri_client/Makefile  14 Apr 2004 12:39:58 -0000      1.1
+++ b/src/mesa/drivers/dri/dri_client/Makefile  29 Apr 2004 10:09:13 -0000
@@ -23,6 +23,7 @@
 
 INCLUDES = \
        -I$(TOP)/include \
+       -I$(TOP)/include/GL/internal \
        -I$(TOP)/src/mesa \
        -I$(TOP)/src/mesa/main \
        -I$(TOP)/src/mesa/glapi \
Index: src/mesa/drivers/dri/dri_client/dri_glx.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/dri_client/dri_glx.c,v
retrieving revision 1.1
diff -u -r1.1 dri_glx.c
--- a/src/mesa/drivers/dri/dri_client/dri_glx.c 14 Apr 2004 12:39:58 -0000      1.1
+++ b/src/mesa/drivers/dri/dri_client/dri_glx.c 29 Apr 2004 10:09:13 -0000
@@ -39,6 +39,7 @@
 #include <X11/Xlibint.h>
 #include <X11/extensions/Xext.h>
 #include "extutil.h"
+#include "dri_interface.h"
 #include "glxclient.h"
 #include "xf86dri.h"
 #include "sarea.h"
Index: src/mesa/drivers/dri/dri_client/dri_util.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/dri_client/dri_util.c,v
retrieving revision 1.1
diff -u -r1.1 dri_util.c
--- a/src/mesa/drivers/dri/dri_client/dri_util.c        14 Apr 2004 12:39:58 -0000     
 1.1
+++ b/src/mesa/drivers/dri/dri_client/dri_util.c        29 Apr 2004 10:09:13 -0000
@@ -41,6 +41,8 @@
 #include "dri_util.h"
 #include "glcontextmodes.h"
 
+#include "glxclient.h"
+
 /*#define DRI_NEW_INTERFACE_ONLY*/
 
 /**
Index: src/mesa/drivers/dri/dri_client/dri_util.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/dri_client/dri_util.h,v
retrieving revision 1.1
diff -u -r1.1 dri_util.h
--- a/src/mesa/drivers/dri/dri_client/dri_util.h        14 Apr 2004 12:39:58 -0000     
 1.1
+++ b/src/mesa/drivers/dri/dri_client/dri_util.h        29 Apr 2004 10:09:13 -0000
@@ -54,7 +54,7 @@
 #define CAPI  /* XXX this should be globally defined somewhere */
 
 #include <inttypes.h>
-#include "glxclient.h"           /* for GLXDrawable */
+#include "dri_interface.h"           /* for GLXDrawable */
 /* temporary */
 /* typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, 
int32_t *numerator, int32_t *denominator); */
 #include "xf86dri.h"             /* for XF86DRIClipRectPtr */
Index: src/mesa/drivers/dri/dri_client/glxextensions.h
===================================================================
RCS file: src/mesa/drivers/dri/dri_client/glxextensions.h
diff -N src/mesa/drivers/dri/dri_client/glxextensions.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ b/src/mesa/drivers/dri/dri_client/glxextensions.h   29 Apr 2004 10:09:13 -0000
@@ -0,0 +1,102 @@
+/*
+ * (c) Copyright IBM Corporation 2002
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ *    Ian Romanick <[EMAIL PROTECTED]>
+ */
+/* $XFree86:$ */
+
+#ifndef GLX_GLXEXTENSIONS_H
+#define GLX_GLXEXTENSIONS_H
+
+enum {
+   ARB_get_proc_address_bit = 0,
+   ARB_multisample_bit,
+   ARB_render_texture_bit,
+   ATI_pixel_format_float_bit,
+   EXT_visual_info_bit,
+   EXT_visual_rating_bit,
+   EXT_import_context_bit,
+   MESA_agp_offset_bit,
+   MESA_allocate_memory_bit, /* Replaces MESA_agp_offset & NV_vertex_array_range */
+   MESA_copy_sub_buffer_bit,
+   MESA_depth_float_bit,
+   MESA_pixmap_colormap_bit,
+   MESA_release_buffers_bit,
+   MESA_set_3dfx_mode_bit,
+   MESA_swap_control_bit,
+   MESA_swap_frame_usage_bit,
+   NV_float_buffer_bit,
+   NV_render_depth_texture_bit,
+   NV_render_texture_rectangle_bit,
+   NV_vertex_array_range_bit,
+   OML_swap_method_bit,
+   OML_sync_control_bit,
+   SGI_cushion_bit,
+   SGI_make_current_read_bit,
+   SGI_swap_control_bit,
+   SGI_video_sync_bit,
+   SGIS_blended_overlay_bit,
+   SGIS_color_range_bit,
+   SGIS_multisample_bit,
+   SGIX_dm_buffer_bit,
+   SGIX_fbconfig_bit,
+   SGIX_pbuffer_bit,
+   SGIX_swap_barrier_bit,
+   SGIX_swap_group_bit,
+   SGIX_video_resize_bit,
+   SGIX_video_source_bit,
+   SGIX_visual_select_group_bit,
+   SUN_get_transparent_index_bit
+};
+
+extern GLboolean __glXExtensionBitIsEnabled( __GLXscreenConfigs *psc, unsigned bit );
+extern const char * __glXGetClientExtensions( void );
+extern void __glXCalculateUsableExtensions( __GLXscreenConfigs *psc,
+    GLboolean display_is_direct_capable, int server_minor_version );
+extern void __glXScrEnableExtension( __GLXscreenConfigs *psc, const char * name );
+
+/* Source-level backwards compatibility with old drivers. They won't
+ * find the respective functions, though. 
+ */
+typedef void (* PFNGLXENABLEEXTENSIONPROC) ( const char * name,
+    GLboolean force_client );
+typedef void (* PFNGLXDISABLEEXTENSIONPROC) ( const char * name );
+
+
+#ifdef GLX_NO_STATIC_EXTENSION_FUNCTIONS
+# define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func)
+#else
+# ifdef __GNUC__
+#  define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) \
+       return_type GLX_PREFIX( real_func ) proto_args \
+       __attribute__ ((alias( # aliased_func ) ))
+# else
+#  define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) \
+       return_type GLX_PREFIX( real_func ) proto_args ; \
+       return_type GLX_PREFIX( real_func ) proto_args \
+       { return aliased_func args ; }
+# endif /* __GNUC__ */
+#endif /* GLX_NO_STATIC_EXTENSION_FUNCTIONS */
+
+#endif /* GLX_GLXEXTENSIONS_H */
Index: src/mesa/drivers/dri/dri_client/imports/glxclient.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/dri_client/imports/glxclient.h,v
retrieving revision 1.1
diff -u -r1.1 glxclient.h
--- a/src/mesa/drivers/dri/dri_client/imports/glxclient.h       14 Apr 2004 12:39:58 
-0000      1.1
+++ b/src/mesa/drivers/dri/dri_client/imports/glxclient.h       29 Apr 2004 10:09:14 
-0000
@@ -47,12 +47,12 @@
 #include <X11/Xproto.h>
 #include <X11/Xlibint.h>
 #define GLX_GLXEXT_PROTOTYPES
-#include <GL/glx.h>
-#include <GL/glxext.h>
+#include "GL/glx.h"
+#include "GL/glxext.h"
 #include <string.h>
 #include <stdlib.h>
 #include "GL/glxint.h"
-#include "GL/glxproto.h"
+/* #include "GL/glxproto.h" */
 #include "GL/internal/glcore.h"
 #include "glapitable.h"
 #ifdef NEED_GL_FUNCS_WRAPPED
@@ -85,6 +85,7 @@
  * side library and the DRI (direct rendering infrastructure).
  */
 /[EMAIL PROTECTED]/
+#if 0
 typedef struct __DRIdisplayRec  __DRIdisplay;
 typedef struct __DRIscreenRec   __DRIscreen;
 typedef struct __DRIcontextRec  __DRIcontext;
@@ -92,6 +93,7 @@
 typedef struct __DRIdriverRec   __DRIdriver;
 typedef struct __DRIframebufferRec __DRIframebuffer;
 typedef struct __DRIversionRec     __DRIversion;
+#endif
 /[EMAIL PROTECTED]/
 
 extern __DRIscreen *__glXFindDRIScreen(Display *dpy, int scrn);
@@ -104,11 +106,13 @@
  *       version, minor version, and patch level.  These structures should
  *       be modified to have a \c __DRIversionRec instead.
  */
+#if 0
 struct __DRIversionRec {
     int    major;        /**< Major version number. */
     int    minor;        /**< Minor version number. */
     int    patch;        /**< Patch-level. */
 };
+#endif
 
 /**
  * Framebuffer information record.  Used by libGL to communicate information
@@ -123,6 +127,7 @@
  *
  * \bug This structure could be better named.
  */
+#if 0
 struct __DRIframebufferRec {
     unsigned char *base;    /**< Framebuffer base address in the CPU's
                             * address space.  This value is calculated by
@@ -137,6 +142,7 @@
     int dev_priv_size;      /**< Size of the driver's dev-priv structure. */
     void *dev_priv;         /**< Pointer to the driver's dev-priv structure. */
 };
+#endif
 
 typedef void *(*CreateScreenFunc)(Display *dpy, int scrn, __DRIscreen *psc,
                                   int numConfigs, __GLXvisualConfig *config);
@@ -187,6 +193,7 @@
  * Screen dependent methods.  This structure is initialized during the
  * \c __DRIdisplayRec::createScreen call.
  */
+#if 0
 struct __DRIscreenRec {
     /**
      * Method to destroy the private DRI screen data.
@@ -271,11 +278,13 @@
                               int render_type,
                               void *sharedPrivate, __DRIcontext *pctx);
 };
+#endif
 
 /**
  * Context dependent methods.  This structure is initialized during the
  * \c __DRIscreenRec::createContext call.
  */
+#if 0
 struct __DRIcontextRec {
     /**
      * Method to destroy the private DRI context data.
@@ -317,6 +326,7 @@
     Bool (*unbindContext2)(Display *dpy, int scrn, GLXDrawable draw,
                           GLXDrawable read, GLXContext gc);
 };
+#endif
 
 /**
  * Drawable dependent methods.  This structure is initialized during the
@@ -324,6 +334,7 @@
  * by libGL at this time.  It's currently used via the dri_util.c utility code
  * instead.
  */
+#if 0
 struct __DRIdrawableRec {
     /**
      * Method to destroy the private DRI drawable data.
@@ -407,6 +418,7 @@
      */
     unsigned swap_interval;
 };
+#endif
 
 
 /*
@@ -682,7 +694,7 @@
      * \c WaitX, \c WaitGL, \c UseXFont, and \c MakeCurrent (for the old
      * context)).
      */
-    GLXContextTag currentContextTag;
+    int currentContextTag;
 
     /**
      * \name Rendering mode
@@ -1109,7 +1121,9 @@
  *
  * \sa __glXGetInternalVersion, glXGetProcAddress
  */
+#if 0
 typedef int (* PFNGLXGETINTERNALVERSIONPROC) ( void );
+#endif
 
 /**
  * Type of a pointer to \c __glXWindowExists, as returned by
@@ -1117,7 +1131,9 @@
  *
  * \sa __glXWindowExists, glXGetProcAddress
  */
+#if 0
 typedef Bool (* PFNGLXWINDOWEXISTSPROC) (Display *dpy, GLXDrawable draw);
+#endif
 
 /* Get the unadjusted system time */
 extern int __glXGetUST( int64_t * ust );
@@ -1127,7 +1143,9 @@
  * 
  * \sa __glXGetUST, glXGetProcAddress
  */
+#if 0
 typedef int (* PFNGLXGETUSTPROC) ( int64_t * ust );
+#endif
 
 
 /**
@@ -1136,8 +1154,9 @@
  * 
  * \sa _gl_context_modes_create, glXGetProcAddress
  */
-
+#if 0
 typedef __GLcontextModes * (* PFNGLXCREATECONTEXTMODES) ( unsigned count,
     size_t minimum_bytes_per_struct );
+#endif
 
 #endif /* !__GLX_client_h__ */
Index: src/mesa/drivers/dri/ffb/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/ffb/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- a/src/mesa/drivers/dri/ffb/Makefile 8 Apr 2004 22:25:29 -0000       1.2
+++ b/src/mesa/drivers/dri/ffb/Makefile 29 Apr 2004 10:09:14 -0000
@@ -5,16 +5,6 @@
 
 LIBNAME = ffb_dri.so
 
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
-
 # not yet
 # MINIGLX_SOURCES = server/ffb_dri.c 
 
@@ -40,90 +30,15 @@
        ffb_tex.c \
        ffb_tris.c \
        ffb_vb.c \
-       ffb_vtxfmt.c \
        ffb_xmesa.c
 
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(MINIGLX_SOURCES) \
        $(DRIVER_SOURCES)
 
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(TOP)/src/mesa/drivers/dri/drm/shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/shader \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
 
 ASM_SOURCES = 
 
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(LIB_DIR)/$(LIBNAME)
-
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
-
-
-$(SYMLINKS):
-       mkdir -p server
-       cd server
-       rm -f $@ && ln -s ../../radeon/$@ $@
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
-
-
-clean:
-       -rm -f *.o server/*.o
-
+include ../Makefile.template
 
-include depend
+symlinks:
Index: src/mesa/drivers/dri/ffb/ffb_xmesa.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/ffb/ffb_xmesa.c,v
retrieving revision 1.3
diff -u -r1.3 ffb_xmesa.c
--- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c      8 Apr 2004 08:54:23 -0000       1.3
+++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c      29 Apr 2004 10:09:14 -0000
@@ -56,6 +56,8 @@
 #include "ffb_vtxfmt.h"
 #include "ffb_bitmap.h"
 
+#include "drm_sarea.h"
+
 static GLboolean
 ffbInitDriver(__DRIscreenPrivate *sPriv)
 {
@@ -66,7 +68,7 @@
                return GL_FALSE;
 
        /* Allocate the private area. */
-       ffbScreen = (ffbScreenPrivate *) Xmalloc(sizeof(ffbScreenPrivate));
+       ffbScreen = (ffbScreenPrivate *) MALLOC(sizeof(ffbScreenPrivate));
        if (!ffbScreen)
                return GL_FALSE;
 
@@ -75,7 +77,7 @@
                   gDRIPriv->hFbcRegs,
                   gDRIPriv->sFbcRegs,
                   &gDRIPriv->mFbcRegs)) {
-               Xfree(ffbScreen);
+               FREE(ffbScreen);
                return GL_FALSE;
        }
        ffbScreen->regs = (ffb_fbcPtr) gDRIPriv->mFbcRegs;
@@ -86,7 +88,7 @@
                   gDRIPriv->sDacRegs,
                   &gDRIPriv->mDacRegs)) {
                drmUnmap(gDRIPriv->mFbcRegs, gDRIPriv->sFbcRegs);
-               Xfree(ffbScreen);
+               FREE(ffbScreen);
                return GL_FALSE;
        }
        ffbScreen->dac = (ffb_dacPtr) gDRIPriv->mDacRegs;
@@ -98,7 +100,7 @@
                   &gDRIPriv->mSfb8r)) {
                drmUnmap(gDRIPriv->mFbcRegs, gDRIPriv->sFbcRegs);
                drmUnmap(gDRIPriv->mDacRegs, gDRIPriv->sDacRegs);
-               Xfree(ffbScreen);
+               FREE(ffbScreen);
                return GL_FALSE;
        }
        ffbScreen->sfb8r = (volatile char *) gDRIPriv->mSfb8r;
@@ -110,7 +112,7 @@
                drmUnmap(gDRIPriv->mFbcRegs, gDRIPriv->sFbcRegs);
                drmUnmap(gDRIPriv->mDacRegs, gDRIPriv->sDacRegs);
                drmUnmap(gDRIPriv->mSfb8r, gDRIPriv->sSfb8r);
-               Xfree(ffbScreen);
+               FREE(ffbScreen);
                return GL_FALSE;
        }
        ffbScreen->sfb32 = (volatile char *) gDRIPriv->mSfb32;
@@ -123,7 +125,7 @@
                drmUnmap(gDRIPriv->mDacRegs, gDRIPriv->sDacRegs);
                drmUnmap(gDRIPriv->mSfb8r, gDRIPriv->sSfb8r);
                drmUnmap(gDRIPriv->mSfb32, gDRIPriv->sSfb32);
-               Xfree(ffbScreen);
+               FREE(ffbScreen);
                return GL_FALSE;
        }
        ffbScreen->sfb64 = (volatile char *) gDRIPriv->mSfb64;
@@ -153,7 +155,7 @@
        drmUnmap(gDRIPriv->mSfb32, gDRIPriv->sSfb32);
        drmUnmap(gDRIPriv->mSfb64, gDRIPriv->sSfb64);
 
-       Xfree(ffbScreen);
+       FREE(ffbScreen);
 }
 
 static const struct tnl_pipeline_stage *ffb_pipeline[] = {
@@ -284,7 +286,9 @@
        ffbDDInitBitmapFuncs(ctx);
        ffbInitVB(ctx);
 
+#if 0
        ffbInitTnlModule(ctx);
+#endif
 
        _tnl_destroy_pipeline(ctx);
        _tnl_install_pipeline(ctx, ffb_pipeline);
Index: src/mesa/drivers/dri/gamma/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/gamma/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- a/src/mesa/drivers/dri/gamma/Makefile       13 Apr 2004 04:11:32 -0000      1.3
+++ b/src/mesa/drivers/dri/gamma/Makefile       29 Apr 2004 10:09:14 -0000
@@ -5,16 +5,6 @@
 
 LIBNAME = gamma_dri.so
 
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
-
 # Not yet
 # MINIGLX_SOURCES = server/gamma_dri.c 
 
@@ -43,79 +33,10 @@
 
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(MINIGLX_SOURCES) \
        $(DRIVER_SOURCES)
 
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(DRM_SOURCE_PATH)/shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/shader \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
-
 ASM_SOURCES = 
 
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(LIB_DIR)/$(LIBNAME)
-
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
-
-
-clean:
-       -rm -f *.o server/*.o
-
+include ../Makefile.template
 
-include depend
+symlinks:
Index: src/mesa/drivers/dri/i810/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/i810/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- a/src/mesa/drivers/dri/i810/Makefile        13 Apr 2004 04:11:32 -0000      1.3
+++ b/src/mesa/drivers/dri/i810/Makefile        29 Apr 2004 10:09:14 -0000
@@ -5,16 +5,6 @@
 
 LIBNAME = i810_dri.so
 
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
-
 # Not yet
 # MINIGLX_SOURCES = server/i810_dri.c 
 
@@ -40,79 +30,10 @@
 
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(MINIGLX_SOURCES) \
        $(DRIVER_SOURCES)
 
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(DRM_SOURCE_PATH)/shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/shader \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
-
 ASM_SOURCES = 
 
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(LIB_DIR)/$(LIBNAME)
-
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
-
-
-clean:
-       -rm -f *.o server/*.o
-
+include ../Makefile.template
 
-include depend
+symlinks:
Index: src/mesa/drivers/dri/i810/i810ioctl.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/i810/i810ioctl.c,v
retrieving revision 1.3
diff -u -r1.3 i810ioctl.c
--- a/src/mesa/drivers/dri/i810/i810ioctl.c     11 Mar 2004 20:35:38 -0000      1.3
+++ b/src/mesa/drivers/dri/i810/i810ioctl.c     29 Apr 2004 10:09:14 -0000
@@ -204,7 +204,7 @@
   LOCK_HARDWARE( imesa );
   
   if (dPriv->pClipRects) {
-    *imesa->sarea->boxes = dPriv->pClipRects[0];
+    *imesa->sarea->boxes = *(drm_clip_rect_t *)&dPriv->pClipRects[0];
     imesa->sarea->nbox = 1;
   }
   ret = drmCommandNone(imesa->driFd, DRM_I810_FLIP);
Index: src/mesa/drivers/dri/i810/i810screen.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/i810/i810screen.c,v
retrieving revision 1.7
diff -u -r1.7 i810screen.c
--- a/src/mesa/drivers/dri/i810/i810screen.c    26 Mar 2004 02:02:48 -0000      1.7
+++ b/src/mesa/drivers/dri/i810/i810screen.c    29 Apr 2004 10:09:14 -0000
@@ -50,7 +50,7 @@
 #include "i810ioctl.h"
 
 #ifndef _SOLO
-#include "glxextensions.h"
+#include "dri_interface.h"
 #endif
 
 #ifdef USE_NEW_INTERFACE
Index: src/mesa/drivers/dri/i810/server/i810_dri.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/i810/server/i810_dri.h,v
retrieving revision 1.2
diff -u -r1.2 i810_dri.h
--- a/src/mesa/drivers/dri/i810/server/i810_dri.h       11 Mar 2004 20:35:38 -0000     
 1.2
+++ b/src/mesa/drivers/dri/i810/server/i810_dri.h       29 Apr 2004 10:09:14 -0000
@@ -4,6 +4,7 @@
 #define _I810_DRI_
 
 #include "xf86drm.h"
+#include "drm.h"
 #include "i810_common.h"
 
 #define I810_MAX_DRAWABLES 256
Index: src/mesa/drivers/dri/i830/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/i830/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- a/src/mesa/drivers/dri/i830/Makefile        14 Apr 2004 12:44:07 -0000      1.4
+++ b/src/mesa/drivers/dri/i830/Makefile        29 Apr 2004 10:09:14 -0000
@@ -34,5 +34,7 @@
 ASM_SOURCES = 
 
 
+
 include ../Makefile.template
 
+symlinks:
Index: src/mesa/drivers/dri/mach64/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/mach64/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- a/src/mesa/drivers/dri/mach64/Makefile      13 Apr 2004 04:11:32 -0000      1.3
+++ b/src/mesa/drivers/dri/mach64/Makefile      29 Apr 2004 10:09:14 -0000
@@ -5,16 +5,6 @@
 
 LIBNAME = mach64_dri.so
 
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
-
 # Not yet
 # MINIGLX_SOURCES = server/mach64_dri.c 
 
@@ -42,79 +32,10 @@
 
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(MINIGLX_SOURCES) \
        $(DRIVER_SOURCES)
 
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(DRM_SOURCE_PATH)/shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/shader \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
-
 ASM_SOURCES = 
 
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(LIB_DIR)/$(LIBNAME)
-
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
-
-
-clean:
-       -rm -f *.o server/*.o
-
+include ../Makefile.template
 
-include depend
+symlinks:
Index: src/mesa/drivers/dri/mach64/mach64_context.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/mach64/mach64_context.h,v
retrieving revision 1.4
diff -u -r1.4 mach64_context.h
--- a/src/mesa/drivers/dri/mach64/mach64_context.h      19 Mar 2004 10:20:23 -0000     
 1.4
+++ b/src/mesa/drivers/dri/mach64/mach64_context.h      29 Apr 2004 10:09:14 -0000
@@ -116,6 +116,8 @@
 } mach64_vertex;
 #endif
 
+#define CARD32 GLuint          /* KW: For building in mesa tree */
+
 /* The size of this union is not of relevence:
  */
 union mach64_vertex_t {
Index: src/mesa/drivers/dri/mach64/mach64_screen.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/mach64/mach64_screen.c,v
retrieving revision 1.4
diff -u -r1.4 mach64_screen.c
--- a/src/mesa/drivers/dri/mach64/mach64_screen.c       26 Mar 2004 02:02:48 -0000     
 1.4
+++ b/src/mesa/drivers/dri/mach64/mach64_screen.c       29 Apr 2004 10:09:14 -0000
@@ -41,7 +41,7 @@
 #include "vblank.h"
 
 #ifndef _SOLO
-#include "glxextensions.h"
+#include "dri_interface.h"
 #endif
 
 /* Mach64 configuration
@@ -452,6 +452,10 @@
  */
 void __driRegisterExtensions( void )
 {
+#if 0
+   /* KW: This is handled differently in the other drivers, not sure
+    * what to do here.
+    */
    PFNGLXENABLEEXTENSIONPROC glx_enable_extension;
 
    if ( driCompareGLXAPIVersion( 20030317 ) >= 0 ) {
@@ -464,6 +468,7 @@
         glx_enable_extension( "GLX_MESA_swap_control", GL_FALSE );
       }
    }
+#endif
 }
 #endif
 
Index: src/mesa/drivers/dri/mga/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/mga/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- a/src/mesa/drivers/dri/mga/Makefile 13 Apr 2004 04:11:32 -0000      1.4
+++ b/src/mesa/drivers/dri/mga/Makefile 29 Apr 2004 10:09:14 -0000
@@ -5,16 +5,6 @@
 
 LIBNAME = mga_dri.so
 
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
-
 MINIGLX_SOURCES = server/mga_dri.c 
 
 COMMON_SOURCES = \
@@ -30,9 +20,7 @@
        mgaioctl.c \
        mgarender.c \
        mgastate.c \
-       mgatris.c
-
-FULL_DRIVER_SOURCES = \
+       mgatris.c \
        mgapixel.c \
        mgaspan.c \
        mgatex.c \
@@ -44,80 +32,11 @@
 
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(MINIGLX_SOURCES) \
-       $(DRIVER_SOURCES) \
-       $(FULL_DRIVER_SOURCES)
-
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(DRM_SOURCE_PATH)/shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/shader \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
-
-ASM_SOURCES = 
-
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
+       $(DRIVER_SOURCES) 
 
-##### TARGETS #####
 
-default: depend $(LIB_DIR)/$(LIBNAME)
-
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
-
-
-clean:
-       -rm -f *.o server/*.o
+ASM_SOURCES = 
 
+include ../Makefile.template
 
-include depend
+symlinks:
Index: src/mesa/drivers/dri/mga/mga_xmesa.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/mga/mga_xmesa.c,v
retrieving revision 1.22
diff -u -r1.22 mga_xmesa.c
--- a/src/mesa/drivers/dri/mga/mga_xmesa.c      24 Apr 2004 14:55:02 -0000      1.22
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c      29 Apr 2004 10:09:15 -0000
@@ -60,7 +60,7 @@
 #include "vblank.h"
 
 #ifndef _SOLO
-#include "glxextensions.h"
+#include "dri_interface.h"
 #endif
 
 /* MGA configuration
Index: src/mesa/drivers/dri/r128/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r128/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- a/src/mesa/drivers/dri/r128/Makefile        13 Apr 2004 04:11:32 -0000      1.3
+++ b/src/mesa/drivers/dri/r128/Makefile        29 Apr 2004 10:09:15 -0000
@@ -5,16 +5,6 @@
 
 LIBNAME = r128_dri.so
 
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
-
 MINIGLX_SOURCES = server/r128_dri.c 
 
 COMMON_SOURCES = \
@@ -41,79 +31,11 @@
 
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(DRIVER_SOURCES) \
-       $(MINIGLX_SOURCES)
-
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(DRM_SOURCE_PATH)/shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/shader \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
+       $(DRIVER_SOURCES) 
 
 ASM_SOURCES = 
 
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(LIB_DIR)/$(LIBNAME)
-
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
-
-
-clean:
-       -rm -f *.o server/*.o
 
+include ../Makefile.template
 
-include depend
+symlinks:
Index: src/mesa/drivers/dri/r128/r128_ioctl.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r128/r128_ioctl.c,v
retrieving revision 1.10
diff -u -r1.10 r128_ioctl.c
--- a/src/mesa/drivers/dri/r128/r128_ioctl.c    26 Apr 2004 10:10:23 -0000      1.10
+++ b/src/mesa/drivers/dri/r128/r128_ioctl.c    29 Apr 2004 10:09:15 -0000
@@ -44,12 +44,6 @@
 
 #include "vblank.h"
 
-#ifdef _SOLO
-/* temporary - should really split r128_reg.h into r128_reg.h & r128_macros.h
- * like the radeon */
-#include "r128_macros.h"
-#endif
-
 #define R128_TIMEOUT        2048
 #define R128_IDLE_RETRY       32
 
@@ -221,6 +215,7 @@
 
 #define R128_MAX_OUTSTANDING   2
 
+
 /* Throttle the frame rate -- only allow one pending swap buffers
  * request at a time.
  * GH: We probably don't want a timeout here, as we can wait as
@@ -235,7 +230,8 @@
    int wait = 0;
 
    while ( 1 ) {
-      frame = INREG( R128_LAST_FRAME_REG );
+      frame = *(volatile unsigned int *)(R128MMIO + R128_LAST_FRAME_REG);
+
       if ( rmesa->sarea->last_frame - frame <= R128_MAX_OUTSTANDING ) {
         break;
       }
Index: src/mesa/drivers/dri/r128/r128_screen.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r128/r128_screen.c,v
retrieving revision 1.4
diff -u -r1.4 r128_screen.c
--- a/src/mesa/drivers/dri/r128/r128_screen.c   12 Mar 2004 03:50:30 -0000      1.4
+++ b/src/mesa/drivers/dri/r128/r128_screen.c   29 Apr 2004 10:09:15 -0000
@@ -47,7 +47,7 @@
 #include "vblank.h"
 
 #ifndef _SOLO
-#include "glxextensions.h"
+#include "dri_interface.h"
 #endif
 
 /* R128 configuration
@@ -345,7 +345,12 @@
  */
 void __driRegisterExtensions( void )
 {
-   PFNGLXENABLEEXTENSIONPROC glx_enable_extension;
+#if 0
+   /* KW: This is done slightly differently to the other drivers and
+      dri_interface.h doesn't seem to cope. 
+   */
+   PFNGLXENABLEEXTENSIONPROC
+   glx_enable_extension;
 
    if ( driCompareGLXAPIVersion( 20030317 ) >= 0 ) {
       glx_enable_extension = (PFNGLXENABLEEXTENSIONPROC)
@@ -357,6 +362,7 @@
         glx_enable_extension( "GLX_MESA_swap_control", GL_FALSE );
       }
    }
+#endif
 }
 #endif
 
Index: src/mesa/drivers/dri/r200/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r200/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- a/src/mesa/drivers/dri/r200/Makefile        13 Apr 2004 04:11:32 -0000      1.4
+++ b/src/mesa/drivers/dri/r200/Makefile        29 Apr 2004 10:09:15 -0000
@@ -1,21 +1,10 @@
 # src/mesa/drivers/dri/r200/Makefile
-# Note, this Makefile requires GNU make
 
 TOP = ../../../../..
 include $(TOP)/configs/current
 
 LIBNAME = r200_dri.so
 
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
-
 MINIGLX_SOURCES = server/radeon_dri.c 
 
 COMMON_SOURCES = \
@@ -47,96 +36,25 @@
                 r200_vtxfmt_sse.c \
                 r200_vtxfmt_x86.c 
 
-C_SOURCES = $(COMMON_SOURCES) $(MINIGLX_SOURCES) $(DRIVER_SOURCES)
-
-
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(DRM_SOURCE_PATH)/shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
+C_SOURCES = $(COMMON_SOURCES) $(DRIVER_SOURCES)
 
 ASM_SOURCES = 
 
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
 SYMLINKS = \
-       server/radeon_common.h \
        server/radeon_dri.c \
        server/radeon_dri.h \
        server/radeon.h \
        server/radeon_macros.h \
-       server/radeon_reg.h \
-       server/radeon_sarea.h \
-
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
+       server/radeon_reg.h 
 
 ##### TARGETS #####
 
-default: depend $(SYMLINKS) $(LIB_DIR)/$(LIBNAME)
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
 
+include ../Makefile.template
 
 $(SYMLINKS):
        mkdir -p server
-       cd server
-       rm -f $@ && ln -s ../../radeon/$@ $@
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
-
-
-clean:
-       -rm -f *.o server/*.o
-       -rm -f $(SYMLINKS)
+       for i in $(SYMLINKS) ; do rm -f $$i && test -f ../radeon/$$i && ln -s 
../../radeon/$$i $$i ; done
 
+symlinks: $(SYMLINKS)
 
-include depend
Index: src/mesa/drivers/dri/r200/r200_screen.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r200/r200_screen.c,v
retrieving revision 1.17
diff -u -r1.17 r200_screen.c
--- a/src/mesa/drivers/dri/r200/r200_screen.c   26 Apr 2004 10:10:23 -0000      1.17
+++ b/src/mesa/drivers/dri/r200/r200_screen.c   29 Apr 2004 10:09:15 -0000
@@ -51,7 +51,7 @@
 #include "utils.h"
 #include "vblank.h"
 #ifndef _SOLO
-#include "glxextensions.h"
+#include "dri_interface.h"
 #endif
 
 /* R200 configuration
Index: src/mesa/drivers/dri/radeon/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/radeon/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- a/src/mesa/drivers/dri/radeon/Makefile      15 Apr 2004 01:35:25 -0000      1.5
+++ b/src/mesa/drivers/dri/radeon/Makefile      29 Apr 2004 10:09:15 -0000
@@ -4,30 +4,7 @@
 TOP = ../../../../..
 include $(TOP)/configs/current
 
-ifeq ($(EMBEDDED),true)
-LIBNAME = radeon_es_dri.so
-DEFINES += \
-       -D_EMBEDDED \
-       -D_HAVE_SWRAST=0 \
-       -D_HAVE_SWTNL=0 \
-       -D_HAVE_SANITY=0 \
-       -D_HAVE_CODEGEN=0 \
-       -D_HAVE_LIGHTING=0 \
-       -D_HAVE_TEXGEN=0 \
-       -D_HAVE_USERCLIP=0 \
-       -DGLX_DIRECT_RENDERING
-else
 LIBNAME = radeon_dri.so
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
-endif
 
 MINIGLX_SOURCES = server/radeon_dri.c 
 
@@ -45,16 +22,7 @@
        radeon_lock.c \
        radeon_screen.c \
        radeon_state.c \
-       radeon_state_init.c
-
-SUBSET_DRIVER_SOURCES = \
-       radeon_subset_bitmap.c \
-       radeon_subset_readpix.c \
-       radeon_subset_select.c \
-       radeon_subset_tex.c \
-       radeon_subset_vtx.c 
-
-FULL_DRIVER_SOURCES = \
+       radeon_state_init.c \
        radeon_tex.c \
        radeon_texmem.c \
        radeon_texstate.c \
@@ -69,91 +37,14 @@
        radeon_vtxfmt_sse.c \
        radeon_vtxfmt_x86.c 
 
-ifeq ($(EMBEDDED),true)
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(MINIGLX_SOURCES) \
-       $(DRIVER_SOURCES) \
-       $(SUBSET_DRIVER_SOURCES)
-else
-C_SOURCES = \
-       $(COMMON_SOURCES) \
-       $(MINIGLX_SOURCES) \
-       $(DRIVER_SOURCES) \
-       $(FULL_DRIVER_SOURCES)
-endif
-
-
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(DRM_SOURCE_PATH)/shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/shader \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = $(GL_LIB_DEPS)
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
-
-ASM_SOURCES = 
-
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
+       $(DRIVER_SOURCES) 
 
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(LIB_DIR)/$(LIBNAME)
-
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(OBJECTS) $(MESA_MODULES)
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
 
+ASM_SOURCES = 
 
-clean:
-       -rm -f *.o server/*.o
 
+include ../Makefile.template
 
-include depend
+symlinks:
Index: src/mesa/drivers/dri/radeon/radeon_screen.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/radeon/radeon_screen.c,v
retrieving revision 1.13
diff -u -r1.13 radeon_screen.c
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c       26 Apr 2004 10:10:23 -0000     
 1.13
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c       29 Apr 2004 10:09:15 -0000
@@ -49,7 +49,7 @@
 #include "vblank.h"
 
 #ifndef _SOLO
-#include "glxextensions.h"
+#include "dri_interface.h"
 #endif
 
 /* Radeon configuration
Index: src/mesa/drivers/dri/radeon/radeon_screen.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/radeon/radeon_screen.h,v
retrieving revision 1.7
diff -u -r1.7 radeon_screen.h
--- a/src/mesa/drivers/dri/radeon/radeon_screen.h       18 Mar 2004 00:16:48 -0000     
 1.7
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.h       29 Apr 2004 10:09:15 -0000
@@ -43,7 +43,7 @@
  * IMPORTS: these headers contain all the DRI, X and kernel-related
  * definitions that we need.
  */
-#include "dri_util.h"
+/* #include "dri_util.h" */
 #include "radeon_dri.h"
 #include "radeon_reg.h"
 #include "drm_sarea.h"
Index: src/mesa/drivers/dri/sis/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/sis/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- a/src/mesa/drivers/dri/sis/Makefile 13 Apr 2004 04:11:33 -0000      1.3
+++ b/src/mesa/drivers/dri/sis/Makefile 29 Apr 2004 10:09:15 -0000
@@ -5,15 +5,6 @@
 
 LIBNAME = sis_dri.so
 
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
 
 # Not yet
 # MINIGLX_SOURCES = server/sis_dri.c 
@@ -44,79 +35,10 @@
 
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(MINIGLX_SOURCES) \
        $(DRIVER_SOURCES)
 
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(DRM_SOURCE_PATH)/shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/shader \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
-
 ASM_SOURCES = 
 
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(LIB_DIR)/$(LIBNAME)
-
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
-
-
-clean:
-       -rm -f *.o server/*.o
-
+include ../Makefile.template
 
-include depend
+symlinks:
Index: src/mesa/drivers/dri/tdfx/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/tdfx/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- a/src/mesa/drivers/dri/tdfx/Makefile        13 Apr 2004 04:11:33 -0000      1.3
+++ b/src/mesa/drivers/dri/tdfx/Makefile        29 Apr 2004 10:09:15 -0000
@@ -5,16 +5,6 @@
 
 LIBNAME = tdfx_dri.so
 
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
-
 # not yet
 # MINIGLX_SOURCES = server/tdfx_dri.c 
 
@@ -43,79 +33,13 @@
 
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(MINIGLX_SOURCES) \
        $(DRIVER_SOURCES)
 
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(DRM_SOURCE_PATH)/shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/shader \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
 
 ASM_SOURCES = 
 
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(LIB_DIR)/$(LIBNAME)
-
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
-
+include ../Makefile.template
 
-clean:
-       -rm -f *.o server/*.o
+symlinks:
 
 
-include depend
Index: src/mesa/drivers/dri/unichrome/Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/unichrome/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- a/src/mesa/drivers/dri/unichrome/Makefile   13 Apr 2004 04:11:33 -0000      1.3
+++ b/src/mesa/drivers/dri/unichrome/Makefile   29 Apr 2004 10:09:15 -0000
@@ -5,16 +5,6 @@
 
 LIBNAME = unichrome_dri.so
 
-DEFINES += \
-       -D_HAVE_SWRAST=1 \
-       -D_HAVE_SWTNL=1 \
-       -D_HAVE_SANITY=1 \
-       -D_HAVE_CODEGEN=1 \
-       -D_HAVE_LIGHTING=1 \
-       -D_HAVE_TEXGEN=1 \
-       -D_HAVE_USERCLIP=1 \
-       -DGLX_DIRECT_RENDERING
-
 MINIGLX_SOURCES = server/via_dri.c 
 
 COMMON_SOURCES = \
@@ -42,79 +32,11 @@
 
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(MINIGLX_SOURCES) \
        $(DRIVER_SOURCES)
 
-# Include directories
-INCLUDE_DIRS = \
-       -I. \
-       -I../common \
-       -Iserver \
-       -I$(TOP)/src/glx/mini \
-       -I$(TOP)/include \
-       -I$(DRM_SOURCE_PATH)\shared \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/math \
-       -I$(TOP)/src/mesa/transform \
-       -I$(TOP)/src/mesa/shader \
-       -I$(TOP)/src/mesa/swrast \
-       -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/mesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
-
-
-ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=$(MESABUILDDIR)/dri/dri.a
-WINLIB=
-else
-WINOBJ=
-WINLIB=-L$(MESA)/src/glx/mini
-endif
-
 ASM_SOURCES = 
 
-OBJECTS = $(C_SOURCES:.c=.o) \
-         $(ASM_SOURCES:.S=.o) 
-
-
-##### RULES #####
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(LIB_DIR)/$(LIBNAME)
-
-
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
-               $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
-
-
-# Emacs tags
-tags:
-       etags `find . -name \*.[ch]` `find ../include`
-
-
-clean:
-       -rm -f *.o server/*.o
 
+include ../Makefile.template
 
-include depend
+symlinks:
Index: src/mesa/drivers/dri/unichrome/via_context.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/unichrome/via_context.c,v
retrieving revision 1.4
diff -u -r1.4 via_context.c
--- a/src/mesa/drivers/dri/unichrome/via_context.c      11 Mar 2004 20:35:42 -0000     
 1.4
+++ b/src/mesa/drivers/dri/unichrome/via_context.c      29 Apr 2004 10:09:15 -0000
@@ -454,7 +454,7 @@
     _tnl_allow_vertex_fog(ctx, GL_TRUE);
 
 #ifndef _SOLO
-    vmesa->display = dpy;
+/*     vmesa->display = dpy; */
     vmesa->display = sPriv->display;
 #endif
     
@@ -545,7 +545,7 @@
     {
        GLboolean saam;
        int count = 0, fbSize;
-#ifdef _SOLO
+#ifndef USE_XINERAMA
         vmesa->saam = 0;
 #else
        saam = XineramaIsActive(vmesa->display);
@@ -706,7 +706,7 @@
         break;
     }
 
-#ifdef _SOLO
+#ifndef USE_XINERAMA
     vmesa->viaScreen->fbOffset = 0;
     vmesa->saam &= ~S1;
     vmesa->saam |= S0;
Index: src/mesa/drivers/dri/unichrome/via_context.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/unichrome/via_context.h,v
retrieving revision 1.3
diff -u -r1.3 via_context.h
--- a/src/mesa/drivers/dri/unichrome/via_context.h      11 Mar 2004 20:35:42 -0000     
 1.3
+++ b/src/mesa/drivers/dri/unichrome/via_context.h      29 Apr 2004 10:09:15 -0000
@@ -44,7 +44,7 @@
 #include "via_tex.h"
 #include "via_common.h"
 #include "xf86drmVIA.h"
-#ifndef _SOLO
+#ifdef USE_XINERAMA
 #include "../../../../../include/extensions/Xinerama.h"
 #endif
 #define VIA_FALLBACK_TEXTURE                   0x1
@@ -264,7 +264,7 @@
     int drawW;                  
     int drawH;
     GLuint saam;
-#ifndef _SOLO
+#ifdef USE_XINERAMA
     XineramaScreenInfo *xsi;
 #endif
     int drawXoffSaam;
Index: src/mesa/drivers/dri/unichrome/via_dri.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/unichrome/via_dri.h,v
retrieving revision 1.2
diff -u -r1.2 via_dri.h
--- a/src/mesa/drivers/dri/unichrome/via_dri.h  23 Feb 2004 21:07:12 -0000      1.2
+++ b/src/mesa/drivers/dri/unichrome/via_dri.h  29 Apr 2004 10:09:15 -0000
@@ -29,7 +29,7 @@
     int priv2;
     int fbOffset;
     int fbSize;
-#ifndef _SOLO
+#ifdef USE_XINERAMA
     Bool drixinerama;
 #endif
     int backOffset;
Index: src/mesa/drivers/dri/unichrome/via_screen.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/unichrome/via_screen.c,v
retrieving revision 1.2
diff -u -r1.2 via_screen.c
--- a/src/mesa/drivers/dri/unichrome/via_screen.c       23 Feb 2004 21:07:12 -0000     
 1.2
+++ b/src/mesa/drivers/dri/unichrome/via_screen.c       29 Apr 2004 10:09:15 -0000
@@ -88,7 +88,7 @@
     viaScreen->bytesPerPixel = gDRIPriv->bytesPerPixel;
     viaScreen->fbOffset = 0;
     viaScreen->fbSize = gDRIPriv->fbSize;
-#ifndef _SOLO
+#ifdef USE_XINERAMA
     viaScreen->drixinerama = gDRIPriv->drixinerama;
 #endif
     /*=* John Sheng [2003.12.9] Tuxracer & VQ *=*/
Index: src/mesa/drivers/dri/unichrome/via_screen.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/unichrome/via_screen.h,v
retrieving revision 1.2
diff -u -r1.2 via_screen.h
--- a/src/mesa/drivers/dri/unichrome/via_screen.h       23 Feb 2004 21:07:12 -0000     
 1.2
+++ b/src/mesa/drivers/dri/unichrome/via_screen.h       29 Apr 2004 10:09:15 -0000
@@ -43,7 +43,7 @@
     int fbFormat;
     int fbOffset;
     int fbSize;
-#ifndef _SOLO
+#ifdef USE_XINERAMA
     Bool drixinerama;
 #endif
     

Reply via email to