summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/Makefile6
-rw-r--r--src/mesa/drivers/x11/glxheader.h1
-rw-r--r--src/mesa/drivers/xorg/.gitignore3
-rw-r--r--src/mesa/drivers/xorg/Makefile86
-rw-r--r--src/mesa/drivers/xorg/glcore.c24
-rw-r--r--src/mesa/glapi/glapi.c4
-rw-r--r--src/mesa/glapi/glthread.c4
-rw-r--r--src/mesa/main/glheader.h5
8 files changed, 126 insertions, 7 deletions
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 695a4160942..633bfb19a3b 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -103,9 +103,11 @@ OSMESA16_OBJECTS = \
$(OSMESA_DRIVER_OBJECTS)
-stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
+stand-alone: depend subdirs libmesa.a \
+ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
-osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
+osmesa-only: depend subdirs \
+ $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
# Make the GL library
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
diff --git a/src/mesa/drivers/x11/glxheader.h b/src/mesa/drivers/x11/glxheader.h
index a402191f131..15e83905834 100644
--- a/src/mesa/drivers/x11/glxheader.h
+++ b/src/mesa/drivers/x11/glxheader.h
@@ -34,6 +34,7 @@
#ifdef XFree86Server
+# include "xorg-server.h"
# include "resource.h"
# include "windowstr.h"
diff --git a/src/mesa/drivers/xorg/.gitignore b/src/mesa/drivers/xorg/.gitignore
new file mode 100644
index 00000000000..18a777939c6
--- /dev/null
+++ b/src/mesa/drivers/xorg/.gitignore
@@ -0,0 +1,3 @@
+glxheader.h
+xmesaP.h
+xm_*
diff --git a/src/mesa/drivers/xorg/Makefile b/src/mesa/drivers/xorg/Makefile
new file mode 100644
index 00000000000..7fd7036665b
--- /dev/null
+++ b/src/mesa/drivers/xorg/Makefile
@@ -0,0 +1,86 @@
+# src/mesa/drivers/xorg/Makefile
+
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBNAME = libGLcore.so
+
+SYMLINKS = \
+ glxheader.h \
+ xmesaP.h \
+ xm_api.c \
+ xm_buffer.c \
+ xm_dd.c \
+ xm_image.c \
+ xm_image.h \
+ xm_line.c \
+ xm_span.c \
+ xm_tri.c
+
+C_SOURCES = \
+ xm_api.c \
+ xm_buffer.c \
+ xm_dd.c \
+ xm_image.c \
+ xm_line.c \
+ xm_span.c \
+ xm_tri.c \
+ glcore.c
+
+########################################
+
+MESA_MODULES = $(TOP)/src/mesa/libmesa.a
+
+C_SOURCES += ../common/driverfuncs.c
+
+OBJECTS = $(C_SOURCES:.c=.o)
+
+### Include directories
+INCLUDES = \
+ -I. \
+ -I.. \
+ -I$(TOP)/include \
+ -I$(TOP)/src/mesa \
+ -I$(TOP)/src/mesa/main \
+ -I$(TOP)/src/mesa/glapi \
+ `pkg-config --cflags xorg-server`
+
+# undef 'USE_XSHM' to make it explicit that 'XFree86Server' takes precedence
+DRIVER_DEFINES = -UUSE_XSHM -DXFree86Server
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
+
+
+##### TARGETS #####
+
+default: depend symlinks $(LIBNAME)
+
+
+$(LIBNAME): $(OBJECTS) $(MESA_MODULES) Makefile
+ $(TOP)/bin/mklib -noprefix -o $@ \
+ $(OBJECTS) $(MESA_MODULES) $(GLCORE_LIB_DEPS)
+
+
+depend: $(C_SOURCES) $(SYMLINKS)
+ touch depend
+ $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \
+ > /dev/null
+
+
+clean:
+ -rm -f *.o *.so $(SYMLINKS)
+ -rm -f depend depend.bak
+
+install: $(LIBNAME)
+ $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
+ $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
+
+$(SYMLINKS):
+ @[ -e $@ ] || ln -sf ../x11/$@ ./
+
+symlinks: $(SYMLINKS)
+
+include depend
diff --git a/src/mesa/drivers/xorg/glcore.c b/src/mesa/drivers/xorg/glcore.c
new file mode 100644
index 00000000000..a0199117c67
--- /dev/null
+++ b/src/mesa/drivers/xorg/glcore.c
@@ -0,0 +1,24 @@
+
+#define _NEED_GL_CORE_IF
+#include <GL/xmesa.h>
+#include <GL/internal/glcore.h>
+#include "xmesaP.h"
+
+PUBLIC
+__GLcoreModule GL_Core = {
+ XMesaCreateVisual,
+ XMesaDestroyVisual,
+
+ XMesaCreateWindowBuffer,
+ XMesaCreatePixmapBuffer,
+ XMesaDestroyBuffer,
+ XMesaSwapBuffers,
+ XMesaResizeBuffers,
+
+ XMesaCreateContext,
+ XMesaDestroyContext,
+ XMesaCopyContext,
+ XMesaMakeCurrent2,
+ XMesaForceCurrent,
+ XMesaLoseCurrent
+};
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 47c57822732..36b09e68e50 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -50,6 +50,10 @@
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#include "glheader.h"
#include "glapi.h"
#include "glapioffsets.h"
diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c
index 4513853f5a2..92f2e5bf560 100644
--- a/src/mesa/glapi/glthread.c
+++ b/src/mesa/glapi/glthread.c
@@ -29,6 +29,10 @@
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#include "glheader.h"
#include "glthread.h"
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index bab962ad5e1..c6f81fdd7e6 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -46,11 +46,6 @@
#ifndef GLHEADER_H
#define GLHEADER_H
-/* This allows Mesa to be integrated into XFree86 */
-#ifdef HAVE_DIX_CONFIG_H
-#include "dix-config.h"
-#endif
-
#include <assert.h>
#include <ctype.h>
#if defined(__alpha__) && defined(CCPML)