src/ofono.exp
src/ofono.ver
plugins/builtin.h
+drivers/builtin.h
-SUBDIRS = gdbus gatchat include plugins src doc
+SUBDIRS = gdbus gatchat include plugins drivers src doc
DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles
AM_CONDITIONAL(DATAFILES, test "${enable_datafiles}" != "no")
AC_OUTPUT(Makefile gdbus/Makefile gatchat/Makefile
- include/Makefile include/version.h
- src/Makefile plugins/Makefile doc/Makefile)
+ include/Makefile include/version.h src/Makefile
+ plugins/Makefile drivers/Makefile doc/Makefile)
--- /dev/null
+
+builtin_modules =
+builtin_sources =
+builtin_cflags =
+
+noinst_LTLIBRARIES = libbuiltin.la
+
+libbuiltin_la_SOURCES = $(builtin_sources)
+libbuiltin_la_LDFLAGS =
+libbuiltin_la_CFLAGS = $(AM_CFLAGS) $(builtin_cflags) -DOFONO_PLUGIN_BUILTIN
+
+BUILT_SOURCES = builtin.h
+
+nodist_libbuiltin_la_SOURCES = $(BUILT_SOURCES)
+
+CLEANFILES = $(BUILT_SOURCES)
+
+MAINTAINERCLEANFILES = Makefile.in
+
+builtin.h:
+ echo "" > $@
+ list='$(builtin_modules)'; for i in $$list; \
+ do echo "extern struct ofono_plugin_desc __ofono_builtin_$$i;" >> $@; done
+ echo "" >> $@
+ echo "static struct ofono_plugin_desc *__ofono_drivers[] = {" >> $@
+ list='$(builtin_modules)'; for i in $$list; \
+ do echo "&__ofono_builtin_$$i," >> $@; done
+ echo "NULL };" >> $@
list='$(builtin_modules)'; for i in $$list; \
do echo "extern struct ofono_plugin_desc __ofono_builtin_$$i;" >> $@; done
echo "" >> $@
- echo "static struct ofono_plugin_desc *__ofono_builtin[] = {" >> $@
+ echo "static struct ofono_plugin_desc *__ofono_plugins[] = {" >> $@
list='$(builtin_modules)'; for i in $$list; \
do echo "&__ofono_builtin_$$i," >> $@; done
echo "NULL };" >> $@
call-settings.c call-waiting.c call-forwarding.c call-meter.c
ofonod_LDADD = $(top_builddir)/plugins/libbuiltin.la \
+ $(top_builddir)/drivers/libbuiltin.la \
@GDBUS_LIBS@ @GLIB_LIBS@ @GTHREAD_LIBS@ -ldl
ofonod_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=ofono.ver
}
#include "plugins/builtin.h"
+#include "drivers/builtin.h"
int __ofono_plugin_init(const char *pattern, const char *exclude)
{
DBG("");
- for (i = 0; __ofono_builtin[i]; i++) {
- if (check_plugin(__ofono_builtin[i],
- pattern, exclude) == FALSE)
+ for (i = 0; __ofono_plugins[i]; i++) {
+ if (check_plugin(__ofono_plugins[i],
+ pattern, exclude) == FALSE)
continue;
- add_plugin(NULL, __ofono_builtin[i]);
+ add_plugin(NULL, __ofono_plugins[i]);
+ }
+
+ for (i = 0; __ofono_drivers[i]; i++) {
+ if (check_plugin(__ofono_drivers[i],
+ pattern, exclude) == FALSE)
+ continue;
+
+ add_plugin(NULL, __ofono_drivers[i]);
}
dir = g_dir_open(PLUGINDIR, 0, NULL);