Bump version number
[platform/upstream/libsecret.git] / library / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 SUBDIRS = . tests
4
5 module_flags = \
6         -version-info $(SECRET_LT_RELEASE) \
7         -export_dynamic \
8         -avoid-version \
9         -module \
10         -no-undefined \
11         -export-symbols-regex '^secret_'
12
13 INCLUDES = \
14         -I$(top_srcdir) \
15         -DSECRET_COMPILATION \
16         $(NULL)
17
18 lib_LTLIBRARIES = libsecret-@SECRET_MAJOR@.la
19
20
21 incdir = $(includedir)/secret-@SECRET_MAJOR@/secret
22
23 HEADER_FILES = \
24         secret.h \
25         secret-attributes.h \
26         secret-collection.h \
27         secret-item.h \
28         secret-password.h \
29         secret-paths.h \
30         secret-prompt.h \
31         secret-schema.h \
32         secret-schemas.h \
33         secret-service.h \
34         secret-types.h \
35         secret-unstable.h \
36         secret-value.h \
37         $(NULL)
38
39 inc_HEADERS = \
40         $(HEADER_FILES) \
41         secret-enum-types.h \
42         $(NULL)
43
44 BUILT_SOURCES = \
45         secret-dbus-generated.c secret-dbus-generated.h \
46         secret-enum-types.c secret-enum-types.h \
47         $(NULL)
48
49 PUBLIC_FILES = \
50         secret-attributes.h secret-attributes.c \
51         secret-collection.h secret-collection.c \
52         secret-item.h secret-item.c \
53         secret-methods.c \
54         secret-password.h secret-password.c \
55         secret-paths.h secret-paths.c \
56         secret-prompt.h secret-prompt.c \
57         secret-schema.h secret-schema.c \
58         secret-schemas.h secret-schemas.c \
59         secret-service.h secret-service.c \
60         secret-types.h \
61         secret-value.h secret-value.c \
62         $(NULL)
63
64 INTERNAL_FILES = \
65         secret-private.h \
66         secret-session.c \
67         secret-util.c \
68         $(NULL)
69
70 libsecret_@SECRET_MAJOR@_la_SOURCES = \
71         $(PUBLIC_FILES) \
72         $(INTERNAL_FILES) \
73         $(BUILT_SOURCES) \
74         $(NULL)
75
76 libsecret_@SECRET_MAJOR@_la_CFLAGS = \
77         $(LIBGCRYPT_CFLAGS)
78
79 libsecret_@SECRET_MAJOR@_la_LIBADD = \
80         $(top_builddir)/egg/libegg.la \
81         $(LIBGCRYPT_LIBS) \
82         $(LIBS)
83
84 DBUS_XML_DEFINITIONS = \
85         $(srcdir)/org.freedesktop.Secrets.xml
86
87 secret-dbus-generated.c: $(DBUS_XML_DEFINITIONS) Makefile.am
88         $(AM_V_GEN) gdbus-codegen --interface-prefix org.freedesktop.Secret. \
89                 --generate-c-code secret-dbus-generated --c-namespace SecretGen \
90                 $(DBUS_XML_DEFINITIONS)
91         $(AM_V_GEN) sed -i -e 's/secret_gen_/_secret_gen_/g' -e 's/type-/type/g' secret-dbus-generated.[ch]
92         $(AM_V_GEN) sed -i -e '1i #define GLIB_DISABLE_DEPRECATION_WARNINGS' secret-dbus-generated.c
93 secret-dbus-generated.h: secret-dbus-generated.c
94
95 secret-enum-types.h: secret-enum-types.h.template $(HEADER_FILES)
96         $(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@
97
98 secret-enum-types.c: secret-enum-types.c.template $(HEADER_FILES)
99         $(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@
100
101 CLEANFILES =
102
103 # ------------------------------------------------------------------
104 # INTROSPECTION
105
106 if HAVE_INTROSPECTION
107
108 include $(INTROSPECTION_MAKEFILE)
109
110 INTROSPECTION_GIRS = Secret-@SECRET_MAJOR@.gir
111 INTROSPECTION_SCANNER_ARGS = $(INTROSPECTION_FLAGS) --warn-all --add-include-path=$(srcdir) --add-include-path=.
112 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=.
113
114 Secret-@SECRET_MAJOR@.gir: libsecret-@SECRET_MAJOR@.la
115
116 Secret_@SECRET_MAJOR@_gir_PACKAGES = gobject-2.0 gio-2.0
117 Secret_@SECRET_MAJOR@_gir_EXPORT_PACKAGES = libsecret-@SECRET_MAJOR@
118 Secret_@SECRET_MAJOR@_gir_INCLUDES = GObject-2.0 Gio-2.0
119 Secret_@SECRET_MAJOR@_gir_LIBS = libsecret-@SECRET_MAJOR@.la
120 Secret_@SECRET_MAJOR@_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -DSECRET_COMPILATION -DSECRET_API_SUBJECT_TO_CHANGE
121 Secret_@SECRET_MAJOR@_gir_FILES = $(PUBLIC_FILES)
122 Secret_@SECRET_MAJOR@_gir_SCANNERFLAGS = --c-include "secret.h"
123
124 girdir = $(datadir)/gir-1.0
125 gir_DATA = $(INTROSPECTION_GIRS)
126
127 typelibsdir = $(libdir)/girepository-1.0
128 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
129
130 if ENABLE_VAPIGEN
131 include $(VAPIGEN_MAKEFILE)
132
133 libsecret-@SECRET_MAJOR@.vapi: Secret-@SECRET_MAJOR@.gir Secret-@SECRET_MAJOR@.metadata
134
135 VAPIGEN_VAPIS = libsecret-@SECRET_MAJOR@.vapi
136
137 libsecret_@SECRET_MAJOR@_vapi_DEPS = gio-2.0
138 libsecret_@SECRET_MAJOR@_vapi_METADATADIRS = $(srcdir)
139 libsecret_@SECRET_MAJOR@_vapi_FILES = Secret-@SECRET_MAJOR@.gir
140
141 vapidir = $(datadir)/vala/vapi
142 vapi_DATA = $(VAPIGEN_VAPIS)
143
144 CLEANFILES += $(VAPIGEN_VAPIS)
145
146 endif # ENABLE_VAPIGEN
147 endif # HAVE_INTROSPECTION
148
149 # ------------------------------------------------------------------
150 # PKG CONFIG
151
152 libsecret-$(SECRET_MAJOR).pc: libsecret.pc
153         cp libsecret.pc libsecret-$(SECRET_MAJOR).pc
154
155 pkgconfigdir = $(libdir)/pkgconfig
156 pkgconfig_DATA = libsecret-$(SECRET_MAJOR).pc
157
158 # ------------------------------------------------------------------
159
160
161 EXTRA_DIST = \
162         secret-enum-types.h.template \
163         secret-enum-types.c.template \
164         org.freedesktop.Secrets.xml \
165         Secret-@SECRET_MAJOR@.metadata \
166         $(NULL)
167
168 CLEANFILES += \
169         $(pkgconfig_DATA) \
170         $(gir_DATA) \
171         $(typelibs_DATA) \
172         $(NULL)
173
174 DISTCLEANFILES = \
175         $(NULL)
176
177 check-memory:
178         make -C tests check-memory