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