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