Check for duplicates, already loaded mechs
[heimdal.git] / lib / hx509 / Makefile.am
blobc947e065221ec0c086cf1c2a0994ddaf0ffcfc21
1 include $(top_srcdir)/Makefile.am.common
3 lib_LTLIBRARIES = libhx509.la
4 libhx509_la_LDFLAGS = -version-info 5:0:0
6 BUILT_SOURCES =                         \
7         sel-gram.h                      \
8         $(gen_files_ocsp:.x=.c)         \
9         $(gen_files_pkcs10:.x=.c)       \
10         hx509_err.c                     \
11         hx509_err.h
13 gen_files_ocsp =                        \
14         asn1_OCSPBasicOCSPResponse.x    \
15         asn1_OCSPCertID.x               \
16         asn1_OCSPCertStatus.x           \
17         asn1_OCSPInnerRequest.x         \
18         asn1_OCSPKeyHash.x              \
19         asn1_OCSPRequest.x              \
20         asn1_OCSPResponderID.x          \
21         asn1_OCSPResponse.x             \
22         asn1_OCSPResponseBytes.x        \
23         asn1_OCSPResponseData.x         \
24         asn1_OCSPResponseStatus.x       \
25         asn1_OCSPSignature.x            \
26         asn1_OCSPSingleResponse.x       \
27         asn1_OCSPTBSRequest.x           \
28         asn1_OCSPVersion.x              \
29         asn1_id_pkix_ocsp.x             \
30         asn1_id_pkix_ocsp_basic.x       \
31         asn1_id_pkix_ocsp_nonce.x
33 gen_files_pkcs10 =                      \
34         asn1_CertificationRequestInfo.x \
35         asn1_CertificationRequest.x
37 gen_files_crmf =                        \
38         asn1_CRMFRDNSequence.x          \
39         asn1_CertReqMessages.x          \
40         asn1_CertReqMsg.x               \
41         asn1_CertRequest.x              \
42         asn1_CertTemplate.x             \
43         asn1_Controls.x                 \
44         asn1_PBMParameter.x             \
45         asn1_PKMACValue.x               \
46         asn1_POPOPrivKey.x              \
47         asn1_POPOSigningKey.x           \
48         asn1_POPOSigningKeyInput.x      \
49         asn1_ProofOfPossession.x        \
50         asn1_SubsequentMessage.x        
52 AM_YFLAGS = -d
54 dist_libhx509_la_SOURCES = \
55         ca.c \
56         cert.c \
57         cms.c \
58         collector.c \
59         crypto.c \
60         doxygen.c \
61         error.c \
62         env.c \
63         file.c \
64         hx509-private.h \
65         hx509-protos.h \
66         hx509.h \
67         hx_locl.h \
68         sel.c \
69         sel.h \
70         sel-gram.y \
71         sel-lex.l \
72         keyset.c \
73         ks_dir.c \
74         ks_file.c \
75         ks_mem.c \
76         ks_null.c \
77         ks_p11.c \
78         ks_p12.c \
79         ks_keychain.c \
80         lock.c \
81         name.c \
82         peer.c \
83         print.c \
84         softp11.c \
85         ref/pkcs11.h \
86         req.c \
87         revoke.c
89 sel-lex.c: sel-gram.h
91 libhx509_la_LIBADD = \
92         $(LIB_com_err) \
93         $(LIB_hcrypto) \
94         $(top_builddir)/lib/asn1/libasn1.la \
95         $(top_builddir)/lib/wind/libwind.la \
96         $(LIBADD_roken) \
97         $(LIB_dlopen)
99 if FRAMEWORK_SECURITY
100 libhx509_la_LDFLAGS += -framework Security -framework CoreFoundation
101 endif
103 if versionscript
104 libhx509_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
105 endif
106 $(libhx509_la_OBJECTS): $(srcdir)/version-script.map
108 libhx509_la_CPPFLAGS = -I$(srcdir)/ref $(INCLUDE_hcrypto)
109 nodist_libhx509_la_SOURCES = $(BUILT_SOURCES)
111 $(gen_files_ocsp) ocsp_asn1.h: ocsp_asn1_files
112 $(gen_files_pkcs10) pkcs10_asn1.h: pkcs10_asn1_files
113 $(gen_files_crmf) crmf_asn1.h: crmf_asn1_files
115 ocsp_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/ocsp.asn1
116         $(ASN1_COMPILE) --preserve-binary=OCSPTBSRequest --preserve-binary=OCSPResponseData $(srcdir)/ocsp.asn1 ocsp_asn1 || (rm -f ocsp_asn1_files ; exit 1)
118 pkcs10_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/pkcs10.asn1
119         $(ASN1_COMPILE) --preserve-binary=CertificationRequestInfo $(srcdir)/pkcs10.asn1 pkcs10_asn1 || (rm -f pkcs10_asn1_files ; exit 1)
121 crmf_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/crmf.asn1
122         $(ASN1_COMPILE) $(srcdir)/crmf.asn1 crmf_asn1 || (rm -f crmf_asn1_files ; exit 1)
124 $(libhx509_la_OBJECTS): $(srcdir)/hx509-protos.h $(srcdir)/hx509-private.h $(srcdir)/hx_locl.h
125 $(libhx509_la_OBJECTS): ocsp_asn1.h pkcs10_asn1.h
127 $(srcdir)/hx509-protos.h:
128         cd $(srcdir) && perl ../../cf/make-proto.pl -R '^(_|^C)' -E HX509_LIB -q -P comment -o hx509-protos.h $(dist_libhx509_la_SOURCES) || rm -f hx509-protos.h
130 $(srcdir)/hx509-private.h:
131         cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p hx509-private.h $(dist_libhx509_la_SOURCES) || rm -f hx509-private.h
133 dist_include_HEADERS = hx509.h hx509-protos.h
134 nodist_include_HEADERS = hx509_err.h
136 bin_PROGRAMS = hxtool
138 hxtool-commands.c hxtool-commands.h: hxtool-commands.in $(SLC)
139         $(SLC) $(srcdir)/hxtool-commands.in
141 dist_hxtool_SOURCES = hxtool.c
142 nodist_hxtool_SOURCES = hxtool-commands.c hxtool-commands.h
144 $(hxtool_OBJECTS): hxtool-commands.h
146 hxtool_CPPFLAGS = $(INCLUDE_hcrypto)
147 hxtool_LDADD = \
148         libhx509.la \
149         $(top_builddir)/lib/asn1/libasn1.la \
150         $(LIB_hcrypto) \
151         $(LIB_roken) \
152         $(top_builddir)/lib/sl/libsl.la
154 CLEANFILES = $(BUILT_SOURCES) \
155         $(gen_files_ocsp) ocsp_asn1_files ocsp_asn1.h* \
156         $(gen_files_pkcs10) pkcs10_asn1_files pkcs10_asn1.h* \
157         $(gen_files_crmf) crmf_asn1_files crmf_asn1.h* \
158         $(TESTS) \
159         hxtool-commands.c hxtool-commands.h *.tmp \
160         request.out \
161         out.pem out2.pem \
162         sd sd.pem \
163         sd.data sd.data.out \
164         ev.data ev.data.out \
165         cert-null.pem cert-sub-ca2.pem \
166         cert-ee.pem cert-ca.pem \
167         cert-sub-ee.pem cert-sub-ca.pem \
168         cert-proxy.der cert-ca.der cert-ee.der pkcs10-request.der \
169         wca.pem wuser.pem wdc.pem wcrl.crl \
170         random-data statfile crl.crl \
171         test p11dbg.log pkcs11.cfg \
172         test-rc-file.rc
174 clean-local:
175         @echo "cleaning PKITS" ; rm -rf PKITS_data
178 # regression tests
181 check_SCRIPTS = $(SCRIPT_TESTS)
182 check_PROGRAMS = $(PROGRAM_TESTS) test_soft_pkcs11
184 LDADD = libhx509.la
186 test_soft_pkcs11_LDADD = libhx509.la
187 test_soft_pkcs11_CPPFLAGS = -I$(srcdir)/ref
189 TESTS = $(SCRIPT_TESTS) $(PROGRAM_TESTS)
191 PROGRAM_TESTS =                 \
192         test_name               \
193         test_expr
195 SCRIPT_TESTS =                  \
196         test_ca                 \
197         test_cert               \
198         test_chain              \
199         test_cms                \
200         test_crypto             \
201         test_nist               \
202         test_nist2              \
203         test_pkcs11             \
204         test_java_pkcs11        \
205         test_nist_cert          \
206         test_nist_pkcs12        \
207         test_req                \
208         test_windows            \
209         test_query
211 do_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \
212         -e 's,[@]objdir[@],$(top_builddir)/lib/hx509,g' \
213         -e 's,[@]egrep[@],$(EGREP),g'
215 test_ca: test_ca.in Makefile
216         $(do_subst) < $(srcdir)/test_ca.in > test_ca.tmp
217         chmod +x test_ca.tmp
218         mv test_ca.tmp test_ca
220 test_cert: test_cert.in Makefile
221         $(do_subst) < $(srcdir)/test_cert.in > test_cert.tmp
222         chmod +x test_cert.tmp
223         mv test_cert.tmp test_cert
225 test_chain: test_chain.in Makefile
226         $(do_subst) < $(srcdir)/test_chain.in > test_chain.tmp
227         chmod +x test_chain.tmp
228         mv test_chain.tmp test_chain
230 test_cms: test_cms.in Makefile
231         $(do_subst) < $(srcdir)/test_cms.in > test_cms.tmp
232         chmod +x test_cms.tmp
233         mv test_cms.tmp test_cms
235 test_crypto: test_crypto.in Makefile
236         $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
237         chmod +x test_crypto.tmp
238         mv test_crypto.tmp test_crypto
240 test_nist: test_nist.in Makefile
241         $(do_subst) < $(srcdir)/test_nist.in > test_nist.tmp
242         chmod +x test_nist.tmp
243         mv test_nist.tmp test_nist
245 test_nist2: test_nist2.in Makefile
246         $(do_subst) < $(srcdir)/test_nist2.in > test_nist2.tmp
247         chmod +x test_nist2.tmp
248         mv test_nist2.tmp test_nist2
250 test_pkcs11: test_pkcs11.in Makefile
251         $(do_subst) < $(srcdir)/test_pkcs11.in > test_pkcs11.tmp
252         chmod +x test_pkcs11.tmp
253         mv test_pkcs11.tmp test_pkcs11
255 test_java_pkcs11: test_java_pkcs11.in Makefile
256         $(do_subst) < $(srcdir)/test_java_pkcs11.in > test_java_pkcs11.tmp
257         chmod +x test_java_pkcs11.tmp
258         mv test_java_pkcs11.tmp test_java_pkcs11
260 test_nist_cert: test_nist_cert.in Makefile
261         $(do_subst) < $(srcdir)/test_nist_cert.in > test_nist_cert.tmp
262         chmod +x test_nist_cert.tmp
263         mv test_nist_cert.tmp test_nist_cert
265 test_nist_pkcs12: test_nist_pkcs12.in Makefile
266         $(do_subst) < $(srcdir)/test_nist_pkcs12.in > test_nist_pkcs12.tmp
267         chmod +x test_nist_pkcs12.tmp
268         mv test_nist_pkcs12.tmp test_nist_pkcs12
270 test_req: test_req.in Makefile
271         $(do_subst) < $(srcdir)/test_req.in > test_req.tmp
272         chmod +x test_req.tmp
273         mv test_req.tmp test_req
275 test_windows: test_windows.in Makefile
276         $(do_subst) < $(srcdir)/test_windows.in > test_windows.tmp
277         chmod +x test_windows.tmp
278         mv test_windows.tmp test_windows
280 test_query: test_query.in Makefile
281         $(do_subst) < $(srcdir)/test_query.in > test_query.tmp
282         chmod +x test_query.tmp
283         mv test_query.tmp test_query
285 EXTRA_DIST = \
286         version-script.map \
287         crmf.asn1 \
288         hx509_err.et \
289         hxtool-commands.in \
290         ocsp.asn1 \
291         pkcs10.asn1 \
292         test_ca.in \
293         test_chain.in \
294         test_cert.in \
295         test_cms.in \
296         test_crypto.in \
297         test_nist.in \
298         test_nist2.in \
299         test_nist_cert.in \
300         test_nist_pkcs12.in \
301         test_pkcs11.in \
302         test_java_pkcs11.in \
303         test_query.in \
304         test_req.in \
305         test_windows.in \
306         tst-crypto-available1 \
307         tst-crypto-available2 \
308         tst-crypto-available3 \
309         tst-crypto-select \
310         tst-crypto-select1 \
311         tst-crypto-select2 \
312         tst-crypto-select3 \
313         tst-crypto-select4 \
314         tst-crypto-select5 \
315         tst-crypto-select6 \
316         tst-crypto-select7 \
317         data/n0ll.pem \
318         data/secp160r1TestCA.cert.pem \
319         data/secp160r1TestCA.key.pem \
320         data/secp160r1TestCA.pem \
321         data/secp160r2TestClient.cert.pem \
322         data/secp160r2TestClient.key.pem \
323         data/secp160r2TestClient.pem \
324         data/secp160r2TestServer.cert.pem \
325         data/secp160r2TestServer.key.pem \
326         data/secp160r2TestServer.pem \
327         data/bleichenbacher-bad.pem \
328         data/bleichenbacher-good.pem \
329         data/bleichenbacher-sf-pad-correct.pem \
330         data/ca.crt \
331         data/ca.key \
332         data/crl1.crl \
333         data/crl1.der \
334         data/gen-req.sh \
335         data/j.pem \
336         data/kdc.crt \
337         data/kdc.key \
338         data/key.der \
339         data/key2.der \
340         data/nist-data \
341         data/nist-data2 \
342         data/no-proxy-test.crt \
343         data/no-proxy-test.key \
344         data/ocsp-req1.der \
345         data/ocsp-req2.der \
346         data/ocsp-resp1-2.der \
347         data/ocsp-resp1-3.der \
348         data/ocsp-resp1-ca.der \
349         data/ocsp-resp1-keyhash.der \
350         data/ocsp-resp1-ocsp-no-cert.der \
351         data/ocsp-resp1-ocsp.der \
352         data/ocsp-resp1.der \
353         data/ocsp-resp2.der \
354         data/ocsp-responder.crt \
355         data/ocsp-responder.key \
356         data/openssl.cnf \
357         data/pkinit-proxy-chain.crt \
358         data/pkinit-proxy.crt \
359         data/pkinit-proxy.key \
360         data/pkinit-pw.key \
361         data/pkinit.crt \
362         data/pkinit.key \
363         data/pkinit-ec.crt \
364         data/pkinit-ec.key \
365         data/proxy-level-test.crt \
366         data/proxy-level-test.key \
367         data/proxy-test.crt \
368         data/proxy-test.key \
369         data/proxy10-child-test.crt \
370         data/proxy10-child-test.key \
371         data/proxy10-child-child-test.crt \
372         data/proxy10-child-child-test.key \
373         data/proxy10-test.crt \
374         data/proxy10-test.key \
375         data/revoke.crt \
376         data/revoke.key \
377         data/sf-class2-root.pem \
378         data/static-file \
379         data/sub-ca.crt \
380         data/sub-ca.key \
381         data/sub-cert.crt \
382         data/sub-cert.key \
383         data/sub-cert.p12 \
384         data/test-ds-only.crt \
385         data/test-ds-only.key \
386         data/test-enveloped-aes-128 \
387         data/test-enveloped-aes-256 \
388         data/test-enveloped-des \
389         data/test-enveloped-des-ede3 \
390         data/test-enveloped-rc2-128 \
391         data/test-enveloped-rc2-40 \
392         data/test-enveloped-rc2-64 \
393         data/test-ke-only.crt \
394         data/test-ke-only.key \
395         data/test-nopw.p12 \
396         data/test-pw.key \
397         data/test-signed-data \
398         data/test-signed-data-noattr \
399         data/test-signed-data-noattr-nocerts \
400         data/test-signed-sha-1 \
401         data/test-signed-sha-256 \
402         data/test-signed-sha-512 \
403         data/test.combined.crt \
404         data/test.crt \
405         data/test.key \
406         data/test.p12 \
407         data/yutaka-pad-broken-ca.pem \
408         data/yutaka-pad-broken-cert.pem \
409         data/yutaka-pad-ok-ca.pem \
410         data/yutaka-pad-ok-cert.pem \
411         data/yutaka-pad.key