summaryrefslogtreecommitdiff
path: root/lib/libssl/Makefile.bsd-wrapper
blob: 3d746a3134bfd7ab55cd954e1bc0995696e091b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
# Build wrapper for OpenSSL
# $OpenBSD: Makefile.bsd-wrapper,v 1.33 2001/03/09 23:03:02 deraadt Exp $

# Our lndir is hacked; specify a full path to avoid potential conflicts
# with the one installed with X11.
LNDIR=	/usr/bin/lndir

# Figure out what flag we use to OpenSSL's configure. This
# needs to be tested on all architectures.

OPENSSLDIR=	/etc/ssl

.if ${MACHINE_ARCH} == "alpha"
SSLCONF=	--openssldir="${OPENSSLDIR}" OpenBSD-alpha
.elif ${MACHINE_ARCH} == "m68k"
SSLCONF=	--openssldir="${OPENSSLDIR}" OpenBSD-m68k
.elif ${MACHINE_ARCH} == "i386"
SSLCONF=	--openssldir="${OPENSSLDIR}" OpenBSD-x86
.elif ${MACHINE_ARCH} == "mips"
SSLCONF=	--openssldir="${OPENSSLDIR}" OpenBSD-mips
.elif ${MACHINE_ARCH} == "vax"
SSLCONF=	--openssldir="${OPENSSLDIR}" OpenBSD-vax
.else
.if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m88k" || \
${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc"
SSLCONF=	--openssldir="${OPENSSLDIR}" OpenBSD
.else
##UNTESTED!	
SSLCONF=	--openssldir="${OPENSSLDIR}" OpenBSD
.endif
.endif
MUNGEDFILES= \
	${.OBJDIR}/${SSL_SRC}/crypto/opensslconf.h \
	${.OBJDIR}/${SSL_SRC}/crypto/objects/obj_dat.h \
	${.OBJDIR}/${SSL_SRC}/Makefile.ssl \
	${.OBJDIR}/${SSL_SRC}/Makefile \
	${.OBJDIR}/${SSL_SRC}/apps/der_chop \
	${.OBJDIR}/${SSL_SRC}/tools/c_rehash \
	${.OBJDIR}/${SSL_SRC}/apps/CA.pl \
	${.OBJDIR}/${SSL_SRC}/apps/CA.pl.bak \
	${.OBJDIR}/des_random_key.pm \
	${.OBJDIR}/HMAC.pm \
	${.OBJDIR}/MD5.pm \
	${.OBJDIR}/MDC2.pm \
	${.OBJDIR}/SHA1.pm \
	${.OBJDIR}/BUF_MEM_new.pm \
	${.OBJDIR}/RC4.pm \
	${.OBJDIR}/RIPEMD160.pm \
	${.OBJDIR}/CRYPTO_set_locking_callback.pm

.include <bsd.own.mk>		# for NOMAN

.ifndef NOMAN
MANALL=	ssl.cat3 SSL_get_error.cat3 \
	BN_CTX_new.cat3 OPENSSL_VERSION_NUMBER.cat3 BN_CTX_start.cat3 \
	OpenSSL_add_all_algorithms.cat3 BN_add.cat3 RAND_add.cat3 BN_add_word.cat3 \
	RAND_bytes.cat3 BN_bn2bin.cat3 RAND_cleanup.cat3 BN_cmp.cat3 RAND_egd.cat3 \
	BN_copy.cat3 RAND_load_file.cat3 BN_generate_prime.cat3 \
	RAND_set_rand_method.cat3 BN_mod_inverse.cat3 RSA_blinding_on.cat3 \
	BN_mod_mul_montgomery.cat3 RSA_check_key.cat3 BN_mod_mul_reciprocal.cat3 \
	RSA_generate_key.cat3 BN_new.cat3 RSA_get_ex_new_index.cat3 BN_num_bytes.cat3 \
	RSA_new.cat3 BN_rand.cat3 RSA_padding_add_PKCS1_type_1.cat3 BN_set_bit.cat3 \
	RSA_print.cat3 BN_zero.cat3 RSA_private_encrypt.cat3 CRYPTO_set_ex_data.cat3 \
	RSA_public_encrypt.cat3 DH_generate_key.cat3 RSA_set_method.cat3 \
	DH_generate_parameters.cat3 RSA_sign.cat3 DH_get_ex_new_index.cat3 \
	RSA_sign_ASN1_OCTET_STRING.cat3 DH_new.cat3 RSA_size.cat3 DH_set_method.cat3 \
	blowfish.cat3 DH_size.cat3 bn.cat3 DSA_SIG_new.cat3 bn_internal.cat3 \
	DSA_do_sign.cat3 DSA_dup_DH.cat3 crypto.cat3 DSA_generate_key.cat3 \
	DSA_generate_parameters.cat3 d2i_DHparams.cat3 d2i_RSAPublicKey.cat3 \
	DSA_get_ex_new_index.cat3 des_random_key.cat3 des_modes.cat7 \
	DSA_new.cat3 dh.cat3 \
	DSA_set_method.cat3 dsa.cat3 DSA_sign.cat3 DSA_size.cat3 HMAC.cat3 \
	ERR_GET_LIB.cat3 lh_stats.cat3 ERR_clear_error.cat3 lhash.cat3 \
	ERR_error_string.cat3 MD5.cat3 ERR_get_error.cat3 MDC2.cat3 \
	ERR_load_crypto_strings.cat3 ERR_load_strings.cat3  \
	ERR_print_errors.cat3 ERR_put_error.cat3 rsa.cat3 \
	ERR_remove_state.cat3 SHA1.cat3 EVP_DigestInit.cat3 \
	EVP_EncryptInit.cat3 BUF_MEM_new.cat3 \
	EVP_OpenInit.cat3 EVP_SealInit.cat3 \
	EVP_SignInit.cat3 EVP_VerifyInit.cat3 \
	openssl.cat1 \
	BUF_MEM_new.cat3 RC4.cat3 \
	RIPEMD160.cat3 CRYPTO_set_locking_callback.cat3

.if MANPS
PSALL=	${MANALL:S/.cat1/.ps1/g:S/.cat2/.ps2/g:S/.cat3/.ps3/g:S/.cat4/.ps4/g:S/.cat5/.ps5/g:S/.cat6/.ps6/g:S/.cat7/.ps7/g:S/.cat8/.ps8/g:S/.cat9/.ps9/g}
.endif

# these are is a real problem, since they re-document functions described in
# other pages.
#
# err.pod -> ERR_get_error.pod
# ERR_peek_error ERR_get_error_line
# ERR_peek_error_line ERR_get_error_line_data ERR_peek_error_line_data
# ERR_GET_LIB ERR_GET_FUNC ERR_GET_REASON ERR_clear_error ERR_error_string
# ERR_lib_error_string ERR_func_error_string ERR_reason_error_string
# ERR_print_errors ERR_print_errors_fp ERR_load_crypto_strings ERR_free_strings
# ERR_remove_state ERR_put_error ERR_add_error_data ERR_load_strings ERR_PACK
# ERR_get_next_error_library
#
# rand.pod -> RAND_bytes.pod
# RAND_pseudo_bytes RAND_seed RAND_add RAND_status
# RAND_screen RAND_load_file RAND_write_file RAND_file_name RAND_egd
# RAND_set_rand_method RAND_get_rand_method RAND_SSLeay RAND_cleanup

# buffer.pod -> BUF_MEM_new.pod
# BUF_MEM_free BUF_MEM_grow BUF_strdup
BUF_MEM_new.cat3: buffer.pod
	( cp ${.ALLSRC} BUF_MEM_new.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  BUF_MEM_new.pm ) | nroff -Tascii -man > ${.TARGET}
.if MANPS
BUF_MEM_new.ps3: buffer.pod
	( cp ${.ALLSRC} BUF_MEM_new.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  BUF_MEM_new.pm ) | nroff -Tps -man > ${.TARGET}
.endif

# rc4.pod -> RC4.pod
# RC4_set_key
RC4.cat3: rc4.pod
	( cp ${.ALLSRC} RC4.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  RC4.pm ) | nroff -Tascii -man > ${.TARGET}
.if MANPS
RC4.ps3: rc4.pod
	( cp ${.ALLSRC} RC4.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  RC4.pm ) | nroff -Tps -man > ${.TARGET}
.endif

# threads.pod -> CRYPTO_set_locking_callback.pod
# CRYPTO_set_id_callback CRYPTO_num_locks
CRYPTO_set_locking_callback.cat3: threads.pod
	( cp ${.ALLSRC} CRYPTO_set_locking_callback.pm && \
	  pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  CRYPTO_set_locking_callback.pm ) | nroff -Tascii -man > ${.TARGET}
.if MANPS
CRYPTO_set_locking_callback.ps3: threads.pod
	( cp ${.ALLSRC} CRYPTO_set_locking_callback.pm && \
	  pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  CRYPTO_set_locking_callback.pm ) | nroff -Tps -man > ${.TARGET}
.endif

# ripemd.pod -> RIPEMD160.pod
# RIPEMD160_Init RIPEMD160_Update RIPEMD160_Final
RIPEMD160.cat3: ripemd.pod
	( cp ${.ALLSRC} RIPEMD160.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  RIPEMD160.pm ) | nroff -Tascii -man > ${.TARGET}
.if MANPS
RIPEMD160.ps3: ripemd.pod
	( cp ${.ALLSRC} RIPEMD160.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  RIPEMD160.pm ) | nroff -Tps -man > ${.TARGET}
.endif

# sha.pod -> SHA1.pod
SHA1.cat3: sha.pod
	( cp ${.ALLSRC} SHA1.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  SHA1.pm ) | nroff -Tascii -man > ${.TARGET}
.if MANPS
SHA1.ps3: sha.pod
	( cp ${.ALLSRC} SHA1.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  SHA1.pm ) | nroff -Tps -man > ${.TARGET}
.endif

# md5.pod -> MD5.pod
MD5.cat3: md5.pod
	( cp ${.ALLSRC} MD5.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  MD5.pm ) | nroff -Tascii -man > ${.TARGET}
.if MANPS
MD5.ps3: md5.pod
	( cp ${.ALLSRC} MD5.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  MD5.pm ) | nroff -Tps -man > ${.TARGET}
.endif

# mdc2.pod -> MDC2.pod
MDC2.cat3: mdc2.pod
	( cp ${.ALLSRC} MDC2.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  MDC2.pm ) | nroff -Tascii -man > ${.TARGET}
.if MANPS
MDC2.ps3: mdc2.pod
	( cp ${.ALLSRC} MDC2.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  MDC2.pm ) | nroff -Tps -man > ${.TARGET}
.endif

# hmac.pod -> HMAC.pod
HMAC.cat3: hmac.pod
	( cp ${.ALLSRC} HMAC.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  HMAC.pm ) | nroff -Tascii -man > ${.TARGET}
.if MANPS
HMAC.ps3: hmac.pod
	( cp ${.ALLSRC} HMAC.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  HMAC.pm ) | nroff -Tps -man > ${.TARGET}
.endif

# des.pod -> des_random_key, des_set_key, des_key_sched, des_set_key_checked,
# des_set_key_unchecked, des_set_odd_parity, des_is_weak_key, des_ecb_encrypt,
# des_ecb2_encrypt, des_ecb3_encrypt, des_ncbc_encrypt, des_cfb_encrypt,
# des_ofb_encrypt, des_pcbc_encrypt, des_cfb64_encrypt, des_ofb64_encrypt,
# des_xcbc_encrypt, des_ede2_cbc_encrypt, des_ede2_cfb64_encrypt,
# des_ede2_ofb64_encrypt, des_ede3_cbc_encrypt, des_ede3_cbcm_encrypt,
# des_ede3_cfb64_encrypt, des_ede3_ofb64_encrypt, des_read_password,
# des_read_2passwords, des_read_pw_string, des_cbc_cksum, des_quad_cksum,
# des_string_to_key, des_string_to_2keys, des_fcrypt, des_crypt,
# des_enc_read, des_enc_write
des_random_key.cat3: des.pod
	( cp ${.ALLSRC} des_random_key.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  des_random_key.pm ) | nroff -Tascii -man > ${.TARGET}
.if MANPS
des_random_key.ps3: des.pod
	( cp ${.ALLSRC} des_random_key.pm && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  des_random_key.pm ) | nroff -Tps -man > ${.TARGET}
.endif

MLINKS+=BN_CTX_new.3 BN_CTX_init.3 BN_CTX_new.3 BN_CTX_free.3 \
	BN_CTX_start.3 BN_CTX_get.3 BN_CTX_start.3 BN_CTX_end.3 \
	BN_add.3 BN_sub.3 BN_add.3 BN_mul.3 BN_add.3 BN_div.3 \
	BN_add.3 BN_sqr.3 BN_add.3 BN_mod.3 BN_add.3 BN_mod_mul.3 \
	BN_add.3 BN_exp.3 BN_add.3 BN_mod_exp.3 BN_add.3 BN_gcd.3 \
	BN_add_word.3 BN_sub_word.3 BN_add_word.3 BN_mul_word.3 \
	BN_add_word.3 BN_div_word.3 BN_add_word.3 BN_mod_word.3 \
	BN_bn2bin.3 BN_bin2bn.3 BN_bn2bin.3 BN_bn2hex.3 \
	BN_bn2bin.3 BN_bn2dec.3 BN_bn2bin.3 BN_hex2bn.3 \
	BN_bn2bin.3 BN_dec2bn.3 BN_bn2bin.3 BN_print.3 \
	BN_bn2bin.3 BN_print_fp.3 BN_bn2bin.3 BN_bn2mpi.3 \
	BN_bn2bin.3 BN_mpi2bn.3 \
	BN_cmp.3 BN_ucmp.3 BN_cmp.3 BN_is_zero.3 BN_cmp.3 BN_is_one.3 \
	BN_cmp.3 BN_is_word.3 BN_cmp.3 BN_is_odd.3 \
	BN_copy.3 BN_dup.3 \
	BN_generate_prime.3 BN_is_prime.3 \
	BN_generate_prime.3 BN_is_prime_fasttest.3 \
	BN_mod_mul_montgomery.3 BN_MONT_CTX_new.3 \
	BN_mod_mul_montgomery.3 BN_MONT_CTX_init.3 \
	BN_mod_mul_montgomery.3 BN_MONT_CTX_free.3 \
	BN_mod_mul_montgomery.3 BN_MONT_CTX_set.3 \
	BN_mod_mul_montgomery.3 BN_MONT_CTX_copy.3 \
	BN_mod_mul_montgomery.3 BN_from_montgomery.3 \
	BN_mod_mul_montgomery.3 BN_to_montgomery.3 \
	BN_mod_mul_reciprocal.3 BN_RECP_CTX_new.3 \
	BN_mod_mul_reciprocal.3 BN_RECP_CTX_init.3 \
	BN_mod_mul_reciprocal.3 BN_RECP_CTX_free.3 \
	BN_mod_mul_reciprocal.3 BN_RECP_CTX_set.3 \
	BN_mod_mul_reciprocal.3 BN_div_recp.3 \
	BN_new.3 BN_init.3 BN_new.3 BN_clear.3 \
	BN_new.3 BN_free.3 BN_new.3 BN_clear_free.3 \
	BN_num_bytes.3 BN_num_bits.3 \
	BN_num_bytes.3 BN_num_bits_word.3 \
	BN_rand.3 BN_pseudo_rand.3 \
	BN_set_bit.3 BN_clear_bit.3 BN_set_bit.3 BN_is_bit_set.3 \
	BN_set_bit.3 BN_mask_bits.3 BN_set_bit.3 BN_lshift.3 \
	BN_set_bit.3 BN_lshift1.3 BN_set_bit.3 BN_rshift.3 \
	BN_set_bit.3 BN_rshift1.3 \
	BN_zero.3 BN_one.3 BN_zero.3 BN_value_one.3 \
	BN_zero.3 BN_set_word.3 BN_zero.3 BN_get_word.3 \
	CRYPTO_set_ex_data.3 CRYPTO_get_ex_data.3 \
	DH_generate_key.3 DH_compute_key.3 \
	DH_generate_parameters.3 DH_check.3 \
	DH_get_ex_new_index.3 DH_set_ex_data.3 \
	DH_get_ex_new_index.3 DH_get_ex_data.3 \
	DH_new.3 DH_free.3 \
	DH_set_method.3 DH_set_default_method.3 \
	DH_set_method.3 DH_get_default_method.3 \
	DH_set_method.3 DH_new_method.3 \
	DH_set_method.3 DH_OpenSSL.3 \
	ERR_GET_LIB.3 ERR_GET_FUNC.3 \
	ERR_GET_LIB.3 ERR_GET_REASON.3 \
	ERR_error_string.3 ERR_lib_error_string.3 \
	ERR_error_string.3 ERR_func_error_string.3 \
	ERR_error_string.3 ERR_reason_error_string.3 \
	ERR_get_error.3 ERR_peek_error.3 \
	ERR_get_error.3 ERR_get_error_line.3 \
	ERR_get_error.3 ERR_peek_error_line.3 \
	ERR_get_error.3 ERR_get_error_line_data.3 \
	ERR_get_error.3 ERR_peek_error_line_data.3 \
	ERR_load_crypto_strings.3 ERR_free_strings.3 \
	ERR_load_crypto_strings.3 SSL_load_error_strings.3 \
	ERR_load_strings.3 ERR_get_next_error_library.3 \
	ERR_load_strings.3 ERR_PACK.3 \
	ERR_print_errors.3 ERR_print_errors_fp.3 \
	ERR_put_error.3 ERR_add_error_data.3 \
	OPENSSL_VERSION_NUMBER.3 SSLeay.3 \
	OpenSSL_add_all_algorithms.3 OpenSSL_add_all_ciphers.3 \
	OpenSSL_add_all_algorithms.3 OpenSSL_add_all_digests.3 \
	OpenSSL_add_all_algorithms.3 EVP_cleanup.3 \
	RAND_add.3 RAND_seed.3 RAND_add.3 RAND_status.3 RAND_add.3 RAND_screen.3 \
	RAND_bytes.3 RAND_pseudo_bytes.3 \
	RAND_load_file.3 RAND_file_name.3 RAND_load_file.3 RAND_write_file.3 \
	RAND_set_rand_method.3 RAND_get_rand_method.3 \
	RAND_set_rand_method.3 RAND_SSLeay.3 \
	RSA_blinding_on.3 RSA_blinding_off.3 \
	RSA_get_ex_new_index.3 RSA_set_ex_data.3 \
	RSA_get_ex_new_index.3 RSA_get_ex_data.3 \
	RSA_new.3 RSA_free.3 \
	RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_PKCS1_type_1.3 \
	RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_PKCS1_type_2.3 \
	RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_PKCS1_type_2.3 \
	RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_PKCS1_OAEP.3 \
	RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_PKCS1_OAEP.3 \
	RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_SSLv23.3 \
	RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_SSLv23.3 \
	RSA_padding_add_PKCS1_type_1.3 RSA_padding_add_none.3 \
	RSA_padding_add_PKCS1_type_1.3 RSA_padding_check_none.3 \
	RSA_print.3 RSA_print_fp.3 RSA_print.3 DSAparams_print.3 \
	RSA_print.3 DSAparams_print_fp.3 RSA_print.3 DSA_print_fp.3 \
	RSA_print.3 DHparams_print.3 RSA_print.3 DHparams_print_fp.3 \
	RSA_private_encrypt.3 RSA_public_decrypt.3 \
	RSA_public_encrypt.3 RSA_private_decrypt.3 \
	RSA_set_method.3 RSA_get_method.3 \
	RSA_set_method.3 RSA_set_default_method.3 \
	RSA_set_method.3 RSA_get_default_method.3 \
	RSA_set_method.3 RSA_PKCS1_SSLeay.3 \
	RSA_set_method.3 RSA_PKCS1_RSAref.3 \
	RSA_set_method.3 RSA_null_method.3 \
	RSA_set_method.3 RSA_flags.3 \
	RSA_set_method.3 RSA_new_method.3 \
	RSA_sign.3 RSA_verify.3 \
	RSA_sign_ASN1_OCTET_STRING.3 RSA_verify_ASN1_OCTET_STRING.3 \
	BUF_MEM_new.3 BUF_MEM_free.3 \
	BUF_MEM_new.3 BUF_MEM_grow.3 BUF_MEM_new.3 BUF_strdup.3 \
	d2i_DHparams.3 i2d_DHparams.3 \
	blowfish.3 BF_set_key.3 blowfish.3 BF_encrypt.3 \
	blowfish.3 BF_decrypt.3 blowfish.3 BF_ecb.3 \
	blowfish.3 BF_cbc.3 blowfish.3 BF_cfb64_encrypt.3 \
	blowfish.3 BF_ofb64_encrypt.3 blowfish.3 BF_options.3 \
	blowfish.3 BF_ecb_encrypt.3 blowfish.3 BF_cbc_encrypt.3 \
	des_crypt.3 des_string_to_2keys.3 \
	des_random_key.3 des_set_key.3 des_random_key.3 des_key_sched.3 \
	des_random_key.3 des_set_key_checked.3 \
	des_random_key.3 des_set_key_unchecked.3 \
	des_random_key.3 des_set_odd_parity.3 des_random_key.3 des_is_weak_key.3 \
	des_random_key.3 des_ecb_encrypt.3 des_random_key.3 des_ecb2_encrypt.3 \
	des_random_key.3 des_ecb3_encrypt.3 des_random_key.3 des_ncbc_encrypt.3 \
	des_random_key.3 des_cfb_encrypt.3 des_random_key.3 des_ofb_encrypt.3 \
	des_random_key.3 des_pcbc_encrypt.3 des_random_key.3 des_cfb64_encrypt.3 \
	des_random_key.3 des_ofb64_encrypt.3 des_random_key.3 des_xcbc_encrypt.3 \
	des_random_key.3 des_ede2_cbc_encrypt.3 \
	des_random_key.3 des_ede2_cfb64_encrypt.3 \
	des_random_key.3 des_ede2_ofb64_encrypt.3 \
	des_random_key.3 des_ede3_cbc_encrypt.3 \
	des_random_key.3 des_ede3_cbcm_encrypt.3 \
	des_random_key.3 des_ede3_cfb64_encrypt.3 \
	des_random_key.3 des_ede3_ofb64_encrypt.3 \
	des_random_key.3 des_read_password.3 \
	des_random_key.3 des_read_2passwords.3 des_random_key.3 des_read_pw_string.3 \
	des_random_key.3 des_cbc_cksum.3 des_random_key.3 des_quad_cksum.3 \
	des_random_key.3 des_string_to_key.3 des_random_key.3 des_string_to_2keys.3 \
	des_random_key.3 des_fcrypt.3 des_random_key.3 des_crypt.3 \
	des_random_key.3 des_enc_read.3 des_random_key.3 des_enc_write.3 \
	MD5.3 MD2.3 MD5.3 MD2_Init.3 MD5.3 MD2_Update.3 \
	MD5.3 MD2_Final.3 MD5.3 MD5_Init.3 \
	MD5.3 MD5_Update.3 MD5.3 MD5_Final.3 \
	bn_internal.3 bn_mul_words.3 \
	bn_internal.3 bn_mul_add_words.3 \
	bn_internal.3 bn_sqr_words.3 \
	bn_internal.3 bn_div_words.3 \
	bn_internal.3 bn_add_words.3 \
	bn_internal.3 bn_sub_words.3 \
	bn_internal.3 bn_mul_comba4.3 \
	bn_internal.3 bn_mul_comba8.3 \
	bn_internal.3 bn_sqr_comba4.3 \
	bn_internal.3 bn_sqr_comba8.3 \
	bn_internal.3 bn_cmp_words.3 \
	bn_internal.3 bn_mul_normal.3 \
	bn_internal.3 bn_mul_low_normal.3 \
	bn_internal.3 bn_mul_recursive.3 \
	bn_internal.3 bn_mul_part_recursive.3 \
	bn_internal.3 bn_mul_low_recursive.3 \
	bn_internal.3 bn_mul_high.3 \
	bn_internal.3 bn_sqr_normal.3 \
	bn_internal.3 bn_sqr_recursive.3 \
	bn_internal.3 mul.3 \
	bn_internal.3 mul_add.3 \
	bn_internal.3 sqr.3 \
	bn_internal.3 bn_expand.3 \
	bn_internal.3 bn_wexpand.3 \
	bn_internal.3 bn_expand2.3 \
	bn_internal.3 bn_fix_top.3 \
	bn_internal.3 bn_check_top.3 \
	bn_internal.3 bn_print.3 \
	bn_internal.3 bn_dump.3 \
	bn_internal.3 bn_set_max.3 \
	bn_internal.3 bn_set_high.3 \
	bn_internal.3 bn_set_low.3 \
	EVP_DigestInit.3 EVP_DigestUpdate.3 EVP_DigestInit.3 EVP_DigestFinal.3 \
	EVP_DigestInit.3 EVP_MD_CTX_copy.3 EVP_DigestInit.3 EVP_MD_type.3 \
	EVP_DigestInit.3 EVP_MD_pkey_type.3 EVP_DigestInit.3 EVP_MD_size.3 \
	EVP_DigestInit.3 EVP_MD_block_size.3 EVP_DigestInit.3 EVP_MD_CTX_md.3 \
	EVP_DigestInit.3 EVP_MD_CTX_size.3 EVP_DigestInit.3 EVP_MD_size.3 \
	EVP_DigestInit.3 EVP_MD_CTX_block_size.3 \
	EVP_DigestInit.3 EVP_MD_block_size.3 EVP_DigestInit.3 EVP_MD_CTX_type.3 \
	EVP_DigestInit.3 EVP_MD_type.3 EVP_DigestInit.3 EVP_md_null.3 \
	EVP_DigestInit.3 EVP_md2.3 EVP_DigestInit.3 EVP_md5.3 \
	EVP_DigestInit.3 EVP_sha.3 EVP_DigestInit.3 EVP_sha1.3 \
	EVP_DigestInit.3 EVP_dss.3 EVP_DigestInit.3 EVP_dss1.3 \
	EVP_DigestInit.3 EVP_mdc2.3 EVP_DigestInit.3 EVP_ripemd160.3 \
	EVP_DigestInit.3 EVP_get_digestbyname.3 \
	EVP_DigestInit.3 EVP_get_digestbynid.3 \
	EVP_DigestInit.3 EVP_get_digestbyname.3 \
	EVP_DigestInit.3 OBJ_nid2sn.3 \
	EVP_DigestInit.3 EVP_get_digestbyobj.3 \
	EVP_DigestInit.3 EVP_get_digestbynid.3 \
	EVP_DigestInit.3 OBJ_obj2nid.3 \
	EVP_EncryptInit.3 EVP_EncryptUpdate.3 \
	EVP_EncryptInit.3 EVP_EncryptFinal.3 \
	EVP_EncryptInit.3 EVP_DecryptInit.3 \
	EVP_EncryptInit.3 EVP_DecryptUpdate.3 \
	EVP_EncryptInit.3 EVP_DecryptFinal.3 \
	EVP_EncryptInit.3 EVP_CipherInit.3 \
	EVP_EncryptInit.3 EVP_CipherUpdate.3 \
	EVP_EncryptInit.3 EVP_CipherFinal.3 \
	EVP_EncryptInit.3 EVP_CIPHER_CTX_cleanup.3 \
	EVP_EncryptInit.3 EVP_get_cipherbyname.3 \
	EVP_EncryptInit.3 EVP_get_cipherbynid.3 \
	EVP_EncryptInit.3 EVP_get_cipherbyname.3 \
	EVP_EncryptInit.3 OBJ_nid2sn.3 \
	EVP_EncryptInit.3 EVP_get_cipherbyobj.3 \
	EVP_EncryptInit.3 EVP_get_cipherbynid.3 \
	EVP_EncryptInit.3 OBJ_obj2nid.3 \
	EVP_EncryptInit.3 EVP_CIPHER_nid.3 \
	EVP_EncryptInit.3 EVP_CIPHER_block_size.3 \
	EVP_EncryptInit.3 EVP_CIPHER_key_length.3 \
	EVP_EncryptInit.3 EVP_CIPHER_iv_length.3 \
	EVP_EncryptInit.3 EVP_CIPHER_type.3 \
	EVP_EncryptInit.3 EVP_CIPHER_CTX_cipher.3 \
	EVP_EncryptInit.3 EVP_CIPHER_CTX_nid.3 \
	EVP_EncryptInit.3 EVP_CIPHER_CTX_block_size.3 \
	EVP_EncryptInit.3 EVP_CIPHER_CTX_key_length.3 \
	EVP_EncryptInit.3 EVP_CIPHER_CTX_iv_length.3 \
	EVP_EncryptInit.3 EVP_CIPHER_CTX_type.3 \
	EVP_EncryptInit.3 EVP_CIPHER_type.3 \
	EVP_EncryptInit.3 EVP_CIPHER_CTX_cipher.3 \
	EVP_EncryptInit.3 EVP_CIPHER_param_to_asn1.3 \
	EVP_EncryptInit.3 EVP_CIPHER_asn1_to_param.3 \
	EVP_OpenInit.3 EVP_OpenUpdate.3 \
	EVP_OpenInit.3 EVP_OpenFinal.3 \
	EVP_SealInit.3 EVP_SealUpdate.3 \
	EVP_SealInit.3 EVP_SealFinal.3 \
	EVP_SignInit.3 EVP_SignUpdate.3 \
	EVP_SignInit.3 EVP_SignFinal.3 \
	EVP_SignInit.3 EVP_PKEY_size.3 \
	EVP_VerifyInit.3 EVP_VerifyUpdate.3 \
	EVP_VerifyInit.3 EVP_VerifyFinal.3 \
	RSA_print.3 RSA_print_fp.3 \
	RSA_print.3 DSAparams_print.3 \
	RSA_print.3 DSAparams_print_fp.3 \
	RSA_print.3 DSA_print.3 \
	RSA_print.3 DSA_print_fp.3 \
	RSA_print.3 DHparams_print.3 \
	RSA_print.3 DHparams_print_fp.3 \
	DSA_new.3 DSA_free.3 \
	DSA_set_method.3 DSA_set_default_method.3 \
	DSA_set_method.3 DSA_get_default_method.3 \
	DSA_set_method.3 DSA_new_method.3 \
	DSA_set_method.3 DSA_OpenSSL.3 \
	dsa.3 DSA_free.3 dsa.3 DSA_sign_setup.3 \
	dsa.3 DSA_verify.3 dsa.3 DSA_set_default_method.3 \
	dsa.3 DSA_get_default_method.3 dsa.3 DSA_new_method.3 \
	dsa.3 DSA_OpenSSL.3 dsa.3 DSA_set_ex_data.3 \
	dsa.3 DSA_get_ex_data.3 dsa.3 DSA_SIG_free.3 \
	dsa.3 i2d_DSA_SIG.3 dsa.3 d2i_DSA_SIG.3 \
	dsa.3 DSA_do_verify.3 dsa.3 d2i_DSAPublicKey.3 \
	dsa.3 d2i_DSAPrivateKey.3 dsa.3 d2i_DSAparams.3 \
	dsa.3 i2d_DSAPublicKey.3 dsa.3 i2d_DSAPrivateKey.3 \
	dsa.3 i2d_DSAparams.3 \
	DSA_sign.3 DSA_sign_setup.3 DSA_sign.3 DSA_verify.3 \
	lhash.3 lh_new.3 lhash.3 lh_free.3 lhash.3 lh_insert.3 \
	lhash.3 lh_delete.3 lhash.3 lh_retrieve.3 lhash.3 lh_doall.3 \
	lhash.3 lh_doall_arg.3 lhash.3 lh_error.3 \
	d2i_RSAPublicKey.3 i2d_RSAPublicKey.3 \
	d2i_RSAPublicKey.3 d2i_RSAPrivateKey.3 \
	d2i_RSAPublicKey.3 i2d_RSAPrivateKey.3 \
	d2i_RSAPublicKey.3 i2d_Netscape_RSA.3 \
	d2i_RSAPublicKey.3 d2i_Netscape_RSA.3 \
	lh_stats.3 lh_node_stats.3 lh_stats.3 lh_node_usage_stats.3 \
	lh_stats.3 lh_stats_bio.3 lh_stats.3 lh_node_stats_bio.3 \
	lh_stats.3 lh_node_usage_stats_bio.3 \
	HMAC.3 HMAC_Init.3 HMAC.3 HMAC_Update.3 \
	HMAC.3 HMAC_Final.3 HMAC.3 HMAC_cleanup.3 \
	MDC2.3 MDC2_Init.3 MDC2.3 MDC2_Update.3 \
	MDC2.3 MDC2_Final.3 \
	SHA1.3 SHA1_Init.3 SHA1.3 SHA1_Update.3 SHA1.3 SHA1_Final.3 \
	RC4.3 RC4_set_key.3 \
	RAND_bytes.3 RAND_pseudo_bytes.3 \
	RAND_load_file.3 RAND_file_name.3 \
	RAND_load_file.3 RAND_write_file.3 \
	RAND_set_rand_method.3 RAND_get_rand_method.3 \
	RAND_set_rand_method.3 RAND_SSLeay.3 \
	CRYPTO_set_locking_callback.3 CRYPTO_set_id_callback.3 \
	CRYPTO_set_locking_callback.3 CRYPTO_num_locks.3 \
	RIPEMD160.3 RIPEMD160_Init.3 RIPEMD160.3 RIPEMD160_Update.3 \
	RIPEMD160.3 RIPEMD160_Final.3 \

.include <bsd.man.mk>
.else
maninstall:

.endif

# XXX .PATH order is critical because of non-unique filenames
.PATH: ${.CURDIR}/src/doc/crypto ${.CURDIR}/src/doc/ssl ${.CURDIR}/src/doc/apps
.SUFFIXES: .pod
.pod.cat3:
	( cd `dirname ${.ALLSRC}` && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  `basename ${.ALLSRC}` ) | nroff -Tascii -man > ${.TARGET}
.pod.cat7:
	( cd `dirname ${.ALLSRC}` && pod2man --section=7 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  `basename ${.ALLSRC}` ) | nroff -Tascii -man > ${.TARGET}
.pod.cat1:
	( cd `dirname ${.ALLSRC}` && pod2man --section=1 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  `basename ${.ALLSRC}` ) | nroff -Tascii -man > ${.TARGET}

.pod.ps3:
	( cd `dirname ${.ALLSRC}` && pod2man --section=3 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  `basename ${.ALLSRC}` ) | nroff -Tps -man > ${.TARGET}
.pod.ps7:
	( cd `dirname ${.ALLSRC}` && pod2man --section=7 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  `basename ${.ALLSRC}` ) | nroff -Tps -man > ${.TARGET}
.pod.ps1:
	( cd `dirname ${.ALLSRC}` && pod2man --section=1 --official \
	  --center='OpenSSL' --release="OpenBSD `uname -r`" \
	  `basename ${.ALLSRC}` ) | nroff -Tps -man > ${.TARGET}

SSL_SRC=src

all: 	prereq ${MANALL} ${PSALL}
	@cd ${.OBJDIR} && ${MAKE}

includes: prereq
	@cd ${.OBJDIR} && ${MAKE} includes

prereq:	${.OBJDIR}/${SSL_SRC}/Makefile.ssl ${.OBJDIR}/${SSL_SRC}/crypto/objects/obj_dat.h

install: maninstall
	@cd ${.OBJDIR} && ${MAKE} install

#${.OBJDIR}/${SSL_SRC}/crypto/objects/obj_dat.h: ${.OBJDIR}/${SSL_SRC}/crypto/objects/objects.h
#	/usr/bin/perl ${.OBJDIR}/${SSL_SRC}/crypto/objects/obj_dat.pl ${.OBJDIR}/${SSL_SRC}/crypto/objects/objects.h ${.OBJDIR}/${SSL_SRC}/crypto/objects/obj_dat.h
# Stupid ssl 0.9.6 fucks this up completely, won't even build if you
# try to regenerate obj_dat.h - even with a stock distrib. 
${.OBJDIR}/${SSL_SRC}/crypto/objects/obj_dat.h: ${.OBJDIR}/${SSL_SRC}/crypto/objects/obj_dat.h.src
	@cp ${.OBJDIR}/${SSL_SRC}/crypto/objects/obj_dat.h.src \
		${.OBJDIR}/${SSL_SRC}/crypto/objects/obj_dat.h

${.OBJDIR}/${SSL_SRC}/Makefile.ssl : ${.OBJDIR}/${SSL_SRC}/Makefile.org
	@cd ${.OBJDIR}/${SSL_SRC} && /usr/bin/perl Configure ${SSLCONF}

.if !exists(${.OBJDIR}/${SSL_SRC}/Makefile.org)
${.OBJDIR}/${SSL_SRC}/Makefile.org: ${.CURDIR}/${SSL_SRC}/Makefile.org
	@${LNDIR} -s -e obj -e obj.${MACHINE_ARCH} -e Makefile.bsd-wrapper ${.CURDIR}
.endif

clean:
	@cd ${.OBJDIR} && ${MAKE} clean

cleandir: clean
	@cd ${.OBJDIR} && rm -f ${MUNGEDFILES}

test:
	# Nothing here so far...

depend: prereq
	# Nothing here so far...

lint:
	# Nothing here so far...

tags:
	# Nothing here so far...

distribution:
	${INSTALL} ${INSTALL_COPY} -g ${BINGRP} -m 444 \
	   ${.CURDIR}/openssl.cnf ${DESTDIR}/etc/ssl/openssl.cnf

.include <bsd.obj.mk>
.include <bsd.subdir.mk>