]> git.0d.be Git - empathy.git/blob - src/Makefile.am
Add EmpathyTubeDispatcher as a helper for dispatching tubes
[empathy.git] / src / Makefile.am
1 AM_CPPFLAGS =                                           \
2         -I$(top_srcdir)                                 \
3         $(EMPATHY_CFLAGS)                               \
4         $(WARN_CFLAGS)
5
6 LDADD =                                                         \
7         $(top_builddir)/libempathy-gtk/libempathy-gtk.la        \
8         $(top_builddir)/libempathy/libempathy.la                \
9         $(top_builddir)/extensions/libemp-extensions.la         \
10         $(EMPATHY_LIBS)
11
12 bin_PROGRAMS =                  \
13         empathy                 \
14         empathy-logs
15
16 BUILT_SOURCES= \
17         empathy-marshal.h \
18         empathy-marshal.c \
19         empathy-marshal.list \
20         empathy-tube-dispatch-enumtypes.h \
21         empathy-tube-dispatch-enumtypes.c
22
23 empathy_SOURCES =                                                       \
24         bacon-message-connection.c bacon-message-connection.h           \
25         empathy.c                                                       \
26         empathy-about-dialog.c empathy-about-dialog.h                   \
27         empathy-accounts-dialog.c empathy-accounts-dialog.h             \
28         empathy-call-window.c empathy-call-window.h                     \
29         empathy-chatrooms-window.c empathy-chatrooms-window.h           \
30         empathy-chat-window.c empathy-chat-window.h                     \
31         empathy-event-manager.c empathy-event-manager.h                 \
32         empathy-ft-manager.c empathy-ft-manager.h                       \
33         empathy-import-dialog.c empathy-import-dialog.h                 \
34         empathy-import-pidgin.c empathy-import-pidgin.h                 \
35         empathy-main-window.c empathy-main-window.h                     \
36         empathy-new-chatroom-dialog.c empathy-new-chatroom-dialog.h     \
37         empathy-preferences.c empathy-preferences.h                     \
38         empathy-status-icon.c empathy-status-icon.h                     \
39         empathy-tube-dispatch.c empathy-tube-dispatch.h                 \
40         ephy-spinner.c ephy-spinner.h
41
42 nodist_empathy_SOURCES = $(BUILT_SOURCES)
43
44 empathy_logs_SOURCES = empathy-logs.c
45
46 gladedir = $(datadir)/empathy
47 glade_DATA =                                    \
48         empathy-accounts-dialog.glade           \
49         empathy-call-window.glade               \
50         empathy-chatrooms-window.glade          \
51         empathy-chat-window.glade               \
52         empathy-ft-manager.glade                \
53         empathy-import-dialog.glade             \
54         empathy-main-window.glade               \
55         empathy-new-chatroom-dialog.glade       \
56         empathy-preferences.glade               \
57         empathy-status-icon.glade
58
59 dist_man_MANS =                 \
60         empathy.1
61
62 empathy-marshal.list: $(empathy_SOURCES) Makefile.am
63         ( cd $(srcdir) && \
64         sed -n -e 's/.*empathy_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
65         $(empathy_SOURCES) ) \
66         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
67         if cmp -s $@.tmp $@; then \
68                 rm $@.tmp; \
69         else \
70                 mv $@.tmp $@; \
71         fi
72
73 %-marshal.h: %-marshal.list Makefile
74         $(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
75
76 %-marshal.c: %-marshal.list Makefile
77         echo "#include \"empathy-marshal.h\"" > $@ && \
78         $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
79
80 # rules for making the glib enum objects
81 %-enumtypes.h: %.h Makefile.in
82         glib-mkenums \
83         --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" \
84         --fprod "/* enumerations from \"@filename@\" */\n" \
85         --vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
86         --ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \
87         $< > $@
88
89 %-enumtypes.c: %.h Makefile.in
90         glib-mkenums \
91         --fhead "#include <$*.h>\n#include <$*-enumtypes.h>" \
92         --fprod "\n/* enumerations from \"@filename@\" */" \
93         --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[] = {"     \
94         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
95         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
96         $< > $@
97
98 EXTRA_DIST =                    \
99         $(autostart_DATA)       \
100         $(glade_DATA)
101
102 CLEANFILES = $(BUILT_SOURCES)
103