]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Merge branch 'gtk3-621753'
[empathy.git] / libempathy / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 AM_CPPFLAGS =                                           \
4         $(ERROR_CFLAGS)                                 \
5         -I.                                             \
6         -I$(top_srcdir)                                 \
7         -I$(top_builddir)                               \
8         -DDATADIR=\""$(datadir)"\"                      \
9         -DLOCALEDIR=\""$(datadir)/locale"\"             \
10         -DG_LOG_DOMAIN=\"empathy\"                      \
11         $(EMPATHY_CFLAGS)                               \
12         $(GEOCLUE_CFLAGS)                               \
13         $(NETWORK_MANAGER_CFLAGS)                       \
14         $(CONNMAN_CFLAGS)                               \
15         $(WARN_CFLAGS)                                  \
16         $(DISABLE_DEPRECATED)
17
18 BUILT_SOURCES =                                         \
19         empathy-marshal.h                               \
20         empathy-marshal.c                               \
21         empathy-marshal.list                            \
22         empathy-enum-types.h                            \
23         empathy-enum-types.c
24
25 noinst_LTLIBRARIES = libempathy.la
26
27 libempathy_headers =                            \
28         empathy-account-settings.h              \
29         empathy-call-factory.h                  \
30         empathy-call-handler.h                  \
31         empathy-chatroom-manager.h              \
32         empathy-chatroom.h                      \
33         empathy-connection-managers.h           \
34         empathy-connectivity.h                  \
35         empathy-contact-groups.h                \
36         empathy-contact-list.h                  \
37         empathy-contact-manager.h               \
38         empathy-contact.h                       \
39         empathy-debug.h                         \
40         empathy-dispatch-operation.h            \
41         empathy-dispatcher.h                    \
42         empathy-ft-factory.h                    \
43         empathy-ft-handler.h                    \
44         empathy-gsettings.h                     \
45         empathy-handler.h                       \
46         empathy-idle.h                          \
47         empathy-irc-network-manager.h           \
48         empathy-irc-network.h                   \
49         empathy-irc-server.h                    \
50         empathy-location.h                      \
51         empathy-message.h                       \
52         empathy-status-presets.h                \
53         empathy-time.h                          \
54         empathy-tp-call.h                       \
55         empathy-tp-chat.h                       \
56         empathy-tp-contact-factory.h            \
57         empathy-tp-contact-list.h               \
58         empathy-tp-file.h                       \
59         empathy-tp-roomlist.h                   \
60         empathy-types.h                         \
61         empathy-utils.h
62
63 libempathy_la_SOURCES =                                 \
64         $(libempathy_headers)                           \
65         empathy-account-settings.c                      \
66         empathy-call-factory.c                          \
67         empathy-call-handler.c                          \
68         empathy-chatroom-manager.c                      \
69         empathy-chatroom.c                              \
70         empathy-connection-managers.c                   \
71         empathy-connectivity.c                          \
72         empathy-contact-groups.c                        \
73         empathy-contact-list.c                          \
74         empathy-contact-manager.c                       \
75         empathy-contact.c                               \
76         empathy-debug.c                                 \
77         empathy-dispatch-operation.c                    \
78         empathy-dispatcher.c                            \
79         empathy-ft-factory.c                            \
80         empathy-ft-handler.c                            \
81         empathy-handler.c                               \
82         empathy-idle.c                                  \
83         empathy-irc-network-manager.c                   \
84         empathy-irc-network.c                           \
85         empathy-irc-server.c                            \
86         empathy-message.c                               \
87         empathy-status-presets.c                        \
88         empathy-time.c                                  \
89         empathy-tp-call.c                               \
90         empathy-tp-chat.c                               \
91         empathy-tp-contact-factory.c                    \
92         empathy-tp-contact-list.c                       \
93         empathy-tp-file.c                               \
94         empathy-tp-roomlist.c                           \
95         empathy-utils.c
96
97 # do not distribute generated files
98 nodist_libempathy_la_SOURCES =\
99         $(BUILT_SOURCES)
100
101 libempathy_la_LIBADD =          \
102         $(top_builddir)/extensions/libemp-extensions.la \
103         $(EMPATHY_LIBS) \
104         $(GEOCLUE_LIBS) \
105         $(NETWORK_MANAGER_LIBS) \
106         $(CONNMAN_LIBS)
107
108 check_c_sources = \
109     $(libempathy_la_SOURCES) \
110     $(libempathy_headers)
111 include $(top_srcdir)/tools/check-coding-style.mk
112 check-local: check-coding-style
113
114 empathy-marshal.list: $(libempathy_la_SOURCES) Makefile.am
115         $(AM_V_GEN)( cd $(srcdir) && \
116         sed -n -e 's/.*empathy_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
117         $(libempathy_la_SOURCES) ) \
118         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
119         @if cmp -s $@.tmp $@; then \
120                 rm $@.tmp; \
121         else \
122                 mv $@.tmp $@; \
123         fi
124
125 %-marshal.h: %-marshal.list Makefile
126         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
127
128 %-marshal.c: %-marshal.list Makefile
129         $(AM_V_GEN)echo "#include \"empathy-marshal.h\"" > $@ && \
130         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
131
132 empathy-enum-types.h: stamp-empathy-enum-types.h
133         $(AM_V_GEN)true
134 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
135         $(AM_V_GEN)(cd $(srcdir) \
136         && glib-mkenums \
137                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
138                         --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
139                         --fhead "#include <glib-object.h>\n\n" \
140                         --fhead "G_BEGIN_DECLS\n\n" \
141                         --ftail "G_END_DECLS\n\n" \
142                         --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
143                         --fprod "#include <libempathy/@filename@>\n" \
144                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
145                         --eprod "GType @enum_name@_get_type (void);\n" \
146                 $(libempathy_headers) ) > xgen-gth \
147         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
148         && rm -f xgen-gth \
149         && echo timestamp > $(@F)
150
151 empathy-enum-types.c: $(libempathy_headers) Makefile
152         $(AM_V_GEN)(cd $(srcdir) \
153         && glib-mkenums \
154                         --fhead "#include <config.h>\n" \
155                         --fhead "#include <glib-object.h>\n" \
156                         --fhead "#include \"empathy-enum-types.h\"\n\n" \
157                         --fprod "\n/* enumerations from \"@filename@\" */" \
158                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
159                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
160                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
161                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
162                         --vtail "  static GType type = 0;\n\n" \
163                         --vtail "  if (!type)\n" \
164                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
165                         --vtail "  return type;\n}\n\n" \
166                 $(libempathy_headers) ) > xgen-gtc \
167         && cp xgen-gtc $(@F) \
168         && rm -f xgen-gtc
169
170 dtddir = $(datadir)/empathy
171 dtd_DATA =                                      \
172         empathy-status-presets.dtd              \
173         empathy-contact-groups.dtd              \
174         empathy-chatroom-manager.dtd            \
175         empathy-irc-networks.dtd
176
177 ircnetworksdir = $(datadir)/empathy
178 ircnetworks_DATA =              \
179         irc-networks.xml
180
181 EXTRA_DIST =                    \
182         empathy-marshal.list    \
183         $(dtd_DATA)             \
184         $(ircnetworks_DATA)
185
186 CLEANFILES =                            \
187         $(BUILT_SOURCES)                \
188         stamp-empathy-enum-types.h