Makefile.am 3.7 KB
Newer Older
1
2
include $(top_srcdir)/Makefile.decl

3
SUBDIRS = . tests
4
5

module_flags = \
6
	-version-info $(SECRET_LT_RELEASE) \
7
8
9
10
	-export_dynamic \
	-avoid-version \
	-module \
	-no-undefined \
Stef Walter's avatar
Stef Walter committed
11
	-export-symbols-regex '^secret_'
12

13
INCLUDES = \
Stef Walter's avatar
Stef Walter committed
14
15
16
	-I$(top_srcdir) \
	-DSECRET_COMPILATION \
	$(NULL)
17

18
19
20
21
lib_LTLIBRARIES = libsecret-@SECRET_MAJOR@.la


incdir = $(includedir)/secret-@SECRET_MAJOR@/secret
22

23
HEADER_FILES = \
24
	secret.h \
Stef Walter's avatar
Stef Walter committed
25
26
27
28
29
	secret-collection.h \
	secret-item.h \
	secret-password.h \
	secret-prompt.h \
	secret-service.h \
30
31
32
33
34
35
36
37
	secret-types.h \
	secret-value.h \
	$(NULL)

inc_HEADERS = \
	$(HEADER_FILES) \
	secret-enum-types.h \
	$(NULL)
38

39
BUILT_SOURCES = \
Stef Walter's avatar
Stef Walter committed
40
	secret-dbus-generated.c secret-dbus-generated.h \
41
42
	secret-enum-types.c secret-enum-types.h \
	$(NULL)
43

44
PUBLIC_FILES = \
Stef Walter's avatar
Stef Walter committed
45
46
47
48
49
50
	secret-collection.h secret-collection.c \
	secret-item.h secret-item.c \
	secret-methods.c \
	secret-password.h secret-password.c \
	secret-prompt.h secret-prompt.c \
	secret-service.h secret-service.c \
51
	secret-types.h \
Stef Walter's avatar
Stef Walter committed
52
	secret-value.h secret-value.c \
53
54
55
	$(NULL)

INTERNAL_FILES = \
Stef Walter's avatar
Stef Walter committed
56
	secret-private.h \
57
58
59
60
61
62
63
	secret-session.c \
	secret-util.c \
	$(NULL)

libsecret_@SECRET_MAJOR@_la_SOURCES = \
	$(PUBLIC_FILES) \
	$(INTERNAL_FILES) \
64
	$(BUILT_SOURCES) \
65
	$(NULL)
66

67
libsecret_@SECRET_MAJOR@_la_CFLAGS = \
Stef Walter's avatar
Stef Walter committed
68
69
	$(LIBGCRYPT_CFLAGS)

70
libsecret_@SECRET_MAJOR@_la_LIBADD = \
71
	$(top_builddir)/egg/libegg.la \
Stef Walter's avatar
Stef Walter committed
72
	$(LIBGCRYPT_LIBS) \
73
74
75
76
77
	$(LIBS)

DBUS_XML_DEFINITIONS = \
	org.freedesktop.Secrets.xml

Stef Walter's avatar
Stef Walter committed
78
secret-dbus-generated.c: $(DBUS_XML_DEFINITIONS) Makefile.am
79
	$(AM_V_GEN) gdbus-codegen --interface-prefix org.freedesktop.Secret. \
Stef Walter's avatar
Stef Walter committed
80
		--generate-c-code secret-dbus-generated --c-namespace SecretGen \
81
		$(DBUS_XML_DEFINITIONS)
Stef Walter's avatar
Stef Walter committed
82
83
84
	$(AM_V_GEN) sed -i -e 's/secret_gen_/_secret_gen_/g' secret-dbus-generated.[ch]
	$(AM_V_GEN) sed -i -e '1i #define GLIB_DISABLE_DEPRECATION_WARNINGS' secret-dbus-generated.c
secret-dbus-generated.h: secret-dbus-generated.c
85

Stef Walter's avatar
Stef Walter committed
86
secret-enum-types.h: secret-enum-types.h.template $(HEADER_FILES)
87
88
	$(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@

Stef Walter's avatar
Stef Walter committed
89
secret-enum-types.c: secret-enum-types.c.template $(HEADER_FILES)
90
91
	$(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# ------------------------------------------------------------------
# INTROSPECTION

if HAVE_INTROSPECTION

include $(INTROSPECTION_MAKEFILE)

INTROSPECTION_GIRS = Secret-@SECRET_MAJOR@.gir
INTROSPECTION_SCANNER_ARGS = $(INTROSPECTION_FLAGS) --warn-all --add-include-path=$(srcdir) --add-include-path=.
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=.

Secret-@SECRET_MAJOR@.gir: libsecret-@SECRET_MAJOR@.la

Secret_@SECRET_MAJOR@_gir_PACKAGES = gobject-2.0 gio-2.0
Secret_@SECRET_MAJOR@_gir_EXPORT_PACKAGES = libsecret-@SECRET_MAJOR@
Secret_@SECRET_MAJOR@_gir_INCLUDES = GObject-2.0 Gio-2.0
Secret_@SECRET_MAJOR@_gir_LIBS = libsecret-@SECRET_MAJOR@.la
Secret_@SECRET_MAJOR@_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -DSECRET_COMPILATION -DSECRET_API_SUBJECT_TO_CHANGE
Secret_@SECRET_MAJOR@_gir_FILES = $(PUBLIC_FILES)
Secret_@SECRET_MAJOR@_gir_SCANNERFLAGS = --c-include "secret.h"

girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)

typelibsdir = $(libdir)/girepository-1.0
typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

endif

# ------------------------------------------------------------------
# PKG CONFIG

libsecret-$(SECRET_MAJOR).pc: libsecret.pc
	cp libsecret.pc libsecret-$(SECRET_MAJOR).pc

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libsecret-$(SECRET_MAJOR).pc

# ------------------------------------------------------------------


133
EXTRA_DIST = \
Stef Walter's avatar
Stef Walter committed
134
	secret-enum-types.h.template \
135
136
137
	secret-enum-types.c.template \
	org.freedesktop.Secrets.xml \
	$(NULL)
138

Stef Walter's avatar
Stef Walter committed
139
140
141
142
143
144
145
146
147
CLEANFILES = \
	$(pkgconfig_DATA) \
	$(gir_DATA) \
	$(typelibs_DATA) \
	$(NULL)

DISTCLEANFILES = \
	$(NULL)

148
check-memory:
149
	make -C tests check-memory