4 libgsignon_glib_la_CPPFLAGS = \
11 libgsignon_glib_la_LIBADD = $(DEPS_LIBS)
12 libgsignon_glib_la_LDFLAGS = \
14 -export-symbols-regex '^signon_'
16 nodist_libgsignon_glib_la_SOURCES = \
21 signon-errors-enum.c \
22 sso-auth-service-gen.c \
23 sso-auth-service-gen.h \
24 sso-auth-session-gen.c \
25 sso-auth-session-gen.h \
28 stamp-signon-enum-types.h
31 $(nodist_libgsignon_glib_la_SOURCES) \
36 sso-auth-service-gen-doc-com.google.code.AccountsSSO.gSingleSignOn.AuthService.xml \
37 sso-auth-session-gen-doc-com.google.code.AccountsSSO.gSingleSignOn.AuthSession.xml \
38 sso-identity-gen-doc-com.google.code.AccountsSSO.gSingleSignOn.Identity.xml
40 libgsignon_glib_la_SOURCES = \
41 signon-auth-service.h \
42 signon-identity-info.h \
45 signon-auth-session.h \
47 signon-auth-service.c \
48 signon-identity-info.c \
51 signon-auth-session.c \
57 signon-security-context.h \
58 signon-security-context.c \
62 libgsignon_glib_includedir = $(includedir)/libgsignon-glib
63 libgsignon_glib_include_HEADERS = \
64 signon-auth-service.h \
65 signon-auth-session.h \
66 signon-identity-info.h \
68 signon-security-context.h \
75 # Headers with enums to be parsed with glib-mkenums;
76 # signon-errors.h is handled separately
77 libgsignon_glib_headers_with_enums = \
78 signon-auth-session.h \
79 signon-identity-info.h
81 # This should come from `pkg-config --variable=interfaces_dir dbus-1`
82 # default is /usr/share/dbus-1/interfaces
83 INTERFACES_DIR = $(top_srcdir)/libgsignon-glib/interfaces
85 sso-auth-service-gen.h sso-auth-service-gen.c: $(INTERFACES_DIR)/com.google.code.AccountsSSO.gSingleSignOn.AuthService.xml
86 $(AM_V_GEN)gdbus-codegen \
87 --generate-c-code sso-auth-service-gen \
88 --generate-docbook sso-auth-service-gen-doc \
89 --annotate "com.google.code.AccountsSSO.gSingleSignOn.AuthService" org.gtk.GDBus.C.Name SsoAuthService \
92 sso-auth-session-gen.h sso-auth-session-gen.c: $(INTERFACES_DIR)/com.google.code.AccountsSSO.gSingleSignOn.AuthSession.xml
93 $(AM_V_GEN)gdbus-codegen \
94 --generate-c-code sso-auth-session-gen \
95 --generate-docbook sso-auth-session-gen-doc \
96 --annotate "com.google.code.AccountsSSO.gSingleSignOn.AuthSession" org.gtk.GDBus.C.Name SsoAuthSession \
99 sso-identity-gen.h sso-identity-gen.c: $(INTERFACES_DIR)/com.google.code.AccountsSSO.gSingleSignOn.Identity.xml
100 $(AM_V_GEN)gdbus-codegen \
101 --generate-c-code sso-identity-gen \
102 --generate-docbook sso-identity-gen-doc \
103 --annotate "com.google.code.AccountsSSO.gSingleSignOn.Identity" org.gtk.GDBus.C.Name SsoIdentity \
106 signon-marshal.h: signon-marshal.list Makefile
107 $(AM_V_GEN)glib-genmarshal --header --prefix=_signon_marshal $< > $@
109 signon-marshal.c: signon-marshal.list Makefile
110 $(AM_V_GEN)glib-genmarshal --body --prefix=_signon_marshal $< > $@
112 signon-enum-types.h: stamp-signon-enum-types.h
115 stamp-signon-enum-types.h: Makefile \
116 $(libgsignon_glib_headers_with_enums) signon-errors.h
117 $(AM_V_GEN)( cd $(srcdir) && glib-mkenums \
118 --fhead "#ifndef __SIGNON_ENUM_TYPES_H__\n#define __SIGNON_ENUM_TYPES_H__\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
119 --fprod "/* enumerations from \"@filename@\" */\n" \
120 --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define SIGNON_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
121 --ftail "G_END_DECLS\n\n#endif /* __SIGNON_ENUM_TYPES_H__ */" \
122 $(libgsignon_glib_headers_with_enums) signon-errors.h ) >> stamp-xgen-geth \
123 && (cmp -s stamp-xgen-geth signon-enum-types.h || cp stamp-xgen-geth signon-enum-types.h ) \
124 && rm -f stamp-xgen-geth \
125 && echo timestamp > $(@F)
127 signon-enum-types.c: Makefile $(libgsignon_glib_headers_with_enums)
128 $(AM_V_GEN)( cd $(srcdir) && glib-mkenums \
129 --fhead "#include \"signon-enum-types.h\"\n" \
130 --fhead "#include \"signon-identity-info.h\"\n" \
131 --fhead "#include \"signon-auth-session.h\"\n" \
132 --fhead "#define g_intern_static_string(s) (s)\n" \
133 --fprod "\n/* enumerations from \"@filename@\" */" \
134 --ftail "\n#define __SIGNON_ENUM_TYPES_C__\n" \
135 --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
136 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
137 --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n }\n return etype;\n}\n" \
138 $(libgsignon_glib_headers_with_enums) ) > enum-xgen-getc \
139 && cp enum-xgen-getc signon-enum-types.c \
140 && rm -f enum-xgen-getc
142 signon-errors-enum.c: Makefile signon-errors.h
143 $(AM_V_GEN)( cd $(srcdir) && glib-mkenums \
144 --fhead "#include \"signon-enum-types.h\"\n#include \"signon-errors.h\"\n#include \"signon-internals.h\"\n#define g_intern_static_string(s) (s)\n" \
145 --fprod "\n/* enumerations from \"@filename@\" */" \
146 --ftail "\n#define __SIGNON_ENUM_TYPES_C__\n" \
147 --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
148 --vprod " { @VALUENAME@, SED@VALUENAME@, \"@valuenick@\" }," \
149 --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n }\n return etype;\n}\n" \
150 signon-errors.h ) | \
151 $(SED) -e 's/SEDSIGNON_ERROR_\([^,]*\)/SIGNOND_\1_ERR_NAME/' \
153 && cp errors-xgen-getc signon-errors-enum.c \
154 && rm -f errors-xgen-getc
156 signon-errors-map.c: Makefile signon-errors.h
157 $(AM_V_GEN)( cd $(srcdir) && \
158 echo "static const GDBusErrorEntry signon_error_entries[] = {" && \
159 grep "^ *SIGNON_ERROR_" signon-errors.h | \
160 $(SED) -e 's/SIGNON_ERROR_\([A-Z_0-9]*\).*/{ SIGNON_ERROR_\1, SIGNOND_\1_ERR_NAME },/' && \
161 echo -e "};\n" ) > signon-errors-map.c
164 signon-marshal.list \
165 stamp-signon-enum-types.h
167 -include $(INTROSPECTION_MAKEFILE)
169 INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
170 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
172 if HAVE_INTROSPECTION
173 introspection_sources = \
174 signon-security-context.c \
175 signon-security-context.h \
176 signon-auth-service.c \
177 signon-auth-service.h \
178 signon-auth-session.c \
179 signon-auth-session.h \
180 signon-enum-types.h \
181 signon-enum-types.c \
184 signon-identity-info.c \
185 signon-identity-info.h \
189 gSignon-1.0.gir: libgsignon-glib.la
190 gSignon_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0
191 gSignon_1_0_gir_SCANNERFLAGS = \
192 --identifier-prefix=Signon \
193 --symbol-prefix=signon \
194 --c-include="libgsignon-glib/signon-glib.h" \
196 gSignon_1_0_gir_CFLAGS = \
199 gSignon_1_0_gir_LIBS = libgsignon-glib.la
200 gSignon_1_0_gir_FILES = $(introspection_sources)
201 INTROSPECTION_GIRS += gSignon-1.0.gir
203 girdir = $(datadir)/gir-1.0
204 gir_DATA = $(INTROSPECTION_GIRS)
206 typelibdir = $(libdir)/girepository-1.0
207 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
209 CLEANFILES += $(gir_DATA) $(typelib_DATA)
212 dbusinterfacesdir = $(DBUS_INTERFACES_DIR)
213 dbusinterfaces_DATA = \
214 $(INTERFACES_DIR)/com.google.code.AccountsSSO.gSingleSignOn.AuthService.xml\
215 $(INTERFACES_DIR)/com.google.code.AccountsSSO.gSingleSignOn.AuthSession.xml\
216 $(INTERFACES_DIR)/com.google.code.AccountsSSO.gSingleSignOn.Identity.xml
218 EXTRA_DIST = interfaces
221 #vapidir = $(datadir)/vala/vapi