]> git.0d.be Git - empathy.git/blob - extensions/Makefile.am
3.12.3
[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     Logger.xml \
16     Channel_Interface_Credentials_Storage.xml \
17     $(NULL)
18
19 noinst_LTLIBRARIES = libemp-extensions.la
20
21 libemp_extensions_la_LIBADD = \
22     $(TP_GLIB_LIBS)
23
24 # The client-specific parts are built into a separate .o file, so the linker
25 # can discard them when linking services. The service-specific parts are
26 # in svc-*.c, so we don't need an extensions-svc.c.
27 libemp_extensions_la_SOURCES = \
28     extensions.c \
29     extensions-cli.c \
30     extensions.h
31
32 nodist_libemp_extensions_la_SOURCES = \
33     _gen/register-dbus-glib-marshallers-body.h \
34     _gen/enums.h \
35     _gen/gtypes.h \
36     _gen/gtypes-body.h \
37     _gen/interfaces.h \
38     _gen/interfaces-body.h \
39     _gen/cli-misc.h \
40     _gen/cli-misc-body.h \
41     _gen/svc-misc.h \
42     _gen/svc-misc.c
43
44 BUILT_SOURCES = \
45     _gen/all.xml \
46     _gen/misc.xml \
47     $(nodist_libemp_extensions_la_SOURCES) \
48     extensions.html
49
50 CLEANFILES = $(BUILT_SOURCES)
51
52 clean-local:
53         rm -rf _gen
54
55 XSLTPROCFLAGS = --nonet --novalid
56
57 # Generated files which can be generated for all categories simultaneously
58
59 _gen/all.xml: all.xml $(wildcard *.xml) $(tools_dir)/xincludator.py
60         @$(MKDIR_P) _gen
61         $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
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/register-dbus-glib-marshallers-body.h: _gen/all.xml \
75         $(tools_dir)/glib-client-marshaller-gen.py
76         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \
77                 _emp_ext > $@
78
79 _gen/enums.h: _gen/all.xml \
80         $(tools_dir)/c-constants-gen.py
81         $(AM_V_GEN)$(PYTHON) $(tools_dir)/c-constants-gen.py \
82                 Emp \
83                 $< _gen/enums
84
85 _gen/interfaces-body.h _gen/interfaces.h: _gen/all.xml \
86         $(tools_dir)/glib-interfaces-gen.py
87         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-interfaces-gen.py \
88                 Emp _gen/interfaces-body.h _gen/interfaces.h $<
89
90 # Generated files which must be generated per "category". Each TpProxy
91 # subclass you want to use with --subclass will need to have its own category,
92 # although you can subdivide further if you want.
93
94 _gen/misc.xml: misc.xml $(wildcard *.xml) $(tools_dir)/xincludator.py
95         @$(MKDIR_P) _gen
96         $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
97
98 _gen/cli-misc-body.h: _gen/cli-misc.h
99
100 _gen/cli-misc.h: _gen/misc.xml \
101         $(tools_dir)/glib-client-gen.py
102         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
103                 --group=misc \
104                 --subclass=TpProxy \
105                 --subclass-assert=TP_IS_PROXY \
106                 --iface-quark-prefix=EMP_IFACE_QUARK \
107                 --tp-proxy-api=0.10.0 \
108                 $< Emp_Cli _gen/cli-misc
109
110 # There is no need to execute glib-ginterface-gen.py twice because it
111 # generates both the .c and .h files in one shot. Therefore, merely
112 # having one of them (say the .c) depend on the other (say the .h) is
113 # enough.
114 #
115 # Moreover, running it twice breaks parallel builds because one
116 # glib-ginterface-gen.py process steps on the other.
117
118 _gen/svc-misc.c: _gen/svc-misc.h
119
120 _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/telepathy-glib.h>' \
126                 --not-implemented-func='tp_dbus_g_method_return_not_implemented' \
127                 --allow-unstable \
128                 $< Emp_Svc_