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