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