14
14
SHLIB_EXT=.so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
15
15
PLATFORM=debian-amd64
16
OPTIONS=--prefix=/usr --openssldir=/usr/lib/ssl enable-zlib enable-tlsext no-camellia no-gmp no-idea no-krb5 no-mdc2 no-rc5 no-rfc3779 no-seed no-shared no-sslv2 no-zlib-dynamic
17
CONFIGURE_ARGS=--prefix=/usr --openssldir=/usr/lib/ssl no-idea no-mdc2 no-rc5 zlib enable-tlsext no-sslv2 debian-amd64
16
OPTIONS=--prefix=/usr --openssldir=/usr/lib/ssl enable-zlib enable-tlsext no-camellia no-capieng no-cms no-gmp no-idea no-jpake no-krb5 no-mdc2 no-montasm no-rc5 no-rfc3779 no-seed no-shared no-zlib-dynamic
17
CONFIGURE_ARGS=--prefix=/usr --openssldir=/usr/lib/ssl no-idea no-mdc2 no-rc5 zlib enable-tlsext debian-amd64
18
18
SHLIB_TARGET=linux-shared
20
20
# HERE indicates where this Makefile lives. This can be used to indicate
60
60
# PKCS1_CHECK - pkcs1 tests.
63
CFLAG= -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int -DMD5_ASM
64
DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_SSLV2
63
CFLAG= -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM
64
DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED
66
EX_LIBS= -ldl -Wl,-Bsymbolic-functions -lz
70
71
RANLIB= /usr/bin/ranlib
71
72
PERL= /usr/bin/perl
88
89
# CPUID module collects small commonly used assembler snippets
89
90
CPUID_OBJ= x86_64cpuid.o
91
BN_ASM= x86_64-gcc.o x86_64-mont.o
91
92
DES_ENC= des_enc.o fcrypt_b.o
92
AES_ASM_OBJ= aes_core.o aes_cbc.o
93
AES_ASM_OBJ= aes-x86_64.o
96
RC4_ENC= rc4_enc.o rc4_skey.o
97
98
MD5_ASM_OBJ= md5-x86_64.o
99
SHA1_ASM_OBJ= sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o
110
# This is the location of fipscanister.o and friends.
111
# The FIPS module build will place it $(INSTALLTOP)/lib
112
# but since $(INSTALLTOP) can only take the default value
113
# when the module is built it will be in /usr/local/ssl/lib
114
# $(INSTALLTOP) for this build make be different so hard
117
FIPSLIBDIR=/usr/local/ssl/fips-1.0/lib/
119
# This is set to "y" if fipscanister.o is compiled internally as
120
# opposed to coming from an external validated location.
122
FIPSCANISTERINTERNAL=n
124
# The location of the library which contains fipscanister.o
125
# normally it will be libcrypto unless fipsdso is set in which
126
# case it will be libfips. If not compiling in FIPS mode at all
127
# this is empty making it a useful test for a FIPS compile.
131
# Shared library base address. Currently only used on Windows.
109
136
DIRS= crypto ssl engines apps tools
110
137
SHLIBDIRS= crypto ssl
194
222
SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \
195
223
MD5_ASM_OBJ='${MD5_ASM_OBJ}' \
196
224
RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \
225
FIPSLIBDIR='${FIPSLIBDIR}' \
226
FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
227
FIPSCANISTERINTERNAL='${FIPSCANISTERINTERNAL}' \
228
FIPS_EX_OBJ='${FIPS_EX_OBJ}' \
197
229
THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
198
230
# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
199
231
# which in turn eliminates ambiguities in variable treatment with -e.
212
244
# subdirectories defined in $(DIRS). It requires that the target
213
245
# is given through the shell variable `target'.
214
246
BUILD_CMD= if [ -d "$$dir" ]; then \
215
( cd $$dir && echo "making $$target in $$dir..." && \
247
( [ $$target != all -a -z "$(FIPSCANLIB)" ] && FIPSCANLIB=/dev/null; \
248
cd $$dir && echo "making $$target in $$dir..." && \
216
249
$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
226
259
@[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
261
FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \
262
../crypto/aes/aes_ecb.o \
263
../crypto/aes/aes_ofb.o \
264
../crypto/bn/bn_add.o \
265
../crypto/bn/bn_blind.o \
266
../crypto/bn/bn_ctx.o \
267
../crypto/bn/bn_div.o \
268
../crypto/bn/bn_exp2.o \
269
../crypto/bn/bn_exp.o \
270
../crypto/bn/bn_gcd.o \
271
../crypto/bn/bn_lib.o \
272
../crypto/bn/bn_mod.o \
273
../crypto/bn/bn_mont.o \
274
../crypto/bn/bn_mul.o \
275
../crypto/bn/bn_prime.o \
276
../crypto/bn/bn_rand.o \
277
../crypto/bn/bn_recp.o \
278
../crypto/bn/bn_shift.o \
279
../crypto/bn/bn_sqr.o \
280
../crypto/bn/bn_word.o \
281
../crypto/bn/bn_x931p.o \
282
../crypto/buffer/buf_str.o \
283
../crypto/cryptlib.o \
284
../crypto/des/cfb64ede.o \
285
../crypto/des/cfb64enc.o \
286
../crypto/des/cfb_enc.o \
287
../crypto/des/ecb3_enc.o \
288
../crypto/des/ecb_enc.o \
289
../crypto/des/ofb64ede.o \
290
../crypto/des/ofb64enc.o \
291
../crypto/des/fcrypt.o \
292
../crypto/des/set_key.o \
293
../crypto/dsa/dsa_utl.o \
294
../crypto/dsa/dsa_sign.o \
295
../crypto/dsa/dsa_vrf.o \
296
../crypto/err/err.o \
297
../crypto/evp/digest.o \
298
../crypto/evp/enc_min.o \
299
../crypto/evp/e_aes.o \
300
../crypto/evp/e_des3.o \
301
../crypto/evp/p_sign.o \
302
../crypto/evp/p_verify.o \
303
../crypto/mem_clr.o \
305
../crypto/rand/md_rand.o \
306
../crypto/rand/rand_egd.o \
307
../crypto/rand/randfile.o \
308
../crypto/rand/rand_lib.o \
309
../crypto/rand/rand_os2.o \
310
../crypto/rand/rand_unix.o \
311
../crypto/rand/rand_win.o \
312
../crypto/rsa/rsa_lib.o \
313
../crypto/rsa/rsa_none.o \
314
../crypto/rsa/rsa_oaep.o \
315
../crypto/rsa/rsa_pk1.o \
316
../crypto/rsa/rsa_pss.o \
317
../crypto/rsa/rsa_ssl.o \
318
../crypto/rsa/rsa_x931.o \
319
../crypto/sha/sha1dgst.o \
320
../crypto/sha/sha256.o \
321
../crypto/sha/sha512.o \
228
324
sub_all: build_all
229
325
build_all: build_libs build_apps build_tests build_tools
231
build_libs: build_crypto build_ssl build_engines
327
build_libs: build_crypto build_fips build_ssl build_shared build_engines
234
@dir=crypto; target=all; $(BUILD_ONE_CMD)
330
if [ -n "$(FIPSCANLIB)" ]; then \
331
EXCL_OBJ='$(AES_ASM_OBJ) $(BN_ASM) $(DES_ENC) $(CPUID_OBJ) $(SHA1_ASM_OBJ) $(FIPS_EX_OBJ)' ; export EXCL_OBJ ; \
332
ARX='$(PERL) $${TOP}/util/arx.pl $(AR)' ; \
336
dir=crypto; target=all; $(BUILD_ONE_CMD)
338
@dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
236
340
@dir=ssl; target=all; $(BUILD_ONE_CMD)
248
352
@dir=crypto; target=testapps; $(BUILD_ONE_CMD)
250
libcrypto$(SHLIB_EXT): libcrypto.a
354
build_shared: $(SHARED_LIBS)
355
libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
251
356
@if [ "$(SHLIB_TARGET)" != "" ]; then \
252
$(MAKE) SHLIBDIRS=crypto build-shared; \
357
if [ "$(FIPSCANLIB)" = "libfips" ]; then \
358
$(ARD) libcrypto.a fipscanister.o ; \
359
$(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
360
$(AR) libcrypto.a fips/fipscanister.o ; \
362
if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
363
FIPSLD_CC=$(CC); CC=fips/fipsld; \
364
export CC FIPSLD_CC; \
366
$(MAKE) -e SHLIBDIRS='crypto' build-shared; \
254
369
echo "There's no support for shared libraries on this platform" >&2; \
258
373
libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
259
374
@if [ "$(SHLIB_TARGET)" != "" ]; then \
260
$(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
375
shlibdeps=-lcrypto; \
376
[ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
377
$(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
379
echo "There's no support for shared libraries on this platform" >&2 ; \
383
fips/fipscanister.o: build_fips
384
libfips$(SHLIB_EXT): fips/fipscanister.o
385
@if [ "$(SHLIB_TARGET)" != "" ]; then \
386
FIPSLD_CC=$(CC); CC=fips/fipsld; export CC FIPSLD_CC; \
387
$(MAKE) -f Makefile.shared -e $(BUILDENV) \
388
CC=$${CC} LIBNAME=fips THIS=$@ \
389
LIBEXTRAS=fips/fipscanister.o \
390
LIBDEPS="$(EX_LIBS)" \
391
LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
392
link_o.$(SHLIB_TARGET) || { rm -f $@; exit 1; } \
262
394
echo "There's no support for shared libraries on this platform" >&2; \
399
dir=fips; target=all; $(BUILD_ONE_CMD)
267
402
@set -e; for i in $(SHLIBDIRS); do \
268
403
if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
375
510
@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
376
511
@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
377
512
@set -e; target=links; $(RECURSIVE_BUILD_CMD)
513
@if [ -z "$(FIPSCANLIB)" ]; then \
514
set -e; target=links; dir=fips ; $(BUILD_CMD) ; \
380
518
@(cd test && echo "generating dummy tests (if needed)..." && \