Build infrastructure for libwfb.so.
Builds fb/* twice, defining FB_ACCESS_WRAPPER for libwfb.la. Define a macro, FBPREFIX(X) which expands to fbX for libfb.la and wfbX for libwfb.la. Use the macro on [w]fbModuleData so the new module loads.
This commit is contained in:
parent
39158e98ac
commit
7608a63ff7
|
@ -1,4 +1,4 @@
|
||||||
noinst_LTLIBRARIES = libfb.la libfbmmx.la
|
noinst_LTLIBRARIES = libfb.la libwfb.la libfbmmx.la
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
-I$(top_srcdir)/hw/xfree86/os-support \
|
-I$(top_srcdir)/hw/xfree86/os-support \
|
||||||
|
@ -11,7 +11,7 @@ sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if MMX_CAPABLE
|
if MMX_CAPABLE
|
||||||
AM_CFLAGS += -DUSE_MMX
|
libfb_la_CFLAGS = $(AM_CFLAGS) -DUSE_MMX
|
||||||
|
|
||||||
libfbmmx_la_CFLAGS = \
|
libfbmmx_la_CFLAGS = \
|
||||||
$(DIX_CFLAGS) \
|
$(DIX_CFLAGS) \
|
||||||
|
@ -23,6 +23,8 @@ libfbmmx_la_CFLAGS = \
|
||||||
--param large-function-growth=10000
|
--param large-function-growth=10000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
|
||||||
|
|
||||||
libfbmmx_la_SOURCES = \
|
libfbmmx_la_SOURCES = \
|
||||||
fbmmx.c \
|
fbmmx.c \
|
||||||
fbmmx.h
|
fbmmx.h
|
||||||
|
@ -70,6 +72,8 @@ libfb_la_SOURCES = \
|
||||||
fbedge.c \
|
fbedge.c \
|
||||||
fbedgeimp.h
|
fbedgeimp.h
|
||||||
|
|
||||||
|
libwfb_la_SOURCES = $(libfb_la_SOURCES)
|
||||||
|
|
||||||
libfb_la_LIBADD = libfbmmx.la
|
libfb_la_LIBADD = libfbmmx.la
|
||||||
|
|
||||||
EXTRA_DIST = fbcmap.c
|
EXTRA_DIST = fbcmap.c
|
||||||
|
|
6
fb/fb.h
6
fb/fb.h
|
@ -44,6 +44,12 @@
|
||||||
#include "picture.h"
|
#include "picture.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FB_ACCESS_WRAPPER
|
||||||
|
#define FBPREFIX(x) wfb##x
|
||||||
|
#else
|
||||||
|
#define FBPREFIX(x) fb##x
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This single define controls the basic size of data manipulated
|
* This single define controls the basic size of data manipulated
|
||||||
* by this software; it must be log2(sizeof (FbBits) * 8)
|
* by this software; it must be log2(sizeof (FbBits) * 8)
|
||||||
|
|
|
@ -18,6 +18,7 @@ module_LTLIBRARIES = libafb.la \
|
||||||
libcfb.la \
|
libcfb.la \
|
||||||
libcfb32.la \
|
libcfb32.la \
|
||||||
libfb.la \
|
libfb.la \
|
||||||
|
libwfb.la \
|
||||||
libmfb.la \
|
libmfb.la \
|
||||||
libshadow.la
|
libshadow.la
|
||||||
|
|
||||||
|
@ -66,6 +67,11 @@ libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
|
||||||
libfb_la_SOURCES = $(top_builddir)/fb/fbcmap.c fbmodule.c
|
libfb_la_SOURCES = $(top_builddir)/fb/fbcmap.c fbmodule.c
|
||||||
libfb_la_CFLAGS = -DXFree86Server $(AM_CFLAGS)
|
libfb_la_CFLAGS = -DXFree86Server $(AM_CFLAGS)
|
||||||
|
|
||||||
|
libwfb_la_LDFLAGS = -avoid-version
|
||||||
|
libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la
|
||||||
|
libwfb_la_SOURCES = $(top_builddir)/fb/fbcmap.c fbmodule.c
|
||||||
|
libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
|
||||||
|
|
||||||
libglx_la_LDFLAGS = -avoid-version
|
libglx_la_LDFLAGS = -avoid-version
|
||||||
if AIGLX
|
if AIGLX
|
||||||
GLXDRI_LIBRARY = $(top_builddir)/GL/glx/libglxdri.la
|
GLXDRI_LIBRARY = $(top_builddir)/GL/glx/libglxdri.la
|
||||||
|
|
|
@ -33,7 +33,11 @@
|
||||||
|
|
||||||
static XF86ModuleVersionInfo VersRec =
|
static XF86ModuleVersionInfo VersRec =
|
||||||
{
|
{
|
||||||
|
#ifdef FB_ACCESS_WRAPPER
|
||||||
|
"wfb",
|
||||||
|
#else
|
||||||
"fb",
|
"fb",
|
||||||
|
#endif
|
||||||
MODULEVENDORSTRING,
|
MODULEVENDORSTRING,
|
||||||
MODINFOSTRING1,
|
MODINFOSTRING1,
|
||||||
MODINFOSTRING2,
|
MODINFOSTRING2,
|
||||||
|
@ -45,4 +49,4 @@ static XF86ModuleVersionInfo VersRec =
|
||||||
{0,0,0,0} /* signature, to be patched into the file by a tool */
|
{0,0,0,0} /* signature, to be patched into the file by a tool */
|
||||||
};
|
};
|
||||||
|
|
||||||
_X_EXPORT XF86ModuleData fbModuleData = { &VersRec, NULL, NULL };
|
_X_EXPORT XF86ModuleData FBPREFIX(ModuleData) = { &VersRec, NULL, NULL };
|
||||||
|
|
Loading…
Reference in New Issue