Bump version.
[heimdal.git] / lib / hx509 / Makefile.am
bloba65fefc5c926a56a4e19864a55aa102d53c2bd0e
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 lib_LTLIBRARIES = libhx509.la
6 libhx509_la_LDFLAGS = -version-info 3:0:0
8 BUILT_SOURCES =                         \
9         $(gen_files_ocsp:.x=.c)         \
10         $(gen_files_pkcs10:.x=.c)       \
11         hx509_err.c                     \
12         hx509_err.h
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
34 gen_files_pkcs10 =                      \
35         asn1_CertificationRequestInfo.x \
36         asn1_CertificationRequest.x
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        
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
84 libhx509_la_LIBADD = \
85         $(LIB_com_err) \
86         $(LIB_hcrypto) \
87         $(top_builddir)/lib/asn1/libasn1.la \
88         $(LIBADD_roken) \
89         $(LIB_dlopen)
91 if FRAMEWORK_SECURITY
92 libhx509_la_LDFLAGS += -framework Security -framework CoreFoundation
93 endif
95 if versionscript
96 libhx509_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
97 endif
98 $(libhx509_la_OBJECTS): $(srcdir)/version-script.map
100 libhx509_la_CPPFLAGS = -I$(srcdir)/ref $(INCLUDE_hcrypto)
101 nodist_libhx509_la_SOURCES = $(BUILT_SOURCES)
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
107 asn1_compile = ../asn1/asn1_compile$(EXEEXT)
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)
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)
115 crmf_asn1_files: $(asn1_compile) $(srcdir)/crmf.asn1
116         $(asn1_compile) $(srcdir)/crmf.asn1 crmf_asn1 || (rm -f crmf_asn1_files ; exit 1)
118 $(libhx509_la_OBJECTS): $(srcdir)/hx509-protos.h $(srcdir)/hx509-private.h
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
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
126 dist_include_HEADERS = hx509.h hx509-protos.h
127 nodist_include_HEADERS = hx509_err.h
129 SLC = $(top_builddir)/lib/sl/slc
131 bin_PROGRAMS = hxtool
133 hxtool-commands.c hxtool-commands.h: hxtool-commands.in $(SLC)
134         $(SLC) $(srcdir)/hxtool-commands.in
136 dist_hxtool_SOURCES = hxtool.c
137 nodist_hxtool_SOURCES = hxtool-commands.c hxtool-commands.h
139 $(hxtool_OBJECTS): hxtool-commands.h
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
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 \
166         test-rc-file.rc
168 clean-local:
169         @echo "cleaning PKITS" ; rm -rf PKITS_data
172 # regression tests
175 check_SCRIPTS = $(SCRIPT_TESTS)
176 check_PROGRAMS = $(PROGRAM_TESTS) test_soft_pkcs11
178 LDADD = libhx509.la
180 test_soft_pkcs11_LDADD = libhx509.la
181 test_soft_pkcs11_CPPFLAGS = -I$(srcdir)/ref
183 TESTS = $(SCRIPT_TESTS) $(PROGRAM_TESTS)
185 PROGRAM_TESTS =                 \
186         test_name
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_nist_cert          \
198         test_nist_pkcs12        \
199         test_req                \
200         test_windows            \
201         test_query
203 do_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \
204         -e 's,[@]objdir[@],$(top_builddir)/lib/hx509,g'
206 test_ca: test_ca.in Makefile
207         $(do_subst) < $(srcdir)/test_ca.in > test_ca.tmp
208         chmod +x test_ca.tmp
209         mv test_ca.tmp test_ca
211 test_cert: test_cert.in Makefile
212         $(do_subst) < $(srcdir)/test_cert.in > test_cert.tmp
213         chmod +x test_cert.tmp
214         mv test_cert.tmp test_cert
216 test_chain: test_chain.in Makefile
217         $(do_subst) < $(srcdir)/test_chain.in > test_chain.tmp
218         chmod +x test_chain.tmp
219         mv test_chain.tmp test_chain
221 test_cms: test_cms.in Makefile
222         $(do_subst) < $(srcdir)/test_cms.in > test_cms.tmp
223         chmod +x test_cms.tmp
224         mv test_cms.tmp test_cms
226 test_crypto: test_crypto.in Makefile
227         $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
228         chmod +x test_crypto.tmp
229         mv test_crypto.tmp test_crypto
231 test_nist: test_nist.in Makefile
232         $(do_subst) < $(srcdir)/test_nist.in > test_nist.tmp
233         chmod +x test_nist.tmp
234         mv test_nist.tmp test_nist
236 test_nist2: test_nist2.in Makefile
237         $(do_subst) < $(srcdir)/test_nist2.in > test_nist2.tmp
238         chmod +x test_nist2.tmp
239         mv test_nist2.tmp test_nist2
241 test_pkcs11: test_pkcs11.in Makefile
242         $(do_subst) < $(srcdir)/test_pkcs11.in > test_pkcs11.tmp
243         chmod +x test_pkcs11.tmp
244         mv test_pkcs11.tmp test_pkcs11
246 test_nist_cert: test_nist_cert.in Makefile
247         $(do_subst) < $(srcdir)/test_nist_cert.in > test_nist_cert.tmp
248         chmod +x test_nist_cert.tmp
249         mv test_nist_cert.tmp test_nist_cert
251 test_nist_pkcs12: test_nist_pkcs12.in Makefile
252         $(do_subst) < $(srcdir)/test_nist_pkcs12.in > test_nist_pkcs12.tmp
253         chmod +x test_nist_pkcs12.tmp
254         mv test_nist_pkcs12.tmp test_nist_pkcs12
256 test_req: test_req.in Makefile
257         $(do_subst) < $(srcdir)/test_req.in > test_req.tmp
258         chmod +x test_req.tmp
259         mv test_req.tmp test_req
261 test_windows: test_windows.in Makefile
262         $(do_subst) < $(srcdir)/test_windows.in > test_windows.tmp
263         chmod +x test_windows.tmp
264         mv test_windows.tmp test_windows
266 test_query: test_query.in Makefile
267         $(do_subst) < $(srcdir)/test_query.in > test_query.tmp
268         chmod +x test_query.tmp
269         mv test_query.tmp test_query
271 EXTRA_DIST = \
272         version-script.map \
273         crmf.asn1 \
274         data/bleichenbacher-bad.pem \
275         hx509_err.et \
276         hxtool-commands.in \
277         ocsp.asn1 \
278         pkcs10.asn1 \
279         test_ca.in \
280         test_chain.in \
281         test_cert.in \
282         test_cms.in \
283         test_crypto.in \
284         test_nist.in \
285         test_nist2.in \
286         test_nist_cert.in \
287         test_nist_pkcs12.in \
288         test_pkcs11.in \
289         test_query.in \
290         test_req.in \
291         test_windows.in \
292         tst-crypto-available1 \
293         tst-crypto-available2 \
294         tst-crypto-available3 \
295         tst-crypto-select \
296         tst-crypto-select1 \
297         tst-crypto-select2 \
298         tst-crypto-select3 \
299         tst-crypto-select4 \
300         tst-crypto-select5 \
301         tst-crypto-select6 \
302         tst-crypto-select7 \
303         data/bleichenbacher-good.pem \
304         data/bleichenbacher-sf-pad-correct.pem \
305         data/ca.crt \
306         data/ca.key \
307         data/crl1.crl \
308         data/crl1.der \
309         data/gen-req.sh \
310         data/j.pem \
311         data/kdc.crt \
312         data/kdc.key \
313         data/key.der \
314         data/key2.der \
315         data/nist-data \
316         data/nist-data2 \
317         data/no-proxy-test.crt \
318         data/no-proxy-test.key \
319         data/ocsp-req1.der \
320         data/ocsp-req2.der \
321         data/ocsp-resp1-2.der \
322         data/ocsp-resp1-3.der \
323         data/ocsp-resp1-ca.der \
324         data/ocsp-resp1-keyhash.der \
325         data/ocsp-resp1-ocsp-no-cert.der \
326         data/ocsp-resp1-ocsp.der \
327         data/ocsp-resp1.der \
328         data/ocsp-resp2.der \
329         data/ocsp-responder.crt \
330         data/ocsp-responder.key \
331         data/openssl.cnf \
332         data/pkinit-proxy-chain.crt \
333         data/pkinit-proxy.crt \
334         data/pkinit-proxy.key \
335         data/pkinit-pw.key \
336         data/pkinit.crt \
337         data/pkinit.key \
338         data/proxy-level-test.crt \
339         data/proxy-level-test.key \
340         data/proxy-test.crt \
341         data/proxy-test.key \
342         data/proxy10-child-test.crt \
343         data/proxy10-child-test.key \
344         data/proxy10-child-child-test.crt \
345         data/proxy10-child-child-test.key \
346         data/proxy10-test.crt \
347         data/proxy10-test.key \
348         data/revoke.crt \
349         data/revoke.key \
350         data/sf-class2-root.pem \
351         data/static-file \
352         data/sub-ca.crt \
353         data/sub-ca.key \
354         data/sub-cert.crt \
355         data/sub-cert.key \
356         data/sub-cert.p12 \
357         data/test-ds-only.crt \
358         data/test-ds-only.key \
359         data/test-enveloped-aes-128 \
360         data/test-enveloped-aes-256 \
361         data/test-enveloped-des \
362         data/test-enveloped-des-ede3 \
363         data/test-enveloped-rc2-128 \
364         data/test-enveloped-rc2-40 \
365         data/test-enveloped-rc2-64 \
366         data/test-ke-only.crt \
367         data/test-ke-only.key \
368         data/test-nopw.p12 \
369         data/test-pw.key \
370         data/test-signed-data \
371         data/test-signed-data-noattr \
372         data/test-signed-data-noattr-nocerts \
373         data/test.combined.crt \
374         data/test.crt \
375         data/test.key \
376         data/test.p12 \
377         data/yutaka-pad-broken-ca.pem \
378         data/yutaka-pad-broken-cert.pem \
379         data/yutaka-pad-ok-ca.pem \
380         data/yutaka-pad-ok-cert.pem \
381         data/yutaka-pad.key