openssl: Adjust manual pages for 1.0.1l.
[dragonfly.git] / secure / lib / libcrypto / Makefile
1 # $FreeBSD: src/secure/lib/libcrypto/Makefile,v 1.15.2.14 2003/02/14 22:38:14 nectar Exp $
2
3 LIB=            crypto
4 SHLIB_MAJOR=    5
5 SHLIBDIR?=      /lib
6 WARNS?=         0
7
8 SUBDIR= engines
9
10 .if ${MACHINE_ARCH} == "x86_64"
11 LDFLAGS+=-Wl,-Bsymbolic
12 .endif
13
14 .if exists(Makefile.man)
15 .include "Makefile.man"
16 .endif
17
18 .include "Makefile.inc"
19
20 # base sources
21 SRCS=   cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c ebcdic.c \
22         uid.c o_time.c o_dir.c o_fips.c o_init.c fips_ers.c
23 .if ${MACHINE_ARCH} == "i386"
24 SRCS+=  x86cpuid.s
25 .elif ${MACHINE_ARCH} == "x86_64"
26 SRCS+=  x86_64cpuid.s
27 .endif
28 INCS=   ../e_os2.h
29 INCS+=  crypto.h opensslv.h opensslconf.h ebcdic.h symhacks.h ossl_typ.h
30 SRCS+=  buildinf.h
31 INCSDIR=        ${INCLUDEDIR}/openssl
32
33 CLEANFILES+=    buildinf.h opensslconf.h
34
35 buildinf.h:
36         ( echo "#ifndef MK1MF_BUILD"; \
37         echo "  /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
38         echo "  #define CFLAGS \"$(CC)\""; \
39         echo "  #define PLATFORM \"`uname -s`-`uname -m`\""; \
40         echo "  #define DATE \"`LC_ALL=C date`\""; \
41         echo "#endif" ) > ${.TARGET}
42
43 opensslconf.h: opensslconf-${MACHINE_ARCH}.h
44 .if defined(WANT_IDEA)
45         sed '/^# define OPENSSL_NO_IDEA$$/d;/^#  define NO_IDEA$$/d' ${.ALLSRC} > ${.TARGET}
46 .else
47         cp ${.ALLSRC} ${.TARGET}
48 .endif
49
50
51 # aes
52 SRCS+=  aes_misc.c aes_ecb.c aes_cfb.c aes_ofb.c aes_ctr.c aes_ige.c aes_wrap.c
53 .if ${MACHINE_ARCH} == "i386"
54 SRCS+=  aes-586.s vpaes-x86.s aesni-x86.s
55 .elif ${MACHINE_ARCH} == "x86_64"
56 SRCS+=  aes-x86_64.s vpaes-x86_64.s bsaes-x86_64.s aesni-x86_64.s aesni-sha1-x86_64.s
57 .endif
58 INCS+=  aes.h
59
60 # asn1
61 SRCS+=  a_object.c a_bitstr.c a_utctm.c a_gentm.c a_time.c a_int.c a_octet.c \
62         a_print.c a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c \
63         a_enum.c a_utf8.c a_sign.c a_digest.c a_verify.c a_mbstr.c a_strex.c \
64         x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c x_bignum.c \
65         x_long.c x_name.c x_x509.c x_x509a.c x_crl.c x_info.c x_spki.c nsseq.c \
66         x_nx509.c d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c \
67         t_req.c t_x509.c t_x509a.c t_crl.c t_pkey.c t_spki.c t_bitst.c \
68         tasn_new.c tasn_fre.c tasn_enc.c tasn_dec.c tasn_utl.c tasn_typ.c \
69         tasn_prn.c ameth_lib.c \
70         f_int.c f_string.c n_pkey.c \
71         f_enum.c x_pkey.c a_bool.c x_exten.c bio_asn1.c bio_ndef.c asn_mime.c \
72         asn1_gen.c asn1_par.c asn1_lib.c asn1_err.c a_bytes.c a_strnid.c \
73         evp_asn1.c asn_pack.c p5_pbe.c p5_pbev2.c p8_pkey.c asn_moid.c
74 INCS+=  asn1.h asn1_mac.h asn1t.h
75
76 # bf
77 SRCS+=  bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c
78 .if ${MACHINE_ARCH} == "i386"
79 SRCS+=  bf-586.s
80 .elif ${MACHINE_ARCH} == "x86_64"
81 SRCS+=  bf_enc.c
82 .endif
83 INCS+=  blowfish.h
84
85 # bio
86 SRCS+=  bio_lib.c bio_cb.c bio_err.c \
87         bss_mem.c bss_null.c bss_fd.c \
88         bss_file.c bss_sock.c bss_conn.c \
89         bf_null.c bf_buff.c b_print.c b_dump.c \
90         b_sock.c bss_acpt.c bf_nbio.c bss_log.c bss_bio.c \
91         bss_dgram.c
92 INCS+=  bio.h
93
94 # bn
95 SRCS+=  bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
96         bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
97         bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c \
98         bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
99         bn_depr.c bn_const.c bn_x931p.c
100 .if ${MACHINE_ARCH} == "i386"
101 SRCS+=  bn-586.s co-586.s x86-mont.s x86-gf2m.s
102 .elif ${MACHINE_ARCH} == "x86_64"
103 SRCS+=  x86_64-gcc.c x86_64-mont.s x86_64-mont5.s x86_64-gf2m.s modexp512-x86_64.s
104 .endif
105 INCS+=  bn.h
106
107 # buffer
108 SRCS+=  buffer.c buf_str.c buf_err.c
109 INCS+=  buffer.h
110
111 # camellia
112 SRCS+=  cmll_ecb.c cmll_ofb.c cmll_cfb.c cmll_ctr.c cmll_utl.c
113 .if ${MACHINE_ARCH} == "i386"
114 SRCS+=  cmll-x86.s
115 .elif ${MACHINE_ARCH} == "x86_64"
116 SRCS+=  cmll-x86_64.s cmll_misc.c
117 .endif
118 INCS+=  camellia.h
119
120 # cast
121 SRCS+=  c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c
122 INCS+=  cast.h
123
124 # cmac
125 SRCS+=  cmac.c cm_ameth.c cm_pmeth.c
126 INCS+=  cmac.h
127
128 # cms
129 SRCS+=  cms_lib.c cms_asn1.c cms_att.c cms_io.c cms_smime.c cms_err.c \
130         cms_sd.c cms_dd.c cms_cd.c cms_env.c cms_enc.c cms_ess.c \
131         cms_pwri.c
132 INCS+=  cms.h
133
134 # comp
135 SRCS+=  comp_lib.c comp_err.c \
136         c_rle.c c_zlib.c
137 INCS+=  comp.h
138
139 # conf
140 SRCS+=  conf_err.c conf_lib.c conf_api.c conf_def.c conf_mod.c \
141         conf_mall.c conf_sap.c
142 INCS+=  conf.h conf_api.h
143
144 # des
145 SRCS+=  set_key.c  ecb_enc.c  cbc_enc.c \
146         ecb3_enc.c cfb64enc.c cfb64ede.c cfb_enc.c  ofb64ede.c \
147         enc_read.c enc_writ.c ofb64enc.c \
148         ofb_enc.c  str2key.c  pcbc_enc.c qud_cksm.c rand_key.c \
149         fcrypt.c xcbc_enc.c rpc_enc.c  cbc_cksm.c \
150         ede_cbcm_enc.c des_old.c des_old2.c read2pwd.c
151 .if ${MACHINE_ARCH} == "i386"
152 SRCS+=  des-586.s crypt586.s
153 .elif ${MACHINE_ARCH} == "x86_64"
154 SRCS+=  des_enc.c fcrypt_b.c
155 .endif
156 INCS+=  des.h des_old.h
157
158 # dh
159 SRCS+=  dh_asn1.c dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c dh_depr.c \
160         dh_ameth.c dh_pmeth.c dh_prn.c
161 INCS+=  dh.h
162
163 # dsa
164 SRCS+=  dsa_gen.c dsa_key.c dsa_lib.c dsa_asn1.c dsa_vrf.c dsa_sign.c \
165         dsa_err.c dsa_ossl.c dsa_depr.c dsa_ameth.c dsa_pmeth.c dsa_prn.c
166 INCS+=  dsa.h
167
168 # dso
169 SRCS+=  dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c dso_openssl.c
170 INCS+=  dso.h
171
172 # ec
173 SRCS+=  ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \
174         ec_err.c ec_curve.c ec_check.c ec_print.c ec_asn1.c ec_key.c \
175         ec2_smpl.c ec2_mult.c ec_ameth.c ec_pmeth.c eck_prn.c \
176         ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c \
177         ecp_oct.c ec2_oct.c ec_oct.c
178 INCS+=  ec.h
179
180 # ecdh
181 SRCS+=  ech_lib.c ech_ossl.c ech_key.c ech_err.c
182 INCS+=  ecdh.h
183
184 # ecdsa
185 SRCS+=  ecs_lib.c ecs_asn1.c ecs_ossl.c ecs_sign.c ecs_vrf.c ecs_err.c
186 INCS+=  ecdsa.h
187
188 # engine
189 CFLAGS+=-DHAVE_CRYPTODEV
190 SRCS+=  eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \
191         eng_table.c eng_pkey.c eng_fat.c eng_all.c \
192         tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_ecdh.c tb_rand.c tb_store.c \
193         tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c \
194         eng_openssl.c eng_cnf.c eng_dyn.c eng_cryptodev.c \
195         eng_rsax.c eng_rdrand.c
196 INCS+=  engine.h
197
198 # err
199 SRCS+=  err.c err_all.c err_prn.c
200 INCS+=  err.h
201
202 # evp
203 SRCS+=  encode.c digest.c evp_enc.c evp_key.c evp_acnf.c evp_cnf.c \
204         e_des.c e_bf.c e_idea.c e_des3.c e_camellia.c\
205         e_rc4.c e_aes.c names.c e_seed.c \
206         e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \
207         m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c m_wp.c \
208         m_dss.c m_dss1.c m_mdc2.c m_ripemd.c m_ecdsa.c\
209         p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \
210         bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \
211         c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \
212         evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c \
213         e_old.c pmeth_lib.c pmeth_fn.c pmeth_gn.c m_sigver.c evp_fips.c \
214         e_aes_cbc_hmac_sha1.c e_rc4_hmac_md5.c
215 INCS+=  evp.h
216
217 # hmac
218 SRCS+=  hmac.c hm_ameth.c hm_pmeth.c
219 INCS+=  hmac.h
220
221 # idea
222 .if defined(WANT_IDEA)
223 SRCS+=  i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c i_skey.c
224 INCS+=  idea.h
225 _ideapath=      ${LCRYPTO_SRC}/crypto/idea
226 .endif
227
228 # krb5
229 SRCS+=  krb5_asn.c
230 INCS+=  krb5_asn.h
231
232 # lhash
233 SRCS+=  lhash.c lh_stats.c
234 INCS+=  lhash.h
235
236 # md2
237 #SRCS+= md2_dgst.c md2_one.c
238 #INCS+= md2.h
239
240 # md4
241 SRCS+=  md4_dgst.c md4_one.c
242 INCS+=  md4.h
243
244 # md5
245 SRCS+=  md5_dgst.c md5_one.c
246 .if ${MACHINE_ARCH} == "i386"
247 SRCS+=  md5-586.s
248 .elif ${MACHINE_ARCH} == "x86_64"
249 SRCS+=  md5-x86_64.s
250 .endif
251 INCS+=  md5.h
252
253 # mdc2
254 SRCS+=  mdc2dgst.c mdc2_one.c
255 INCS+=  mdc2.h
256
257 # modes
258 SRCS+=  cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c \
259         ccm128.c xts128.c
260 .if ${MACHINE_ARCH} == "i386"
261 SRCS+=  ghash-x86.s
262 .elif ${MACHINE_ARCH} == "x86_64"
263 SRCS+=  ghash-x86_64.s
264 .endif
265 INCS+=  modes.h
266
267 # objects
268 SRCS+=  o_names.c obj_dat.c obj_lib.c obj_err.c obj_xref.c
269 INCS+=  objects.h obj_mac.h
270
271 # ocsp
272 SRCS+=  ocsp_asn.c ocsp_ext.c ocsp_ht.c ocsp_lib.c ocsp_cl.c \
273         ocsp_srv.c ocsp_prn.c ocsp_vfy.c ocsp_err.c
274 INCS+=  ocsp.h
275
276 # pem
277 SRCS+=  pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c pem_err.c \
278         pem_x509.c pem_xaux.c pem_oth.c pem_pk8.c pem_pkey.c pvkfmt.c
279 INCS+=  pem.h pem2.h
280
281 # pkcs12
282 SRCS+=  p12_add.c p12_asn.c p12_attr.c p12_crpt.c p12_crt.c p12_decr.c \
283         p12_init.c p12_key.c p12_kiss.c p12_mutl.c \
284         p12_utl.c p12_npas.c pk12err.c p12_p8d.c p12_p8e.c
285 INCS+=  pkcs12.h
286
287 # pkcs7
288 SRCS+=  pk7_asn1.c pk7_lib.c pkcs7err.c pk7_doit.c pk7_smime.c pk7_attr.c \
289         pk7_mime.c bio_pk7.c
290 INCS+=  pkcs7.h
291
292 # pqueue
293 SRCS+=  pqueue.c
294 INCS+=  pqueue.h
295
296 # rand
297 SRCS+=  md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \
298         rand_unix.c
299 INCS+=  rand.h
300
301 # rc2
302 SRCS+=  rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c
303 INCS+=  rc2.h
304
305 # rc4
306 SRCS+=  rc4_utl.c
307 .if ${MACHINE_ARCH} == "i386"
308 SRCS+=  rc4-586.s
309 .elif ${MACHINE_ARCH} == "x86_64"
310 SRCS+=  rc4-x86_64.s rc4-md5-x86_64.s
311 .endif
312 INCS+=  rc4.h
313
314 # rc5
315 # .. is patented, so don't compile by default
316 #SRCS+= rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c
317 #INCS+= rc5.h
318
319 # ripemd
320 SRCS+=  rmd_dgst.c rmd_one.c
321 .if ${MACHINE_ARCH} == "i386"
322 SRCS+=  rmd-586.s
323 .endif
324 INCS+=  ripemd.h
325
326 # rsa
327 SRCS+=  rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \
328         rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \
329         rsa_pss.c rsa_x931.c rsa_asn1.c rsa_depr.c rsa_ameth.c rsa_prn.c \
330         rsa_pmeth.c rsa_crpt.c
331 INCS+=  rsa.h
332
333 # seed
334 SRCS+=  seed.c seed_ecb.c seed_cbc.c seed_cfb.c seed_ofb.c
335 INCS+=  seed.h
336
337 # sha
338 SRCS+=  sha_dgst.c sha1dgst.c sha_one.c sha1_one.c sha256.c sha512.c
339 .if ${MACHINE_ARCH} == "i386"
340 SRCS+=  sha1-586.s sha256-586.s sha512-586.s
341 .elif ${MACHINE_ARCH} == "x86_64"
342 SRCS+=  sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s
343 .endif
344 INCS+=  sha.h
345
346 # srp
347 SRCS+=  srp_lib.c srp_vfy.c
348 INCS+=  srp.h
349
350 # stack
351 SRCS+=  stack.c
352 INCS+=  stack.h safestack.h
353
354 # store
355 #SRCS+= str_err.c str_lib.c str_meth.c str_mem.c
356 #INCS+= store.h
357
358 # ts
359 SRCS+=  ts_err.c ts_req_utils.c ts_req_print.c ts_rsp_utils.c ts_rsp_print.c \
360         ts_rsp_sign.c ts_rsp_verify.c ts_verify_ctx.c ts_lib.c ts_conf.c \
361         ts_asn1.c
362 INCS+=  ts.h
363
364 # txt_db
365 SRCS+=  txt_db.c
366 INCS+=  txt_db.h
367
368 # ui
369 SRCS+=  ui_err.c ui_lib.c ui_openssl.c ui_util.c ui_compat.c
370 INCS+=  ui.h ui_compat.h
371
372 # whrlpool
373 SRCS+=  wp_dgst.c
374 .if ${MACHINE_ARCH} == "i386"
375 SRCS+=  wp_block.c wp-mmx.s
376 .elif ${MACHINE_ARCH} == "x86_64"
377 SRCS+=  wp-x86_64.s
378 .endif
379 INCS+=  whrlpool.h
380
381 # x509
382 SRCS+=  x509_def.c x509_d2.c x509_r2x.c x509_cmp.c \
383         x509_obj.c x509_req.c x509spki.c x509_vfy.c \
384         x509_set.c x509cset.c x509rset.c x509_err.c \
385         x509name.c x509_v3.c x509_ext.c x509_att.c \
386         x509type.c x509_lu.c x_all.c x509_txt.c \
387         x509_trs.c by_file.c by_dir.c x509_vpm.c
388 INCS+=  x509.h x509_vfy.h
389
390 # x509v3
391 SRCS+=  v3_bcons.c v3_bitst.c v3_conf.c v3_extku.c v3_ia5.c v3_lib.c \
392         v3_prn.c v3_utl.c v3err.c v3_genn.c v3_alt.c v3_skey.c v3_akey.c v3_pku.c \
393         v3_int.c v3_enum.c v3_sxnet.c v3_cpols.c v3_crld.c v3_purp.c v3_info.c \
394         v3_ocsp.c v3_akeya.c v3_pmaps.c v3_pcons.c v3_ncons.c v3_pcia.c v3_pci.c \
395         pcy_cache.c pcy_node.c pcy_data.c pcy_map.c pcy_tree.c pcy_lib.c \
396         v3_asid.c v3_addr.c
397 INCS+=  x509v3.h
398
399 .include <bsd.lib.mk>
400
401 # The crypto subdirs are listed in the order of the vendor's Makefile
402 # to aid future imports.
403 .PATH: \
404         ${.CURDIR}/asm \
405         ${LCRYPTO_SRC}/crypto \
406         ${LCRYPTO_SRC}/crypto/objects \
407         ${LCRYPTO_SRC}/crypto/md4 \
408         ${LCRYPTO_SRC}/crypto/md5 \
409         ${LCRYPTO_SRC}/crypto/sha \
410         ${LCRYPTO_SRC}/crypto/mdc2 \
411         ${LCRYPTO_SRC}/crypto/hmac \
412         ${LCRYPTO_SRC}/crypto/ripemd \
413         ${LCRYPTO_SRC}/crypto/whrlpool \
414         ${LCRYPTO_SRC}/crypto/des \
415         ${LCRYPTO_SRC}/crypto/aes \
416         ${LCRYPTO_SRC}/crypto/rc2 \
417         ${LCRYPTO_SRC}/crypto/rc4 \
418         ${LCRYPTO_SRC}/crypto/bf \
419         ${LCRYPTO_SRC}/crypto/cast \
420         ${LCRYPTO_SRC}/crypto/camellia \
421         ${LCRYPTO_SRC}/crypto/seed \
422         ${LCRYPTO_SRC}/crypto/modes \
423         ${LCRYPTO_SRC}/crypto/bn \
424         ${LCRYPTO_SRC}/crypto/bn/asm \
425         ${LCRYPTO_SRC}/crypto/ec \
426         ${LCRYPTO_SRC}/crypto/rsa \
427         ${LCRYPTO_SRC}/crypto/dsa \
428         ${LCRYPTO_SRC}/crypto/ecdsa \
429         ${LCRYPTO_SRC}/crypto/dh \
430         ${LCRYPTO_SRC}/crypto/ecdh \
431         ${LCRYPTO_SRC}/crypto/dso \
432         ${LCRYPTO_SRC}/crypto/engine \
433         ${LCRYPTO_SRC}/crypto/buffer \
434         ${LCRYPTO_SRC}/crypto/bio \
435         ${LCRYPTO_SRC}/crypto/stack \
436         ${LCRYPTO_SRC}/crypto/lhash \
437         ${LCRYPTO_SRC}/crypto/rand \
438         ${LCRYPTO_SRC}/crypto/err \
439         ${LCRYPTO_SRC}/crypto/evp \
440         ${LCRYPTO_SRC}/crypto/asn1 \
441         ${LCRYPTO_SRC}/crypto/pem \
442         ${LCRYPTO_SRC}/crypto/x509 \
443         ${LCRYPTO_SRC}/crypto/x509v3 \
444         ${LCRYPTO_SRC}/crypto/conf \
445         ${LCRYPTO_SRC}/crypto/txt_db \
446         ${LCRYPTO_SRC}/crypto/pkcs7 \
447         ${LCRYPTO_SRC}/crypto/pkcs12 \
448         ${LCRYPTO_SRC}/crypto/comp \
449         ${LCRYPTO_SRC}/crypto/ocsp \
450         ${LCRYPTO_SRC}/crypto/ui \
451         ${LCRYPTO_SRC}/crypto/krb5 \
452         ${LCRYPTO_SRC}/crypto/cms \
453         ${LCRYPTO_SRC}/crypto/pqueue \
454         ${LCRYPTO_SRC}/crypto/ts \
455         ${LCRYPTO_SRC}/crypto/srp \
456         ${LCRYPTO_SRC}/crypto/cmac \
457         ${_ideapath} \
458         ${LCRYPTO_SRC} \
459         ${.CURDIR}/man