]> git.0d.be Git - empathy.git/blob - src/Makefile.am
Merge branch 'move-video-preview-656268'
[empathy.git] / src / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 CPPFLAGS_COMMON =                                       \
4         $(YELL_CFLAGS)                                  \
5         $(EMPATHY_CFLAGS)                               \
6         $(EDS_CFLAGS)                                   \
7         $(ERROR_CFLAGS)                                 \
8         -I$(top_srcdir)                                 \
9         -DG_LOG_DOMAIN=\"empathy\"                      \
10         -DBIN_DIR=\"$(bindir)\"                         \
11         $(DISABLE_DEPRECATED)                           \
12         $(WARN_CFLAGS)                                  \
13         $(NULL)
14
15 AM_LDFLAGS = -lm
16 AM_CPPFLAGS =                                           \
17         $(CPPFLAGS_COMMON)                              \
18         $(LIBCHAMPLAIN_CFLAGS)                          \
19         $(WEBKIT_CFLAGS)                                \
20         $(NULL)
21
22 LDADD =                                                         \
23         $(top_builddir)/libempathy-gtk/libempathy-gtk.la        \
24         $(top_builddir)/libempathy/libempathy.la                \
25         $(top_builddir)/extensions/libemp-extensions.la         \
26         $(GCR_LIBS)                                             \
27         $(EMPATHY_LIBS)                                         \
28         $(YELL_LIBS)                                            \
29         $(LIBCHAMPLAIN_LIBS)                                    \
30         $(WEBKIT_LIBS)
31
32 noinst_LTLIBRARIES = libempathy-accounts-common.la
33
34 libempathy_accounts_common_la_SOURCES =                                 \
35         empathy-accounts-common.c empathy-accounts-common.h             \
36         empathy-account-assistant.c empathy-account-assistant.h         \
37         empathy-accounts-dialog.c empathy-accounts-dialog.h             \
38         empathy-auto-salut-account-helper.c empathy-auto-salut-account-helper.h \
39         empathy-import-dialog.c empathy-import-dialog.h                 \
40         empathy-import-pidgin.c empathy-import-pidgin.h                 \
41         empathy-import-widget.c empathy-import-widget.h                 \
42         empathy-import-utils.c empathy-import-utils.h                   \
43         $(NULL)
44
45 libempathy_accounts_common_la_LIBADD =                                  \
46         $(top_builddir)/libempathy-gtk/libempathy-gtk.la                \
47         $(EDS_LIBS)                                                     \
48         $(EMPATHY_LIBS)                                                 \
49         $(LIBCHAMPLAIN_LIBS)                                            \
50         $(WEBKIT_LIBS)                                                  \
51         $(NULL)
52
53 if HAVE_CONTROL_CENTER_EMBEDDING
54 ccmodulesdir = $(CONTROL_CENTER_EXTENSIONDIR)
55 ccmodules_LTLIBRARIES = libempathy-accounts-panel.la
56
57 libempathy_accounts_panel_la_SOURCES =                          \
58         empathy-accounts-module.c                               \
59         cc-empathy-accounts-panel.c                             \
60         cc-empathy-accounts-panel.h                             \
61         $(NULL)
62
63 libempathy_accounts_panel_la_CPPFLAGS =                         \
64         $(CPPFLAGS_COMMON)                                      \
65         $(CONTROL_CENTER_EMBEDDING_CFLAGS)                      \
66         -DLOCALEDIR=\""$(datadir)/locale"\"                     \
67         $(NULL)
68
69 libempathy_accounts_panel_la_LDFLAGS = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)'
70
71 libempathy_accounts_panel_la_LIBADD =                           \
72         $(EMPATHY_LIBS)                                         \
73         $(CONTROL_CENTER_EMBEDDING_LIBS)                        \
74         libempathy-accounts-common.la                           \
75         $(NULL)
76 endif
77
78 bin_PROGRAMS =                  \
79         empathy                 \
80         empathy-accounts        \
81         empathy-debugger        \
82         $(NULL)
83
84 libexec_PROGRAMS = \
85         empathy-auth-client \
86         empathy-av \
87         empathy-chat
88
89 BUILT_SOURCES = \
90         src-marshal.h \
91         src-marshal.c \
92         src-marshal.list
93
94 empathy_accounts_SOURCES =                                              \
95         empathy-accounts.c empathy-accounts.h                           \
96         $(NULL)
97
98 empathy_accounts_LDADD =                                                \
99         $(LDADD)                                                        \
100         libempathy-accounts-common.la                                   \
101         $(NULL)
102
103 empathy_debugger_SOURCES =                                              \
104         empathy-debug-window.c empathy-debug-window.h                   \
105         empathy-debugger.c                                              \
106         $(NULL)
107
108 empathy_av_SOURCES = \
109         empathy-av.c \
110         empathy-audio-sink.c \
111         empathy-audio-sink.h \
112         empathy-audio-src.c \
113         empathy-audio-src.h \
114         empathy-streamed-media-factory.c \
115         empathy-streamed-media-factory.h \
116         empathy-streamed-media-handler.c \
117         empathy-streamed-media-handler.h \
118         empathy-streamed-media-window-fullscreen.c \
119         empathy-streamed-media-window-fullscreen.h \
120         empathy-streamed-media-window.c \
121         empathy-streamed-media-window.h \
122         empathy-video-src.c \
123         empathy-video-src.h \
124         empathy-video-widget.c \
125         empathy-video-widget.h \
126         ev-sidebar.c \
127         ev-sidebar.h \
128         $(NULL)
129
130 nodist_empathy_av_SOURCES = $(BUILT_SOURCES)
131
132 empathy_av_CFLAGS = $(EMPATHY_AV_CFLAGS)
133 empathy_av_LDFLAGS = $(EMPATHY_AV_LIBS)
134
135 empathy_auth_client_SOURCES =                                           \
136         empathy-auth-client.c \
137         $(NULL)
138
139 empathy_chat_SOURCES =                                          \
140         empathy-about-dialog.c empathy-about-dialog.h                   \
141         empathy-chat-manager.c empathy-chat-manager.h           \
142         empathy-chat-window.c empathy-chat-window.h             \
143         empathy-invite-participant-dialog.c empathy-invite-participant-dialog.h \
144         empathy-chat.c \
145         gedit-close-button.c gedit-close-button.h \
146         $(NULL)
147
148 if HAVE_CALL
149
150 libexec_PROGRAMS += empathy-call
151
152 empathy_call_SOURCES = \
153        empathy-call.c \
154        empathy-call-factory.c \
155        empathy-call-factory.h \
156        empathy-call-handler.c \
157        empathy-call-handler.h \
158        empathy-call-window.c \
159        empathy-call-window.h \
160        empathy-call-window-fullscreen.c \
161        empathy-call-window-fullscreen.h \
162        empathy-about-dialog.c \
163        empathy-about-dialog.h \
164        empathy-audio-sink.c \
165        empathy-audio-sink.h \
166        empathy-audio-src.c \
167        empathy-audio-src.h \
168        empathy-video-src.c \
169        empathy-video-src.h \
170        empathy-video-widget.c \
171        empathy-video-widget.h \
172        empathy-preferences.c \
173        empathy-preferences.h \
174        ev-sidebar.c \
175        ev-sidebar.h \
176        empathy-camera-menu.c \
177        empathy-camera-menu.h \
178        empathy-mic-menu.c \
179        empathy-mic-menu.h \
180        empathy-rounded-actor.c \
181        empathy-rounded-actor.h
182
183 nodist_empathy_call_SOURCES = $(BUILT_SOURCES)
184
185 empathy_call_CFLAGS = $(EMPATHY_CALL_CFLAGS)
186 empathy_call_LDFLAGS = $(EMPATHY_CALL_LIBS)
187
188 endif
189
190 empathy_handwritten_source = \
191         empathy-about-dialog.c empathy-about-dialog.h                   \
192         empathy-chat-window.c empathy-chat-window.h                     \
193         empathy-chatrooms-window.c empathy-chatrooms-window.h           \
194         empathy-event-manager.c empathy-event-manager.h                 \
195         empathy-ft-manager.c empathy-ft-manager.h                       \
196         empathy-invite-participant-dialog.c empathy-invite-participant-dialog.h \
197         empathy-main-window.c empathy-main-window.h                     \
198         empathy-migrate-butterfly-logs.c empathy-migrate-butterfly-logs.h \
199         empathy-new-chatroom-dialog.c empathy-new-chatroom-dialog.h     \
200         empathy-notifications-approver.c empathy-notifications-approver.h \
201         empathy-call-observer.c empathy-call-observer.h                 \
202         empathy-preferences.c empathy-preferences.h                     \
203         empathy-status-icon.c empathy-status-icon.h                     \
204         empathy-chat-manager.c empathy-chat-manager.h                   \
205         gedit-close-button.c gedit-close-button.h \
206         empathy.c
207
208 empathy_SOURCES =                                                       \
209         $(empathy_handwritten_source)                                   \
210         $(NULL)
211
212 empathy_LDADD =                                                         \
213         libempathy-accounts-common.la                                   \
214         $(top_builddir)/libempathy-gtk/libempathy-gtk.la                \
215         $(top_builddir)/libempathy/libempathy.la                        \
216         $(top_builddir)/extensions/libemp-extensions.la                 \
217         $(EMPATHY_LIBS)                                                 \
218         $(LIBCHAMPLAIN_LIBS)                                            \
219         $(WEBKIT_LIBS)                                                  \
220         $(NULL)
221
222 nodist_empathy_SOURCES = $(BUILT_SOURCES)
223
224 check_c_sources = \
225     $(empathy_handwritten_source) \
226     $(empathy_logs_SOURCES) \
227     $(empathy_handwritten_av_source)
228
229 include $(top_srcdir)/tools/check-coding-style.mk
230 check-local: check-coding-style
231
232 uidir = $(datadir)/empathy
233 ui_DATA =                                       \
234         empathy-accounts-dialog.ui              \
235         empathy-call-window-fullscreen.ui       \
236         empathy-call-window.ui                  \
237         empathy-streamed-media-window.ui        \
238         empathy-chat-window.ui                  \
239         empathy-chatrooms-window.ui             \
240         empathy-ft-manager.ui                   \
241         empathy-import-dialog.ui                \
242         empathy-main-window.ui                  \
243         empathy-new-chatroom-dialog.ui          \
244         empathy-preferences.ui                  \
245         empathy-status-icon.ui
246
247 EXTRA_DIST =                    \
248         $(autostart_DATA)       \
249         $(ui_DATA)
250
251 if HAVE_LIBCHAMPLAIN
252 empathy_handwritten_source +=                           \
253         empathy-map-view.c                      \
254         empathy-map-view.h
255
256 ui_DATA +=                                      \
257         empathy-map-view.ui
258 else
259 EXTRA_DIST +=                                   \
260         empathy-map-view.c                      \
261         empathy-map-view.h                      \
262         empathy-map-view.ui
263 endif
264
265 if !HAVE_CONTROL_CENTER_EMBEDDING
266 EXTRA_DIST += $(libempathy_accounts_panel_la_SOURCES)
267 else
268 check_c_sources += $(libempathy_accounts_panel_la_SOURCES)
269 endif
270
271 dist_man_MANS =                 \
272         empathy.1 \
273         empathy-accounts.1
274
275 src-marshal.list: $(empathy_SOURCES) $(empathy_call_SOURCES) Makefile.am
276         $(AM_V_GEN)( cd $(srcdir) && \
277         sed -n -e 's/.*src_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
278         $(empathy_SOURCES) $(empathy_av_SOURCES) $(empathy_call_SOURCES) ) \
279         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
280         @if cmp -s $@.tmp $@; then \
281                 rm $@.tmp; \
282         else \
283                 mv $@.tmp $@; \
284         fi
285
286 %-marshal.h: %-marshal.list Makefile
287         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
288
289 %-marshal.c: %-marshal.list Makefile
290         $(AM_V_GEN)echo "#include \"src-marshal.h\"" > $@ && \
291         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
292
293 # rules for making the glib enum objects
294 %-enumtypes.h: %.h Makefile.in
295         $(AM_V_GEN)glib-mkenums \
296         --fhead "#ifndef __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n#define __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
297         --fprod "/* enumerations from \"@filename@\" */\n" \
298         --vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
299         --ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \
300         $< > $@
301
302 %-enumtypes.c: %.h Makefile.in
303         $(AM_V_GEN)glib-mkenums \
304         --fhead "#include <$*.h>\n#include <$*-enumtypes.h>" \
305         --fprod "\n/* enumerations from \"@filename@\" */" \
306         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"     \
307         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
308         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
309         $< > $@
310
311 CLEANFILES = $(BUILT_SOURCES)
312