]> git.0d.be Git - empathy.git/blob - src/Makefile.am
allow building empathy without eds
[empathy.git] / src / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 CPPFLAGS_COMMON =                                       \
4         $(EMPATHY_CFLAGS)                               \
5         $(EDS_CFLAGS)                                   \
6         $(GTK_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         $(LIBNOTIFY_CFLAGS)                             \
19         $(UNIQUE_CFLAGS) \
20         $(LIBCHAMPLAIN_CFLAGS)                          \
21         $(WEBKIT_CFLAGS)                                \
22         $(NULL)
23
24 LDADD =                                                         \
25         $(top_builddir)/libempathy-gtk/libempathy-gtk.la        \
26         $(top_builddir)/libempathy/libempathy.la                \
27         $(top_builddir)/extensions/libemp-extensions.la         \
28         $(LIBNOTIFY_LIBS)                                       \
29         $(UNIQUE_LIBS)                                          \
30         $(EMPATHY_LIBS)                                         \
31         $(GTK_LIBS)                                             \
32         $(LIBCHAMPLAIN_LIBS)                                    \
33         $(WEBKIT_LIBS)
34
35 noinst_LTLIBRARIES = libempathy-accounts-common.la
36
37 libempathy_accounts_common_la_SOURCES =                                 \
38         empathy-accounts-common.c empathy-accounts-common.h             \
39         empathy-account-assistant.c empathy-account-assistant.h         \
40         empathy-accounts-dialog.c empathy-accounts-dialog.h             \
41         empathy-auto-salut-account-helper.c empathy-auto-salut-account-helper.h \
42         empathy-import-dialog.c empathy-import-dialog.h                 \
43         empathy-import-pidgin.c empathy-import-pidgin.h                 \
44         empathy-import-widget.c empathy-import-widget.h                 \
45         empathy-import-utils.c empathy-import-utils.h                   \
46         $(NULL)
47
48 libempathy_accounts_common_la_LIBADD =                                  \
49         $(top_builddir)/libempathy-gtk/libempathy-gtk.la                \
50         $(EDS_LIBS)                                                     \
51         $(LIBNOTIFY_LIBS)                                               \
52         $(UNIQUE_LIBS) \
53         $(EMPATHY_LIBS)                                                 \
54         $(LIBCHAMPLAIN_LIBS)                                            \
55         $(WEBKIT_LIBS)                                                  \
56         $(NULL)
57
58 if HAVE_CONTROL_CENTER_EMBEDDING
59 ccmodulesdir = $(CONTROL_CENTER_EXTENSIONDIR)
60 ccmodules_LTLIBRARIES = libempathy-accounts-panel.la
61
62 libempathy_accounts_panel_la_SOURCES =                          \
63         empathy-accounts-module.c                               \
64         cc-empathy-accounts-panel.c                             \
65         cc-empathy-accounts-panel.h                             \
66         $(NULL)
67
68 libempathy_accounts_panel_la_CPPFLAGS =                         \
69         $(CPPFLAGS_COMMON)                                      \
70         $(CONTROL_CENTER_EMBEDDING_CFLAGS)                      \
71         -DLOCALEDIR=\""$(datadir)/locale"\"                     \
72         $(NULL)
73
74 libempathy_accounts_panel_la_LDFLAGS = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)'
75
76 libempathy_accounts_panel_la_LIBADD =                           \
77         $(EMPATHY_LIBS)                                         \
78         $(CONTROL_CENTER_EMBEDDING_LIBS)                        \
79         libempathy-accounts-common.la                           \
80         $(NULL)
81 endif
82
83 bin_PROGRAMS =                  \
84         empathy                 \
85         empathy-accounts        \
86         empathy-debugger        \
87         $(NULL)
88
89 libexec_PROGRAMS = \
90         empathy-av \
91         empathy-auth-client
92
93 BUILT_SOURCES=
94
95 empathy_accounts_SOURCES =                                              \
96         empathy-accounts.c empathy-accounts.h                           \
97         $(NULL)
98
99 empathy_accounts_LDADD =                                                \
100         $(LDADD)                                                        \
101         libempathy-accounts-common.la                                   \
102         $(NULL)
103
104 empathy_debugger_SOURCES =                                              \
105         empathy-debug-window.c empathy-debug-window.h                   \
106         empathy-debugger.c                                              \
107         $(NULL)
108
109 empathy_av_SOURCES =                                            \
110         empathy-av.c \
111         empathy-call-window-fullscreen.c empathy-call-window-fullscreen.h \
112         empathy-call-window.c empathy-call-window.h      \
113         empathy-sidebar.c empathy-sidebar.h \
114         $(NULL)
115
116 empathy_auth_client_SOURCES =                                           \
117         empathy-auth-client.c
118
119 empathy_handwritten_source = \
120         empathy-about-dialog.c empathy-about-dialog.h                   \
121         empathy-chat-window.c empathy-chat-window.h                     \
122         empathy-chatrooms-window.c empathy-chatrooms-window.h           \
123         empathy-event-manager.c empathy-event-manager.h                 \
124         empathy-ft-manager.c empathy-ft-manager.h                       \
125         empathy-invite-participant-dialog.c empathy-invite-participant-dialog.h \
126         empathy-main-window.c empathy-main-window.h                     \
127         empathy-migrate-butterfly-logs.c empathy-migrate-butterfly-logs.h \
128         empathy-new-chatroom-dialog.c empathy-new-chatroom-dialog.h     \
129         empathy-preferences.c empathy-preferences.h                     \
130         empathy-status-icon.c empathy-status-icon.h                     \
131         empathy-chat-manager.c empathy-chat-manager.h                   \
132         empathy.c
133
134 empathy_SOURCES =                                                       \
135         $(empathy_handwritten_source)                                   \
136         $(NULL)
137
138 empathy_LDADD =                                                         \
139         libempathy-accounts-common.la                                   \
140         $(top_builddir)/libempathy-gtk/libempathy-gtk.la                \
141         $(top_builddir)/libempathy/libempathy.la                        \
142         $(top_builddir)/extensions/libemp-extensions.la                 \
143         $(LIBNOTIFY_LIBS)                                               \
144         $(UNIQUE_LIBS)                                          \
145         $(EMPATHY_LIBS)                                                 \
146         $(LIBCHAMPLAIN_LIBS)                                            \
147         $(WEBKIT_LIBS)                                                  \
148         $(NULL)
149
150 nodist_empathy_SOURCES = $(BUILT_SOURCES)
151
152 check_c_sources = \
153     $(empathy_handwritten_source) \
154     $(empathy_logs_SOURCES) \
155     $(empathy_av_SOURCES)
156
157 include $(top_srcdir)/tools/check-coding-style.mk
158 check-local: check-coding-style
159
160 uidir = $(datadir)/empathy
161 ui_DATA =                                       \
162         empathy-accounts-dialog.ui              \
163         empathy-call-window-fullscreen.ui       \
164         empathy-call-window.ui                  \
165         empathy-chat-window.ui                  \
166         empathy-chatrooms-window.ui             \
167         empathy-ft-manager.ui                   \
168         empathy-import-dialog.ui                \
169         empathy-main-window.ui                  \
170         empathy-new-chatroom-dialog.ui          \
171         empathy-preferences.ui                  \
172         empathy-status-icon.ui
173
174 EXTRA_DIST =                    \
175         $(autostart_DATA)       \
176         $(ui_DATA)
177
178 if HAVE_LIBCHAMPLAIN
179 empathy_handwritten_source +=                           \
180         empathy-map-view.c                      \
181         empathy-map-view.h
182
183 ui_DATA +=                                      \
184         empathy-map-view.ui
185 else
186 EXTRA_DIST +=                                   \
187         empathy-map-view.c                      \
188         empathy-map-view.h                      \
189         empathy-map-view.ui
190 endif
191
192 if !HAVE_CONTROL_CENTER_EMBEDDING
193 EXTRA_DIST += $(libempathy_accounts_panel_la_SOURCES)
194 else
195 check_c_sources += $(libempathy_accounts_panel_la_SOURCES)
196 endif
197
198 dist_man_MANS =                 \
199         empathy.1 \
200         empathy-accounts.1
201
202 # rules for making the glib enum objects
203 %-enumtypes.h: %.h Makefile.in
204         $(AM_V_GEN)glib-mkenums \
205         --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" \
206         --fprod "/* enumerations from \"@filename@\" */\n" \
207         --vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
208         --ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \
209         $< > $@
210
211 %-enumtypes.c: %.h Makefile.in
212         $(AM_V_GEN)glib-mkenums \
213         --fhead "#include <$*.h>\n#include <$*-enumtypes.h>" \
214         --fprod "\n/* enumerations from \"@filename@\" */" \
215         --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[] = {"     \
216         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
217         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
218         $< > $@
219
220 CLEANFILES = $(BUILT_SOURCES)
221