9faea863008a98e10f8e66a820bcb9349102c710
[empathy.git] / src / Makefile.am
1 include $(top_srcdir)/tools/shave.mk
2 include $(top_srcdir)/tools/flymake.mk
3
4 AM_CPPFLAGS =                                           \
5         -I$(top_srcdir)                                 \
6         -DG_LOG_DOMAIN=\"empathy\"                      \
7         $(EMPATHY_CFLAGS)                               \
8         $(LIBNOTIFY_CFLAGS)                             \
9         $(LIBCHAMPLAIN_CFLAGS)                          \
10         $(DISABLE_DEPRECATED)                           \
11         $(WEBKIT_CFLAGS)                                \
12         $(WARN_CFLAGS)
13
14 LDADD =                                                         \
15         $(top_builddir)/libempathy-gtk/libempathy-gtk.la        \
16         $(top_builddir)/libempathy/libempathy.la                \
17         $(top_builddir)/extensions/libemp-extensions.la         \
18         $(LIBNOTIFY_LIBS)                                       \
19         $(EMPATHY_LIBS)                                         \
20         $(LIBCHAMPLAIN_LIBS)                                    \
21         $(WEBKIT_LIBS)
22
23 bin_PROGRAMS =                  \
24         empathy                 \
25         empathy-logs
26
27 BUILT_SOURCES= \
28         empathy-tube-dispatch-enumtypes.h \
29         empathy-tube-dispatch-enumtypes.c
30
31 empathy_handwritten_source = \
32         empathy.c                                                       \
33         empathy-about-dialog.c empathy-about-dialog.h                   \
34         empathy-accounts-dialog.c empathy-accounts-dialog.h             \
35         empathy-call-window.c empathy-call-window.h                     \
36         empathy-call-window-fullscreen.c empathy-call-window-fullscreen.h                       \
37         empathy-chatrooms-window.c empathy-chatrooms-window.h           \
38         empathy-debug-window.c empathy-debug-window.h                   \
39         empathy-chat-window.c empathy-chat-window.h                     \
40         empathy-event-manager.c empathy-event-manager.h                 \
41         empathy-ft-manager.c empathy-ft-manager.h                       \
42         empathy-import-dialog.c empathy-import-dialog.h                 \
43         empathy-import-pidgin.c empathy-import-pidgin.h                 \
44         empathy-main-window.c empathy-main-window.h                     \
45         empathy-misc.c empathy-misc.h                                   \
46         empathy-new-chatroom-dialog.c empathy-new-chatroom-dialog.h     \
47         empathy-preferences.c empathy-preferences.h                     \
48         empathy-sidebar.c empathy-sidebar.h                     \
49         empathy-status-icon.c empathy-status-icon.h                     \
50         empathy-tube-dispatch.c empathy-tube-dispatch.h
51
52 empathy_SOURCES =                                                       \
53         $(empathy_handwritten_source)                                   \
54         bacon-message-connection.c bacon-message-connection.h           \
55         ephy-spinner.c ephy-spinner.h
56
57 nodist_empathy_SOURCES = $(BUILT_SOURCES)
58
59 empathy_logs_SOURCES = empathy-logs.c
60
61 check_c_sources = \
62     $(empathy_handwritten_source) \
63     $(empathy_logs_SOURCES)
64 include $(top_srcdir)/tools/check-coding-style.mk
65 check-local: check-coding-style
66
67 uidir = $(datadir)/empathy
68 ui_DATA =                                       \
69         empathy-accounts-dialog.ui              \
70         empathy-call-window.ui                  \
71         empathy-call-window-fullscreen.ui                       \
72         empathy-chatrooms-window.ui             \
73         empathy-chat-window.ui                  \
74         empathy-ft-manager.ui                   \
75         empathy-import-dialog.ui                \
76         empathy-main-window.ui                  \
77         empathy-new-chatroom-dialog.ui          \
78         empathy-preferences.ui                  \
79         empathy-status-icon.ui
80
81 EXTRA_DIST =                    \
82         $(autostart_DATA)       \
83         $(ui_DATA)
84
85 if HAVE_LIBCHAMPLAIN
86 empathy_handwritten_source +=                           \
87         empathy-map-view.c                      \
88         empathy-map-view.h
89
90 ui_DATA +=                                      \
91         empathy-map-view.ui
92 else
93 EXTRA_DIST +=                                   \
94         empathy-map-view.c                      \
95         empathy-map-view.h                      \
96         empathy-map-view.ui
97 endif
98
99 dist_man_MANS =                 \
100         empathy.1
101
102 # rules for making the glib enum objects
103 %-enumtypes.h: %.h Makefile.in
104         $(QUIET_GEN)glib-mkenums \
105         --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" \
106         --fprod "/* enumerations from \"@filename@\" */\n" \
107         --vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
108         --ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \
109         $< > $@
110
111 %-enumtypes.c: %.h Makefile.in
112         $(QUIET_GEN)glib-mkenums \
113         --fhead "#include <$*.h>\n#include <$*-enumtypes.h>" \
114         --fprod "\n/* enumerations from \"@filename@\" */" \
115         --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[] = {"     \
116         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
117         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
118         $< > $@
119
120 CLEANFILES = $(BUILT_SOURCES)
121