]> git.0d.be Git - empathy.git/blob - src/Makefile.am
Generate closures for src/
[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-av \
84         empathy-auth-client \
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_handwritten_av_source = \
107         empathy-av.c \
108         empathy-streamed-media-window-fullscreen.c empathy-streamed-media-window-fullscreen.h   \
109         empathy-streamed-media-window.c empathy-streamed-media-window.h \
110         $(NULL)
111
112 empathy_av_SOURCES =                                            \
113         $(empathy_handwritten_av_source) \
114         ev-sidebar.c ev-sidebar.h \
115         $(NULL)
116
117 empathy_auth_client_SOURCES =                                           \
118         empathy-auth-client.c \
119         $(NULL)
120
121 empathy_chat_SOURCES =                                          \
122         empathy-about-dialog.c empathy-about-dialog.h                   \
123         empathy-chat-manager.c empathy-chat-manager.h           \
124         empathy-chat-window.c empathy-chat-window.h             \
125         empathy-invite-participant-dialog.c empathy-invite-participant-dialog.h \
126         empathy-chat.c \
127         $(NULL)
128
129 empathy_handwritten_source = \
130         empathy-about-dialog.c empathy-about-dialog.h                   \
131         empathy-chat-window.c empathy-chat-window.h                     \
132         empathy-chatrooms-window.c empathy-chatrooms-window.h           \
133         empathy-event-manager.c empathy-event-manager.h                 \
134         empathy-ft-manager.c empathy-ft-manager.h                       \
135         empathy-invite-participant-dialog.c empathy-invite-participant-dialog.h \
136         empathy-main-window.c empathy-main-window.h                     \
137         empathy-migrate-butterfly-logs.c empathy-migrate-butterfly-logs.h \
138         empathy-new-chatroom-dialog.c empathy-new-chatroom-dialog.h     \
139         empathy-notifications-approver.c empathy-notifications-approver.h \
140         empathy-preferences.c empathy-preferences.h                     \
141         empathy-status-icon.c empathy-status-icon.h                     \
142         empathy-chat-manager.c empathy-chat-manager.h                   \
143         empathy.c
144
145 empathy_SOURCES =                                                       \
146         $(empathy_handwritten_source)                                   \
147         $(NULL)
148
149 empathy_LDADD =                                                         \
150         libempathy-accounts-common.la                                   \
151         $(top_builddir)/libempathy-gtk/libempathy-gtk.la                \
152         $(top_builddir)/libempathy/libempathy.la                        \
153         $(top_builddir)/extensions/libemp-extensions.la                 \
154         $(EMPATHY_LIBS)                                                 \
155         $(LIBCHAMPLAIN_LIBS)                                            \
156         $(WEBKIT_LIBS)                                                  \
157         $(NULL)
158
159 nodist_empathy_SOURCES = $(BUILT_SOURCES)
160
161 check_c_sources = \
162     $(empathy_handwritten_source) \
163     $(empathy_logs_SOURCES) \
164     $(empathy_handwritten_av_source)
165
166 include $(top_srcdir)/tools/check-coding-style.mk
167 check-local: check-coding-style
168
169 uidir = $(datadir)/empathy
170 ui_DATA =                                       \
171         empathy-accounts-dialog.ui              \
172         empathy-call-window-fullscreen.ui       \
173         empathy-call-window.ui                  \
174         empathy-chat-window.ui                  \
175         empathy-chatrooms-window.ui             \
176         empathy-ft-manager.ui                   \
177         empathy-import-dialog.ui                \
178         empathy-main-window.ui                  \
179         empathy-new-chatroom-dialog.ui          \
180         empathy-preferences.ui                  \
181         empathy-status-icon.ui
182
183 EXTRA_DIST =                    \
184         $(autostart_DATA)       \
185         $(ui_DATA)
186
187 if HAVE_LIBCHAMPLAIN
188 empathy_handwritten_source +=                           \
189         empathy-map-view.c                      \
190         empathy-map-view.h
191
192 ui_DATA +=                                      \
193         empathy-map-view.ui
194 else
195 EXTRA_DIST +=                                   \
196         empathy-map-view.c                      \
197         empathy-map-view.h                      \
198         empathy-map-view.ui
199 endif
200
201 if !HAVE_CONTROL_CENTER_EMBEDDING
202 EXTRA_DIST += $(libempathy_accounts_panel_la_SOURCES)
203 else
204 check_c_sources += $(libempathy_accounts_panel_la_SOURCES)
205 endif
206
207 dist_man_MANS =                 \
208         empathy.1 \
209         empathy-accounts.1
210
211 src-marshal.list: $(empathy_SOURCES) Makefile.am
212         $(AM_V_GEN)( cd $(srcdir) && \
213         sed -n -e 's/.*src_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
214         $(wildcard *.c) ) \
215         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
216         @if cmp -s $@.tmp $@; then \
217                 rm $@.tmp; \
218         else \
219                 mv $@.tmp $@; \
220         fi
221
222 %-marshal.h: %-marshal.list Makefile
223         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
224
225 %-marshal.c: %-marshal.list Makefile
226         $(AM_V_GEN)echo "#include \"src-marshal.h\"" > $@ && \
227         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
228
229 # rules for making the glib enum objects
230 %-enumtypes.h: %.h Makefile.in
231         $(AM_V_GEN)glib-mkenums \
232         --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" \
233         --fprod "/* enumerations from \"@filename@\" */\n" \
234         --vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
235         --ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \
236         $< > $@
237
238 %-enumtypes.c: %.h Makefile.in
239         $(AM_V_GEN)glib-mkenums \
240         --fhead "#include <$*.h>\n#include <$*-enumtypes.h>" \
241         --fprod "\n/* enumerations from \"@filename@\" */" \
242         --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[] = {"     \
243         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
244         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
245         $< > $@
246
247 CLEANFILES = $(BUILT_SOURCES)
248