]> git.0d.be Git - empathy.git/blob - libempathy/Makefile.am
Merge branch 'gnome-3-4'
[empathy.git] / libempathy / Makefile.am
1 include $(top_srcdir)/tools/flymake.mk
2
3 AM_CPPFLAGS =                                           \
4         $(ERROR_CFLAGS)                                 \
5         -I.                                             \
6         -I$(top_srcdir)                                 \
7         -I$(top_builddir)                               \
8         -DDATADIR=\""$(datadir)"\"                      \
9         -DLOCALEDIR=\""$(datadir)/locale"\"             \
10         -DG_LOG_DOMAIN=\"empathy\"                      \
11         -DGCR_API_SUBJECT_TO_CHANGE                     \
12         $(EMPATHY_CFLAGS)                               \
13         $(GEOCLUE_CFLAGS)                               \
14         $(GEOCODE_CFLAGS)                               \
15         $(NETWORK_MANAGER_CFLAGS)                       \
16         $(CONNMAN_CFLAGS)                               \
17         $(UDEV_CFLAGS)                                  \
18         $(GOA_CFLAGS)                                   \
19         $(WARN_CFLAGS)                                  \
20         $(DISABLE_DEPRECATED)
21
22 BUILT_SOURCES =                                         \
23         empathy-enum-types.h                            \
24         empathy-enum-types.c
25
26 noinst_LTLIBRARIES = libempathy.la
27
28 libempathy_headers =                            \
29         action-chain-internal.h                 \
30         empathy-account-settings.h              \
31         empathy-auth-factory.h                  \
32         empathy-camera-monitor.h                \
33         empathy-chatroom-manager.h              \
34         empathy-chatroom.h                      \
35         empathy-client-factory.h \
36         empathy-connection-managers.h           \
37         empathy-connection-aggregator.h         \
38         empathy-contact-groups.h                \
39         empathy-contact.h                       \
40         empathy-debug.h                         \
41         empathy-ft-factory.h                    \
42         empathy-ft-handler.h                    \
43         empathy-gsettings.h                     \
44         empathy-presence-manager.h                              \
45         empathy-individual-manager.h            \
46         empathy-irc-network-manager.h           \
47         empathy-irc-network.h                   \
48         empathy-irc-server.h                    \
49         empathy-keyring.h                       \
50         empathy-location.h                      \
51         empathy-message.h                       \
52         empathy-pkg-kit.h               \
53         empathy-request-util.h                  \
54         empathy-server-sasl-handler.h           \
55         empathy-server-tls-handler.h            \
56         empathy-status-presets.h                \
57         empathy-time.h                          \
58         empathy-tls-verifier.h                  \
59         empathy-tp-chat.h                       \
60         empathy-tp-contact-factory.h            \
61         empathy-types.h                         \
62         empathy-utils.h
63
64 libempathy_handwritten_source =                         \
65         $(libempathy_headers)                           \
66         action-chain.c                                  \
67         empathy-account-settings.c                      \
68         empathy-auth-factory.c                          \
69         empathy-camera-monitor.c                        \
70         empathy-chatroom-manager.c                      \
71         empathy-chatroom.c                              \
72         empathy-client-factory.c \
73         empathy-connection-managers.c                   \
74         empathy-connection-aggregator.c         \
75         empathy-contact-groups.c                        \
76         empathy-contact.c                               \
77         empathy-debug.c                                 \
78         empathy-ft-factory.c                            \
79         empathy-ft-handler.c                            \
80         empathy-presence-manager.c                                      \
81         empathy-individual-manager.c                    \
82         empathy-irc-network-manager.c                   \
83         empathy-irc-network.c                           \
84         empathy-irc-server.c                            \
85         empathy-keyring.c                               \
86         empathy-message.c                               \
87         empathy-pkg-kit.c               \
88         empathy-request-util.c                          \
89         empathy-server-sasl-handler.c                   \
90         empathy-server-tls-handler.c                    \
91         empathy-status-presets.c                        \
92         empathy-time.c                                  \
93         empathy-tls-verifier.c                          \
94         empathy-tp-chat.c                               \
95         empathy-tp-contact-factory.c                    \
96         empathy-utils.c
97
98 # these are sources that depend on GOA
99 goa_sources = \
100         empathy-goa-auth-handler.c \
101         empathy-goa-auth-handler.h \
102         $(NULL)
103
104 libempathy_la_SOURCES = \
105         $(libempathy_handwritten_source) \
106         cheese-camera-device-monitor.c cheese-camera-device-monitor.h
107
108 dtddir = $(datadir)/empathy
109 dtd_DATA =                                      \
110         empathy-status-presets.dtd              \
111         empathy-contact-groups.dtd              \
112         empathy-chatroom-manager.dtd            \
113         empathy-irc-networks.dtd
114
115 ircnetworksdir = $(datadir)/empathy
116 ircnetworks_DATA =              \
117         irc-networks.xml
118
119 EXTRA_DIST =                    \
120         $(dtd_DATA)             \
121         $(ircnetworks_DATA)
122
123 CLEANFILES =                            \
124         $(BUILT_SOURCES)                \
125         stamp-empathy-enum-types.h
126
127 if HAVE_GOA
128 libempathy_la_SOURCES += $(goa_sources)
129 else
130 EXTRA_DIST += $(goa_sources)
131 endif
132
133 # do not distribute generated files
134 nodist_libempathy_la_SOURCES =\
135         $(BUILT_SOURCES)
136
137 libempathy_la_LIBADD =          \
138         $(top_builddir)/extensions/libemp-extensions.la \
139         $(GCR_LIBS) \
140         $(EMPATHY_LIBS) \
141         $(GEOCLUE_LIBS) \
142         $(GEOCODE_LIBS) \
143         $(NETWORK_MANAGER_LIBS) \
144         $(CONNMAN_LIBS) \
145         $(UDEV_LIBS) \
146         $(GOA_LIBS) \
147         $(LIBM)
148
149 check_c_sources = \
150     $(libempathy_handwritten_source) \
151     $(goa_sources) \
152     $(NULL)
153
154 include $(top_srcdir)/tools/check-coding-style.mk
155 check-local: check-coding-style
156
157 empathy-enum-types.h: stamp-empathy-enum-types.h
158         $(AM_V_GEN)true
159 stamp-empathy-enum-types.h: $(libempathy_headers) Makefile
160         $(AM_V_GEN)(cd $(srcdir) \
161         && glib-mkenums \
162                         --fhead "#ifndef __LIBEMPATHY_ENUM_TYPES_H__\n" \
163                         --fhead "#define __LIBEMPATHY_ENUM_TYPES_H__ 1\n\n" \
164                         --fhead "#include <glib-object.h>\n\n" \
165                         --fhead "G_BEGIN_DECLS\n\n" \
166                         --ftail "G_END_DECLS\n\n" \
167                         --ftail "#endif /* __LIBEMPATHY_ENUM_TYPES_H__ */\n" \
168                         --fprod "#include <libempathy/@filename@>\n" \
169                         --eprod "#define EMPATHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
170                         --eprod "GType @enum_name@_get_type (void);\n" \
171                 $(libempathy_headers) ) > xgen-gth \
172         && (cmp -s xgen-gth empathy-enum-type.h || cp xgen-gth empathy-enum-types.h) \
173         && rm -f xgen-gth \
174         && echo timestamp > $(@F)
175
176 empathy-enum-types.c: $(libempathy_headers) Makefile
177         $(AM_V_GEN)(cd $(srcdir) \
178         && glib-mkenums \
179                         --fhead "#include <config.h>\n" \
180                         --fhead "#include <glib-object.h>\n" \
181                         --fhead "#include \"empathy-enum-types.h\"\n\n" \
182                         --fprod "\n/* enumerations from \"@filename@\" */" \
183                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
184                         --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
185                         --vtail "  { 0, NULL, NULL }\n};\n\n" \
186                         --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
187                         --vtail "  static GType type = 0;\n\n" \
188                         --vtail "  if (!type)\n" \
189                         --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
190                         --vtail "  return type;\n}\n\n" \
191                 $(libempathy_headers) ) > xgen-gtc \
192         && cp xgen-gtc $(@F) \
193         && rm -f xgen-gtc