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