libmm-common: setup new library, with the gdbus-codegen generated code

This library will not (probably) be installable, but will share the GDBus
and new Enum/Flag/Error type support between the core daemon and the new
libmm-glib library.
This commit is contained in:
Aleksander Morgado
2011-11-22 10:49:03 +01:00
parent da99e8ddad
commit ade484826c
4 changed files with 130 additions and 1 deletions

3
.gitignore vendored
View File

@@ -44,6 +44,9 @@ libwmc/tests/test-wmc
include/ModemManager.h
include/ModemManager-names.h
libmm-common/*.[ch]
libmm-common/*.xml
po/Makefile.in.in
po/POTFILES
po/stamp-it

View File

@@ -20,7 +20,7 @@ all: $(GENERATED_FILES)
CLEANFILES = $(GENERATED_FILES)
endif
SUBDIRS = . marshallers build-aux include libqcdm libwmc src plugins introspection po test
SUBDIRS = . marshallers build-aux include libmm-common libqcdm libwmc src plugins introspection po test
if WITH_POLKIT
SUBDIRS += policy

View File

@@ -158,6 +158,7 @@ Makefile
marshallers/Makefile
include/Makefile
build-aux/Makefile
libmm-common/Makefile
libqcdm/Makefile
libqcdm/src/Makefile
libqcdm/tests/Makefile

125
libmm-common/Makefile.am Normal file
View File

@@ -0,0 +1,125 @@
noinst_LTLIBRARIES = libmm-common.la
GENERATED_H = \
mm-gdbus-manager.h \
mm-gdbus-sim.h \
mm-gdbus-sms.h \
mm-gdbus-bearer.h \
mm-gdbus-modem.h
GENERATED_C = \
mm-gdbus-manager.c \
mm-gdbus-sim.c \
mm-gdbus-sms.c \
mm-gdbus-bearer.c \
mm-gdbus-modem.c
GENERATED_DOC = \
mm-gdbus-doc-org.freedesktop.ModemManager1.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Sim.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Sms.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Bearer.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Messaging.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Location.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Firmware.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Contacts.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Cdma.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.3gpp.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.3gpp.Ussd.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Simple.xml
# Manager interface
mm_gdbus_manager_generated = \
mm-gdbus-manager.h \
mm-gdbus-manager.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.xml
$(mm_gdbus_manager_generated): $(top_srcdir)/new/org.freedesktop.ModemManager1.xml
$(AM_V_GEN) gdbus-codegen \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-manager \
$< \
$(NULL)
# SIM interface
mm_gdbus_sim_generated = \
mm-gdbus-sim.h \
mm-gdbus-sim.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.Sim.xml
$(mm_gdbus_sim_generated): $(top_srcdir)/new/org.freedesktop.ModemManager1.Sim.xml
$(AM_V_GEN) gdbus-codegen \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-sim \
$< \
$(NULL)
# Modem interfaces
mm_gdbus_modem_generated = \
mm-gdbus-modem.h \
mm-gdbus-modem.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.xml
mm_gdbus_modem_deps = \
$(top_srcdir)/new/org.freedesktop.ModemManager1.Modem.xml \
$(top_srcdir)/new/org.freedesktop.ModemManager1.Modem.Messaging.xml \
$(top_srcdir)/new/org.freedesktop.ModemManager1.Modem.Location.xml \
$(top_srcdir)/new/org.freedesktop.ModemManager1.Modem.Firmware.xml \
$(top_srcdir)/new/org.freedesktop.ModemManager1.Modem.Contacts.xml \
$(top_srcdir)/new/org.freedesktop.ModemManager1.Modem.Cdma.xml \
$(top_srcdir)/new/org.freedesktop.ModemManager1.Modem.3gpp.xml \
$(top_srcdir)/new/org.freedesktop.ModemManager1.Modem.3gpp.Ussd.xml \
$(top_srcdir)/new/org.freedesktop.ModemManager1.Modem.Simple.xml
$(mm_gdbus_modem_generated): $(mm_gdbus_modem_deps)
$(AM_V_GEN) gdbus-codegen \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-modem \
--c-generate-object-manager \
$^ \
$(NULL)
# SMS interface
mm_gdbus_sms_generated = \
mm-gdbus-sms.h \
mm-gdbus-sms.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.Sms.xml
$(mm_gdbus_sms_generated): $(top_srcdir)/new/org.freedesktop.ModemManager1.Sms.xml
$(AM_V_GEN) gdbus-codegen \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-sms \
$< \
$(NULL)
# Bearer interface
mm_gdbus_bearer_generated = \
mm-gdbus-bearer.h \
mm-gdbus-bearer.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.Bearer.xml
$(mm_gdbus_bearer_generated): $(top_srcdir)/new/org.freedesktop.ModemManager1.Bearer.xml
$(AM_V_GEN) gdbus-codegen \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-bearer \
$< \
$(NULL)
libmm_common_la_SOURCES = \
$(GENERATED_H) \
$(GENERATED_C)
libmm_common_la_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir)/include \
-Wno-unused-function \
-Wno-float-equal \
-Wno-shadow
CLEANFILES = $(GENERATED_H) $(GENERATED_C) $(GENERATED_DOC)