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