]> git.0d.be Git - empathy.git/blob - src/Makefile.am
add gedit-close-button
[empathy.git] / src / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 CPPFLAGS_COMMON =                                       \
4         $(EMPATHY_CFLAGS)                               \
5         $(EDS_CFLAGS)                                   \
6         $(ERROR_CFLAGS)                                 \
7         -I$(top_srcdir)                                 \
8         -DG_LOG_DOMAIN=\"empathy\"                      \
9         -DBIN_DIR=\"$(bindir)\"                         \
10         $(DISABLE_DEPRECATED)                           \
11         $(WARN_CFLAGS)                                  \
12         $(NULL)
13
14 AM_LDFLAGS = -lm
15 AM_CPPFLAGS =                                           \
16         $(CPPFLAGS_COMMON)                              \
17         $(LIBCHAMPLAIN_CFLAGS)                          \
18         $(WEBKIT_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         $(LIBCHAMPLAIN_LIBS)                                    \
28         $(WEBKIT_LIBS)
29
30 noinst_LTLIBRARIES = libempathy-accounts-common.la
31
32 libempathy_accounts_common_la_SOURCES =                                 \
33         empathy-accounts-common.c empathy-accounts-common.h             \
34         empathy-account-assistant.c empathy-account-assistant.h         \
35         empathy-accounts-dialog.c empathy-accounts-dialog.h             \
36         empathy-auto-salut-account-helper.c empathy-auto-salut-account-helper.h \
37         empathy-import-dialog.c empathy-import-dialog.h                 \
38         empathy-import-pidgin.c empathy-import-pidgin.h                 \
39         empathy-import-widget.c empathy-import-widget.h                 \
40         empathy-import-utils.c empathy-import-utils.h                   \
41         $(NULL)
42
43 libempathy_accounts_common_la_LIBADD =                                  \
44         $(top_builddir)/libempathy-gtk/libempathy-gtk.la                \
45         $(EDS_LIBS)                                                     \
46         $(EMPATHY_LIBS)                                                 \
47         $(LIBCHAMPLAIN_LIBS)                                            \
48         $(WEBKIT_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 empathy_handwritten_source = \
147         empathy-about-dialog.c empathy-about-dialog.h                   \
148         empathy-chat-window.c empathy-chat-window.h                     \
149         empathy-chatrooms-window.c empathy-chatrooms-window.h           \
150         empathy-event-manager.c empathy-event-manager.h                 \
151         empathy-ft-manager.c empathy-ft-manager.h                       \
152         empathy-invite-participant-dialog.c empathy-invite-participant-dialog.h \
153         empathy-main-window.c empathy-main-window.h                     \
154         empathy-migrate-butterfly-logs.c empathy-migrate-butterfly-logs.h \
155         empathy-new-chatroom-dialog.c empathy-new-chatroom-dialog.h     \
156         empathy-notifications-approver.c empathy-notifications-approver.h \
157         empathy-preferences.c empathy-preferences.h                     \
158         empathy-status-icon.c empathy-status-icon.h                     \
159         empathy-chat-manager.c empathy-chat-manager.h                   \
160         gedit-close-button.c gedit-close-button.h \
161         empathy.c
162
163 empathy_SOURCES =                                                       \
164         $(empathy_handwritten_source)                                   \
165         $(NULL)
166
167 empathy_LDADD =                                                         \
168         libempathy-accounts-common.la                                   \
169         $(top_builddir)/libempathy-gtk/libempathy-gtk.la                \
170         $(top_builddir)/libempathy/libempathy.la                        \
171         $(top_builddir)/extensions/libemp-extensions.la                 \
172         $(EMPATHY_LIBS)                                                 \
173         $(LIBCHAMPLAIN_LIBS)                                            \
174         $(WEBKIT_LIBS)                                                  \
175         $(NULL)
176
177 nodist_empathy_SOURCES = $(BUILT_SOURCES)
178
179 check_c_sources = \
180     $(empathy_handwritten_source) \
181     $(empathy_logs_SOURCES) \
182     $(empathy_handwritten_av_source)
183
184 include $(top_srcdir)/tools/check-coding-style.mk
185 check-local: check-coding-style
186
187 uidir = $(datadir)/empathy
188 ui_DATA =                                       \
189         empathy-accounts-dialog.ui              \
190         empathy-call-window-fullscreen.ui       \
191         empathy-call-window.ui                  \
192         empathy-chat-window.ui                  \
193         empathy-chatrooms-window.ui             \
194         empathy-ft-manager.ui                   \
195         empathy-import-dialog.ui                \
196         empathy-main-window.ui                  \
197         empathy-new-chatroom-dialog.ui          \
198         empathy-preferences.ui                  \
199         empathy-status-icon.ui
200
201 EXTRA_DIST =                    \
202         $(autostart_DATA)       \
203         $(ui_DATA)
204
205 if HAVE_LIBCHAMPLAIN
206 empathy_handwritten_source +=                           \
207         empathy-map-view.c                      \
208         empathy-map-view.h
209
210 ui_DATA +=                                      \
211         empathy-map-view.ui
212 else
213 EXTRA_DIST +=                                   \
214         empathy-map-view.c                      \
215         empathy-map-view.h                      \
216         empathy-map-view.ui
217 endif
218
219 if !HAVE_CONTROL_CENTER_EMBEDDING
220 EXTRA_DIST += $(libempathy_accounts_panel_la_SOURCES)
221 else
222 check_c_sources += $(libempathy_accounts_panel_la_SOURCES)
223 endif
224
225 dist_man_MANS =                 \
226         empathy.1 \
227         empathy-accounts.1
228
229 src-marshal.list: $(empathy_SOURCES) Makefile.am
230         $(AM_V_GEN)( cd $(srcdir) && \
231         sed -n -e 's/.*src_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
232         $(wildcard *.c) ) \
233         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
234         @if cmp -s $@.tmp $@; then \
235                 rm $@.tmp; \
236         else \
237                 mv $@.tmp $@; \
238         fi
239
240 %-marshal.h: %-marshal.list Makefile
241         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
242
243 %-marshal.c: %-marshal.list Makefile
244         $(AM_V_GEN)echo "#include \"src-marshal.h\"" > $@ && \
245         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
246
247 # rules for making the glib enum objects
248 %-enumtypes.h: %.h Makefile.in
249         $(AM_V_GEN)glib-mkenums \
250         --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" \
251         --fprod "/* enumerations from \"@filename@\" */\n" \
252         --vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
253         --ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \
254         $< > $@
255
256 %-enumtypes.c: %.h Makefile.in
257         $(AM_V_GEN)glib-mkenums \
258         --fhead "#include <$*.h>\n#include <$*-enumtypes.h>" \
259         --fprod "\n/* enumerations from \"@filename@\" */" \
260         --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[] = {"     \
261         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
262         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
263         $< > $@
264
265 CLEANFILES = $(BUILT_SOURCES)
266