summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-08-24 23:49:40 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-08-24 23:49:40 -0700
commit70aab2a82671d29a5a2dd0195469999bc70e2412 (patch)
tree4b0b177d024e825ec0482edb506fc61a67561b03
parent7d3d52009dd110f3b2f94adad98348f6171f4c3d (diff)
downloadofono-70aab2a82671d29a5a2dd0195469999bc70e2412.tar.bz2
Convert to fully non-recursive build system
-rw-r--r--.gitignore3
-rw-r--r--Makefile.am189
-rwxr-xr-xbootstrap-configure10
-rw-r--r--configure.ac44
-rw-r--r--doc/Makefile.am7
-rw-r--r--drivers/Makefile.am48
-rw-r--r--drivers/atmodem/atmodem.c1
-rw-r--r--drivers/atmodem/devinfo.c1
-rw-r--r--drivers/isimodem/isicall-barring.c10
-rw-r--r--drivers/isimodem/isicall-forwarding.c10
-rw-r--r--drivers/isimodem/isicall-meter.c10
-rw-r--r--drivers/isimodem/isicall-settings.c10
-rw-r--r--drivers/isimodem/isidevinfo.c1
-rw-r--r--drivers/isimodem/isimodem.c1
-rw-r--r--drivers/isimodem/isinetwork.c2
-rw-r--r--drivers/isimodem/isisim.c10
-rw-r--r--drivers/isimodem/isisms.c10
-rw-r--r--drivers/isimodem/isissn.c10
-rw-r--r--drivers/isimodem/isiussd.c10
-rw-r--r--drivers/isimodem/isivoicecall.c10
-rw-r--r--gatchat/Makefile.am9
-rw-r--r--gdbus/Makefile.am8
-rw-r--r--gisi/Makefile.am13
-rw-r--r--include/Makefile.am26
-rw-r--r--plugins/Makefile.am35
-rw-r--r--plugins/example_history.c1
-rw-r--r--plugins/generic_at.c1
-rw-r--r--src/Makefile.am54
-rw-r--r--src/plugin.c17
-rw-r--r--unit/Makefile.am21
30 files changed, 216 insertions, 366 deletions
diff --git a/.gitignore b/.gitignore
index 21c8a115..fe317312 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,11 +25,10 @@ autom4te.cache
include/ofono
include/version.h
+src/builtin.h
src/ofonod
src/ofono.exp
src/ofono.ver
-plugins/builtin.h
-drivers/builtin.h
unit/test-common
unit/test-util
diff --git a/Makefile.am b/Makefile.am
index 67ce1dc5..f381ea16 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,14 +1,195 @@
-if COND_ISI
-MAYBE_ISI = gisi
+AM_MAKEFLAGS = --no-print-directory
+
+includedir = @includedir@/ofono
+
+include_HEADERS = include/log.h include/plugin.h include/history.h \
+ include/dbus.h include/modem.h include/types.h \
+ include/call-barring.h include/call-forwarding.h \
+ include/call-meter.h include/call-settings.h \
+ include/phonebook.h include/ssn.h include/ussd.h \
+ include/sms.h include/sim.h include/message-waiting.h \
+ include/netreg.h include/voicecall.h include/devinfo.h
+
+nodist_include_HEADERS = include/version.h
+
+local_headers = $(foreach file,$(include_HEADERS) $(nodist_include_HEADERS), \
+ include/ofono/$(notdir $(file)))
+
+
+if DATAFILES
+dbusdir = @DBUS_DATADIR@
+
+dbus_DATA = src/ofono.conf
endif
-SUBDIRS = gdbus gatchat $(MAYBE_ISI) include plugins drivers unit src doc
+builtin_modules =
+builtin_sources =
+builtin_libadd =
+builtin_cflags =
+
+gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/object.c gdbus/watch.c
+
+gisi_sources = gisi/phonet.h gisi/modem.h gisi/netlink.h gisi/netlink.c \
+ gisi/socket.h gisi/socket.c gisi/client.h gisi/client.c \
+ gisi/pep.h gisi/pep.c gisi/pipe.h gisi/pipe.c
+
+gatchat_sources = gatchat/gatchat.h gatchat/gatchat.c \
+ gatchat/gatresult.h gatchat/gatresult.c \
+ gatchat/gatsyntax.h gatchat/gatsyntax.c \
+ gatchat/ringbuffer.h gatchat/ringbuffer.c
+
+if ISIMODEM
+builtin_modules += isimodem
+builtin_sources += $(gisi_sources) drivers/isimodem/isi.h \
+ drivers/isimodem/isimodem.c \
+ drivers/isimodem/isiphonebook.c \
+ drivers/isimodem/isidevinfo.c \
+ drivers/isimodem/isinetwork.c \
+ drivers/isimodem/isivoicecall.c \
+ drivers/isimodem/isisms.c \
+ drivers/isimodem/isisim.c \
+ drivers/isimodem/isissn.c \
+ drivers/isimodem/isiussd.c \
+ drivers/isimodem/isicall-forwarding.c \
+ drivers/isimodem/isicall-settings.c \
+ drivers/isimodem/isicall-barring.c \
+ drivers/isimodem/isicall-meter.c
+endif
+
+if ATMODEM
+builtin_modules += atmodem
+builtin_sources += $(gatchat_sources) drivers/atmodem/at.h \
+ drivers/atmodem/atmodem.c \
+ drivers/atmodem/call-settings.c \
+ drivers/atmodem/sms.c \
+ drivers/atmodem/call-forwarding.c \
+ drivers/atmodem/call-meter.c \
+ drivers/atmodem/network-registration.c \
+ drivers/atmodem/sim.c \
+ drivers/atmodem/ussd.c \
+ drivers/atmodem/voicecall.c \
+ drivers/atmodem/call-barring.c \
+ drivers/atmodem/phonebook.c \
+ drivers/atmodem/ssn.c \
+ drivers/atmodem/devinfo.c
+
+builtin_modules += generic_at
+builtin_sources += plugins/generic_at.c
+endif
+
+if MAINTAINER_MODE
+builtin_modules += example_history
+builtin_sources += plugins/example_history.c
+endif
+
+sbin_PROGRAMS = src/ofonod
+
+src_ofonod_SOURCES = $(gdbus_sources) $(builtin_sources) \
+ src/main.c src/ofono.h src/log.c src/plugin.c \
+ src/modem.c src/common.h src/common.c \
+ src/manager.c src/dbus.c src/util.h src/util.c \
+ src/network.c src/voicecall.c src/ussd.c src/sms.c \
+ src/call-settings.c src/call-forwarding.c \
+ src/call-meter.c src/smsutil.h src/smsutil.c \
+ src/ssn.c src/call-barring.c src/sim.c \
+ src/phonebook.c src/history.c src/message-waiting.c \
+ src/simutil.h src/simutil.c
+
+src_ofonod_LDADD = $(builtin_libadd) \
+ @GLIB_LIBS@ @GTHREAD_LIBS@ @DBUS_LIBS@ -ldl
+
+src_ofonod_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=src/ofono.ver
+
+src_ofonod_DEPENDENCIES = src/ofono.ver
+
+CLEANFILES = src/ofono.ver src/ofono.exp src/builtin.h $(local_headers)
+
+plugindir = $(libdir)/ofono/plugins
+
+if MAINTAINER_MODE
+build_plugindir = $(abs_top_srcdir)/plugins/.libs
+else
+build_plugindir = $(plugindir)
+endif
+
+AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @GTHREAD_CFLAGS@ \
+ $(builtin_cflags) \
+ -DOFONO_PLUGIN_BUILTIN \
+ -DPLUGINDIR=\""$(build_plugindir)"\"
+
+INCLUDES = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/src \
+ -I$(srcdir)/gdbus -I$(srcdir)/gisi -I$(srcdir)/gatchat
+
+doc_files = doc/overview.txt \
+ doc/manager-api.txt doc/modem-api.txt doc/network-api.txt \
+ doc/voicecallmanager-api.txt doc/voicecall-api.txt
+
+test_files = test/test-manager test/test-modem test/test-voicecall \
+ test/test-network-registration test/test-phonebook \
+ test/test-advice-of-charge test/test-call-settings \
+ test/test-call-forwarding test/test-call-barring \
+ test/test-ss-control-cb test/test-ss-control-cf \
+ test/test-ss-control-cs
+
+EXTRA_DIST = src/genbuiltin src/ofono.conf $(doc_files) $(test_files)
+
+dist_man_MANS = doc/ofonod.8
+
+
+unit_objects =
+
+noinst_PROGRAMS = unit/test-common unit/test-util \
+ unit/test-sms unit/test-simutil
+
+unit_test_common_SOURCES = unit/test-common.c src/common.c
+unit_test_common_LDADD = @GLIB_LIBS@
+unit_objects += $(unit_test_common_OBJECTS)
+
+unit_test_util_SOURCES = unit/test-util.c src/util.c
+unit_test_util_LDADD = @GLIB_LIBS@
+unit_objects += $(unit_test_utils_OBJECTS)
+
+unit_test_sms_SOURCES = unit/test-sms.c src/util.c src/smsutil.c
+unit_test_sms_LDADD = @GLIB_LIBS@
+unit_objects += $(unit_test_sms_OBJECTS)
+
+unit_test_simutil_SOURCES = unit/test-simutil.c src/util.c \
+ src/simutil.c src/smsutil.c
+unit_test_simutil_LDADD = @GLIB_LIBS@
+unit_objects += $(unit_test_simutil_OBJECTS)
-AM_MAKEFLAGS = --no-print-directory
DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles
MAINTAINERCLEANFILES = Makefile.in \
aclocal.m4 configure config.h.in config.sub config.guess \
ltmain.sh depcomp compile missing install-sh mkinstalldirs
+
+
+src/plugin.$(OBJEXT): src/builtin.h
+
+src/builtin.h: src/genbuiltin $(builtin_sources)
+ $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
+
+src/ofono.exp: $(src_ofonod_OBJECTS)
+ $(AM_V_GEN)$(NM) $^ | $(AWK) '{ print $$3 }' | sort -u | \
+ $(EGREP) -e '^ofono_' -e '^g_dbus_' > $@
+
+src/ofono.ver: src/ofono.exp
+ $(AM_V_at)echo "{ global:" > $@
+ $(AM_V_GEN)$(SED) -e "s/\(.*\)/\1;/" $< >> $@
+ $(AM_V_at)echo "local: *; };" >> $@
+
+$(src_ofonod_OBJECTS) $(unit_objects): $(local_headers)
+
+include/ofono/version.h: include/version.h
+ $(AM_V_at)$(MKDIR_P) include/ofono
+ $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
+
+include/ofono/%.h: include/%.h
+ $(AM_V_at)$(MKDIR_P) include/ofono
+ $(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
+
+clean-local: include/ofono
+ @$(RM) -r $<
diff --git a/bootstrap-configure b/bootstrap-configure
index cea17bfa..677fb0f1 100755
--- a/bootstrap-configure
+++ b/bootstrap-configure
@@ -1,16 +1,14 @@
#!/bin/sh
-DIR="$(dirname "$0")"
-
if [ -f config.status ]; then
make maintainer-clean
fi
-(cd "$DIR" && ./bootstrap) && \
- "$DIR/configure" --enable-maintainer-mode \
+./bootstrap && \
+ ./configure --enable-maintainer-mode \
--enable-debug \
--prefix=/usr \
--mandir=/usr/share/man \
+ --localstatedir=/var \
--sysconfdir=/etc \
- --disable-datafiles \
- --localstatedir=/var
+ --disable-datafiles $*
diff --git a/configure.ac b/configure.ac
index 6c0116d7..a299a13b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,15 +1,23 @@
AC_PREREQ(2.60)
AC_INIT(ofono, 0.3)
-AM_INIT_AUTOMAKE()
+AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_CONFIG_HEADER(config.h)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
+AC_PREFIX_DEFAULT(/usr/local)
+
+PKG_PROG_PKG_CONFIG
+
+COMPILER_FLAGS
+
AC_LANG_C
+AC_C_RESTRICT
+
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CC_PIE
@@ -18,8 +26,6 @@ AC_PROG_SED
AC_PROG_AWK
AM_PROG_MKDIR_P
-AC_C_RESTRICT
-
m4_define([_LT_AC_TAGCONFIG], [])
m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
@@ -54,18 +60,15 @@ AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads],
[enable threading support]), [enable_threads=${enableval}])
-AC_ARG_ENABLE(isi, AC_HELP_STRING([--disable-isi],
- [disable PhoNet/ISI protocol support]), [enable_isi=${enableval}])
-
-AM_CONDITIONAL(COND_ISI, test "${enable_isi}" != "no")
-
-if (test "${enable_isi}" != "no"); then
- GISI_CFLAGS='-I$(top_srcdir)'
- GISI_LIBS='$(top_builddir)/gisi/libgisi.la'
-fi
+AC_ARG_ENABLE(isimodem, AC_HELP_STRING([--disable-isimodem],
+ [disable PhoNet/ISI modem support]),
+ [enable_isimodem=${enableval}])
+AM_CONDITIONAL(ISIMODEM, test "${enable_isimodem}" != "no")
-AC_SUBST(GISI_CFLAGS)
-AC_SUBST(GISI_LIBS)
+AC_ARG_ENABLE(atmodem, AC_HELP_STRING([--disable-atmodem],
+ [disable ETSI AT modem support]),
+ [enable_atmodem=${enableval}])
+AM_CONDITIONAL(ATMODEM, test "${enable_atmodem}" != "no")
AC_CHECK_LIB(dl, dlopen, dummy=yes,
AC_MSG_ERROR(dynamic linking loader is required))
@@ -98,12 +101,6 @@ else
fi
AC_SUBST(DBUS_DATADIR)
-AC_SUBST([GDBUS_CFLAGS], ['$(DBUS_CFLAGS) -I$(top_srcdir)/gdbus'])
-AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.la $(DBUS_LIBS)'])
-
-AC_SUBST([GATCHAT_CFLAGS], ['-I$(top_srcdir)/gatchat'])
-AC_SUBST([GATCHAT_LIBS], ['$(top_builddir)/gatchat/libgatchat.la'])
-
AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
[don't install configuration and data files]),
[enable_datafiles=${enableval}])
@@ -139,9 +136,4 @@ fi
AC_DEFINE_UNQUOTED(CONFIGDIR, "${configdir}",
[Directory for the configuration files])
-COMPILER_FLAGS
-
-AC_OUTPUT(Makefile gdbus/Makefile gatchat/Makefile gisi/Makefile
- include/Makefile include/version.h src/Makefile
- plugins/Makefile drivers/Makefile unit/Makefile
- doc/Makefile)
+AC_OUTPUT(Makefile include/version.h)
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index 9ae9ff79..00000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-man_MANS = ofonod.8
-
-EXTRA_DIST = $(man_MANS) overview.txt \
- manager-api.txt modem-api.txt network-api.txt \
- voicecallmanager-api.txt voicecall-api.txt
-
-MAINTAINERCLEANFILES = Makefile.in
diff --git a/drivers/Makefile.am b/drivers/Makefile.am
deleted file mode 100644
index 9c40fd17..00000000
--- a/drivers/Makefile.am
+++ /dev/null
@@ -1,48 +0,0 @@
-
-builtin_modules =
-builtin_sources =
-builtin_cflags =
-
-builtin_modules += atmodem
-builtin_sources += atmodem/atmodem.c atmodem/at.h \
- atmodem/call-settings.c atmodem/sms.c \
- atmodem/call-forwarding.c atmodem/call-meter.c \
- atmodem/network-registration.c atmodem/sim.c \
- atmodem/ussd.c atmodem/voicecall.c \
- atmodem/call-barring.c atmodem/phonebook.c \
- atmodem/ssn.c atmodem/devinfo.c
-
-if COND_ISI
-builtin_modules += isimodem
-builtin_sources += isimodem/isimodem.c isimodem/isi.h isimodem/isiphonebook.c \
- isimodem/isidevinfo.c isimodem/isinetwork.c \
- isimodem/isivoicecall.c isimodem/isisms.c \
- isimodem/isisim.c isimodem/isissn.c \
- isimodem/isiussd.c isimodem/isicall-forwarding.c \
- isimodem/isicall-settings.c isimodem/isicall-barring.c \
- isimodem/isicall-meter.c
-endif
-
-noinst_LTLIBRARIES = libbuiltin.la
-
-libbuiltin_la_SOURCES = $(builtin_sources)
-libbuiltin_la_LDFLAGS =
-libbuiltin_la_CFLAGS = $(AM_CFLAGS) $(builtin_cflags) \
- -DOFONO_PLUGIN_BUILTIN -DOFONO_API_SUBJECT_TO_CHANGE
-
-BUILT_SOURCES = builtin.h
-
-nodist_libbuiltin_la_SOURCES = $(BUILT_SOURCES)
-
-AM_CFLAGS = -fvisibility=hidden \
- @GLIB_CFLAGS@ @GDBUS_CFLAGS@ @GATCHAT_CFLAGS@ @GISI_CFLAGS@
-
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/src
-
-CLEANFILES = $(BUILT_SOURCES)
-
-MAINTAINERCLEANFILES = Makefile.in
-
-builtin.h: $(top_srcdir)/src/genbuiltin $(builtin_sources)
- $(AM_V_GEN)$(top_srcdir)/src/genbuiltin $(builtin_modules) | \
- $(SED) -e "s/builtin\[\]/drivers\[\]/" > $@
diff --git a/drivers/atmodem/atmodem.c b/drivers/atmodem/atmodem.c
index c2324e5d..d6ae3919 100644
--- a/drivers/atmodem/atmodem.c
+++ b/drivers/atmodem/atmodem.c
@@ -29,6 +29,7 @@
#include <gatchat.h>
#include <stdlib.h>
+#define OFONO_API_SUBJECT_TO_CHANGE
#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
diff --git a/drivers/atmodem/devinfo.c b/drivers/atmodem/devinfo.c
index ad61e8e7..df43bc4d 100644
--- a/drivers/atmodem/devinfo.c
+++ b/drivers/atmodem/devinfo.c
@@ -26,7 +26,6 @@
#include <string.h>
#include <glib.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/devinfo.h>
diff --git a/drivers/isimodem/isicall-barring.c b/drivers/isimodem/isicall-barring.c
index e7102be7..a35dd9bc 100644
--- a/drivers/isimodem/isicall-barring.c
+++ b/drivers/isimodem/isicall-barring.c
@@ -35,7 +35,6 @@
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/call-barring.h>
@@ -66,15 +65,6 @@ static void isi_set_passwd(struct ofono_call_barring *barr, const char *lock,
{
}
-static gboolean isi_call_barring_register(gpointer user)
-{
- struct ofono_call_barring *barr = user;
-
- ofono_call_barring_register(barr);
-
- return FALSE;
-}
-
static int isi_call_barring_probe(struct ofono_call_barring *barr)
{
GIsiModem *idx = ofono_call_barring_get_data(barr);
diff --git a/drivers/isimodem/isicall-forwarding.c b/drivers/isimodem/isicall-forwarding.c
index 056ebd62..08236c8c 100644
--- a/drivers/isimodem/isicall-forwarding.c
+++ b/drivers/isimodem/isicall-forwarding.c
@@ -35,7 +35,6 @@
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/call-forwarding.h>
@@ -80,15 +79,6 @@ static void isi_query(struct ofono_call_forwarding *cf, int type, int cls,
{
}
-static gboolean isi_call_forwarding_register(gpointer user)
-{
- struct ofono_call_forwarding *cf = user;
-
- ofono_call_forwarding_register(cf);
-
- return FALSE;
-}
-
static int isi_call_forwarding_probe(struct ofono_call_forwarding *cf)
{
GIsiModem *idx = ofono_call_forwarding_get_data(cf);
diff --git a/drivers/isimodem/isicall-meter.c b/drivers/isimodem/isicall-meter.c
index 5736ec24..7a7930f7 100644
--- a/drivers/isimodem/isicall-meter.c
+++ b/drivers/isimodem/isicall-meter.c
@@ -35,7 +35,6 @@
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/call-meter.h>
@@ -88,15 +87,6 @@ static void isi_puct_set(struct ofono_call_meter *cm, const char *currency,
{
}
-static gboolean isi_call_meter_register(gpointer user)
-{
- struct ofono_call_meter *cm = user;
-
- ofono_call_meter_register(cm);
-
- return FALSE;
-}
-
static int isi_call_meter_probe(struct ofono_call_meter *cm)
{
GIsiModem *idx = ofono_call_meter_get_data(cm);
diff --git a/drivers/isimodem/isicall-settings.c b/drivers/isimodem/isicall-settings.c
index b5df8132..99129618 100644
--- a/drivers/isimodem/isicall-settings.c
+++ b/drivers/isimodem/isicall-settings.c
@@ -35,7 +35,6 @@
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/call-settings.h>
@@ -84,15 +83,6 @@ static void isi_cw_set(struct ofono_call_settings *cs, int mode, int cls,
{
}
-static gboolean isi_call_settings_register(gpointer user)
-{
- struct ofono_call_settings *cs = user;
-
- ofono_call_settings_register(cs);
-
- return FALSE;
-}
-
static int isi_call_settings_probe(struct ofono_call_settings *cs)
{
GIsiModem *idx = ofono_call_settings_get_data(cs);
diff --git a/drivers/isimodem/isidevinfo.c b/drivers/isimodem/isidevinfo.c
index c865fa2c..6c479bb4 100644
--- a/drivers/isimodem/isidevinfo.c
+++ b/drivers/isimodem/isidevinfo.c
@@ -35,7 +35,6 @@
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/devinfo.h>
diff --git a/drivers/isimodem/isimodem.c b/drivers/isimodem/isimodem.c
index 4a01dd3c..3f3d179d 100644
--- a/drivers/isimodem/isimodem.c
+++ b/drivers/isimodem/isimodem.c
@@ -33,6 +33,7 @@
#include <gisi/netlink.h>
#include <gisi/client.h>
+#define OFONO_API_SUBJECT_TO_CHANGE
#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
diff --git a/drivers/isimodem/isinetwork.c b/drivers/isimodem/isinetwork.c
index e2a65940..88483903 100644
--- a/drivers/isimodem/isinetwork.c
+++ b/drivers/isimodem/isinetwork.c
@@ -37,7 +37,6 @@
#include <gisi/netlink.h>
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/netreg.h>
@@ -173,7 +172,6 @@ static void isi_strength(struct ofono_netreg *netreg,
static gboolean isi_netreg_register(gpointer user)
{
struct ofono_netreg *net = user;
- struct netreg_data *data = ofono_netreg_get_data(net);
ofono_netreg_register(net);
diff --git a/drivers/isimodem/isisim.c b/drivers/isimodem/isisim.c
index b50083da..e0e64252 100644
--- a/drivers/isimodem/isisim.c
+++ b/drivers/isimodem/isisim.c
@@ -35,7 +35,6 @@
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/sim.h>
@@ -97,15 +96,6 @@ static void isi_read_imsi(struct ofono_sim *sim,
{
}
-static gboolean isi_sim_register(gpointer user)
-{
- struct ofono_sim *sim = user;
-
- ofono_sim_register(sim);
-
- return FALSE;
-}
-
static int isi_sim_probe(struct ofono_sim *sim)
{
GIsiModem *idx = ofono_sim_get_data(sim);
diff --git a/drivers/isimodem/isisms.c b/drivers/isimodem/isisms.c
index 5f188566..52ce4d1a 100644
--- a/drivers/isimodem/isisms.c
+++ b/drivers/isimodem/isisms.c
@@ -35,7 +35,6 @@
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/sms.h>
@@ -66,15 +65,6 @@ static void isi_submit(struct ofono_sms *sms, unsigned char *pdu,
{
}
-static gboolean isi_sms_register(gpointer user)
-{
- struct ofono_sms *sms = user;
-
- ofono_sms_register(sms);
-
- return FALSE;
-}
-
static int isi_sms_probe(struct ofono_sms *sms)
{
GIsiModem *idx = ofono_sms_get_data(sms);
diff --git a/drivers/isimodem/isissn.c b/drivers/isimodem/isissn.c
index bd9a4ff8..4225ffc2 100644
--- a/drivers/isimodem/isissn.c
+++ b/drivers/isimodem/isissn.c
@@ -35,7 +35,6 @@
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/ssn.h>
@@ -49,15 +48,6 @@ struct ssn_data {
struct isi_version version;
};
-static gboolean isi_ssn_register(gpointer user)
-{
- struct ofono_ssn *ssn = user;
-
- ofono_ssn_register(ssn);
-
- return FALSE;
-}
-
static int isi_ssn_probe(struct ofono_ssn *ssn)
{
GIsiModem *idx = ofono_ssn_get_data(ssn);
diff --git a/drivers/isimodem/isiussd.c b/drivers/isimodem/isiussd.c
index 2c7bf30d..e2cbd605 100644
--- a/drivers/isimodem/isiussd.c
+++ b/drivers/isimodem/isiussd.c
@@ -35,7 +35,6 @@
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/ussd.h>
@@ -59,15 +58,6 @@ static void isi_cancel(struct ofono_ussd *ussd,
{
}
-static gboolean isi_ussd_register(gpointer user)
-{
- struct ofono_ussd *ussd = user;
-
- ofono_ussd_register(ussd);
-
- return FALSE;
-}
-
static int isi_ussd_probe(struct ofono_ussd *ussd)
{
GIsiModem *idx = ofono_ussd_get_data(ussd);
diff --git a/drivers/isimodem/isivoicecall.c b/drivers/isimodem/isivoicecall.c
index 1e01a0ea..423c0268 100644
--- a/drivers/isimodem/isivoicecall.c
+++ b/drivers/isimodem/isivoicecall.c
@@ -36,7 +36,6 @@
#include <gisi/netlink.h>
#include <gisi/client.h>
-#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/voicecall.h>
@@ -128,15 +127,6 @@ static void isi_send_tones(struct ofono_voicecall *vc, const char *tones,
{
}
-static gboolean isi_voicecall_register(gpointer user)
-{
- struct ofono_voicecall *call = user;
-
- ofono_voicecall_register(call);
-
- return FALSE;
-}
-
static int isi_voicecall_probe(struct ofono_voicecall *call)
{
GIsiModem *idx = ofono_voicecall_get_data(call);
diff --git a/gatchat/Makefile.am b/gatchat/Makefile.am
deleted file mode 100644
index 8b2ed200..00000000
--- a/gatchat/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-
-noinst_LTLIBRARIES = libgatchat.la
-
-libgatchat_la_SOURCES = gatchat.h gatchat.c gatresult.h gatresult.c \
- ringbuffer.h ringbuffer.c gatsyntax.h gatsyntax.c
-
-AM_CFLAGS = @GLIB_CFLAGS@
-
-MAINTAINERCLEANFILES = Makefile.in
diff --git a/gdbus/Makefile.am b/gdbus/Makefile.am
deleted file mode 100644
index 9447555f..00000000
--- a/gdbus/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-
-noinst_LTLIBRARIES = libgdbus.la
-
-libgdbus_la_SOURCES = gdbus.h mainloop.c object.c watch.c
-
-AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@
-
-MAINTAINERCLEANFILES = Makefile.in
diff --git a/gisi/Makefile.am b/gisi/Makefile.am
deleted file mode 100644
index 7c1f6928..00000000
--- a/gisi/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-AM_CFLAGS = @GLIB_CFLAGS@ -I$(top_srcdir)
-
-noinst_LTLIBRARIES = libgisi.la
-MAINTAINERCLEANFILES = Makefile.in
-
-libgisi_la_SOURCES = \
- phonet.h modem.h \
- netlink.h netlink.c \
- socket.h socket.c \
- client.h client.c \
- pep.h pep.c \
- pipe.h pipe.c
-libgisi_la_LIBADD = @GLIB_LIBS@
diff --git a/include/Makefile.am b/include/Makefile.am
deleted file mode 100644
index bc44606a..00000000
--- a/include/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-
-includedir = @includedir@/ofono
-
-include_HEADERS = log.h plugin.h history.h dbus.h modem.h \
- types.h call-barring.h call-forwarding.h \
- call-meter.h call-settings.h phonebook.h \
- ssn.h ussd.h sms.h sim.h message-waiting.h \
- netreg.h voicecall.h devinfo.h
-
-nodist_include_HEADERS = version.h
-
-MAINTAINERCLEANFILES = Makefile.in
-
-all-local:
- @test -d ofono || mkdir ofono
- @list='$(include_HEADERS)'; for i in $$list; do \
- test -f ofono/$$i || \
- $(LN_S) $(abs_top_srcdir)/include/$$i ofono/$$i; \
- done
- @list='$(nodist_include_HEADERS)'; for i in $$list; do \
- test -f ofono/$$i || \
- $(LN_S) $(abs_top_builddir)/include/$$i ofono/$$i; \
- done
-
-clean-local:
- @rm -rf ofono
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
deleted file mode 100644
index d1728e82..00000000
--- a/plugins/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-
-builtin_modules =
-builtin_sources =
-builtin_cflags =
-
-if MAINTAINER_MODE
-builtin_modules += example_history
-builtin_sources += example_history.c
-endif
-
-builtin_modules += generic_at
-builtin_sources += generic_at.c
-
-noinst_LTLIBRARIES = libbuiltin.la
-
-libbuiltin_la_SOURCES = $(builtin_sources)
-libbuiltin_la_LDFLAGS =
-libbuiltin_la_CFLAGS = $(AM_CFLAGS) $(builtin_cflags) -DOFONO_PLUGIN_BUILTIN \
- -DOFONO_API_SUBJECT_TO_CHANGE
-
-BUILT_SOURCES = builtin.h
-
-nodist_libbuiltin_la_SOURCES = $(BUILT_SOURCES)
-
-AM_CFLAGS = -fvisibility=hidden @GLIB_CFLAGS@ @GDBUS_CFLAGS@ @GATCHAT_CFLAGS@
-
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/src
-
-CLEANFILES = $(BUILT_SOURCES)
-
-MAINTAINERCLEANFILES = Makefile.in
-
-builtin.h: $(top_srcdir)/src/genbuiltin $(builtin_sources)
- $(AM_V_GEN)$(top_srcdir)/src/genbuiltin $(builtin_modules) | \
- $(SED) -e "s/builtin\[\]/plugins\[\]/" > $@
diff --git a/plugins/example_history.c b/plugins/example_history.c
index c08d0cae..384c88dc 100644
--- a/plugins/example_history.c
+++ b/plugins/example_history.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <glib.h>
+#define OFONO_API_SUBJECT_TO_CHANGE
#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/history.h>
diff --git a/plugins/generic_at.c b/plugins/generic_at.c
index e5d7a428..f500e9ca 100644
--- a/plugins/generic_at.c
+++ b/plugins/generic_at.c
@@ -39,6 +39,7 @@
#include <gatchat.h>
#include <gatsyntax.h>
+#define OFONO_API_SUBJECT_TO_CHANGE
#include <ofono/plugin.h>
#include <ofono/log.h>
#include <ofono/modem.h>
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 11dac64b..00000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
-
-if DATAFILES
-dbusdir = @DBUS_DATADIR@
-
-dbus_DATA = ofono.conf
-endif
-
-sbin_PROGRAMS = ofonod
-
-ofonod_SOURCES = main.c ofono.h log.c plugin.c \
- modem.c common.h common.c \
- manager.c dbus.c util.h util.c \
- network.c voicecall.c ussd.c sms.c \
- call-settings.c call-forwarding.c call-meter.c \
- smsutil.h smsutil.c ssn.c call-barring.c sim.c \
- phonebook.c history.c simutil.h simutil.c \
- message-waiting.c
-
-ofonod_LDADD = $(top_builddir)/plugins/libbuiltin.la \
- $(top_builddir)/drivers/libbuiltin.la \
- @GATCHAT_LIBS@ @GDBUS_LIBS@ @GLIB_LIBS@ \
- @GISI_LIBS@ @GTHREAD_LIBS@ -ldl
-
-ofonod_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=ofono.ver
-
-ofonod_DEPENDENCIES = ofono.ver \
- @GATCHAT_LIBS@ @GISI_LIBS@ ../gdbus/libgdbus.la \
- ../drivers/libbuiltin.la ../plugins/libbuiltin.la
-
-CLEANFILES = ofono.ver ofono.exp
-
-if MAINTAINER_MODE
-plugindir = $(abs_top_srcdir)/plugins/.libs
-else
-plugindir = $(libdir)/ofono/plugins
-endif
-
-AM_CFLAGS = @GTHREAD_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@ @GATCHAT_CFLAGS@ \
- @GISI_CFLAGS@ -DPLUGINDIR=\""$(plugindir)"\"
-
-INCLUDES = -I$(top_builddir)/include -I$(top_builddir)
-
-EXTRA_DIST = genbuiltin ofono.conf
-
-MAINTAINERCLEANFILES = Makefile.in
-
-ofono.exp: $(ofonod_OBJECTS)
- $(AM_V_GEN)$(NM) $^ | $(AWK) '{ print $$3 }' | sort -u | \
- $(EGREP) -e '^ofono_' > $@
-
-ofono.ver: ofono.exp
- $(AM_V_at)echo "{ global:" > $@
- $(AM_V_GEN)$(SED) -e "s/\(.*\)/\1;/" $< >> $@
- $(AM_V_at)echo "local: *; };" >> $@
diff --git a/src/plugin.c b/src/plugin.c
index 017ebad5..979a6855 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -88,8 +88,7 @@ static gboolean check_plugin(struct ofono_plugin_desc *desc,
return TRUE;
}
-#include "plugins/builtin.h"
-#include "drivers/builtin.h"
+#include "builtin.h"
int __ofono_plugin_init(const char *pattern, const char *exclude)
{
@@ -101,20 +100,12 @@ int __ofono_plugin_init(const char *pattern, const char *exclude)
DBG("");
- for (i = 0; __ofono_plugins[i]; i++) {
- if (check_plugin(__ofono_plugins[i],
+ for (i = 0; __ofono_builtin[i]; i++) {
+ if (check_plugin(__ofono_builtin[i],
pattern, exclude) == FALSE)
continue;
- 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]);
+ add_plugin(NULL, __ofono_builtin[i]);
}
dir = g_dir_open(PLUGINDIR, 0, NULL);
diff --git a/unit/Makefile.am b/unit/Makefile.am
deleted file mode 100644
index 8a27267f..00000000
--- a/unit/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-
-noinst_PROGRAMS = test-common test-util test-sms test-simutil
-
-test_common_SOURCES = test-common.c $(top_srcdir)/src/common.c
-
-test_util_SOURCES = test-util.c $(top_srcdir)/src/util.c
-
-test_sms_SOURCES = test-sms.c $(top_srcdir)/src/util.c \
- $(top_srcdir)/src/smsutil.c
-
-test_simutil_SOURCES = test-simutil.c $(top_srcdir)/src/util.c \
- $(top_srcdir)/src/simutil.c \
- $(top_srcdir)/src/smsutil.c
-
-LDADD = @GLIB_LIBS@ @GTHREAD_LIBS@
-
-AM_CFLAGS = @GTHREAD_CFLAGS@ @GLIB_CFLAGS@
-
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/src
-
-MAINTAINERCLEANFILES = Makefile.in