]> git.0d.be Git - empathy.git/blob - src/Makefile.am
Merge branch 'call'
[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-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        ev-sidebar.c \
171        ev-sidebar.h
172
173 nodist_empathy_call_SOURCES = $(BUILT_SOURCES)
174
175 empathy_call_CFLAGS = $(EMPATHY_CALL_CFLAGS)
176 empathy_call_LDFLAGS = $(EMPATHY_CALL_LIBS)
177
178 endif
179
180 empathy_handwritten_source = \
181         empathy-about-dialog.c empathy-about-dialog.h                   \
182         empathy-chat-window.c empathy-chat-window.h                     \
183         empathy-chatrooms-window.c empathy-chatrooms-window.h           \
184         empathy-event-manager.c empathy-event-manager.h                 \
185         empathy-ft-manager.c empathy-ft-manager.h                       \
186         empathy-invite-participant-dialog.c empathy-invite-participant-dialog.h \
187         empathy-main-window.c empathy-main-window.h                     \
188         empathy-migrate-butterfly-logs.c empathy-migrate-butterfly-logs.h \
189         empathy-new-chatroom-dialog.c empathy-new-chatroom-dialog.h     \
190         empathy-notifications-approver.c empathy-notifications-approver.h \
191         empathy-call-observer.c empathy-call-observer.h                 \
192         empathy-preferences.c empathy-preferences.h                     \
193         empathy-status-icon.c empathy-status-icon.h                     \
194         empathy-chat-manager.c empathy-chat-manager.h                   \
195         gedit-close-button.c gedit-close-button.h \
196         empathy.c
197
198 empathy_SOURCES =                                                       \
199         $(empathy_handwritten_source)                                   \
200         $(NULL)
201
202 empathy_LDADD =                                                         \
203         libempathy-accounts-common.la                                   \
204         $(top_builddir)/libempathy-gtk/libempathy-gtk.la                \
205         $(top_builddir)/libempathy/libempathy.la                        \
206         $(top_builddir)/extensions/libemp-extensions.la                 \
207         $(EMPATHY_LIBS)                                                 \
208         $(LIBCHAMPLAIN_LIBS)                                            \
209         $(WEBKIT_LIBS)                                                  \
210         $(NULL)
211
212 nodist_empathy_SOURCES = $(BUILT_SOURCES)
213
214 check_c_sources = \
215     $(empathy_handwritten_source) \
216     $(empathy_logs_SOURCES) \
217     $(empathy_handwritten_av_source)
218
219 include $(top_srcdir)/tools/check-coding-style.mk
220 check-local: check-coding-style
221
222 uidir = $(datadir)/empathy
223 ui_DATA =                                       \
224         empathy-accounts-dialog.ui              \
225         empathy-call-window-fullscreen.ui       \
226         empathy-call-window.ui                  \
227         empathy-chat-window.ui                  \
228         empathy-chatrooms-window.ui             \
229         empathy-ft-manager.ui                   \
230         empathy-import-dialog.ui                \
231         empathy-main-window.ui                  \
232         empathy-new-chatroom-dialog.ui          \
233         empathy-preferences.ui                  \
234         empathy-status-icon.ui
235
236 EXTRA_DIST =                    \
237         $(autostart_DATA)       \
238         $(ui_DATA)
239
240 if HAVE_LIBCHAMPLAIN
241 empathy_handwritten_source +=                           \
242         empathy-map-view.c                      \
243         empathy-map-view.h
244
245 ui_DATA +=                                      \
246         empathy-map-view.ui
247 else
248 EXTRA_DIST +=                                   \
249         empathy-map-view.c                      \
250         empathy-map-view.h                      \
251         empathy-map-view.ui
252 endif
253
254 if !HAVE_CONTROL_CENTER_EMBEDDING
255 EXTRA_DIST += $(libempathy_accounts_panel_la_SOURCES)
256 else
257 check_c_sources += $(libempathy_accounts_panel_la_SOURCES)
258 endif
259
260 dist_man_MANS =                 \
261         empathy.1 \
262         empathy-accounts.1
263
264 src-marshal.list: $(empathy_SOURCES) Makefile.am
265         $(AM_V_GEN)( cd $(srcdir) && \
266         sed -n -e 's/.*src_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
267         $(empathy_SOURCES) $(empathy_av_SOURCES) ) \
268         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
269         @if cmp -s $@.tmp $@; then \
270                 rm $@.tmp; \
271         else \
272                 mv $@.tmp $@; \
273         fi
274
275 %-marshal.h: %-marshal.list Makefile
276         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
277
278 %-marshal.c: %-marshal.list Makefile
279         $(AM_V_GEN)echo "#include \"src-marshal.h\"" > $@ && \
280         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
281
282 # rules for making the glib enum objects
283 %-enumtypes.h: %.h Makefile.in
284         $(AM_V_GEN)glib-mkenums \
285         --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" \
286         --fprod "/* enumerations from \"@filename@\" */\n" \
287         --vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
288         --ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \
289         $< > $@
290
291 %-enumtypes.c: %.h Makefile.in
292         $(AM_V_GEN)glib-mkenums \
293         --fhead "#include <$*.h>\n#include <$*-enumtypes.h>" \
294         --fprod "\n/* enumerations from \"@filename@\" */" \
295         --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[] = {"     \
296         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
297         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
298         $< > $@
299
300 CLEANFILES = $(BUILT_SOURCES)
301