]> git.0d.be Git - empathy.git/blob - extensions/Makefile.am
Merge remote-tracking branch 'pochu/upgrade-software'
[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     $(EMPATHY_CFLAGS)
10
11 EXTRA_DIST = \
12     all.xml \
13     generic-types.xml \
14     misc.xml \
15     Debug.xml \
16     Logger.xml \
17     Connection_Interface_Renaming.xml \
18     Authentication_TLS_Certificate.xml \
19     Channel_Interface_Credentials_Storage.xml \
20     Channel_Type_Server_TLS_Connection.xml \
21     Chat_Manager.xml \
22     $(NULL)
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 clean-local:
61         rm -rf _gen
62
63 XSLTPROCFLAGS = --nonet --novalid
64
65 # Generated files which can be generated for all categories simultaneously
66
67 _gen/all.xml: all.xml $(wildcard *.xml) $(tools_dir)/xincludator.py
68         @$(mkdir_p) _gen
69         $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
70
71 extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl
72         $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \
73                 --param "allow-undefined-interfaces" "true()" \
74                 $(tools_dir)/doc-generator.xsl \
75                 $< > $@
76
77 _gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \
78         $(top_srcdir)/tools/glib-gtypes-generator.py
79         $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \
80                 $< _gen/gtypes Emp
81
82 _gen/signals-marshal.list: _gen/all.xml \
83         $(tools_dir)/glib-signals-marshal-gen.py
84         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@
85
86 _gen/signals-marshal.h: _gen/signals-marshal.list Makefile.am
87         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_emp_ext_marshal $< > $@
88
89 _gen/signals-marshal.c: _gen/signals-marshal.list Makefile.am
90         $(AM_V_GEN){ echo '#include "_gen/signals-marshal.h"' && \
91         $(GLIB_GENMARSHAL) --body --prefix=_emp_ext_marshal $< ; } > $@
92
93 _gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \
94         $(tools_dir)/glib-client-marshaller-gen.py
95         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \
96                 _emp_ext > $@
97
98 _gen/enums.h: _gen/all.xml \
99         $(tools_dir)/c-constants-gen.py
100         $(AM_V_GEN)$(PYTHON) $(tools_dir)/c-constants-gen.py \
101                 Emp \
102                 $< _gen/enums
103
104 _gen/interfaces-body.h _gen/interfaces.h: _gen/all.xml \
105         $(tools_dir)/glib-interfaces-gen.py
106         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-interfaces-gen.py \
107                 Emp _gen/interfaces-body.h _gen/interfaces.h $<
108
109 # Generated files which must be generated per "category". Each TpProxy
110 # subclass you want to use with --subclass will need to have its own category,
111 # although you can subdivide further if you want.
112
113 _gen/misc.xml: misc.xml $(wildcard *.xml) $(tools_dir)/xincludator.py
114         @$(mkdir_p) _gen
115         $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
116
117 _gen/cli-misc-body.h _gen/cli-misc.h: _gen/misc.xml \
118         $(tools_dir)/glib-client-gen.py
119         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
120                 --group=misc \
121                 --subclass=TpProxy \
122                 --subclass-assert=TP_IS_PROXY \
123                 --iface-quark-prefix=EMP_IFACE_QUARK \
124                 --tp-proxy-api=0.10.0 \
125                 $< Emp_Cli _gen/cli-misc
126
127 _gen/svc-misc.c _gen/svc-misc.h: _gen/misc.xml \
128         $(tools_dir)/glib-ginterface-gen.py
129         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
130                 --filename=_gen/svc-misc \
131                 --signal-marshal-prefix=_emp_ext \
132                 --include='<telepathy-glib/dbus.h>' \
133                 --include='"_gen/signals-marshal.h"' \
134                 --not-implemented-func='tp_dbus_g_method_return_not_implemented' \
135                 --allow-unstable \
136                 $< Emp_Svc_