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