diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-08-09 14:05:57 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-08-09 14:05:57 -0700 |
commit | 33f51f71f9ce9af5ba3bf2fdce3310645e24f2f2 (patch) | |
tree | ea2551f1c0b14f00c02ba0a6c9de4af3d9dd6106 | |
parent | 6c7c4ec6b0cb39c7b5d1ed13a4dcf4c216517a73 (diff) | |
download | bluez-33f51f71f9ce9af5ba3bf2fdce3310645e24f2f2.tar.gz |
Build the builtin plugins along with the daemon
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | plugins/Makefile.am | 53 | ||||
-rw-r--r-- | src/Makefile.am | 50 |
4 files changed, 50 insertions, 61 deletions
diff --git a/.gitignore b/.gitignore index 7c2c08b7d..9ee703d6a 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,7 @@ parser.c bluez.pc include/bluetooth src/bluetoothd -plugins/builtin.h +src/builtin.h audio/telephony.c scripts/bluetooth.rules diff --git a/Makefile.am b/Makefile.am index c4c63226d..fce726032 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ -SUBDIRS = include lib sbc gdbus common plugins src client\ +SUBDIRS = include lib sbc gdbus common src client plugins \ network serial input audio tools \ rfcomm compat cups test scripts doc @@ -9,12 +9,10 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = bluez.pc -DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc \ - --disable-udevrules +DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc --disable-udevrules DISTCLEANFILES = $(pkgconfig_DATA) MAINTAINERCLEANFILES = Makefile.in \ aclocal.m4 configure config.h.in config.sub config.guess \ ltmain.sh depcomp compile missing install-sh mkinstalldirs ylwrap - diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 9d9f970ef..3895e2766 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -3,39 +3,12 @@ plugindir = $(libdir)/bluetooth/plugins plugin_LTLIBRARIES = -builtin_modules = -builtin_sources = -builtin_cflags = - -if SERVICEPLUGIN -builtin_modules += service -builtin_sources += service.c -endif - -builtin_modules += hciops -builtin_sources += hciops.c - if NETLINK plugin_LTLIBRARIES += netlink.la netlink_la_LIBADD = @NETLINK_LIBS@ endif -builtin_modules += hal -builtin_sources += hal.c - -builtin_modules += storage -builtin_sources += storage.c - -noinst_LTLIBRARIES = libbuiltin.la echo.la - -libbuiltin_la_SOURCES = $(builtin_sources) -libbuiltin_la_LDFLAGS = -libbuiltin_la_CFLAGS = $(AM_CFLAGS) \ - $(builtin_cflags) -DBLUETOOTH_PLUGIN_BUILTIN - -BUILT_SOURCES = builtin.h - -nodist_libbuiltin_la_SOURCES = $(BUILT_SOURCES) +noinst_LTLIBRARIES = echo.la AM_LDFLAGS = -module -avoid-version -no-undefined @@ -44,28 +17,4 @@ AM_CFLAGS = -fvisibility=hidden @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ \ INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/src -CLEANFILES = $(BUILT_SOURCES) - MAINTAINERCLEANFILES = Makefile.in - -builtin.h: - echo "" > $@ - list='$(builtin_modules)'; for i in $$list; \ - do echo "extern struct bluetooth_plugin_desc __bluetooth_builtin_$$i;" >> $@; done - echo "" >> $@ - echo "static struct bluetooth_plugin_desc *__bluetooth_builtin[] = {" >> $@ - list='$(builtin_modules)'; for i in $$list; \ - do echo "&__bluetooth_builtin_$$i," >> $@; done - echo "NULL };" >> $@ - -all-local: - @$(LN_S) -f $(top_srcdir)/input/.libs/input.so - @$(LN_S) -f $(top_srcdir)/audio/.libs/audio.so - @$(LN_S) -f $(top_srcdir)/serial/.libs/serial.so - @$(LN_S) -f $(top_srcdir)/network/.libs/network.so - -clean-local: - @rm -f network.so - @rm -f serial.so - @rm -f audio.so - @rm -f input.so diff --git a/src/Makefile.am b/src/Makefile.am index 569c060e7..bd68d50dc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,6 +13,37 @@ statedir = $(localstatedir)/lib/bluetooth state_DATA = endif +builtin_modules = +builtin_sources = +builtin_cflags = + +if SERVICEPLUGIN +builtin_modules += service +builtin_sources += $(top_srcdir)/plugins/service.c +endif + +builtin_modules += hciops +builtin_sources += $(top_srcdir)/plugins/hciops.c + +builtin_modules += hal +builtin_sources += $(top_srcdir)/plugins/hal.c + +builtin_modules += storage +builtin_sources += $(top_srcdir)/plugins/storage.c + +noinst_LTLIBRARIES = libbuiltin.la + +libbuiltin_la_SOURCES = $(builtin_sources) +libbuiltin_la_LDFLAGS = +libbuiltin_la_CFLAGS = $(AM_CFLAGS) \ + $(builtin_cflags) -DBLUETOOTH_PLUGIN_BUILTIN + +BUILT_SOURCES = builtin.h + +nodist_libbuiltin_la_SOURCES = $(BUILT_SOURCES) + +CLEANFILES = $(BUILT_SOURCES) + sbin_PROGRAMS = bluetoothd bluetoothd_SOURCES = main.c security.c hcid.h sdpd.h \ @@ -21,14 +52,15 @@ bluetoothd_SOURCES = main.c security.c hcid.h sdpd.h \ error.h error.c manager.h manager.c adapter.h adapter.c \ device.h device.c dbus-common.c dbus-common.h dbus-hci.h dbus-hci.c -bluetoothd_LDADD = $(top_builddir)/common/libhelper.a \ - $(top_builddir)/plugins/libbuiltin.la \ +bluetoothd_LDADD = $(top_builddir)/common/libhelper.a libbuiltin.la \ @GDBUS_LIBS@ @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ -ldl bluetoothd_LDFLAGS = -Wl,--export-dynamic +bluetoothd_DEPENDENCIES = libbuiltin.la + if MAINTAINER_MODE -plugindir = $(abs_top_srcdir)/plugins +plugindir = $(abs_top_srcdir)/plugins/.libs else plugindir = $(libdir)/bluetooth/plugins endif @@ -36,7 +68,7 @@ endif AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@ \ -DPLUGINDIR=\""$(plugindir)"\" -INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/plugins +INCLUDES = -I$(top_srcdir)/common if MANPAGES man_MANS = bluetoothd.8 @@ -45,3 +77,13 @@ endif EXTRA_DIST = bluetooth.conf bluetoothd.8 main.conf MAINTAINERCLEANFILES = Makefile.in + +builtin.h: + echo "" > $@ + list='$(builtin_modules)'; for i in $$list; \ + do echo "extern struct bluetooth_plugin_desc __bluetooth_builtin_$$i;" >> $@; done + echo "" >> $@ + echo "static struct bluetooth_plugin_desc *__bluetooth_builtin[] = {" >> $@ + list='$(builtin_modules)'; for i in $$list; \ + do echo "&__bluetooth_builtin_$$i," >> $@; done + echo "NULL };" >> $@ |