Initial commit of XGL build infrastructure and XGL code changes for

building within the xorg server tree. Requires additional, uncommitted
    dix changes to successfully build, and successful running is still yet
    to happen.
This commit is contained in:
Eric Anholt 2005-12-28 10:31:46 +00:00
commit b1b40ed6a8
18 changed files with 187 additions and 88 deletions

View file

@ -18,6 +18,10 @@ if XWIN
XWIN_SUBDIRS = xwin
endif
if XGL
XGL_SUBDIRS = xgl
endif
if KDRIVE
KDRIVE_SUBDIRS = kdrive
endif
@ -26,6 +30,7 @@ endif
SUBDIRS = \
$(XORG_SUBDIRS) \
$(XGL_SUBDIRS) \
$(XWIN_SUBDIRS) \
$(XVFB_SUBDIRS) \
$(XNEST_SUBDIRS) \

View file

@ -16,11 +16,9 @@ SUBDIRS = \
$(XGLX_SUBDIRS) \
$(XEGL_SUBDIRS)
INCLUDES = \
@XGL_INCS@ \
@XSERVER_CFLAGS@ \
@XGLSERVER_CFLAGS@ \
-DMODULEPATH=\"@MODULEPATH@\"
AM_CFLAGS = \
@SERVER_DEFINES@ \
$(XGLMODULES_CFLAGS)
noinst_LIBRARIES = libxgl.a
@ -52,15 +50,20 @@ libxgl_a_SOURCES = \
xglloader.c \
xglglx.c
if XGLSERVER
Xgl_DEPENDENCIES = @XGL_LIBS@
Xgl_LDFLAGS = -export-dynamic
Xgl_SOURCES = xglinit.c
Xgl_LDADD = \
@XGL_LIBS@ \
@XSERVER_LIBS@ \
@XGLSERVER_LIBS@
Xgl_SOURCES = \
xglinit.c \
$(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c \
$(top_srcdir)/fb/fbcmap.c
Xgl_LDADD = \
libxgl.a \
$(XORG_CORE_LIBS) \
$(XGL_LIBS) \
$(XSERVER_LIBS) \
$(EXTENSION_LIBS) \
$(XGLMODULES_LIBS)
Xgl_programs = Xgl
endif
bin_PROGRAMS = $(Xgl_programs)

View file

@ -1,16 +1,14 @@
if XGLSERVER
MODULE_SUBDIRS = module
if XGL
XGL_MODULE_DIRS = module
endif
SUBDIRS = \
. \
$(MODULE_SUBDIRS)
$(XGL_MODULE_DIRS)
INCLUDES = \
@XEGL_INCS@ \
@XSERVER_CFLAGS@ \
@XGLSERVER_CFLAGS@ \
@XEGLSERVER_CFLAGS@
AM_CFLAGS = \
@SERVER_DEFINES@ \
$(XEGLMODULES_CFLAGS)
noinst_LTLIBRARIES = libxegl.la
@ -22,16 +20,22 @@ libxegl_la_SOURCES = \
kinput.c \
evdev.c
if XEGLSERVER
Xegl_DEPENDENCIES = @XEGL_LIBS@
Xegl_LDFLAGS = -export-dynamic
Xegl_SOURCES = xeglinit.c
Xegl_LDADD = \
@XEGL_LIBS@ \
@XSERVER_LIBS@ \
@XGLSERVER_LIBS@ \
@XEGLSERVER_LIBS@
Xegl_SOURCES = \
xglxinit.c \
$(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c \
$(top_srcdir)/fb/fbcmap.c
Xegl_LDADD = \
libxegl.la \
../libxgl.a \
$(XORG_CORE_LIBS) \
$(XEGL_LIBS) \
$(XSERVER_LIBS) \
$(EXTENSION_LIBS) \
$(XGLXMODULES_LIBS)
Xegl_programs = Xegl
endif
bin_PROGRAMS = $(Xegl_programs)

View file

@ -22,9 +22,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xgl-config.h>
#define NEED_EVENTS
#include <errno.h>
#include <linux/input.h>

View file

@ -23,9 +23,7 @@
*/
/* $RCSId: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.30 2002/11/13 16:37:39 keithp Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xgl-config.h>
#include <signal.h>
#include <stdio.h>

View file

@ -1,14 +1,14 @@
INCLUDES = \
@XEGL_INCS@ \
@XSERVER_CFLAGS@ \
@XEGLSERVER_CFLAGS@
AM_CFLAGS = \
-I$(srcdir)/.. \
-I$(srcdir)/../.. \
$(XEGLMODULES_CFLAGS)
libxegl_la_LDFLAGS = -avoid-version
libxegl_la_SOURCES = xeglmodule.c
libxegl_la_LIBADD = \
@XEGL_MOD_LIBS@ \
@XEGLSERVER_LIBS@
$(top_builddir)/hw/xgl/glx/libxegl.la \
$(XEGLMODULES_LIBS)
moduledir = @MODULEPATH@/xgl
moduledir = @xglmoduledir@
module_LTLIBRARIES = libxegl.la

View file

@ -1,16 +1,15 @@
if XGLSERVER
MODULE_SUBDIRS = module
if XGL
XGL_MODULE_DIRS = module
endif
SUBDIRS = \
. \
$(MODULE_SUBDIRS)
$(XGL_MODULE_DIRS)
INCLUDES = \
@XGLX_INCS@ \
@XSERVER_CFLAGS@ \
@XGLSERVER_CFLAGS@ \
@XGLXSERVER_CFLAGS@
AM_CFLAGS = \
-I$(srcdir)/.. \
@SERVER_DEFINES@ \
$(XGLXMODULES_CFLAGS)
noinst_LTLIBRARIES = libxglx.la
@ -18,16 +17,22 @@ libxglx_la_SOURCES = \
xglx.h \
xglx.c
if XGLXSERVER
Xglx_DEPENDENCIES = @XGLX_LIBS@
Xglx_LDFLAGS = -export-dynamic
Xglx_SOURCES = xglxinit.c
Xglx_LDADD = \
@XGLX_LIBS@ \
@XSERVER_LIBS@ \
@XGLSERVER_LIBS@ \
@XGLXSERVER_LIBS@
Xglx_SOURCES = \
xglxinit.c \
$(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c \
$(top_srcdir)/fb/fbcmap.c
Xglx_LDADD = \
libxglx.la \
../libxgl.a \
$(XORG_CORE_LIBS) \
$(XGLX_LIBS) \
$(XSERVER_LIBS) \
$(EXTENSION_LIBS) \
$(XGLXMODULES_LIBS)
Xglx_programs = Xglx
endif
bin_PROGRAMS = $(Xglx_programs)

View file

@ -1,14 +1,14 @@
INCLUDES = \
@XGLX_INCS@ \
@XSERVER_CFLAGS@ \
@XGLXSERVER_CFLAGS@
AM_CFLAGS = \
-I$(srcdir)/.. \
-I$(srcdir)/../.. \
$(XGLXMODULES_CFLAGS)
libxglx_la_LDFLAGS = -avoid-version
libxglx_la_SOURCES = xglxmodule.c
libxglx_la_LIBADD = \
@XGLX_MOD_LIBS@ \
@XGLXSERVER_LIBS@
libxglx_la_LIBADD = \
$(top_builddir)/hw/xgl/glx/libxglx.la \
$(XGLXMODULES_LIBS)
moduledir = @MODULEPATH@/xgl
moduledir = @xglmoduledir@
module_LTLIBRARIES = libxglx.la

View file

@ -25,7 +25,7 @@
#include "xglx.h"
static xglScreenInfoRec xglxScreenInfo = {
xglScreenInfoRec xglScreenInfo = {
NULL, 0, 0, 0, 0,
DEFAULT_GEOMETRY_DATA_TYPE,
DEFAULT_GEOMETRY_USAGE,
@ -53,7 +53,7 @@ InitOutput (ScreenInfo *pScreenInfo,
}
#endif
xglxInitOutput (&xglxScreenInfo, pScreenInfo, argc, argv);
xglxInitOutput (pScreenInfo, argc, argv);
}
Bool
@ -73,7 +73,7 @@ void
InitInput (int argc,
char **argv)
{
xglxInitInput (&xglxScreenInfo, argc, argv);
xglxInitInput (argc, argv);
}
void
@ -105,11 +105,11 @@ ddxProcessArgument (int argc,
}
#endif
skip = xglProcessArgument (&xglxScreenInfo, argc, argv, i);
skip = xglProcessArgument (argc, argv, i);
if (skip)
return skip;
return xglxProcessArgument (&xglxScreenInfo, argc, argv, i);
return xglxProcessArgument (argc, argv, i);
}
void
@ -129,3 +129,7 @@ OsVendorInit (void)
{
xglxOsVendorInit ();
}
void ddxInitGlobals(void)
{
}

View file

@ -26,9 +26,7 @@
#ifndef _XGL_GLXEXT_H_
#define _XGL_GLXEXT_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xgl-config.h>
#include "scrnintstr.h"

View file

@ -26,9 +26,7 @@
#ifndef _XGL_H_
#define _XGL_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xgl-config.h>
#include <stdint.h>
#include <stdio.h>
@ -53,6 +51,11 @@ typedef struct _GCFuncs *GCFuncsPtr;
#include "mipict.h"
#endif
/* For the modules. We should decide what the actual version numbering should
* be.
*/
#define VERSION "0.0.1"
extern WindowPtr *WindowTable;
#define XGL_DEFAULT_PBO_MASK 0
@ -1331,7 +1334,7 @@ xglAddTraps (PicturePtr pDst,
#endif
#ifdef XLOADABLE
#ifdef XGL_MODULAR
/* xglloader.c */

View file

@ -139,7 +139,7 @@ Bool
xglLoadGLXModules (void)
{
#ifdef XLOADABLE
#ifdef XGL_MODULAR
if (!glXHandle)
{
xglSymbolRec sym[] = {
@ -207,7 +207,7 @@ void
xglUnloadGLXModules (void)
{
#ifdef XLOADABLE
#ifdef XGL_MODULAR
if (glXHandle)
{
xglUnloadModule (glXHandle);

View file

@ -52,7 +52,7 @@ Bool
xglLoadHashFuncs (void *handle)
{
#ifdef XLOADABLE
#ifdef XGL_MODULAR
xglSymbolRec sym[] = {
SYM (__hashFunc.NewHashTable, "_mesa_NewHashTable"),
SYM (__hashFunc.DeleteHashTable, "_mesa_DeleteHashTable"),

View file

@ -98,7 +98,7 @@ static Bool
xglEnsureDDXModule (void)
{
#ifdef XLOADABLE
#ifdef XGL_MODULAR
static void *ddxHandle = 0;
static Bool status = TRUE;
@ -285,3 +285,7 @@ OsVendorInit (void)
if (xglEnsureDDXModule ())
(*__ddxFunc.osVendorInit) ();
}
void ddxInitGlobals(void)
{
}

View file

@ -26,7 +26,7 @@
#include "xgl.h"
#include "xglmodule.h"
#ifdef XLOADABLE
#ifdef XGL_MODULAR
#include <dlfcn.h>
@ -44,11 +44,11 @@ xglLoadModule (const char *name)
SYM (moduleInit, "moduleInit")
};
module = malloc (strlen (MODULEPATH "/xgl/lib.so") + strlen (name) + 1);
module = malloc (strlen (XGL_MODULE_PATH "/lib.so") + strlen (name) + 1);
if (!module)
return 0;
sprintf (module, MODULEPATH "/xgl/lib%s.so", name);
sprintf (module, XGL_MODULE_PATH "/lib%s.so", name);
handle = dlopen (module, RTLD_NOW);
if (handle)

View file

@ -26,9 +26,7 @@
#ifndef _XGL_MODULE_H_
#define _XGL_MODULE_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xgl-config.h>
#include <X11/Xdefs.h>
#include "misc.h"