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