]> git.0d.be Git - empathy.git/blob - extensions/Makefile.am
Merge branch 'gnome-3-10'
[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     Connection_Interface_Renaming.xml \
17     Channel_Interface_Credentials_Storage.xml \
18     Chat_Manager.xml \
19     $(NULL)
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/register-dbus-glib-marshallers-body.h \
36     _gen/enums.h \
37     _gen/gtypes.h \
38     _gen/gtypes-body.h \
39     _gen/interfaces.h \
40     _gen/interfaces-body.h \
41     _gen/cli-misc.h \
42     _gen/cli-misc-body.h \
43     _gen/svc-misc.h \
44     _gen/svc-misc.c
45
46 BUILT_SOURCES = \
47     _gen/all.xml \
48     _gen/misc.xml \
49     $(nodist_libemp_extensions_la_SOURCES) \
50     extensions.html
51
52 CLEANFILES = $(BUILT_SOURCES)
53
54 clean-local:
55         rm -rf _gen
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) $(tools_dir)/xincludator.py
62         @$(MKDIR_P) _gen
63         $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
64
65 extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl
66         $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \
67                 --param "allow-undefined-interfaces" "true()" \
68                 $(tools_dir)/doc-generator.xsl \
69                 $< > $@
70
71 _gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \
72         $(top_srcdir)/tools/glib-gtypes-generator.py
73         $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \
74                 $< _gen/gtypes Emp
75
76 _gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \
77         $(tools_dir)/glib-client-marshaller-gen.py
78         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \
79                 _emp_ext > $@
80
81 _gen/enums.h: _gen/all.xml \
82         $(tools_dir)/c-constants-gen.py
83         $(AM_V_GEN)$(PYTHON) $(tools_dir)/c-constants-gen.py \
84                 Emp \
85                 $< _gen/enums
86
87 _gen/interfaces-body.h _gen/interfaces.h: _gen/all.xml \
88         $(tools_dir)/glib-interfaces-gen.py
89         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-interfaces-gen.py \
90                 Emp _gen/interfaces-body.h _gen/interfaces.h $<
91
92 # Generated files which must be generated per "category". Each TpProxy
93 # subclass you want to use with --subclass will need to have its own category,
94 # although you can subdivide further if you want.
95
96 _gen/misc.xml: misc.xml $(wildcard *.xml) $(tools_dir)/xincludator.py
97         @$(MKDIR_P) _gen
98         $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
99
100 _gen/cli-misc-body.h: _gen/cli-misc.h
101
102 _gen/cli-misc.h: _gen/misc.xml \
103         $(tools_dir)/glib-client-gen.py
104         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
105                 --group=misc \
106                 --subclass=TpProxy \
107                 --subclass-assert=TP_IS_PROXY \
108                 --iface-quark-prefix=EMP_IFACE_QUARK \
109                 --tp-proxy-api=0.10.0 \
110                 $< Emp_Cli _gen/cli-misc
111
112 # There is no need to execute glib-ginterface-gen.py twice because it
113 # generates both the .c and .h files in one shot. Therefore, merely
114 # having one of them (say the .c) depend on the other (say the .h) is
115 # enough.
116 #
117 # Moreover, running it twice breaks parallel builds because one
118 # glib-ginterface-gen.py process steps on the other.
119
120 _gen/svc-misc.c: _gen/svc-misc.h
121
122 _gen/svc-misc.h: _gen/misc.xml \
123         $(tools_dir)/glib-ginterface-gen.py
124         $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
125                 --filename=_gen/svc-misc \
126                 --signal-marshal-prefix=_emp_ext \
127                 --include='<telepathy-glib/telepathy-glib.h>' \
128                 --not-implemented-func='tp_dbus_g_method_return_not_implemented' \
129                 --allow-unstable \
130                 $< Emp_Svc_