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