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