diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-21 11:03:42 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-31 14:56:47 +1000 |
commit | 7a69159f835d4542dae41cafda22782b66c6662b (patch) | |
tree | 280a8529d07d3e48cf24d8597c0276c3bdd7eca1 | |
parent | 230babf623f23aac9f3cb62b56c8ce9a1a885e3c (diff) |
Split non-evdev backends into a separate helper library
Untangling those from the various X bits they rely to is a waste of time,
IMO.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/Makefile.am | 19 | ||||
-rw-r--r-- | src/synaptics.c | 11 |
2 files changed, 22 insertions, 8 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index bbb28db..9eab5a2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -41,12 +41,7 @@ libsynaptics_core_la_SOURCES = \ synproto.c \ synproto.h -if BUILD_PS2COMM -libsynaptics_core_la_SOURCES += \ - alpscomm.c \ - ps2comm.c ps2comm.h -endif - +# evdev backend - for all frontends if BUILD_EVENTCOMM libsynaptics_core_la_SOURCES += \ eventcomm.c eventcomm.h @@ -54,8 +49,16 @@ libsynaptics_core_la_LIBADD = \ $(MTDEV_LIBS) endif +# other backends - for X driver only +noinst_LTLIBRARIES += libsynaptics_alt_backends.la +libsynaptics_alt_backends_la_SOURCES = +if BUILD_PS2COMM +libsynaptics_alt_backends_la_SOURCES += \ + alpscomm.c \ + ps2comm.c ps2comm.h +endif if BUILD_PSMCOMM -libsynaptics_core_la_SOURCES += \ +libsynaptics_alt_backends_la_SOURCES += \ psmcomm.c endif @@ -65,5 +68,5 @@ synaptics_drv_la_SOURCES = \ synaptics-x11.h \ properties.c +synaptics_drv_la_LIBADD = libsynaptics_core.la libsynaptics_alt_backends.la -synaptics_drv_la_LIBADD = libsynaptics_core.la diff --git a/src/synaptics.c b/src/synaptics.c index b482541..b069371 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -114,6 +114,17 @@ static int HandleState(SynapticsPrivate *priv, struct SynapticsHwState *, unsign Bool from_timer); static void ScaleCoordinates(SynapticsPrivate * priv, struct SynapticsHwState *hw); + +/** + * When building the core library, the alternative backends may not be + * linked (for non-X11 drivers). We still need to resolve it though. + * FIXME: need a better way to handle this + */ +struct SynapticsProtocolOperations event_proto_operations; +struct SynapticsProtocolOperations psm_proto_operations; +struct SynapticsProtocolOperations psaux_proto_operations; +struct SynapticsProtocolOperations alps_proto_operations; + const static struct { const char *name; struct SynapticsProtocolOperations *proto_ops; |