Maintainer's effort: add proper DISTCHECK, DISTCLEANFILES and
[mmediamanager.git] / libmmanager / Makefile.am
blob9a43d80b39f3372830e5ee2856914e55cfcd69e2
1 AM_CPPFLAGS =                   \
2         -I.                     \
3         -I$(top_srcdir)         \
4         -I$(top_builddir)
6 AM_CFLAGS =     \
7         -Wall   \
8         -Werror \
9         -g
11 INCLUDES = \
12         -DMMEDIAMANAGER_EXTENSIONDIR=\""$(libdir)/mmediamanager/extensions"\"
13   
14 lib_LTLIBRARIES = \
15         libmmanager.la
17 libmmanager_la_includedir=$(includedir)/libmmanager
19 libmmanager_la_headers =                \
20         mm.h                            \
21         mm-application.h                \
22         mm-dbus-application.h           \
23         mm-so-application.h             \
24         mm-application-provider.h       \
25         mm-category.h                   \
26         mm-dbus-category.h              \
27         mm-so-category.h                \
28         mm-category-provider.h          \
29         mm-hit.h                        \
30         mm-hit-collection.h             \
31         mm-hit-collection-provider.h    \
32         mm-manager.h                    \
33         mm-module-manager.h             \
34         mm-filter.h                     \
35         mm-attribute.h                  \
36         mm-base-attributes.h            \
37         mm-filter-param.h               \
38         mm-attribute-manager.h          \
39         mm-attribute-base-manager.h     \
40         mm-module.h                     \
41         mm-string-utils.h               \
42         mm-utils.h                      \
43         mm-types.h                      \
44         mm-error.h
46 libmmanager_la_include_HEADERS =        \
47         $(libmmanager_la_headers)       \
48         mm-type-builtins.h
50 libmmanager_la_SOURCES =                \
51         mm-application.c                \
52         mm-dbus-application.c           \
53         mm-so-application.c             \
54         mm-application-provider.c       \
55         mm-category.c                   \
56         mm-dbus-category.c              \
57         mm-so-category.c                \
58         mm-category-provider.c          \
59         mm-hit.c                        \
60         mm-hit-collection.c             \
61         mm-hit-collection-provider.c    \
62         mm-manager.c                    \
63         mm-module.c                     \
64         mm-module-manager.c             \
65         mm-type-builtins.c              \
66         mm-filter.c                     \
67         mm-attribute.c                  \
68         mm-filter-param.c               \
69         mm-attribute-manager.c          \
70         mm-string-utils.c               \
71         mm-utils.c                      \
72         mm-attribute-base-manager.c
74 libmmanager_la_CFLAGS =                 \
75         $(MMEDIAMANAGER_CFLAGS)         \
76         $(DBUS_CFLAGS)
78 libmmanager_la_LIBADD =                 \
79         $(MMEDIAMANAGER_LIBS)           \
80         $(DBUS_LIBS)
82 BUILT_SOURCES =                                 \
83         mm-type-builtins.c                      \
84         mm-type-builtins.h
86 stamp_files =                                   \
87         stamp-mm-type-builtins.c                \
88         stamp-mm-type-builtins.h
90 mm-type-builtins.c: stamp-mm-type-builtins.c Makefile
91         @true
92 stamp-mm-type-builtins.c: Makefile $(libmmanager_la_headers)
93         $(GLIB_MKENUMS) \
94                 --fhead "#include <config.h>\n\n" \
95                 --fhead "#include \"mm-type-builtins.h\"\n\n" \
96                 --fprod "\n/* enumerations from \"@filename@\" */" \
97                 --fprod "\n#include \"@filename@\"" \
98                 --vhead "GType\n@enum_name@_get_type (void)\n{\n" \
99                 --vhead "  static GType type = 0;\n\n" \
100                 --vhead "  if (G_UNLIKELY (type == 0))\n  {\n" \
101                 --vhead "    static const G@Type@Value _@enum_name@_values[] = {" \
102                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
103                 --vtail "      { 0, NULL, NULL }\n    };\n\n" \
104                 --vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n  }\n\n" \
105                 --vtail "  return type;\n}\n\n" \
106                 $(libmmanager_la_headers) > xgen-$(@F) \
107         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
108         && rm -f xgen-$(@F) \
109         && echo timestamp > $(@F)
111 mm-type-builtins.h: stamp-mm-type-builtins.h Makefile
112         @true
113 stamp-mm-type-builtins.h: Makefile $(libmmanager_la_headers)
114         $(GLIB_MKENUMS) \
115                 --fhead "#ifndef __MM_TYPE_BUILTINS_H__\n" \
116                 --fhead "#define __MM_TYPE_BUILTINS_H__\n\n" \
117                 --fhead "#include <glib-object.h>\n\n" \
118                 --fhead "G_BEGIN_DECLS\n\n" \
119                 --ftail "G_END_DECLS\n\n" \
120                 --ftail "#endif /* __MM_TYPE_BUILTINS_H__ */\n" \
121                 --fprod "\n/* --- @filename@ --- */" \
122                 --eprod "#define MM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
123                 --eprod "GType @enum_name@_get_type (void);\n" \
124                 $(libmmanager_la_headers) > xgen-$(@F) \
125         && ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
126         && rm -f xgen-$(@F) \
127         && echo timestamp > $(@F)
128         
129 CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
130 DISTCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
131 MAINTAINERCLEANFILES =          \
132         *~                      \
133         Makefile.in             \
134         $(stamp_files)          \
135         $(BUILT_SOURCES)
137 pkgconfigdir=$(libdir)/pkgconfig
138 pkgconfig_DATA=libmmanager.pc
140 EXTRA_DIST =                            \
141         libmmanager.pc.in