Merge branch 'debug'
[empathy.git] / extensions / Makefile.am
1 include $(top_srcdir)/tools/shave.mk
2
3 tools_dir = $(top_srcdir)/tools
4
5 AM_CPPFLAGS = $(DISABLE_DEPRECATED)
6
7 AM_CFLAGS = \
8     -I$(top_srcdir) \
9     -I$(top_builddir) \
10     $(WARN_CFLAGS) \
11     $(LIBEMPATHY_CFLAGS)
12
13 EXTRA_DIST = \
14     all.xml \
15     generic-types.xml \
16     misc.xml \
17     Channel_Handler.xml \
18     Connection_Interface_Location.xml \
19     Tube_Handler.xml \
20     Debug.xml
21
22 noinst_LTLIBRARIES = libemp-extensions.la
23
24 libemp_extensions_la_LIBADD = \
25     $(TP_GLIB_LIBS)
26
27 # The client-specific parts are built into a separate .o file, so the linker
28 # can discard them when linking services. The service-specific parts are
29 # in svc-*.c, so we don't need an extensions-svc.c.
30 libemp_extensions_la_SOURCES = \
31     extensions.c \
32     extensions-cli.c \
33     extensions.h
34
35 nodist_libemp_extensions_la_SOURCES = \
36     _gen/signals-marshal.c \
37     _gen/signals-marshal.h \
38     _gen/signals-marshal.list \
39     _gen/register-dbus-glib-marshallers-body.h \
40     _gen/enums.h \
41     _gen/gtypes.h \
42     _gen/gtypes-body.h \
43     _gen/interfaces.h \
44     _gen/interfaces-body.h \
45     _gen/cli-misc.h \
46     _gen/cli-misc-body.h \
47     _gen/svc-misc.h \
48     _gen/svc-misc.c
49
50 BUILT_SOURCES = \
51     _gen/all.xml \
52     _gen/misc.xml \
53     $(nodist_libemp_extensions_la_SOURCES) \
54     extensions.html
55
56 CLEANFILES = $(BUILT_SOURCES)
57
58 XSLTPROCFLAGS = --nonet --novalid
59
60 # Generated files which can be generated for all categories simultaneously
61
62 _gen/all.xml: all.xml $(wildcard *.xml)
63         $(mkdir_p) _gen
64         $(QUIET_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \
65                 $< > $@
66
67 extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl
68         $(QUIET_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \
69                 --param "allow-undefined-interfaces" "true()" \
70                 $(tools_dir)/doc-generator.xsl \
71                 $< > $@
72
73 _gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \
74         $(top_srcdir)/tools/glib-gtypes-generator.py
75         $(QUIET_GEN)$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \
76                 $< _gen/gtypes Emp
77
78 _gen/signals-marshal.list: _gen/all.xml \
79         $(tools_dir)/glib-signals-marshal-gen.py
80         $(QUIET_GEN)$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@
81
82 _gen/signals-marshal.h: _gen/signals-marshal.list Makefile.am
83         $(QUIET_GEN)$(GLIB_GENMARSHAL) --header --prefix=_emp_ext_marshal $< > $@
84
85 _gen/signals-marshal.c: _gen/signals-marshal.list Makefile.am
86         $(QUIET_GEN){ echo '#include "_gen/signals-marshal.h"' && \
87         $(GLIB_GENMARSHAL) --body --prefix=_emp_ext_marshal $< ; } > $@
88
89 _gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \
90         $(tools_dir)/glib-client-marshaller-gen.py
91         $(QUIET_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \
92                 _emp_ext > $@
93
94 _gen/enums.h: _gen/all.xml \
95         $(tools_dir)/c-constants-gen.py
96         $(QUIET_GEN)$(PYTHON) $(tools_dir)/c-constants-gen.py \
97                 Emp \
98                 $< > $@
99
100 _gen/interfaces-body.h _gen/interfaces.h: _gen/all.xml \
101         $(tools_dir)/glib-interfaces-gen.py
102         $(QUIET_GEN)$(PYTHON) $(tools_dir)/glib-interfaces-gen.py \
103                 Emp _gen/interfaces-body.h _gen/interfaces.h $<
104
105 # Generated files which must be generated per "category". Each TpProxy
106 # subclass you want to use with --subclass will need to have its own category,
107 # although you can subdivide further if you want.
108
109 _gen/misc.xml: misc.xml $(wildcard *.xml)
110         $(mkdir_p) _gen
111         $(QUIET_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \
112                 $< > $@
113
114 _gen/cli-misc-body.h _gen/cli-misc.h: _gen/misc.xml \
115         $(tools_dir)/glib-client-gen.py
116         $(QUIET_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
117                 --group=misc \
118                 --subclass=TpProxy \
119                 --subclass-assert=TP_IS_PROXY \
120                 --iface-quark-prefix=EMP_IFACE_QUARK \
121                 --tp-proxy-api=0.7.6 \
122                 $< Emp_Cli _gen/cli-misc
123
124 _gen/svc-misc.c _gen/svc-misc.h: _gen/misc.xml \
125         $(tools_dir)/glib-ginterface-gen.py
126         $(QUIET_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
127                 --filename=_gen/svc-misc \
128                 --signal-marshal-prefix=_emp_ext \
129                 --include='<telepathy-glib/dbus.h>' \
130                 --include='"_gen/signals-marshal.h"' \
131                 --not-implemented-func='tp_dbus_g_method_return_not_implemented' \
132                 --allow-unstable \
133                 $< Emp_Svc_