bump version
[heimdal.git] / lib / hx509 / Makefile.am
blob6246b85a8338cbf164e63a41f407256d256862b0
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 lib_LTLIBRARIES = libhx509.la
6 libhx509_la_LDFLAGS = -version-info 4: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
130 $(srcdir)/hx509-protos.h:
131         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
133 $(srcdir)/hx509-private.h:
134         cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p hx509-private.h $(dist_libhx509_la_SOURCES) || rm -f hx509-private.h
136 dist_include_HEADERS = hx509.h hx509-protos.h
137 nodist_include_HEADERS = hx509_err.h
139 SLC = $(top_builddir)/lib/sl/slc
141 bin_PROGRAMS = hxtool
143 hxtool-commands.c hxtool-commands.h: hxtool-commands.in $(SLC)
144         $(SLC) $(srcdir)/hxtool-commands.in
146 dist_hxtool_SOURCES = hxtool.c
147 nodist_hxtool_SOURCES = hxtool-commands.c hxtool-commands.h
149 $(hxtool_OBJECTS): hxtool-commands.h
151 hxtool_CPPFLAGS = $(INCLUDE_hcrypto)
152 hxtool_LDADD = \
153         libhx509.la \
154         $(top_builddir)/lib/asn1/libasn1.la \
155         $(LIB_hcrypto) \
156         $(LIB_roken) \
157         $(top_builddir)/lib/sl/libsl.la
159 CLEANFILES = $(BUILT_SOURCES) \
160         $(gen_files_ocsp) ocsp_asn1_files ocsp_asn1.h \
161         $(gen_files_pkcs10) pkcs10_asn1_files pkcs10_asn1.h \
162         $(gen_files_crmf) crmf_asn1_files crmf_asn1.h \
163         $(TESTS) \
164         hxtool-commands.c hxtool-commands.h *.tmp \
165         request.out \
166         out.pem out2.pem \
167         sd.data sd.data.out \
168         ev.data ev.data.out \
169         cert-null.pem cert-sub-ca2.pem \
170         cert-ee.pem cert-ca.pem \
171         cert-sub-ee.pem cert-sub-ca.pem \
172         cert-proxy.der cert-ca.der cert-ee.der pkcs10-request.der \
173         wca.pem wuser.pem wdc.pem wcrl.crl \
174         random-data statfile crl.crl \
175         test p11dbg.log pkcs11.cfg \
176         test-rc-file.rc
178 clean-local:
179         @echo "cleaning PKITS" ; rm -rf PKITS_data
182 # regression tests
185 check_SCRIPTS = $(SCRIPT_TESTS)
186 check_PROGRAMS = $(PROGRAM_TESTS) test_soft_pkcs11
188 LDADD = libhx509.la
190 test_soft_pkcs11_LDADD = libhx509.la
191 test_soft_pkcs11_CPPFLAGS = -I$(srcdir)/ref
193 TESTS = $(SCRIPT_TESTS) $(PROGRAM_TESTS)
195 PROGRAM_TESTS =                 \
196         test_name               \
197         test_expr
199 SCRIPT_TESTS =                  \
200         test_ca                 \
201         test_cert               \
202         test_chain              \
203         test_cms                \
204         test_crypto             \
205         test_nist               \
206         test_nist2              \
207         test_pkcs11             \
208         test_java_pkcs11        \
209         test_nist_cert          \
210         test_nist_pkcs12        \
211         test_req                \
212         test_windows            \
213         test_query
215 do_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \
216         -e 's,[@]objdir[@],$(top_builddir)/lib/hx509,g'
218 test_ca: test_ca.in Makefile
219         $(do_subst) < $(srcdir)/test_ca.in > test_ca.tmp
220         chmod +x test_ca.tmp
221         mv test_ca.tmp test_ca
223 test_cert: test_cert.in Makefile
224         $(do_subst) < $(srcdir)/test_cert.in > test_cert.tmp
225         chmod +x test_cert.tmp
226         mv test_cert.tmp test_cert
228 test_chain: test_chain.in Makefile
229         $(do_subst) < $(srcdir)/test_chain.in > test_chain.tmp
230         chmod +x test_chain.tmp
231         mv test_chain.tmp test_chain
233 test_cms: test_cms.in Makefile
234         $(do_subst) < $(srcdir)/test_cms.in > test_cms.tmp
235         chmod +x test_cms.tmp
236         mv test_cms.tmp test_cms
238 test_crypto: test_crypto.in Makefile
239         $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
240         chmod +x test_crypto.tmp
241         mv test_crypto.tmp test_crypto
243 test_nist: test_nist.in Makefile
244         $(do_subst) < $(srcdir)/test_nist.in > test_nist.tmp
245         chmod +x test_nist.tmp
246         mv test_nist.tmp test_nist
248 test_nist2: test_nist2.in Makefile
249         $(do_subst) < $(srcdir)/test_nist2.in > test_nist2.tmp
250         chmod +x test_nist2.tmp
251         mv test_nist2.tmp test_nist2
253 test_pkcs11: test_pkcs11.in Makefile
254         $(do_subst) < $(srcdir)/test_pkcs11.in > test_pkcs11.tmp
255         chmod +x test_pkcs11.tmp
256         mv test_pkcs11.tmp test_pkcs11
258 test_java_pkcs11: test_java_pkcs11.in Makefile
259         $(do_subst) < $(srcdir)/test_java_pkcs11.in > test_java_pkcs11.tmp
260         chmod +x test_java_pkcs11.tmp
261         mv test_java_pkcs11.tmp test_java_pkcs11
263 test_nist_cert: test_nist_cert.in Makefile
264         $(do_subst) < $(srcdir)/test_nist_cert.in > test_nist_cert.tmp
265         chmod +x test_nist_cert.tmp
266         mv test_nist_cert.tmp test_nist_cert
268 test_nist_pkcs12: test_nist_pkcs12.in Makefile
269         $(do_subst) < $(srcdir)/test_nist_pkcs12.in > test_nist_pkcs12.tmp
270         chmod +x test_nist_pkcs12.tmp
271         mv test_nist_pkcs12.tmp test_nist_pkcs12
273 test_req: test_req.in Makefile
274         $(do_subst) < $(srcdir)/test_req.in > test_req.tmp
275         chmod +x test_req.tmp
276         mv test_req.tmp test_req
278 test_windows: test_windows.in Makefile
279         $(do_subst) < $(srcdir)/test_windows.in > test_windows.tmp
280         chmod +x test_windows.tmp
281         mv test_windows.tmp test_windows
283 test_query: test_query.in Makefile
284         $(do_subst) < $(srcdir)/test_query.in > test_query.tmp
285         chmod +x test_query.tmp
286         mv test_query.tmp test_query
288 EXTRA_DIST = \
289         version-script.map \
290         crmf.asn1 \
291         data/bleichenbacher-bad.pem \
292         hx509_err.et \
293         hxtool-commands.in \
294         ocsp.asn1 \
295         pkcs10.asn1 \
296         test_ca.in \
297         test_chain.in \
298         test_cert.in \
299         test_cms.in \
300         test_crypto.in \
301         test_nist.in \
302         test_nist2.in \
303         test_nist_cert.in \
304         test_nist_pkcs12.in \
305         test_pkcs11.in \
306         test_java_pkcs11.in \
307         test_query.in \
308         test_req.in \
309         test_windows.in \
310         tst-crypto-available1 \
311         tst-crypto-available2 \
312         tst-crypto-available3 \
313         tst-crypto-select \
314         tst-crypto-select1 \
315         tst-crypto-select2 \
316         tst-crypto-select3 \
317         tst-crypto-select4 \
318         tst-crypto-select5 \
319         tst-crypto-select6 \
320         tst-crypto-select7 \
321         data/bleichenbacher-good.pem \
322         data/bleichenbacher-sf-pad-correct.pem \
323         data/ca.crt \
324         data/ca.key \
325         data/crl1.crl \
326         data/crl1.der \
327         data/gen-req.sh \
328         data/j.pem \
329         data/kdc.crt \
330         data/kdc.key \
331         data/key.der \
332         data/key2.der \
333         data/nist-data \
334         data/nist-data2 \
335         data/no-proxy-test.crt \
336         data/no-proxy-test.key \
337         data/ocsp-req1.der \
338         data/ocsp-req2.der \
339         data/ocsp-resp1-2.der \
340         data/ocsp-resp1-3.der \
341         data/ocsp-resp1-ca.der \
342         data/ocsp-resp1-keyhash.der \
343         data/ocsp-resp1-ocsp-no-cert.der \
344         data/ocsp-resp1-ocsp.der \
345         data/ocsp-resp1.der \
346         data/ocsp-resp2.der \
347         data/ocsp-responder.crt \
348         data/ocsp-responder.key \
349         data/openssl.cnf \
350         data/pkinit-proxy-chain.crt \
351         data/pkinit-proxy.crt \
352         data/pkinit-proxy.key \
353         data/pkinit-pw.key \
354         data/pkinit.crt \
355         data/pkinit.key \
356         data/proxy-level-test.crt \
357         data/proxy-level-test.key \
358         data/proxy-test.crt \
359         data/proxy-test.key \
360         data/proxy10-child-test.crt \
361         data/proxy10-child-test.key \
362         data/proxy10-child-child-test.crt \
363         data/proxy10-child-child-test.key \
364         data/proxy10-test.crt \
365         data/proxy10-test.key \
366         data/revoke.crt \
367         data/revoke.key \
368         data/sf-class2-root.pem \
369         data/static-file \
370         data/sub-ca.crt \
371         data/sub-ca.key \
372         data/sub-cert.crt \
373         data/sub-cert.key \
374         data/sub-cert.p12 \
375         data/test-ds-only.crt \
376         data/test-ds-only.key \
377         data/test-enveloped-aes-128 \
378         data/test-enveloped-aes-256 \
379         data/test-enveloped-des \
380         data/test-enveloped-des-ede3 \
381         data/test-enveloped-rc2-128 \
382         data/test-enveloped-rc2-40 \
383         data/test-enveloped-rc2-64 \
384         data/test-ke-only.crt \
385         data/test-ke-only.key \
386         data/test-nopw.p12 \
387         data/test-pw.key \
388         data/test-signed-data \
389         data/test-signed-data-noattr \
390         data/test-signed-data-noattr-nocerts \
391         data/test.combined.crt \
392         data/test.crt \
393         data/test.key \
394         data/test.p12 \
395         data/yutaka-pad-broken-ca.pem \
396         data/yutaka-pad-broken-cert.pem \
397         data/yutaka-pad-ok-ca.pem \
398         data/yutaka-pad-ok-cert.pem \
399         data/yutaka-pad.key