summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Allum <mallum@openedhand.com>2006-08-29 22:07:15 +0100
committerMatthew Allum <mallum@openedhand.com>2006-08-29 22:07:15 +0100
commit5ddbf4bcd46fe0d3d682668c2748c712fea410ae (patch)
tree46eef47d19ec7ea82f7af69d4ebf81fad1d05fc3
parent942b4369990a255257f66835caf8671432c405a3 (diff)
downloadxserver-5ddbf4bcd46fe0d3d682668c2748c712fea410ae.tar.gz
Re-add support for tslib (1.0 release) and Xcalibrate extension.
-rw-r--r--Xext/Makefile.am7
-rw-r--r--Xext/xcalibrate.c262
-rw-r--r--configure.ac23
-rw-r--r--hw/kdrive/ati/Makefile.am14
-rw-r--r--hw/kdrive/chips/Makefile.am17
-rw-r--r--hw/kdrive/ephyr/Makefile.am6
-rw-r--r--hw/kdrive/epson/Makefile.am11
-rw-r--r--hw/kdrive/fbdev/Makefile.am7
-rw-r--r--hw/kdrive/i810/Makefile.am8
-rw-r--r--hw/kdrive/mga/Makefile.am4
-rw-r--r--hw/kdrive/neomagic/Makefile.am13
-rw-r--r--hw/kdrive/nvidia/Makefile.am7
-rw-r--r--hw/kdrive/pm2/Makefile.am12
-rw-r--r--hw/kdrive/r128/Makefile.am12
-rw-r--r--hw/kdrive/smi/Makefile.am13
-rw-r--r--hw/kdrive/vesa/Makefile.am6
16 files changed, 338 insertions, 84 deletions
diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index ad3f98edf..3a48109bc 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -75,6 +75,12 @@ SERVERCONFIG_DATA = SecurityPolicy
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
endif
+XCALIBRATE_SRCS = xcalibrate.c
+if XCALIBRATE
+BUILTIN_SRCS += $(XCALIBRATE_SRCS)
+# XCalibrare needs tslib
+endif
+
# X EVent Interception Extension: allows accessibility helpers & composite
# managers to intercept events from input devices and transform as needed
# before the clients see them.
@@ -150,6 +156,7 @@ EXTRA_DIST = \
$(RES_SRCS) \
$(SCREENSAVER_SRCS) \
$(XCSECURITY_SRCS) \
+ $(XCALIBRATE_SRCS) \
$(XINERAMA_SRCS) \
$(XEVIE_SRCS) \
$(XPRINT_SRCS) \
diff --git a/Xext/xcalibrate.c b/Xext/xcalibrate.c
new file mode 100644
index 000000000..e273c5313
--- /dev/null
+++ b/Xext/xcalibrate.c
@@ -0,0 +1,262 @@
+/*
+ * $Id: xcalibrate.c,v 3.1 2004/06/02 20:49:50 pb Exp $
+ *
+ * Copyright © 2003 Philip Blundell
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Philip Blundell not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Philip Blundell makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_KDRIVE_CONFIG_H
+#include <kdrive-config.h>
+#endif
+
+#define NEED_EVENTS
+#define NEED_REPLIES
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "extnsionst.h"
+#include "swaprep.h"
+
+#include <X11/extensions/xcalibrateproto.h>
+#include <X11/extensions/xcalibratewire.h>
+
+extern void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
+extern void *tslib_raw_event_closure;
+
+static CARD8 XCalibrateReqCode;
+int XCalibrateEventBase;
+int XCalibrateReqBase;
+int XCalibrateErrorBase;
+
+static ClientPtr xcalibrate_client;
+
+static void
+xcalibrate_event_hook (int x, int y, int pressure, void *closure)
+{
+ ClientPtr pClient = (ClientPtr) closure;
+ xXCalibrateRawTouchscreenEvent ev;
+
+ ev.type = XCalibrateEventBase + X_XCalibrateRawTouchscreen;
+ ev.sequenceNumber = pClient->sequence;
+ ev.x = x;
+ ev.y = y;
+ ev.pressure = pressure;
+
+ if (!pClient->clientGone)
+ WriteEventsToClient (pClient, 1, (xEvent *) &ev);
+}
+
+static int
+ProcXCalibrateQueryVersion (ClientPtr client)
+{
+ REQUEST(xXCalibrateQueryVersionReq);
+ xXCalibrateQueryVersionReply rep;
+ CARD16 client_major, client_minor; /* not used */
+
+ REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq);
+
+ client_major = stuff->majorVersion;
+ client_minor = stuff->minorVersion;
+
+ fprintf(stderr, "%s(): called\n", __func__);
+
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.majorVersion = XCALIBRATE_MAJOR_VERSION;
+ rep.minorVersion = XCALIBRATE_MINOR_VERSION;
+ if (client->swapped) {
+ int n;
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ swaps(&rep.majorVersion, n);
+ swaps(&rep.minorVersion, n);
+ }
+ WriteToClient(client, sizeof (xXCalibrateQueryVersionReply), (char *)&rep);
+ return (client->noClientException);
+}
+
+static int
+SProcXCalibrateQueryVersion (ClientPtr client)
+{
+ REQUEST(xXCalibrateQueryVersionReq);
+ int n;
+
+ REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq);
+ swaps(&stuff->majorVersion,n);
+ swaps(&stuff->minorVersion,n);
+ return ProcXCalibrateQueryVersion(client);
+}
+
+static int
+ProcXCalibrateSetRawMode (ClientPtr client)
+{
+ REQUEST(xXCalibrateRawModeReq);
+ xXCalibrateRawModeReply rep;
+
+ REQUEST_SIZE_MATCH (xXCalibrateRawModeReq);
+
+ memset (&rep, 0, sizeof (rep));
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+
+ if (stuff->on)
+ {
+ if (xcalibrate_client == NULL)
+ {
+ /* Start calibrating. */
+ xcalibrate_client = client;
+ tslib_raw_event_hook = xcalibrate_event_hook;
+ tslib_raw_event_closure = client;
+ rep.status = GrabSuccess;
+ }
+ else
+ {
+ rep.status = AlreadyGrabbed;
+ }
+ }
+ else
+ {
+ if (xcalibrate_client == client)
+ {
+ /* Stop calibrating. */
+ xcalibrate_client = NULL;
+ tslib_raw_event_hook = NULL;
+ tslib_raw_event_closure = NULL;
+ rep.status = GrabSuccess;
+
+ /* Cycle input off and on to reload configuration. */
+ KdDisableInput ();
+ KdEnableInput ();
+ }
+ else
+ {
+ rep.status = AlreadyGrabbed;
+ }
+ }
+
+ if (client->swapped)
+ {
+ int n;
+
+ swaps (&rep.sequenceNumber, n);
+ swaps (&rep.status, n);
+ }
+ WriteToClient(client, sizeof (rep), (char *) &rep);
+ return (client->noClientException);
+}
+
+
+static int
+SProcXCalibrateSetRawMode (ClientPtr client)
+{
+ REQUEST(xXCalibrateRawModeReq);
+ int n;
+
+ REQUEST_SIZE_MATCH (xXCalibrateRawModeReq);
+
+ swaps(&stuff->on, n);
+
+ return ProcXCalibrateSetRawMode(client);
+}
+
+static void
+XCalibrateResetProc (ExtensionEntry *extEntry)
+{
+}
+
+static int
+ProcXCalibrateDispatch (ClientPtr client)
+{
+ REQUEST(xReq);
+ switch (stuff->data) {
+ case X_XCalibrateQueryVersion:
+ return ProcXCalibrateQueryVersion(client);
+ case X_XCalibrateRawMode:
+ return ProcXCalibrateSetRawMode(client);
+ default: break;
+ }
+
+ return BadRequest;
+}
+
+static int
+SProcXCalibrateDispatch (ClientPtr client)
+{
+ REQUEST(xReq);
+ int n;
+
+ swaps(&stuff->length,n);
+
+ switch (stuff->data) {
+ case X_XCalibrateQueryVersion:
+ return SProcXCalibrateQueryVersion(client);
+ case X_XCalibrateRawMode:
+ return SProcXCalibrateSetRawMode(client);
+
+ default: break;
+ }
+
+ return BadRequest;
+}
+
+static void
+XCalibrateClientCallback (CallbackListPtr *list,
+ pointer closure,
+ pointer data)
+{
+ NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
+ ClientPtr pClient = clientinfo->client;
+
+ if (clientinfo->setup == NULL
+ && xcalibrate_client != NULL
+ && xcalibrate_client == pClient)
+ {
+ /* Stop calibrating. */
+ xcalibrate_client = NULL;
+ tslib_raw_event_hook = NULL;
+ tslib_raw_event_closure = NULL;
+ }
+}
+
+void
+XCalibrateExtensionInit(void)
+{
+ ExtensionEntry *extEntry;
+
+ if (!AddCallback (&ClientStateCallback, XCalibrateClientCallback, 0))
+ return;
+
+ extEntry = AddExtension(XCALIBRATE_NAME, XCalibrateNumberEvents, XCalibrateNumberErrors,
+ ProcXCalibrateDispatch, SProcXCalibrateDispatch,
+ XCalibrateResetProc, StandardMinorOpcode);
+
+ if (!extEntry)
+ return;
+
+ XCalibrateReqCode = (unsigned char)extEntry->base;
+ XCalibrateEventBase = extEntry->eventBase;
+ XCalibrateErrorBase = extEntry->errorBase;
+
+ xcalibrate_client = 0;
+}
diff --git a/configure.ac b/configure.ac
index bbff3875c..798c8f0da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -414,6 +414,8 @@ AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinera
AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes])
AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes])
AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=yes])
+AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
+AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
AC_ARG_ENABLE(xevie, AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes])
AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=yes])
AC_ARG_ENABLE(cup, AS_HELP_STRING([--disable-cup], [Build TOG-CUP extension (default: enabled)]), [CUP=$enableval], [CUP=yes])
@@ -696,6 +698,14 @@ if test "x$XPRINT" = xyes; then
REQUIRED_MODULES="$REQUIRED_MODULES printproto"
fi
+if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then
+ AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension])
+ REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto"
+else
+ XCALIBRATE=no
+fi
+AM_CONDITIONAL(XCALIBRATE, [test "x$XCALIBRATE" = xyes])
+
AC_DEFINE(RENDER, 1, [Support RENDER extension])
RENDER_LIB='$(top_builddir)/render/librender.la'
RENDER_INC='-I$(top_srcdir)/render'
@@ -1439,6 +1449,13 @@ if test "$KDRIVE" = yes; then
fi
# tslib...
+ if test "x$TSLIB" = xyes; then
+ PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
+ if test "x$HAVE_TSLIB" = xno; then
+ AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/])
+ fi
+ AC_DEFINE(TSLIB, 1, [Have tslib support])
+ fi
# damage shadow extension glx (NOTYET) fb mi
KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src'
@@ -1446,7 +1463,7 @@ if test "$KDRIVE" = yes; then
KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux'
KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC"
- KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H"
+ KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
# dix os fb mi extension glx (NOTYET) damage shadow xpstubs
#KDRIVE_PURE_LIBS="$DIX_LIB $OS_LIB $FB_LIB $XEXT_LIB $MIEXT_DAMAGE_LIB \
@@ -1455,7 +1472,7 @@ if test "$KDRIVE" = yes; then
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a'
KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
- KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB"
+ KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB $TSLIB_LIBS"
# check if we can build Xephyr
PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
@@ -1471,7 +1488,7 @@ AC_SUBST(KDRIVE_PURE_INCS)
AC_SUBST(KDRIVE_CFLAGS)
AC_SUBST(KDRIVE_PURE_LIBS)
AC_SUBST(KDRIVE_LIBS)
-AM_CONDITIONAL(TSLIB, false)
+AM_CONDITIONAL(TSLIB, [test "x$HAVE_TSLIB" = xyes])
AM_CONDITIONAL(H3600_TS, false)
AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes])
AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes])
diff --git a/hw/kdrive/ati/Makefile.am b/hw/kdrive/ati/Makefile.am
index b23418129..3732d7d72 100644
--- a/hw/kdrive/ati/Makefile.am
+++ b/hw/kdrive/ati/Makefile.am
@@ -31,10 +31,6 @@ INCLUDES = \
bin_PROGRAMS = Xati
-if TSLIB
-TSLIB_FLAG = -lts
-endif
-
noinst_LIBRARIES = libati.a
libati_a_SOURCES = \
@@ -65,8 +61,12 @@ ATI_LIBS = \
Xati_LDADD = \
$(ATI_LIBS) \
@KDRIVE_LIBS@ \
- @XSERVER_LIBS@ \
- $(TSLIB_FLAG)
+ @XSERVER_LIBS@
+
+Xati_DEPENDENCIES = \
+ libati.a \
+ $(FBDEV_LIBS) \
+ $(VESA_LIBS) \
+ $(DRI_LIBS)
-Xati_DEPENDENCIES = $(ATI_LIBS)
diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am
index 4966faeed..80fb2ddea 100644
--- a/hw/kdrive/chips/Makefile.am
+++ b/hw/kdrive/chips/Makefile.am
@@ -5,10 +5,6 @@ INCLUDES = \
bin_PROGRAMS = Xchips
-if TSLIB
-TSLIB_FLAG = -lts
-endif
-
noinst_LIBRARIES = libchips.a
libchips_a_SOURCES = \
@@ -19,15 +15,16 @@ libchips_a_SOURCES = \
Xchips_SOURCES = \
chipsstub.c
-CHIPS_LIBS = \
- libchips.a \
+CHIPS_LIBS = \
+ libchips.a \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
Xchips_LDADD = \
$(CHIPS_LIBS) \
- @KDRIVE_LIBS@ \
- @XSERVER_LIBS@ \
- $(TSLIB_FLAG)
+ @KDRIVE_LIBS@ \
+ @XSERVER_LIBS@
-Xchips_DEPENDENCIES = $(CHIPS_LIBS)
+Xchips_DEPENDENCIES = \
+ libchips.a \
+ $(top_builddir)/hw/kdrive/vesa/libvesa.a
diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am
index 1c65944b9..8f51bbe08 100644
--- a/hw/kdrive/ephyr/Makefile.am
+++ b/hw/kdrive/ephyr/Makefile.am
@@ -5,11 +5,6 @@ INCLUDES = \
noinst_LIBRARIES = libxephyr.a libxephyr-hostx.a
-if TSLIB
-TSLIB_LIBS = -lts
-endif
-
-
bin_PROGRAMS = Xephyr
libxephyr_a_SOURCES = \
@@ -34,7 +29,6 @@ Xephyr_LDADD = \
../../../exa/libexa.la \
@KDRIVE_LIBS@ \
@KDRIVE_LIBS@ \
- $(TSLIB_LIBS) \
@XEPHYR_LIBS@
Xephyr_DEPENDENCIES = \
diff --git a/hw/kdrive/epson/Makefile.am b/hw/kdrive/epson/Makefile.am
index 97b0a75b3..665d13651 100644
--- a/hw/kdrive/epson/Makefile.am
+++ b/hw/kdrive/epson/Makefile.am
@@ -4,10 +4,6 @@ INCLUDES = \
bin_PROGRAMS = Xepson
-if TSLIB
-TSLIB_FLAG = -lts
-endif
-
noinst_LIBRARIES = libepson.a
libepson_a_SOURCES = \
@@ -25,9 +21,8 @@ EPSON_LIBS = \
@KDRIVE_LIBS@
Xepson_LDADD = \
- $(EPSON_LIBS) \
+ $(EPSON_LIBS) \
@KDRIVE_LIBS@ \
- @XSERVER_LIBS@ \
- $(TSLIB_FLAG)
+ @XSERVER_LIBS@
-Xepson_DEPENDENCIES = $(EPSON_LIBS)
+Xepson_DEPENDENCIES = libepson.a
diff --git a/hw/kdrive/fbdev/Makefile.am b/hw/kdrive/fbdev/Makefile.am
index 92464f4e8..3a8c65bbb 100644
--- a/hw/kdrive/fbdev/Makefile.am
+++ b/hw/kdrive/fbdev/Makefile.am
@@ -6,10 +6,6 @@ noinst_LIBRARIES = libfbdev.a
bin_PROGRAMS = Xfbdev
-if TSLIB
-TSLIB_FLAG = -lts
-endif
-
libfbdev_a_SOURCES = \
fbdev.c \
fbdev.h
@@ -20,8 +16,7 @@ Xfbdev_SOURCES = \
Xfbdev_LDADD = \
libfbdev.a \
@KDRIVE_LIBS@ \
- @XSERVER_LIBS@ \
- $(TSLIB_FLAG)
+ @XSERVER_LIBS@
Xfbdev_DEPENDENCIES = \
libfbdev.a
diff --git a/hw/kdrive/i810/Makefile.am b/hw/kdrive/i810/Makefile.am
index a611829a3..808d8f70b 100644
--- a/hw/kdrive/i810/Makefile.am
+++ b/hw/kdrive/i810/Makefile.am
@@ -6,9 +6,6 @@ bin_PROGRAMS = Xi810
noinst_LIBRARIES = libi810.a
-if TSLIB
-TSLIB_FLAG = -lts
-endif
libi810_a_SOURCES = \
i810_cursor.c \
@@ -29,7 +26,6 @@ I810_LIBS = \
Xi810_LDADD = \
$(I810_LIBS) \
@KDRIVE_LIBS@ \
- @XSERVER_LIBS@ \
- $(TSLIB_FLAG)
+ @XSERVER_LIBS@
-Xi810_DEPENDENCIES = $(I810_LIBS)
+Xi810_DEPENDENCIES = libi810.a
diff --git a/hw/kdrive/mga/Makefile.am b/hw/kdrive/mga/Makefile.am
index 00b8c56e9..d8ebae920 100644
--- a/hw/kdrive/mga/Makefile.am
+++ b/hw/kdrive/mga/Makefile.am
@@ -32,4 +32,6 @@ Xmga_LDADD = \
@XSERVER_LIBS@ \
$(TSLIB_FLAG)
-Xmga_DEPENDENCIES = $(MGA_LIBS)
+Xmga_DEPENDENCIES = \
+ libmga.a \
+ $(top_builddir)/hw/kdrive/vesa/libvesa.a
diff --git a/hw/kdrive/neomagic/Makefile.am b/hw/kdrive/neomagic/Makefile.am
index 75fd4ed7b..9f8e02919 100644
--- a/hw/kdrive/neomagic/Makefile.am
+++ b/hw/kdrive/neomagic/Makefile.am
@@ -16,10 +16,6 @@ INCLUDES = \
bin_PROGRAMS = Xneomagic
-if TSLIB
-TSLIB_FLAG = -lts
-endif
-
noinst_LIBRARIES = libneomagic.a
libneomagic_a_SOURCES = \
@@ -41,7 +37,10 @@ NEOMAGIC_LIBS = \
Xneomagic_LDADD = \
$(NEOMAGIC_LIBS) \
@KDRIVE_LIBS@ \
- @XSERVER_LIBS@ \
- $(TSLIB_FLAG)
+ @XSERVER_LIBS@
+
-Xneomagic_DEPENDENCIES = $(NEOMAGIC_LIBS)
+Xneomagic_DEPENDENCIES = \
+ libneomagic.a \
+ ${FBDEV_LIBS} \
+ ${VESA_LIBS}
diff --git a/hw/kdrive/nvidia/Makefile.am b/hw/kdrive/nvidia/Makefile.am
index 3c31a9842..d7b26cfa1 100644
--- a/hw/kdrive/nvidia/Makefile.am
+++ b/hw/kdrive/nvidia/Makefile.am
@@ -30,7 +30,8 @@ NVIDIA_LIBS = \
Xnvidia_LDADD = \
$(NVIDIA_LIBS) \
@KDRIVE_LIBS@ \
- @XSERVER_LIBS@ \
- $(TSLIB_FLAG)
+ @XSERVER_LIBS@
-Xnvidia_DEPENDENCIES = $(NVIDIA_LIBS)
+Xnvidia_DEPENDENCIES = \
+ libnvidia.a \
+ $(top_builddir)/hw/kdrive/vesa/libvesa.a
diff --git a/hw/kdrive/pm2/Makefile.am b/hw/kdrive/pm2/Makefile.am
index 4c41c65e8..24ef15042 100644
--- a/hw/kdrive/pm2/Makefile.am
+++ b/hw/kdrive/pm2/Makefile.am
@@ -5,10 +5,6 @@ INCLUDES = \
bin_PROGRAMS = Xpm2
-if TSLIB
-TSLIB_FLAG = -lts
-endif
-
noinst_LIBRARIES = libpm2.a
libpm2_a_SOURCES = \
@@ -28,7 +24,9 @@ PM2_LIBS = \
Xpm2_LDADD = \
$(PM2_LIBS) \
@KDRIVE_LIBS@ \
- @XSERVER_LIBS@ \
- $(TSLIB_FLAG)
+ @XSERVER_LIBS@
+
-Xpm2_DEPENDENCIES = $(PM2_LIBS)
+Xpm2_DEPENDENCIES = \
+ libpm2.a \
+ $(top_builddir)/hw/kdrive/vesa/libvesa.a
diff --git a/hw/kdrive/r128/Makefile.am b/hw/kdrive/r128/Makefile.am
index d68e155f4..da42af95f 100644
--- a/hw/kdrive/r128/Makefile.am
+++ b/hw/kdrive/r128/Makefile.am
@@ -5,10 +5,6 @@ INCLUDES = \
bin_PROGRAMS = Xr128
-if TSLIB
-TSLIB_FLAG = -lts
-endif
-
noinst_LIBRARIES = libr128.a
libr128_a_SOURCES = \
@@ -27,7 +23,9 @@ R128_LIBS = \
Xr128_LDADD = \
$(R128_LIBS) \
@KDRIVE_LIBS@ \
- @XSERVER_LIBS@ \
- $(TSLIB_FLAG)
+ @XSERVER_LIBS@
+
-Xr128_DEPENDENCIES = $(R128_LIBS)
+Xr128_DEPENDENCIES = \
+ libr128.a \
+ $(top_builddir)/hw/kdrive/vesa/libvesa.a
diff --git a/hw/kdrive/smi/Makefile.am b/hw/kdrive/smi/Makefile.am
index f7f0a6675..86a9ea947 100644
--- a/hw/kdrive/smi/Makefile.am
+++ b/hw/kdrive/smi/Makefile.am
@@ -6,10 +6,6 @@ INCLUDES = \
bin_PROGRAMS = Xsmi
-if TSLIB
-TSLIB_FLAG = -lts
-endif
-
noinst_LIBRARIES = libsmi.a
# smivideo.c # not ready yet
@@ -32,7 +28,10 @@ SMI_LIBS = \
Xsmi_LDADD = \
$(SMI_LIBS) \
@KDRIVE_LIBS@ \
- @XSERVER_LIBS@ \
- $(TSLIB_FLAG)
+ @XSERVER_LIBS@
+
-Xsmi_DEPENDENCIES = $(SMI_LIBS)
+Xsmi_DEPENDENCIES = \
+ libsmi.a \
+ $(top_builddir)/hw/kdrive/fbdev/libfbdev.a \
+ $(top_builddir)/hw/kdrive/vesa/libvesa.a
diff --git a/hw/kdrive/vesa/Makefile.am b/hw/kdrive/vesa/Makefile.am
index c490205b0..70ba55fa7 100644
--- a/hw/kdrive/vesa/Makefile.am
+++ b/hw/kdrive/vesa/Makefile.am
@@ -6,11 +6,6 @@ noinst_LIBRARIES = libvesa.a
bin_PROGRAMS = Xvesa
-if TSLIB
-TSLIB_FLAG = -lts
-endif
-
-
libvesa_a_SOURCES = \
vesa.c \
vesa.h \
@@ -28,7 +23,6 @@ Xvesa_LDADD = \
libvesa.a \
@KDRIVE_LIBS@ \
@KDRIVE_LIBS@ \
- $(TSLIB_FLAG) \
@XSERVER_LIBS@
Xvesa_DEPENDENCIES = \