Add interface for the DBus module.
[mmediamanager.git] / src / Makefile.am
blob0ae227b50ac8c7b5427ff5009bfd1243e3807a3b
1 ## Process this file with automake to produce Makefile.in
3 AM_CPPFLAGS = \
4   -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
5   -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
6   -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
7   $(MMEDIAMANAGER_CFLAGS)
9 AM_CFLAGS =\
10   -Wall\
11   -Werror\
12   -g
13   
14 bin_PROGRAMS = \
15   mm-dbus-manager
17 lib_LTLIBRARIES = \
18   libmmanager.la
20 mm_dbus_manager_headers = \
21   mm-dbus-manager.h \
22   mm-error.h
24 mm_dbus_manager_SOURCES = \
25   mm-dbus-manager-main.c \
26   mm-dbus-manager.c \
27   mm-dbus-manager-type-builtins.c \
28   mm-dbus-manager-type-builtins.h \
29   $(mm_dbus_manager_headers)
31 mm_dbus_manager_INCLUDES = \
32   $(DBUS_CFLAGS)
34 mm_dbus_manager_LDADD = \
35   $(DBUS_LIBS)
37 libmmanager_includedir=$(includedir)/libmmanager
39 libmmanager_headers = \
40   mm.h \
41   mm-application.h \
42   mm-dbus-application.h \
43   mm-so-application.h \
44   mm-application-provider.h \
45   mm-category.h \
46   mm-dbus-category.h \
47   mm-so-category.h \
48   mm-category-provider.h \
49   mm-hit.h \
50   mm-hit-collection.h \
51   mm-hit-collection-provider.h \
52   mm-manager.h \
53   mm-module-manager.h \
54   mm-filter.h \
55   mm-attribute.h \
56   mm-base-attributes.h \
57   mm-filter-param.h \
58   mm-attribute-manager.h \
59   mm-attribute-base-manager.h \
60   mm-module.h \
61   mm-string-utils.h \
62   mm-utils.h \
63   mm-types.h \
64   mm-error.h
66 libmmanager_include_HEADERS = \
67   $(libmmanager_headers) \
68   mm-type-builtins.h
70 libmmanager_la_SOURCES = \
71   mm-application.c \
72   mm-dbus-application.c \
73   mm-so-application.c \
74   mm-application-provider.c \
75   mm-category.c \
76   mm-dbus-category.c \
77   mm-so-category.c \
78   mm-category-provider.c \
79   mm-hit.c \
80   mm-hit-collection.c \
81   mm-hit-collection-provider.c \
82   mm-manager.c \
83   mm-module.c \
84   mm-module-manager.c \
85   mm-type-builtins.c \
86   mm-filter.c \
87   mm-attribute.c \
88   mm-filter-param.c \
89   mm-attribute-manager.c \
90   mm-string-utils.c \
91   mm-utils.c \
92   mm-attribute-base-manager.c
94 BUILT_SOURCES = \
95   mm-type-builtins.c \
96   mm-type-builtins.h \
97   mm-dbus-manager-client-bindings.h \
98   mm-dbus-manager-server-bindings.h \
99   mm-dbus-manager-type-builtins.c \
100   mm-dbus-manager-type-builtins.h
102 stamp_files = \
103   stamp-mm-type-builtins.c \
104   stamp-mm-type-builtins.h \
105   stamp-mm-dbus-manager-client-bindings.h \
106   stamp-mm-dbus-manager-server-bindings.h \
107   stamp-mm-dbus-manager-type-builtins.c \
108   stamp-mm-dbus-manager-type-builtins.h
110 mm-type-builtins.c: stamp-mm-type-builtins.c Makefile
111         @true
112 stamp-mm-type-builtins.c: Makefile $(libmmanager_headers)
113         $(GLIB_MKENUMS) \
114                 --fhead "#include <config.h>\n\n" \
115                 --fhead "#include \"mm-type-builtins.h\"\n\n" \
116                 --fprod "\n/* enumerations from \"@filename@\" */" \
117                 --fprod "\n#include \"@filename@\"" \
118                 --vhead "GType\n@enum_name@_get_type (void)\n{\n" \
119                 --vhead "  static GType type = 0;\n\n" \
120                 --vhead "  if (G_UNLIKELY (type == 0))\n  {\n" \
121                 --vhead "    static const G@Type@Value _@enum_name@_values[] = {" \
122                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
123                 --vtail "      { 0, NULL, NULL }\n    };\n\n" \
124                 --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n  }\n\n" \
125                 --vtail "  return type;\n}\n\n" \
126                 $(libmmanager_headers) > xgen-$(@F) \
127         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
128         && rm -f xgen-$(@F) \
129         && echo timestamp > $(@F)
131 mm-type-builtins.h: stamp-mm-type-builtins.h Makefile
132         @true
133 stamp-mm-type-builtins.h: Makefile $(libmmanager_headers)
134         $(GLIB_MKENUMS) \
135                 --fhead "#ifndef __MM_TYPE_BUILTINS_H__\n" \
136                 --fhead "#define __MM_TYPE_BUILTINS_H__\n\n" \
137                 --fhead "#include <glib-object.h>\n\n" \
138                 --fhead "G_BEGIN_DECLS\n\n" \
139                 --ftail "G_END_DECLS\n\n" \
140                 --ftail "#endif /* __MM_TYPE_BUILTINS_H__ */\n" \
141                 --fprod "\n/* --- @filename@ --- */" \
142                 --eprod "#define MM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
143                 --eprod "GType @enum_name@_get_type (void);\n" \
144                 $(libmmanager_headers) > xgen-$(@F) \
145         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
146         && rm -f xgen-$(@F) \
147         && echo timestamp > $(@F)
148         
149 mm-dbus-manager-type-builtins.c: stamp-mm-dbus-manager-type-builtins.c Makefile
150         @true
151 stamp-mm-dbus-manager-type-builtins.c: Makefile $(mm_dbus_manager_headers)
152         $(GLIB_MKENUMS) \
153                 --fhead "#include <config.h>\n\n" \
154                 --fhead "#include \"mm-type-builtins.h\"\n\n" \
155                 --fprod "\n/* enumerations from \"@filename@\" */" \
156                 --fprod "\n#include \"@filename@\"" \
157                 --vhead "GType\n@enum_name@_get_type (void)\n{\n" \
158                 --vhead "  static GType type = 0;\n\n" \
159                 --vhead "  if (G_UNLIKELY (type == 0))\n  {\n" \
160                 --vhead "    static const G@Type@Value _@enum_name@_values[] = {" \
161                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
162                 --vtail "      { 0, NULL, NULL }\n    };\n\n" \
163                 --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n  }\n\n" \
164                 --vtail "  return type;\n}\n\n" \
165                 $(mm_dbus_manager_headers) > xgen-$(@F) \
166         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
167         && rm -f xgen-$(@F) \
168         && echo timestamp > $(@F)
170 mm-dbus-manager-type-builtins.h: stamp-mm-dbus-manager-type-builtins.h Makefile
171         @true
172 stamp-mm-dbus-manager-type-builtins.h: Makefile $(mm_dbus_manager_headers)
173         $(GLIB_MKENUMS) \
174                 --fhead "#ifndef __MM_TYPE_BUILTINS_H__\n" \
175                 --fhead "#define __MM_TYPE_BUILTINS_H__\n\n" \
176                 --fhead "#include <glib-object.h>\n\n" \
177                 --fhead "G_BEGIN_DECLS\n\n" \
178                 --ftail "G_END_DECLS\n\n" \
179                 --ftail "#endif /* __MM_TYPE_BUILTINS_H__ */\n" \
180                 --fprod "\n/* --- @filename@ --- */" \
181                 --eprod "#define MM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
182                 --eprod "GType @enum_name@_get_type (void);\n" \
183                 $(mm_dbus_manager_headers) > xgen-$(@F) \
184         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
185         && rm -f xgen-$(@F) \
186         && echo timestamp > $(@F)
188 mm-dbus-manager-server-bindings.h: stamp-mm-dbus-manager-server-bindings.h
189         @true
190 stamp-mm-dbus-manager-server-bindings.h: mm-dbus-manager-info.xml Makefile
191         $(DBUS_BINDING_TOOL) --prefix=mm_dbus_manager --mode=glib-server $< > xgen-$(@F) \
192         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
193         && rm -f xgen-$(@F) \
194         && echo timestamp > $(@F)
196 mm-dbus-manager-client-bindings.h: stamp-mm-dbus-manager-client-bindings.h
197         @true
198 stamp-mm-dbus-manager-client-bindings.h: mm-dbus-manager-info.xml Makefile
199         $(DBUS_BINDING_TOOL) --prefix=mm_dbus_manager --mode=glib-client $< > xgen-$(@F) \
200         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
201         && rm -f xgen-$(@F) \
202         && echo timestamp > $(@F)
204 mm-dbus-module-server-bindings.h: stamp-mm-dbus-module-server-bindings.h
205         @true
206 stamp-mm-dbus-module-server-bindings.h: mm-dbus-module-info.xml Makefile
207         $(DBUS_BINDING_TOOL) --prefix=mm_dbus_module --mode=glib-server $< > xget-$(@F) \
208         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
209         && rm -f xgen-$(@F) \
210         && echo timestamp > $(@F)
212 mm-dbus-module-client-bindings.h: stamp-mm-dbus-module-client-bindings.h
213         @true
214 stamp-mm-dbus-module-client-bindings.h: mm-dbus-module-info.xml Makefile
215         $(DBUS_BINDING_TOOL) --prefix=mm_dbus_module --mode=glib-client $< > xgen-$(@F) \
216         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
217         && rm -f xgen-$(@F) \
218         && echo timestamp > $(@F)
220 CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
221 DISTCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
222 MAINTAINERCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
224 pkgconfigdir=$(libdir)/pkgconfig
225 pkgconfig_DATA=libmmanager.pc
227 EXTRA_DIST = \
228   libmmanager.pc.in \
229   mm-dbus-manager-info.xml