gcr: Implement OpenSSH public key parser
[platform/upstream/gcr.git] / gcr / Makefile.am
1 SUBDIRS = . icons tests
2
3 # ------------------------------------------------------------------
4 # UI BUILDER
5 #
6
7 uidir = $(datadir)/gcr-@GCR_MAJOR@/ui/
8
9 ui_DATA = \
10         gcr-import-dialog.ui \
11         gcr-unlock-options-widget.ui
12
13 # ------------------------------------------------------------------
14 # HEADERS
15
16 HEADER_BASE_FILES = \
17         gcr-base.h \
18         gcr-certificate.h \
19         gcr-certificate-chain.h \
20         gcr-collection.h \
21         gcr-comparable.h \
22         gcr-deprecated-base.h \
23         gcr-icons.h \
24         gcr-library.h \
25         gcr-parser.h \
26         gcr-pkcs11-certificate.h \
27         gcr-simple-certificate.h \
28         gcr-trust.h \
29         gcr-types.h \
30         gcr-union-collection.h \
31         gcr-unlock-options.h
32
33 HEADER_UI_FILES = \
34         gcr.h \
35         gcr-certificate-basics-widget.h \
36         gcr-certificate-details-widget.h \
37         gcr-certificate-renderer.h \
38         gcr-certificate-widget.h \
39         gcr-collection-model.h \
40         gcr-column.h \
41         gcr-combo-selector.h \
42         gcr-deprecated.h \
43         gcr-key-renderer.h \
44         gcr-key-widget.h \
45         gcr-importer.h \
46         gcr-list-selector.h \
47         gcr-renderer.h \
48         gcr-simple-collection.h \
49         gcr-tree-selector.h \
50         gcr-unlock-options-widget.h \
51         gcr-viewer.h \
52         gcr-viewer-window.h
53
54 incdir = $(includedir)/gcr-@GCR_MAJOR@/gcr
55
56 inc_HEADERS = \
57         $(HEADER_BASE_FILES) \
58         $(HEADER_UI_FILES) \
59         gcr-enum-types-base.h \
60         gcr-enum-types.h
61
62 # ------------------------------------------------------------------
63 # LIBRARY
64
65 INCLUDES = \
66         -I$(top_builddir) \
67         -I$(top_srcdir) \
68         $(GOBJECT_CFLAGS) \
69         $(GLIB_CFLAGS) \
70         $(LIBGCRYPT_CFLAGS) \
71         $(P11_KIT_CFLAGS) \
72         -DG_LOG_DOMAIN=\"Gcr\"
73
74 lib_LTLIBRARIES = \
75         libgcr-base-@GCR_MAJOR@.la \
76         libgcr-@GCR_MAJOR@.la
77
78 BUILT_BASE_FILES = \
79         gcr-marshal.c gcr-marshal.h \
80         gcr-enum-types-base.c gcr-enum-types-base.h \
81         gcr-oids.c gcr-oids.h
82
83 BUILT_UI_FILES = \
84         gcr-marshal.c gcr-marshal.h \
85         gcr-enum-types.c gcr-enum-types.h \
86         gcr-oids.c gcr-oids.h
87
88 BUILT_SOURCES = \
89         $(BUILT_BASE_FILES) \
90         $(BUILT_UI_FILES)
91
92 libgcr_base_@GCR_MAJOR@_la_SOURCES = \
93         gcr-certificate.c gcr-certificate.h \
94         gcr-certificate-chain.c gcr-certificate-chain.h \
95         gcr-collection.c gcr-collection.h \
96         gcr-comparable.c gcr-comparable.h \
97         gcr-debug.c gcr-debug.h \
98         gcr-gnupg-collection.c gcr-gnupg-collection.h \
99         gcr-gnupg-key.c gcr-gnupg-key.h \
100         gcr-gnupg-process.c gcr-gnupg-process.h \
101         gcr-gnupg-util.c gcr-gnupg-util.h \
102         gcr-library.c gcr-library.h \
103         gcr-internal.h \
104         gcr-memory.c \
105         gcr-memory-icon.c gcr-memory-icon.h \
106         gcr-openssh.c gcr-openssh.h \
107         gcr-parser.c gcr-parser.h \
108         gcr-pkcs11-certificate.c gcr-pkcs11-certificate.h \
109         gcr-record.c gcr-record.h \
110         gcr-simple-certificate.c gcr-simple-certificate.h \
111         gcr-simple-collection.c gcr-simple-collection.h \
112         gcr-trust.c gcr-trust.h \
113         gcr-types.h \
114         gcr-union-collection.c gcr-union-collection.h \
115         gcr-util.c gcr-util.h \
116         $(BUILT_BASE_FILES)
117
118 libgcr_@GCR_MAJOR@_la_SOURCES = \
119         gcr-certificate-basics-widget.c gcr-certificate-basics-widget.h \
120         gcr-certificate-details-widget.c gcr-certificate-details-widget.h \
121         gcr-certificate-exporter.c gcr-certificate-exporter.h \
122         gcr-certificate-extensions.c gcr-certificate-extensions.h \
123         gcr-certificate-renderer.c gcr-certificate-renderer.h \
124         gcr-certificate-widget.c gcr-certificate-widget.h \
125         gcr-collection-model.c gcr-collection-model.h \
126         gcr-combo-selector.c gcr-combo-selector.h \
127         gcr-display-scrolled.c gcr-display-scrolled.h \
128         gcr-display-view.c gcr-display-view.h \
129         gcr-failure-renderer.c gcr-failure-renderer.h \
130         gcr-fingerprint.c gcr-fingerprint.h \
131         gcr-icons.c gcr-icons.h \
132         gcr-import-dialog.c gcr-import-dialog.h \
133         gcr-importer.c gcr-importer.h  \
134         gcr-key-renderer.c gcr-key-renderer.h \
135         gcr-key-widget.c gcr-key-widget.h \
136         gcr-list-selector.c gcr-list-selector.h gcr-list-selector-private.h \
137         gcr-live-search.c gcr-live-search.h \
138         gcr-memory.c \
139         gcr-renderer.c gcr-renderer.h \
140         gcr-tree-selector.c gcr-tree-selector.h \
141         gcr-unlock-options.h \
142         gcr-unlock-options-widget.c gcr-unlock-options-widget.h \
143         gcr-unlock-renderer.c gcr-unlock-renderer.h \
144         gcr-viewer.c gcr-viewer.h \
145         gcr-viewer-window.c \
146         $(BUILT_UI_FILES)
147
148 libgcr_base_@GCR_MAJOR@_la_CFLAGS = \
149         -DGCK_API_SUBJECT_TO_CHANGE \
150         -DGCR_API_SUBJECT_TO_CHANGE \
151         -DP11_KIT_API_SUBJECT_TO_CHANGE \
152         -DGCR_COMPILATION
153
154 libgcr_@GCR_MAJOR@_la_CFLAGS = \
155         $(GTK_CFLAGS) \
156         -DUIDIR=\""$(uidir)"\" \
157         $(libgcr_base_@GCR_MAJOR@_la_CFLAGS)
158
159 libgcr_base_@GCR_MAJOR@_la_LDFLAGS = \
160         -version-info $(GCR_LT_RELEASE) \
161         -no-undefined \
162         -export-symbols-regex '^gcr_*'
163
164 libgcr_@GCR_MAJOR@_la_LDFLAGS = \
165         $(libgcr_base_@GCR_MAJOR@_la_LDFLAGS)
166
167 libgcr_base_@GCR_MAJOR@_la_LIBADD = \
168         $(top_builddir)/egg/libegg.la \
169         $(top_builddir)/egg/libegg-entry-buffer.la \
170         $(top_builddir)/gck/libgck-@GCK_MAJOR@.la \
171         $(GOBJECT_LIBS) \
172         $(GLIB_LIBS) \
173         $(LIBGCRYPT_LIBS) \
174         $(P11_KIT_LIBS)
175
176 libgcr_@GCR_MAJOR@_la_LIBADD = \
177         $(GTK_LIBS) \
178         $(libgcr_base_@GCR_MAJOR@_la_LIBADD) \
179         $(builddir)/libgcr-base-$(GCR_MAJOR).la
180
181 noinst_LTLIBRARIES = libgcr-testable.la
182 libgcr_testable_la_SOURCES =
183 libgcr_testable_la_LIBADD = \
184         $(libgcr_base_@GCR_MAJOR@_la_OBJECTS) \
185         $(libgcr_@GCR_MAJOR@_la_OBJECTS) \
186         $(libgcr_@GCR_MAJOR@_la_LIBADD)
187 libgcr_testable_la_DEPENDENCIES = \
188         $(libgcr_base_@GCR_MAJOR@_la_OBJECTS) \
189         $(libgcr_@GCR_MAJOR@_la_OBJECTS)
190
191 gcr-marshal.h: gcr-marshal.list $(GLIB_GENMARSHAL)
192         $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=_gcr_marshal > $@
193
194 gcr-marshal.c: gcr-marshal.list $(GLIB_GENMARSHAL)
195         $(AM_V_GEN) ( echo "#include \"gcr-marshal.h\"" > $@ && \
196                 $(GLIB_GENMARSHAL) $< --body --prefix=_gcr_marshal >> $@ )
197
198 gcr-enum-types.h: $(HEADER_UI_FILES) gcr-enum-types.h.template
199         $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.h.template \
200                 $(HEADER_UI_FILES) > $@
201
202 gcr-enum-types.c: $(HEADER_UI_FILES) gcr-enum-types.c.template
203         $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.c.template \
204                 $(HEADER_UI_FILES) > $@
205
206 gcr-enum-types-base.h: $(HEADER_BASE_FILES) gcr-enum-types.h.template
207         $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.h.template \
208                 $(HEADER_BASE_FILES) > $@
209
210 gcr-enum-types-base.c: $(HEADER_BASE_FILES) gcr-enum-types.c.template
211         $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.c.template \
212                 $(HEADER_BASE_FILES) > $@
213
214 gcr-oids.c: gcr-oids.list gcr-mkoids
215         $(AM_V_GEN) sh gcr-mkoids -p GCR -c gcr-oids.c -h gcr-oids.h gcr-oids.list
216
217 gcr-oids.h: gcr-oids.c
218
219 pkgconfigdir = $(libdir)/pkgconfig
220 pkgconfig_DATA = gcr-$(GCR_MAJOR).pc gcr-base-$(GCR_MAJOR).pc
221
222 gcr-$(GCR_MAJOR).pc: gcr.pc
223         cp gcr.pc gcr-$(GCR_MAJOR).pc
224 gcr-base-$(GCR_MAJOR).pc: gcr-base.pc
225         cp gcr-base.pc gcr-base-$(GCR_MAJOR).pc
226
227 # ----------------------------------------------------------------
228 # SYSTEM INTEGRATION
229
230 # The new mime system
231 mimedir = $(datadir)/mime/packages
232 mime_DATA = gcr-crypto-types.xml
233
234 if WITH_UPDATE_MIME
235 update_mime_database_cmd = update-mime-database $(datadir)/mime/
236
237 install-data-hook: update_mime_database
238 uninstall-hook: update_mime_database
239
240 update_mime_database:
241         @-if test -z "$(DESTDIR)"; then \
242                 echo "Updating MIME database."; \
243                 $(update_mime_database_cmd); \
244         else \
245                 echo "*** MIME database not updated.  After (un)install, run this:"; \
246                 echo "***   $(update_mime_database_cmd)"; \
247         fi
248 endif
249
250 desktopdir = $(datadir)/applications
251 desktop_in_in_files = gcr-viewer.desktop.in.in
252 desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
253 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
254 @INTLTOOL_DESKTOP_RULE@
255
256 # ----------------------------------------------------------------
257 # TOOLS
258
259 bin_PROGRAMS = gcr-viewer
260
261 gcr_viewer_SOURCES = \
262         gcr-viewer-tool.c
263
264 gcr_viewer_CFLAGS = \
265         $(GTK_CFLAGS) \
266         -DLOCALEDIR=\""$(datadir)/locale"\"
267
268 gcr_viewer_LDADD = \
269         $(builddir)/libgcr-$(GCR_MAJOR).la \
270         $(top_builddir)/gck/libgck-@GCK_MAJOR@.la \
271         $(GTK_LIBS)
272
273 # ----------------------------------------------------------------
274
275 gcr-expected-base.abi: gcr-base.symbols
276         $(AM_V_GEN) cpp -P $< | sort > $@
277 gcr-expected.abi: gcr.symbols
278         $(AM_V_GEN) cpp -P $< | sort > $@
279
280 gcr-actual-base.abi: $(builddir)/.libs/libgcr-base-@GCR_MAJOR@.so
281         $(AM_V_GEN)  $(NM) -D -g --defined-only $< | \
282                 cut -d ' ' -f 3 | grep -Ev '^(__bss_start|_edata|_end)' | sort > $@
283 gcr-actual.abi: $(builddir)/.libs/libgcr-@GCR_MAJOR@.so
284         $(AM_V_GEN)  $(NM) -D -g --defined-only $< | \
285                 cut -d ' ' -f 3 | grep -Ev '^(__bss_start|_edata|_end)' | sort > $@
286
287 check-symbols: gcr-expected.abi gcr-actual.abi gcr-expected-base.abi gcr-actual-base.abi
288         $(AM_V_GEN) diff -U0 --ignore-blank-lines gcr-expected-base.abi gcr-actual-base.abi || \
289                 (echo "check-symbols: Symbols have CHANGED. Fix gcr-base.symbols"; exit 1)
290         $(AM_V_GEN) diff -U0 --ignore-blank-lines gcr-expected.abi gcr-actual.abi || \
291                 (echo "check-symbols: Symbols have CHANGED. Fix gcr.symbols"; exit 1)
292
293 check-local: check-symbols
294
295 EXTRA_DIST = \
296         gcr.pc.in \
297         gcr-base.pc.in \
298         gcr-marshal.list \
299         gcr-oids.list \
300         gcr-mkoids \
301         $(ui_DATA) \
302         $(conf_DATA) \
303         gcr-enum-types.h.template \
304         gcr-enum-types.c.template \
305         gcr.symbols \
306         gcr-base.symbols \
307         $(desktop_in_in_files) \
308         $(desktop_in_files) \
309         $(desktop_DATA) \
310         $(mime_DATA)
311
312 CLEANFILES = \
313         $(BUILT_SOURCES) \
314         $(pkgconfig_DATA) \
315         gcr-actual.abi \
316         gcr-actual-base.abi \
317         gcr-expected.abi \
318         gcr-expected-base.abi
319
320 DISTCLEANFILES = \
321         $(desktop_in_files) \
322         $(desktop_DATA) \
323         $(pkgconfig_DATA)