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