OpenSSL: Eliminate some options from CFLAGS.
[dragonfly.git] / secure / lib / libcrypto / Makefile
CommitLineData
984263bc 1# $FreeBSD: src/secure/lib/libcrypto/Makefile,v 1.15.2.14 2003/02/14 22:38:14 nectar Exp $
aac4ff6f 2# $DragonFly: src/secure/lib/libcrypto/Makefile,v 1.11 2008/09/06 20:42:53 pavalos Exp $
984263bc
MD
3
4LIB= crypto
f675e8b5 5SHLIB_MAJOR= 4
984263bc
MD
6
7NOLINT= true
8
9.if exists(Makefile.man)
10.include "Makefile.man"
11.endif
984263bc
MD
12
13.include "Makefile.inc"
14
15# base sources
0fae822e 16SRCS= cpt_err.c cryptlib.c cversion.c dyn_lck.c ebcdic.c ex_data.c \
e257b235
PA
17 fips_err.c mem.c mem_clr.c \
18 mem_dbg.c o_dir.c o_init.c o_time.c tmdiff.c uid.c
0fae822e
PA
19INCS= ../e_os.h ../e_os2.h crypto.h ebcdic.h fips_err.h \
20 opensslv.h ossl_typ.h symhacks.h tmdiff.h
984263bc
MD
21
22# aes
c6e28a8e 23SRCS+= aes_cbc.c aes_cfb.c aes_core.c aes_ctr.c aes_ecb.c aes_ige.c \
aac4ff6f 24 aes_misc.c aes_ofb.c aes_wrap.c
0fae822e 25INCS+= aes.h aes_locl.h
984263bc
MD
26
27# asn1
28SRCS+= a_bitstr.c a_bool.c a_bytes.c a_d2i_fp.c a_digest.c \
29 a_dup.c a_enum.c a_gentm.c a_hdr.c a_i2d_fp.c a_int.c \
30 a_mbstr.c a_meth.c a_object.c a_octet.c a_print.c \
31 a_set.c a_sign.c a_strex.c a_strnid.c a_time.c a_type.c \
32 a_utctm.c a_utf8.c a_verify.c asn1_err.c asn1_lib.c \
aac4ff6f
PA
33 asn1_gen.c asn1_par.c asn_mime.c \
34 asn_moid.c asn_pack.c d2i_pr.c d2i_pu.c \
984263bc
MD
35 evp_asn1.c f_enum.c f_int.c f_string.c i2d_pr.c i2d_pu.c \
36 n_pkey.c nsseq.c p5_pbe.c p5_pbev2.c p8_pkey.c t_bitst.c \
37 t_crl.c t_pkey.c t_req.c t_spki.c t_x509.c t_x509a.c \
38 tasn_dec.c tasn_enc.c tasn_fre.c tasn_new.c tasn_typ.c \
39 tasn_utl.c x_algor.c x_attrib.c x_bignum.c x_crl.c \
40 x_exten.c x_info.c x_long.c x_name.c x_pkey.c x_pubkey.c \
41 x_req.c x_sig.c x_spki.c x_val.c x_x509.c x_x509a.c
0fae822e 42INCS+= asn1.h asn1_mac.h asn1t.h
984263bc
MD
43
44# bf
45SRCS+= bf_cfb64.c bf_ecb.c bf_enc.c bf_ofb64.c bf_skey.c
0fae822e 46INCS+= blowfish.h
984263bc
MD
47
48# bio
49SRCS+= b_dump.c b_print.c b_sock.c bf_buff.c bf_lbuf.c bf_nbio.c \
50 bf_null.c bio_cb.c bio_err.c bio_lib.c bss_acpt.c bss_bio.c \
a561f9ff 51 bss_conn.c bss_dgram.c bss_fd.c bss_file.c bss_log.c bss_mem.c \
984263bc 52 bss_null.c bss_sock.c
0fae822e 53INCS+= bio.h
984263bc
MD
54
55# bn
c6082640
SS
56SRCS+= bn_add.c bn_asm.c bn_blind.c bn_const.c bn_ctx.c bn_depr.c \
57 bn_div.c bn_err.c bn_exp.c \
a561f9ff 58 bn_exp2.c bn_gcd.c bn_gf2m.c bn_kron.c bn_lib.c bn_mod.c bn_mont.c \
e257b235
PA
59 bn_mpi.c bn_mul.c bn_nist.c bn_opt.c \
60 bn_prime.c bn_print.c bn_rand.c bn_recp.c \
61 bn_shift.c bn_sqr.c bn_sqrt.c bn_word.c bn_x931p.c
0fae822e 62INCS+= bn.h
984263bc
MD
63
64# buffer
e257b235 65SRCS+= buf_err.c buf_str.c buffer.c
0fae822e 66INCS+= buffer.h
984263bc 67
c6e28a8e
SS
68# camellia
69# still disabled in 0.9.8
70#SRCS+= camellia.c cmll_misc.c cmll_ecb.c cmll_cbc.c cmll_ofb.c \
71# cmll_cfb.c cmll_ctr.c
0fae822e 72INCS+= camellia.h
c6e28a8e 73
984263bc
MD
74# cast
75SRCS+= c_cfb64.c c_ecb.c c_enc.c c_ofb64.c c_skey.c
0fae822e 76INCS+= cast.h
984263bc 77
aac4ff6f
PA
78# cms
79#SRCS+= cms_att.c cms_att.c cms_cd.c cms_dd.c cms_enc.c cms_env.c cms_err.c \
80# cms_ess.c cms_io.c cms_lib.c cms_sd.c cms_smime.c
81
984263bc
MD
82# comp
83SRCS+= c_rle.c c_zlib.c comp_err.c comp_lib.c
0fae822e 84INCS+= comp.h
984263bc
MD
85
86# conf
87SRCS+= conf_api.c conf_def.c conf_err.c conf_lib.c conf_mall.c conf_mod.c conf_sap.c
0fae822e 88INCS+= conf.h conf_api.h
984263bc
MD
89
90# des
91SRCS+= cbc3_enc.c cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c \
e257b235
PA
92 des_enc.c des_lib.c des_old.c des_old2.c \
93 ecb3_enc.c ecb_enc.c ede_cbcm_enc.c \
984263bc
MD
94 enc_read.c enc_writ.c fcrypt.c fcrypt_b.c ofb64ede.c ofb64enc.c \
95 ofb_enc.c pcbc_enc.c qud_cksm.c rand_key.c read2pwd.c \
96 rpc_enc.c set_key.c str2key.c xcbc_enc.c
0fae822e 97INCS+= des.h des_old.h
984263bc
MD
98
99# dh
a561f9ff 100SRCS+= dh_asn1.c dh_check.c dh_depr.c dh_err.c dh_gen.c dh_key.c dh_lib.c
0fae822e 101INCS+= dh.h
984263bc
MD
102
103# dsa
a561f9ff 104SRCS+= dsa_asn1.c dsa_depr.c dsa_err.c dsa_gen.c dsa_key.c dsa_lib.c \
e257b235 105 dsa_ossl.c dsa_sign.c dsa_utl.c dsa_vrf.c
0fae822e 106INCS+= dsa.h
984263bc
MD
107
108# dso
109SRCS+= dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c dso_openssl.c
0fae822e 110INCS+= dso.h
984263bc
MD
111
112# ec
a561f9ff
SS
113SRCS+= ec_asn1.c ec_check.c ec_curve.c ec_cvt.c ec_err.c ec_key.c ec_lib.c \
114 ec_mult.c ec_print.c ec2_smpl.c ec2_mult.c ecp_mont.c ecp_nist.c \
115 ecp_smpl.c
0fae822e 116INCS+= ec.h
a561f9ff
SS
117
118# ecdh
119SRCS+= ech_err.c ech_key.c ech_lib.c ech_ossl.c
0fae822e 120INCS+= ecdh.h
a561f9ff
SS
121
122# ecdsa
123SRCS+= ecs_asn1.c ecs_err.c ecs_lib.c ecs_ossl.c ecs_sign.c ecs_vrf.c
0fae822e 124INCS+= ecdsa.h
984263bc
MD
125
126# engine
a561f9ff
SS
127SRCS+= eng_all.c eng_cnf.c eng_cryptodev.c eng_ctrl.c eng_dyn.c eng_err.c \
128 eng_fat.c eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_padlock.c \
129 eng_pkey.c eng_table.c tb_cipher.c tb_dh.c tb_ecdh.c tb_ecdsa.c \
130 tb_digest.c tb_dsa.c tb_rand.c tb_rsa.c tb_store.c
0fae822e 131INCS+= eng_int.h engine.h
a561f9ff
SS
132
133# engines
134CFLAGS+=-DOPENSSL_NO_DYNAMIC_ENGINE # needs more hacking
135SRCS+= e_4758cca.c e_aep.c e_atalla.c e_chil.c e_cswift.c e_gmp.c \
136 e_nuron.c e_sureware.c e_ubsec.c
984263bc
MD
137
138# err
e257b235 139SRCS+= err.c err_all.c err_bio.c err_def.c err_prn.c err_str.c
0fae822e 140INCS+= err.h
984263bc
MD
141
142# evp
143SRCS+= bio_b64.c bio_enc.c bio_md.c bio_ok.c c_all.c c_allc.c c_alld.c \
e257b235 144 dig_eng.c \
c6e28a8e 145 digest.c e_aes.c e_bf.c e_camellia.c e_cast.c e_des.c e_des3.c \
e257b235
PA
146 e_idea.c e_null.c e_rc2.c e_rc4.c e_rc5.c e_xcbc_d.c \
147 enc_min.c encode.c \
148 evp_acnf.c evp_cnf.c evp_enc.c evp_err.c evp_key.c evp_lib.c evp_pbe.c \
c6e28a8e
SS
149 evp_pkey.c m_dss.c m_dss1.c m_ecdsa.c m_md2.c m_md4.c m_md5.c \
150 m_mdc2.c m_null.c m_ripemd.c m_sha.c m_sha1.c names.c openbsd_hw.c \
151 p5_crpt.c p5_crpt2.c p_dec.c p_enc.c p_lib.c p_open.c p_seal.c \
152 p_sign.c p_verify.c
0fae822e 153INCS+= evp.h
984263bc
MD
154
155# hmac
156SRCS+= hmac.c
0fae822e 157INCS+= hmac.h
984263bc
MD
158
159# idea
cecff5c1 160.if defined(WANT_IDEA)
984263bc 161SRCS+= i_cbc.c i_cfb64.c i_ecb.c i_ofb64.c i_skey.c
0fae822e 162INCS+= idea.h
984263bc
MD
163.endif
164
165# krb5
166#SRCS+= krb5_asn.c
0fae822e 167#INCS+= krb5_asn.h
984263bc
MD
168
169# lhash
170SRCS+= lh_stats.c lhash.c
0fae822e 171INCS+= lhash.h
984263bc
MD
172
173# md2
174SRCS+= md2_dgst.c md2_one.c
0fae822e 175INCS+= md2.h
984263bc
MD
176
177# md4
178SRCS+= md4_dgst.c md4_one.c
0fae822e 179INCS+= md4.h
984263bc
MD
180
181# md5
182SRCS+= md5_dgst.c md5_one.c
0fae822e 183INCS+= md5.h
984263bc
MD
184
185# mdc2
a561f9ff
SS
186# ... is patented, so don't compile by default.
187#SRCS+= mdc2_one.c mdc2dgst.c
0fae822e 188INCS+= mdc2.h
984263bc
MD
189
190# objects
191SRCS+= o_names.c obj_dat.c obj_err.c obj_lib.c
0fae822e 192INCS+= objects.h obj_mac.h
984263bc
MD
193
194# ocsp
195SRCS+= ocsp_asn.c ocsp_cl.c ocsp_err.c ocsp_ext.c ocsp_ht.c \
196 ocsp_lib.c ocsp_prn.c ocsp_srv.c ocsp_vfy.c
0fae822e 197INCS+= ocsp.h
984263bc
MD
198
199# pem
200SRCS+= pem_all.c pem_err.c pem_info.c pem_lib.c pem_oth.c pem_pk8.c \
201 pem_pkey.c pem_seal.c pem_sign.c pem_x509.c pem_xaux.c
0fae822e 202INCS+= pem.h pem2.h
984263bc
MD
203
204# pkcs12
205SRCS+= p12_add.c p12_asn.c p12_attr.c p12_crpt.c p12_crt.c \
206 p12_decr.c p12_init.c p12_key.c p12_kiss.c p12_mutl.c \
207 p12_npas.c p12_p8d.c p12_p8e.c p12_utl.c pk12err.c
0fae822e 208INCS+= pkcs12.h
984263bc
MD
209
210# pkcs7
211SRCS+= example.c pk7_asn1.c pk7_attr.c pk7_dgst.c pk7_doit.c \
212 pk7_lib.c pk7_mime.c pk7_smime.c pkcs7err.c
0fae822e 213INCS+= pkcs7.h
984263bc 214
a561f9ff
SS
215# pqueue
216SRCS+= pqueue.c
0fae822e 217INCS+= pqueue.h pq_compat.h
a561f9ff 218
984263bc 219# rand
e257b235
PA
220SRCS+= md_rand.c rand_egd.c rand_eng.c \
221 rand_err.c rand_lib.c rand_nw.c rand_unix.c \
a561f9ff 222 randfile.c
0fae822e 223INCS+= rand.h
984263bc
MD
224
225# rc2
226SRCS+= rc2_cbc.c rc2_ecb.c rc2_skey.c rc2cfb64.c rc2ofb64.c
0fae822e 227INCS+= rc2.h
984263bc
MD
228
229# rc4
e257b235 230SRCS+= rc4_enc.c rc4_fblk.c rc4_skey.c
0fae822e 231INCS+= rc4.h
984263bc
MD
232
233# rc5
a561f9ff
SS
234# .. is patented, so don't compile by default
235#SRCS+= rc5_ecb.c rc5_enc.c rc5_skey.c rc5cfb64.c rc5ofb64.c
0fae822e 236INCS+= rc5.h
984263bc
MD
237
238# ripemd
239SRCS+= rmd_dgst.c rmd_one.c
0fae822e 240INCS+= ripemd.h
984263bc
MD
241
242# rsa
e257b235
PA
243SRCS+= rsa_asn1.c rsa_chk.c rsa_depr.c rsa_eay.c \
244 rsa_eng.c rsa_err.c rsa_gen.c \
a561f9ff 245 rsa_lib.c rsa_none.c rsa_null.c rsa_oaep.c rsa_pk1.c rsa_pss.c \
e257b235 246 rsa_saos.c rsa_sign.c rsa_ssl.c rsa_x931.c rsa_x931g.c
0fae822e 247INCS+= rsa.h
984263bc
MD
248
249# sha
a561f9ff 250SRCS+= sha1_one.c sha1dgst.c sha256.c sha512.c sha_dgst.c sha_one.c
0fae822e 251INCS+= sha.h
984263bc
MD
252
253# stack
254SRCS+= stack.c
0fae822e 255INCS+= stack.h safestack.h
984263bc 256
a561f9ff
SS
257# store
258SRCS+= str_err.c str_lib.c str_meth.c str_mem.c
0fae822e 259INCS+= store.h
a561f9ff 260
984263bc
MD
261# txt_db
262SRCS+= txt_db.c
0fae822e 263INCS+= txt_db.h
984263bc
MD
264
265# ui
266SRCS+= ui_compat.c ui_err.c ui_lib.c ui_openssl.c ui_util.c
0fae822e 267INCS+= ui.h ui_compat.h ui_locl.h
984263bc
MD
268
269# x509
270SRCS+= by_dir.c by_file.c x509_att.c x509_cmp.c x509_d2.c \
271 x509_def.c x509_err.c x509_ext.c x509_lu.c x509_obj.c \
272 x509_r2x.c x509_req.c x509_set.c x509_trs.c x509_txt.c \
a561f9ff 273 x509_v3.c x509_vfy.c x509_vpm.c x509cset.c x509name.c x509rset.c \
984263bc 274 x509spki.c x509type.c x_all.c
0fae822e 275INCS+= x509.h x509_vfy.h
984263bc
MD
276
277# x509v3
a561f9ff 278SRCS+= pcy_cache.c pcy_data.c pcy_lib.c pcy_map.c pcy_node.c pcy_tree.c \
edae4a78 279 v3_addr.c v3_akey.c v3_akeya.c v3_asid.c v3_alt.c v3_bcons.c v3_bitst.c \
984263bc 280 v3_conf.c v3_cpols.c v3_crld.c v3_enum.c v3_extku.c \
a561f9ff
SS
281 v3_genn.c v3_ia5.c v3_info.c v3_int.c v3_lib.c v3_ncons.c v3_ocsp.c \
282 v3_pci.c v3_pcia.c v3_pcons.c v3_pmaps.c v3_pku.c v3_prn.c v3_purp.c \
283 v3_skey.c v3_sxnet.c v3_utl.c v3err.c
0fae822e 284INCS+= x509v3.h
984263bc 285
0fae822e
PA
286SRCS+= buildinf.h
287INCS+= opensslconf.h
984263bc
MD
288INCSDIR= ${INCLUDEDIR}/openssl
289
0fae822e
PA
290CLEANFILES+= buildinf.h opensslconf.h
291
292buildinf.h:
293 ( echo "#ifndef MK1MF_BUILD"; \
294 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
295 echo " #define CFLAGS \"$(CC)\""; \
296 echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
297 echo " #define DATE \"`LC_ALL=C date`\""; \
298 echo "#endif" ) > ${.TARGET}
299
300opensslconf.h: opensslconf-${MACHINE_ARCH}.h
301.if defined(WANT_IDEA)
302 sed '/^# define OPENSSL_NO_IDEA$$/d;/^# define NO_IDEA$$/d' ${.ALLSRC} > ${.TARGET}
303.else
304 cp ${.ALLSRC} ${.TARGET}
305.endif
306
984263bc
MD
307.include <bsd.lib.mk>
308
cecff5c1 309.if defined(WANT_IDEA)
984263bc
MD
310_ideapath= ${LCRYPTO_SRC}/crypto/idea
311.endif
312
313.PATH: \
314 ${LCRYPTO_SRC}/crypto \
315 ${LCRYPTO_SRC}/crypto/aes \
316 ${LCRYPTO_SRC}/crypto/asn1 \
317 ${LCRYPTO_SRC}/crypto/bf \
318 ${LCRYPTO_SRC}/crypto/bio \
319 ${LCRYPTO_SRC}/crypto/bn \
320 ${LCRYPTO_SRC}/crypto/buffer \
0fae822e 321 ${LCRYPTO_SRC}/crypto/camellia \
984263bc
MD
322 ${LCRYPTO_SRC}/crypto/cast \
323 ${LCRYPTO_SRC}/crypto/comp \
324 ${LCRYPTO_SRC}/crypto/conf \
325 ${LCRYPTO_SRC}/crypto/des \
326 ${LCRYPTO_SRC}/crypto/dh \
327 ${LCRYPTO_SRC}/crypto/dsa \
328 ${LCRYPTO_SRC}/crypto/dso \
329 ${LCRYPTO_SRC}/crypto/ec \
a561f9ff
SS
330 ${LCRYPTO_SRC}/crypto/ecdh \
331 ${LCRYPTO_SRC}/crypto/ecdsa \
984263bc
MD
332 ${LCRYPTO_SRC}/crypto/engine \
333 ${LCRYPTO_SRC}/crypto/err \
334 ${LCRYPTO_SRC}/crypto/evp \
335 ${LCRYPTO_SRC}/crypto/hmac \
336 ${_ideapath} \
337 ${LCRYPTO_SRC}/crypto/krb5 \
338 ${LCRYPTO_SRC}/crypto/lhash \
339 ${LCRYPTO_SRC}/crypto/md2 \
340 ${LCRYPTO_SRC}/crypto/md4 \
341 ${LCRYPTO_SRC}/crypto/md5 \
0fae822e 342 ${LCRYPTO_SRC}/crypto/mdc2 \
984263bc
MD
343 ${LCRYPTO_SRC}/crypto/objects \
344 ${LCRYPTO_SRC}/crypto/ocsp \
345 ${LCRYPTO_SRC}/crypto/pem \
346 ${LCRYPTO_SRC}/crypto/pkcs12 \
347 ${LCRYPTO_SRC}/crypto/pkcs7 \
a561f9ff 348 ${LCRYPTO_SRC}/crypto/pqueue \
984263bc
MD
349 ${LCRYPTO_SRC}/crypto/rand \
350 ${LCRYPTO_SRC}/crypto/rc2 \
351 ${LCRYPTO_SRC}/crypto/rc4 \
0fae822e 352 ${LCRYPTO_SRC}/crypto/rc5 \
984263bc
MD
353 ${LCRYPTO_SRC}/crypto/ripemd \
354 ${LCRYPTO_SRC}/crypto/rsa \
355 ${LCRYPTO_SRC}/crypto/sha \
356 ${LCRYPTO_SRC}/crypto/stack \
a561f9ff 357 ${LCRYPTO_SRC}/crypto/store \
984263bc
MD
358 ${LCRYPTO_SRC}/crypto/threads \
359 ${LCRYPTO_SRC}/crypto/txt_db \
360 ${LCRYPTO_SRC}/crypto/ui \
361 ${LCRYPTO_SRC}/crypto/x509 \
362 ${LCRYPTO_SRC}/crypto/x509v3 \
a561f9ff 363 ${LCRYPTO_SRC}/engines \
984263bc
MD
364 ${LCRYPTO_SRC} \
365 ${.CURDIR}/man