On Fri, 19 Aug 2011 10:58:02 +0200 Antonio Ospite <ospite@xxxxxxxxxxxxxxxxx> wrote: > On Thu, 18 Aug 2011 16:18:57 -0700 > Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote: > [...] > > > > I rather have the Sixaxis plugin being an external plugin only then. So > > you are not allowed to make this builtin. > > > > Marcel, I guess that an _external_ plugin in BlueZ context is one which > is not embedded in the bluetoothd binary but rather distributed as a > shared object, isn't it? Are there examples of such a plugin in bluez > tree I can copy from? > OK, I think I've got it, it is external-dummy, this is how I did it: --- Makefile.am | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4bcff4d..ff33bf0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -230,8 +230,10 @@ builtin_sources += thermometer/main.c \ endif if SIXAXISPLUGIN -builtin_modules += sixaxis -builtin_sources += plugins/sixaxis.c +plugin_LTLIBRARIES += plugins/sixaxis.la +plugins_sixaxis_la_SOURCES = plugins/sixaxis.c +plugins_sixaxis_la_LDFLAGS = -module -avoid-version -no-undefined @UDEV_LIBS@ +plugins_sixaxis_la_CFLAGS = -fvisibility=hidden @DBUS_CFLAGS@ @GLIB_CFLAGS@ @UDEV_CFLAGS@ endif builtin_modules += hciops mgmtops @@ -300,7 +302,7 @@ src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \ src/event.h src/event.c \ src/oob.h src/oob.c src/eir.h src/eir.c src_bluetoothd_LDADD = lib/libbluetooth.la @GLIB_LIBS@ @DBUS_LIBS@ \ - @CAPNG_LIBS@ @UDEV_LIBS@ -ldl -lrt + @CAPNG_LIBS@ -ldl -lrt src_bluetoothd_LDFLAGS = -Wl,--export-dynamic \ -Wl,--version-script=$(srcdir)/src/bluetooth.ver @@ -415,7 +417,7 @@ EXTRA_DIST += doc/manager-api.txt \ AM_YFLAGS = -d -AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@ @UDEV_CFLAGS@ \ +AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@ \ -DBLUETOOTH_PLUGIN_BUILTIN -DPLUGINDIR=\""$(plugindir)"\" INCLUDES = -I$(builddir)/lib -I$(builddir)/src -I$(srcdir)/src \ -- 1.7.5.4 -- Antonio Ospite http://ao2.it PGP public key ID: 0x4553B001 A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing?
Attachment:
pgpiQuUgQo9_o.pgp
Description: PGP signature