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