Fix includes and add prototypes for serializing/unserializing the
[mmediamanager.git] / src / Makefile.am
blobe1a47a995cdd2785410766b8a6755989a8d2b5ac
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
23 mm_dbus_manager_SOURCES = \
24   mm-dbus-manager-main.c \
25   mm-dbus-manager.c \
26   mm-dbus-manager-type-builtins.c \
27   mm-dbus-manager-type-builtins.h \
28   $(mm_dbus_manager_headers)
30 mm_dbus_manager_INCLUDES = \
31   $(DBUS_CFLAGS)
33 mm_dbus_manager_LDADD = \
34   $(DBUS_LIBS)
36 libmmanager_includedir=$(includedir)/libmmanager
38 libmmanager_headers = \
39   mm.h \
40   mm-application.h \
41   mm-dbus-application.h \
42   mm-so-application.h \
43   mm-application-provider.h \
44   mm-category.h \
45   mm-dbus-category.h \
46   mm-so-category.h \
47   mm-category-provider.h \
48   mm-hit.h \
49   mm-hit-collection.h \
50   mm-hit-collection-provider.h \
51   mm-manager.h \
52   mm-module-manager.h \
53   mm-filter.h \
54   mm-attribute.h \
55   mm-base-attributes.h \
56   mm-filter-param.h \
57   mm-attribute-manager.h \
58   mm-attribute-base-manager.h \
59   mm-module.h \
60   mm-string-utils.h \
61   mm-utils.h \
62   mm-types.h
64 libmmanager_include_HEADERS = \
65   $(libmmanager_headers) \
66   mm-type-builtins.h
68 libmmanager_la_SOURCES = \
69   mm-application.c \
70   mm-dbus-application.c \
71   mm-so-application.c \
72   mm-application-provider.c \
73   mm-category.c \
74   mm-dbus-category.c \
75   mm-so-category.c \
76   mm-category-provider.c \
77   mm-hit.c \
78   mm-hit-collection.c \
79   mm-hit-collection-provider.c \
80   mm-manager.c \
81   mm-module.c \
82   mm-module-manager.c \
83   mm-type-builtins.c \
84   mm-filter.c \
85   mm-attribute.c \
86   mm-filter-param.c \
87   mm-attribute-manager.c \
88   mm-string-utils.c \
89   mm-utils.c \
90   mm-attribute-base-manager.c
92 BUILT_SOURCES = \
93   mm-type-builtins.c \
94   mm-type-builtins.h \
95   mm-dbus-manager-client-bindings.h \
96   mm-dbus-manager-server-bindings.h \
97   mm-dbus-manager-type-builtins.c \
98   mm-dbus-manager-type-builtins.h
100 stamp_files = \
101   stamp-mm-type-builtins.c \
102   stamp-mm-type-builtins.h \
103   stamp-mm-dbus-manager-client-bindings.h \
104   stamp-mm-dbus-manager-server-bindings.h \
105   stamp-mm-dbus-manager-type-builtins.c \
106   stamp-mm-dbus-manager-type-builtins.h
108 mm-type-builtins.c: stamp-mm-type-builtins.c Makefile
109         @true
110 stamp-mm-type-builtins.c: Makefile $(libmmanager_headers)
111         $(GLIB_MKENUMS) \
112                 --fhead "#include <config.h>\n\n" \
113                 --fhead "#include \"mm-type-builtins.h\"\n\n" \
114                 --fprod "\n/* enumerations from \"@filename@\" */" \
115                 --fprod "\n#include \"@filename@\"" \
116                 --vhead "GType\n@enum_name@_get_type (void)\n{\n" \
117                 --vhead "  static GType type = 0;\n\n" \
118                 --vhead "  if (G_UNLIKELY (type == 0))\n  {\n" \
119                 --vhead "    static const G@Type@Value _@enum_name@_values[] = {" \
120                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
121                 --vtail "      { 0, NULL, NULL }\n    };\n\n" \
122                 --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n  }\n\n" \
123                 --vtail "  return type;\n}\n\n" \
124                 $(libmmanager_headers) > xgen-$(@F) \
125         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
126         && rm -f xgen-$(@F) \
127         && echo timestamp > $(@F)
129 mm-type-builtins.h: stamp-mm-type-builtins.h Makefile
130         @true
131 stamp-mm-type-builtins.h: Makefile $(libmmanager_headers)
132         $(GLIB_MKENUMS) \
133                 --fhead "#ifndef __MM_TYPE_BUILTINS_H__\n" \
134                 --fhead "#define __MM_TYPE_BUILTINS_H__\n\n" \
135                 --fhead "#include <glib-object.h>\n\n" \
136                 --fhead "G_BEGIN_DECLS\n\n" \
137                 --ftail "G_END_DECLS\n\n" \
138                 --ftail "#endif /* __MM_TYPE_BUILTINS_H__ */\n" \
139                 --fprod "\n/* --- @filename@ --- */" \
140                 --eprod "#define MM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
141                 --eprod "GType @enum_name@_get_type (void);\n" \
142                 $(libmmanager_headers) > xgen-$(@F) \
143         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
144         && rm -f xgen-$(@F) \
145         && echo timestamp > $(@F)
146         
147 mm-dbus-manager-type-builtins.c: stamp-mm-dbus-manager-type-builtins.c Makefile
148         @true
149 stamp-mm-dbus-manager-type-builtins.c: Makefile $(mm_dbus_manager_headers)
150         $(GLIB_MKENUMS) \
151                 --fhead "#include <config.h>\n\n" \
152                 --fhead "#include \"mm-type-builtins.h\"\n\n" \
153                 --fprod "\n/* enumerations from \"@filename@\" */" \
154                 --fprod "\n#include \"@filename@\"" \
155                 --vhead "GType\n@enum_name@_get_type (void)\n{\n" \
156                 --vhead "  static GType type = 0;\n\n" \
157                 --vhead "  if (G_UNLIKELY (type == 0))\n  {\n" \
158                 --vhead "    static const G@Type@Value _@enum_name@_values[] = {" \
159                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
160                 --vtail "      { 0, NULL, NULL }\n    };\n\n" \
161                 --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n  }\n\n" \
162                 --vtail "  return type;\n}\n\n" \
163                 $(mm_dbus_manager_headers) > xgen-$(@F) \
164         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
165         && rm -f xgen-$(@F) \
166         && echo timestamp > $(@F)
168 mm-dbus-manager-type-builtins.h: stamp-mm-dbus-manager-type-builtins.h Makefile
169         @true
170 stamp-mm-dbus-manager-type-builtins.h: Makefile $(mm_dbus_manager_headers)
171         $(GLIB_MKENUMS) \
172                 --fhead "#ifndef __MM_TYPE_BUILTINS_H__\n" \
173                 --fhead "#define __MM_TYPE_BUILTINS_H__\n\n" \
174                 --fhead "#include <glib-object.h>\n\n" \
175                 --fhead "G_BEGIN_DECLS\n\n" \
176                 --ftail "G_END_DECLS\n\n" \
177                 --ftail "#endif /* __MM_TYPE_BUILTINS_H__ */\n" \
178                 --fprod "\n/* --- @filename@ --- */" \
179                 --eprod "#define MM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
180                 --eprod "GType @enum_name@_get_type (void);\n" \
181                 $(mm_dbus_manager_headers) > xgen-$(@F) \
182         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
183         && rm -f xgen-$(@F) \
184         && echo timestamp > $(@F)
186 mm-dbus-manager-server-bindings.h: stamp-mm-dbus-manager-server-bindings.h
187         @true
188 stamp-mm-dbus-manager-server-bindings.h: mm-dbus-manager-info.xml Makefile
189         $(DBUS_BINDING_TOOL) --prefix=mm_dbus_manager --mode=glib-server $< > xgen-$(@F) \
190         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
191         && rm -f xgen-$(@F) \
192         && echo timestamp > $(@F)
194 mm-dbus-manager-client-bindings.h: stamp-mm-dbus-manager-client-bindings.h
195         @true
196 stamp-mm-dbus-manager-client-bindings.h: mm-dbus-manager-info.xml Makefile
197         $(DBUS_BINDING_TOOL) --prefix=mm_dbus_manager --mode=glib-client $< > xgen-$(@F) \
198         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
199         && rm -f xgen-$(@F) \
200         && echo timestamp > $(@F)
202 CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
203 DISTCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
204 MAINTAINERCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
206 pkgconfigdir=$(libdir)/pkgconfig
207 pkgconfig_DATA=libmmanager.pc
209 EXTRA_DIST = \
210   libmmanager.pc.in \
211   mm-dbus-manager-info.xml