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