summaryrefslogtreecommitdiff
path: root/Makefile.am
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 /Makefile.am
parent7d3d52009dd110f3b2f94adad98348f6171f4c3d (diff)
Convert to fully non-recursive build system
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am189
1 files changed, 185 insertions, 4 deletions
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 $<