No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / dist / heimdal / lib / hx509 / Makefile.am
blob1e2133540b70576d39d7c193b7d87672d5cfcba3
1 # $Heimdal: Makefile.am 22459 2008-01-15 21:46:20Z lha $
2 # $NetBSD$
4 include $(top_srcdir)/Makefile.am.common
6 lib_LTLIBRARIES = libhx509.la
7 libhx509_la_LDFLAGS = -version-info 3:0:0
9 BUILT_SOURCES =                         \
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 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         keyset.c \
69         ks_dir.c \
70         ks_file.c \
71         ks_mem.c \
72         ks_null.c \
73         ks_p11.c \
74         ks_p12.c \
75         ks_keychain.c \
76         lock.c \
77         name.c \
78         peer.c \
79         print.c \
80         softp11.c \
81         ref/pkcs11.h \
82         req.c \
83         revoke.c
85 libhx509_la_LIBADD = \
86         $(LIB_com_err) \
87         $(LIB_hcrypto) \
88         $(top_builddir)/lib/asn1/libasn1.la \
89         $(LIBADD_roken) \
90         $(LIB_dlopen)
92 if FRAMEWORK_SECURITY
93 libhx509_la_LDFLAGS += -framework Security -framework CoreFoundation
94 endif
96 if versionscript
97 libhx509_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
98 endif
99 $(libhx509_la_OBJECTS): $(srcdir)/version-script.map
101 libhx509_la_CPPFLAGS = -I$(srcdir)/ref $(INCLUDE_hcrypto)
102 nodist_libhx509_la_SOURCES = $(BUILT_SOURCES)
104 $(gen_files_ocsp) ocsp_asn1.h: ocsp_asn1_files
105 $(gen_files_pkcs10) pkcs10_asn1.h: pkcs10_asn1_files
106 $(gen_files_crmf) crmf_asn1.h: crmf_asn1_files
108 asn1_compile = ../asn1/asn1_compile$(EXEEXT)
110 ocsp_asn1_files: $(asn1_compile) $(srcdir)/ocsp.asn1
111         $(asn1_compile) --preserve-binary=OCSPTBSRequest --preserve-binary=OCSPResponseData $(srcdir)/ocsp.asn1 ocsp_asn1 || (rm -f ocsp_asn1_files ; exit 1)
113 pkcs10_asn1_files: $(asn1_compile) $(srcdir)/pkcs10.asn1
114         $(asn1_compile) --preserve-binary=CertificationRequestInfo $(srcdir)/pkcs10.asn1 pkcs10_asn1 || (rm -f pkcs10_asn1_files ; exit 1)
116 crmf_asn1_files: $(asn1_compile) $(srcdir)/crmf.asn1
117         $(asn1_compile) $(srcdir)/crmf.asn1 crmf_asn1 || (rm -f crmf_asn1_files ; exit 1)
119 $(libhx509_la_OBJECTS): $(srcdir)/hx509-protos.h $(srcdir)/hx509-private.h
121 $(srcdir)/hx509-protos.h:
122         cd $(srcdir) && perl ../../cf/make-proto.pl -R '^(_|^C)' -E HX509_LIB_FUNCTION -q -P comment -o hx509-protos.h $(dist_libhx509_la_SOURCES) || rm -f hx509-protos.h
124 $(srcdir)/hx509-private.h:
125         cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p hx509-private.h $(dist_libhx509_la_SOURCES) || rm -f hx509-private.h
127 dist_include_HEADERS = hx509.h hx509-protos.h
128 nodist_include_HEADERS = hx509_err.h
130 SLC = $(top_builddir)/lib/sl/slc
132 bin_PROGRAMS = hxtool
134 hxtool-commands.c hxtool-commands.h: hxtool-commands.in $(SLC)
135         $(SLC) $(srcdir)/hxtool-commands.in
137 dist_hxtool_SOURCES = hxtool.c
138 nodist_hxtool_SOURCES = hxtool-commands.c hxtool-commands.h
140 $(hxtool_OBJECTS): hxtool-commands.h
142 hxtool_CPPFLAGS = $(INCLUDE_hcrypto)
143 hxtool_LDADD = \
144         libhx509.la \
145         $(top_builddir)/lib/asn1/libasn1.la \
146         $(LIB_hcrypto) \
147         $(LIB_roken) \
148         $(top_builddir)/lib/sl/libsl.la
150 CLEANFILES = $(BUILT_SOURCES) \
151         $(gen_files_ocsp) ocsp_asn1_files ocsp_asn1.h \
152         $(gen_files_pkcs10) pkcs10_asn1_files pkcs10_asn1.h \
153         $(gen_files_crmf) crmf_asn1_files crmf_asn1.h \
154         $(TESTS) \
155         hxtool-commands.c hxtool-commands.h *.tmp \
156         request.out \
157         out.pem out2.pem \
158         sd.data sd.data.out \
159         ev.data ev.data.out \
160         cert-null.pem cert-sub-ca2.pem \
161         cert-ee.pem cert-ca.pem \
162         cert-sub-ee.pem cert-sub-ca.pem \
163         cert-proxy.der cert-ca.der cert-ee.der pkcs10-request.der \
164         wca.pem wuser.pem wdc.pem wcrl.crl \
165         random-data statfile crl.crl \
166         test p11dbg.log pkcs11.cfg \
167         test-rc-file.rc
169 clean-local:
170         @echo "cleaning PKITS" ; rm -rf PKITS_data
173 # regression tests
176 check_SCRIPTS = $(SCRIPT_TESTS)
177 check_PROGRAMS = $(PROGRAM_TESTS) test_soft_pkcs11
179 LDADD = libhx509.la
181 test_soft_pkcs11_LDADD = libhx509.la
182 test_soft_pkcs11_CPPFLAGS = -I$(srcdir)/ref
184 TESTS = $(SCRIPT_TESTS) $(PROGRAM_TESTS)
186 PROGRAM_TESTS =                 \
187         test_name
189 SCRIPT_TESTS =                  \
190         test_ca                 \
191         test_cert               \
192         test_chain              \
193         test_cms                \
194         test_crypto             \
195         test_nist               \
196         test_nist2              \
197         test_pkcs11             \
198         test_java_pkcs11        \
199         test_nist_cert          \
200         test_nist_pkcs12        \
201         test_req                \
202         test_windows            \
203         test_query
205 do_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \
206         -e 's,[@]objdir[@],$(top_builddir)/lib/hx509,g'
208 test_ca: test_ca.in Makefile
209         $(do_subst) < $(srcdir)/test_ca.in > test_ca.tmp
210         chmod +x test_ca.tmp
211         mv test_ca.tmp test_ca
213 test_cert: test_cert.in Makefile
214         $(do_subst) < $(srcdir)/test_cert.in > test_cert.tmp
215         chmod +x test_cert.tmp
216         mv test_cert.tmp test_cert
218 test_chain: test_chain.in Makefile
219         $(do_subst) < $(srcdir)/test_chain.in > test_chain.tmp
220         chmod +x test_chain.tmp
221         mv test_chain.tmp test_chain
223 test_cms: test_cms.in Makefile
224         $(do_subst) < $(srcdir)/test_cms.in > test_cms.tmp
225         chmod +x test_cms.tmp
226         mv test_cms.tmp test_cms
228 test_crypto: test_crypto.in Makefile
229         $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
230         chmod +x test_crypto.tmp
231         mv test_crypto.tmp test_crypto
233 test_nist: test_nist.in Makefile
234         $(do_subst) < $(srcdir)/test_nist.in > test_nist.tmp
235         chmod +x test_nist.tmp
236         mv test_nist.tmp test_nist
238 test_nist2: test_nist2.in Makefile
239         $(do_subst) < $(srcdir)/test_nist2.in > test_nist2.tmp
240         chmod +x test_nist2.tmp
241         mv test_nist2.tmp test_nist2
243 test_pkcs11: test_pkcs11.in Makefile
244         $(do_subst) < $(srcdir)/test_pkcs11.in > test_pkcs11.tmp
245         chmod +x test_pkcs11.tmp
246         mv test_pkcs11.tmp test_pkcs11
248 test_java_pkcs11: test_java_pkcs11.in Makefile
249         $(do_subst) < $(srcdir)/test_java_pkcs11.in > test_java_pkcs11.tmp
250         chmod +x test_java_pkcs11.tmp
251         mv test_java_pkcs11.tmp test_java_pkcs11
253 test_nist_cert: test_nist_cert.in Makefile
254         $(do_subst) < $(srcdir)/test_nist_cert.in > test_nist_cert.tmp
255         chmod +x test_nist_cert.tmp
256         mv test_nist_cert.tmp test_nist_cert
258 test_nist_pkcs12: test_nist_pkcs12.in Makefile
259         $(do_subst) < $(srcdir)/test_nist_pkcs12.in > test_nist_pkcs12.tmp
260         chmod +x test_nist_pkcs12.tmp
261         mv test_nist_pkcs12.tmp test_nist_pkcs12
263 test_req: test_req.in Makefile
264         $(do_subst) < $(srcdir)/test_req.in > test_req.tmp
265         chmod +x test_req.tmp
266         mv test_req.tmp test_req
268 test_windows: test_windows.in Makefile
269         $(do_subst) < $(srcdir)/test_windows.in > test_windows.tmp
270         chmod +x test_windows.tmp
271         mv test_windows.tmp test_windows
273 test_query: test_query.in Makefile
274         $(do_subst) < $(srcdir)/test_query.in > test_query.tmp
275         chmod +x test_query.tmp
276         mv test_query.tmp test_query
278 EXTRA_DIST = \
279         version-script.map \
280         crmf.asn1 \
281         data/bleichenbacher-bad.pem \
282         hx509_err.et \
283         hxtool-commands.in \
284         ocsp.asn1 \
285         pkcs10.asn1 \
286         test_ca.in \
287         test_chain.in \
288         test_cert.in \
289         test_cms.in \
290         test_crypto.in \
291         test_nist.in \
292         test_nist2.in \
293         test_nist_cert.in \
294         test_nist_pkcs12.in \
295         test_pkcs11.in \
296         test_java_pkcs11.in \
297         test_query.in \
298         test_req.in \
299         test_windows.in \
300         tst-crypto-available1 \
301         tst-crypto-available2 \
302         tst-crypto-available3 \
303         tst-crypto-select \
304         tst-crypto-select1 \
305         tst-crypto-select2 \
306         tst-crypto-select3 \
307         tst-crypto-select4 \
308         tst-crypto-select5 \
309         tst-crypto-select6 \
310         tst-crypto-select7 \
311         data/bleichenbacher-good.pem \
312         data/bleichenbacher-sf-pad-correct.pem \
313         data/ca.crt \
314         data/ca.key \
315         data/crl1.crl \
316         data/crl1.der \
317         data/gen-req.sh \
318         data/j.pem \
319         data/kdc.crt \
320         data/kdc.key \
321         data/key.der \
322         data/key2.der \
323         data/nist-data \
324         data/nist-data2 \
325         data/no-proxy-test.crt \
326         data/no-proxy-test.key \
327         data/ocsp-req1.der \
328         data/ocsp-req2.der \
329         data/ocsp-resp1-2.der \
330         data/ocsp-resp1-3.der \
331         data/ocsp-resp1-ca.der \
332         data/ocsp-resp1-keyhash.der \
333         data/ocsp-resp1-ocsp-no-cert.der \
334         data/ocsp-resp1-ocsp.der \
335         data/ocsp-resp1.der \
336         data/ocsp-resp2.der \
337         data/ocsp-responder.crt \
338         data/ocsp-responder.key \
339         data/openssl.cnf \
340         data/pkinit-proxy-chain.crt \
341         data/pkinit-proxy.crt \
342         data/pkinit-proxy.key \
343         data/pkinit-pw.key \
344         data/pkinit.crt \
345         data/pkinit.key \
346         data/proxy-level-test.crt \
347         data/proxy-level-test.key \
348         data/proxy-test.crt \
349         data/proxy-test.key \
350         data/proxy10-child-test.crt \
351         data/proxy10-child-test.key \
352         data/proxy10-child-child-test.crt \
353         data/proxy10-child-child-test.key \
354         data/proxy10-test.crt \
355         data/proxy10-test.key \
356         data/revoke.crt \
357         data/revoke.key \
358         data/sf-class2-root.pem \
359         data/static-file \
360         data/sub-ca.crt \
361         data/sub-ca.key \
362         data/sub-cert.crt \
363         data/sub-cert.key \
364         data/sub-cert.p12 \
365         data/test-ds-only.crt \
366         data/test-ds-only.key \
367         data/test-enveloped-aes-128 \
368         data/test-enveloped-aes-256 \
369         data/test-enveloped-des \
370         data/test-enveloped-des-ede3 \
371         data/test-enveloped-rc2-128 \
372         data/test-enveloped-rc2-40 \
373         data/test-enveloped-rc2-64 \
374         data/test-ke-only.crt \
375         data/test-ke-only.key \
376         data/test-nopw.p12 \
377         data/test-pw.key \
378         data/test-signed-data \
379         data/test-signed-data-noattr \
380         data/test-signed-data-noattr-nocerts \
381         data/test.combined.crt \
382         data/test.crt \
383         data/test.key \
384         data/test.p12 \
385         data/yutaka-pad-broken-ca.pem \
386         data/yutaka-pad-broken-cert.pem \
387         data/yutaka-pad-ok-ca.pem \
388         data/yutaka-pad-ok-cert.pem \
389         data/yutaka-pad.key