Add a first implementation of the DBus application.
[mmediamanager.git] / src / Makefile.am
blob3d12f81307ae966e41773ef5822ac73c698d58af
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-category-provider.h \
46   mm-hit.h \
47   mm-hit-collection.h \
48   mm-hit-collection-provider.h \
49   mm-manager.h \
50   mm-module-manager.h \
51   mm-filter.h \
52   mm-attribute.h \
53   mm-base-attributes.h \
54   mm-filter-param.h \
55   mm-attribute-manager.h \
56   mm-attribute-base-manager.h \
57   mm-module.h \
58   mm-utils.h \
59   mm-types.h
61 libmmanager_include_HEADERS = \
62   $(libmmanager_headers) \
63   mm-type-builtins.h
65 libmmanager_la_SOURCES = \
66   mm-application.c \
67   mm-dbus-application.c \
68   mm-so-application.c \
69   mm-application-provider.c \
70   mm-category.c \
71   mm-category-provider.c \
72   mm-hit.c \
73   mm-hit-collection.c \
74   mm-hit-collection-provider.c \
75   mm-manager.c \
76   mm-module.c \
77   mm-module-manager.c \
78   mm-type-builtins.c \
79   mm-filter.c \
80   mm-attribute.c \
81   mm-filter-param.c \
82   mm-attribute-manager.c \
83   mm-utils.c \
84   mm-attribute-base-manager.c
86 BUILT_SOURCES = \
87   mm-type-builtins.c \
88   mm-type-builtins.h \
89   mm-dbus-manager-client-bindings.h \
90   mm-dbus-manager-server-bindings.h \
91   mm-dbus-manager-type-builtins.c \
92   mm-dbus-manager-type-builtins.h
94 stamp_files = \
95   stamp-mm-type-builtins.c \
96   stamp-mm-type-builtins.h \
97   stamp-mm-dbus-manager-client-bindings.h \
98   stamp-mm-dbus-manager-server-bindings.h \
99   stamp-mm-dbus-manager-type-builtins.c \
100   stamp-mm-dbus-manager-type-builtins.h
102 mm-type-builtins.c: stamp-mm-type-builtins.c Makefile
103         @true
104 stamp-mm-type-builtins.c: Makefile $(libmmanager_headers)
105         $(GLIB_MKENUMS) \
106                 --fhead "#include <config.h>\n\n" \
107                 --fhead "#include \"mm-type-builtins.h\"\n\n" \
108                 --fprod "\n/* enumerations from \"@filename@\" */" \
109                 --fprod "\n#include \"@filename@\"" \
110                 --vhead "GType\n@enum_name@_get_type (void)\n{\n" \
111                 --vhead "  static GType type = 0;\n\n" \
112                 --vhead "  if (G_UNLIKELY (type == 0))\n  {\n" \
113                 --vhead "    static const G@Type@Value _@enum_name@_values[] = {" \
114                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
115                 --vtail "      { 0, NULL, NULL }\n    };\n\n" \
116                 --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n  }\n\n" \
117                 --vtail "  return type;\n}\n\n" \
118                 $(libmmanager_headers) > xgen-$(@F) \
119         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
120         && rm -f xgen-$(@F) \
121         && echo timestamp > $(@F)
123 mm-type-builtins.h: stamp-mm-type-builtins.h Makefile
124         @true
125 stamp-mm-type-builtins.h: Makefile $(libmmanager_headers)
126         $(GLIB_MKENUMS) \
127                 --fhead "#ifndef __MM_TYPE_BUILTINS_H__\n" \
128                 --fhead "#define __MM_TYPE_BUILTINS_H__\n\n" \
129                 --fhead "#include <glib-object.h>\n\n" \
130                 --fhead "G_BEGIN_DECLS\n\n" \
131                 --ftail "G_END_DECLS\n\n" \
132                 --ftail "#endif /* __MM_TYPE_BUILTINS_H__ */\n" \
133                 --fprod "\n/* --- @filename@ --- */" \
134                 --eprod "#define MM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
135                 --eprod "GType @enum_name@_get_type (void);\n" \
136                 $(libmmanager_headers) > xgen-$(@F) \
137         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
138         && rm -f xgen-$(@F) \
139         && echo timestamp > $(@F)
140         
141 mm-dbus-manager-type-builtins.c: stamp-mm-dbus-manager-type-builtins.c Makefile
142         @true
143 stamp-mm-dbus-manager-type-builtins.c: Makefile $(mm_dbus_manager_headers)
144         $(GLIB_MKENUMS) \
145                 --fhead "#include <config.h>\n\n" \
146                 --fhead "#include \"mm-type-builtins.h\"\n\n" \
147                 --fprod "\n/* enumerations from \"@filename@\" */" \
148                 --fprod "\n#include \"@filename@\"" \
149                 --vhead "GType\n@enum_name@_get_type (void)\n{\n" \
150                 --vhead "  static GType type = 0;\n\n" \
151                 --vhead "  if (G_UNLIKELY (type == 0))\n  {\n" \
152                 --vhead "    static const G@Type@Value _@enum_name@_values[] = {" \
153                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
154                 --vtail "      { 0, NULL, NULL }\n    };\n\n" \
155                 --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n  }\n\n" \
156                 --vtail "  return type;\n}\n\n" \
157                 $(mm_dbus_manager_headers) > xgen-$(@F) \
158         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
159         && rm -f xgen-$(@F) \
160         && echo timestamp > $(@F)
162 mm-dbus-manager-type-builtins.h: stamp-mm-dbus-manager-type-builtins.h Makefile
163         @true
164 stamp-mm-dbus-manager-type-builtins.h: Makefile $(mm_dbus_manager_headers)
165         $(GLIB_MKENUMS) \
166                 --fhead "#ifndef __MM_TYPE_BUILTINS_H__\n" \
167                 --fhead "#define __MM_TYPE_BUILTINS_H__\n\n" \
168                 --fhead "#include <glib-object.h>\n\n" \
169                 --fhead "G_BEGIN_DECLS\n\n" \
170                 --ftail "G_END_DECLS\n\n" \
171                 --ftail "#endif /* __MM_TYPE_BUILTINS_H__ */\n" \
172                 --fprod "\n/* --- @filename@ --- */" \
173                 --eprod "#define MM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
174                 --eprod "GType @enum_name@_get_type (void);\n" \
175                 $(mm_dbus_manager_headers) > xgen-$(@F) \
176         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
177         && rm -f xgen-$(@F) \
178         && echo timestamp > $(@F)
180 mm-dbus-manager-server-bindings.h: stamp-mm-dbus-manager-server-bindings.h
181         @true
182 stamp-mm-dbus-manager-server-bindings.h: mm-dbus-manager-info.xml Makefile
183         $(DBUS_BINDING_TOOL) --prefix=mm_dbus_manager --mode=glib-server $< > 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-client-bindings.h: stamp-mm-dbus-manager-client-bindings.h
189         @true
190 stamp-mm-dbus-manager-client-bindings.h: mm-dbus-manager-info.xml Makefile
191         $(DBUS_BINDING_TOOL) --prefix=mm_dbus_manager --mode=glib-client $< > xgen-$(@F) \
192         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
193         && rm -f xgen-$(@F) \
194         && echo timestamp > $(@F)
196 CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
197 DISTCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
198 MAINTAINERCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
200 pkgconfigdir=$(libdir)/pkgconfig
201 pkgconfig_DATA=libmmanager.pc
203 EXTRA_DIST = \
204   libmmanager.pc.in \
205   mm-dbus-manager-info.xml