~sbeattie/ubuntu/oneiric/openssl/lp850608

« back to all changes in this revision

Viewing changes to Makefile.org

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-05-01 23:51:53 UTC
  • mfrom: (11.1.20 sid)
  • Revision ID: james.westby@ubuntu.com-20110501235153-bjcxitndquaezb68
Tags: 1.0.0d-2ubuntu1
* Resynchronise with Debian (LP: #675566).  Remaining changes:
  - debian/libssl1.0.0.postinst:
    + Display a system restart required notification bubble on libssl1.0.0
      upgrade.
    + Use a different priority for libssl1.0.0/restart-services depending
      on whether a desktop, or server dist-upgrade is being performed.
  - debian/{libssl1.0.0-udeb.dirs, control, rules}: Create
    libssl1.0.0-udeb, for the benefit of wget-udeb (no wget-udeb package
    in Debian).
  - debian/{libcrypto1.0.0-udeb.dirs, libssl1.0.0.dirs, libssl1.0.0.files,
    rules}: Move runtime libraries to /lib, for the benefit of
    wpasupplicant.
  - debian/patches/aesni.patch: Backport Intel AES-NI support, now from
    http://rt.openssl.org/Ticket/Display.html?id=2065 rather than the
    0.9.8 variant.
  - debian/patches/Bsymbolic-functions.patch: Link using
    -Bsymbolic-functions.
  - debian/patches/perlpath-quilt.patch: Don't change perl #! paths under
    .pc.
  - debian/rules:
    + Don't run 'make test' when cross-building.
    + Use host compiler when cross-building.  Patch from Neil Williams.
    + Don't build for processors no longer supported: i486, i586 (on
      i386), v8 (on sparc).
    + Fix Makefile to properly clean up libs/ dirs in clean target.
    + Replace duplicate files in the doc directory with symlinks.
* Update architectures affected by Bsymbolic-functions.patch.
* Drop debian/patches/no-sslv2.patch; Debian now adds the 'no-ssl2'
  configure option, which compiles out SSLv2 support entirely, so this is
  no longer needed.
* Drop openssl-doc in favour of the libssl-doc package introduced by
  Debian.  Add Conflicts/Replaces until the next LTS release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
EXE_EXT= 
66
66
ARFLAGS=
67
67
AR=ar $(ARFLAGS) r
68
 
ARD=ar $(ARFLAGS) d
69
68
RANLIB= ranlib
 
69
NM= nm
70
70
PERL= perl
71
71
TAR= tar
72
72
TARFLAGS= --no-recursion
89
89
CPUID_OBJ= 
90
90
BN_ASM= bn_asm.o
91
91
DES_ENC= des_enc.o fcrypt_b.o
92
 
AES_ASM_OBJ=aes_core.o aes_cbc.o
 
92
AES_ENC= aes_core.o aes_cbc.o
93
93
BF_ENC= bf_enc.o
94
94
CAST_ENC= c_enc.o
95
95
RC4_ENC= rc4_enc.o
97
97
MD5_ASM_OBJ= 
98
98
SHA1_ASM_OBJ= 
99
99
RMD160_ASM_OBJ= 
 
100
WP_ASM_OBJ=
 
101
CMLL_ENC=
 
102
PERLASM_SCHEME=
100
103
 
101
104
# KRB5 stuff
102
105
KRB5_INCLUDES=
106
109
ZLIB_INCLUDE=
107
110
LIBZLIB=
108
111
 
109
 
# This is the location of fipscanister.o and friends.
110
 
# The FIPS module build will place it $(INSTALLTOP)/lib
111
 
# but since $(INSTALLTOP) can only take the default value
112
 
# when the module is built it will be in /usr/local/ssl/lib
113
 
# $(INSTALLTOP) for this build make be different so hard
114
 
# code the path.
115
 
 
116
 
FIPSLIBDIR=/usr/local/ssl/$(LIBDIR)/
117
 
 
118
 
# This is set to "y" if fipscanister.o is compiled internally as
119
 
# opposed to coming from an external validated location.
120
 
 
121
 
FIPSCANISTERINTERNAL=n
122
 
 
123
 
# The location of the library which contains fipscanister.o
124
 
# normally it will be libcrypto unless fipsdso is set in which
125
 
# case it will be libfips. If not compiling in FIPS mode at all
126
 
# this is empty making it a useful test for a FIPS compile.
127
 
 
128
 
FIPSCANLIB=
129
 
 
130
 
# Shared library base address. Currently only used on Windows.
131
 
#
132
 
 
133
 
BASEADDR=
134
 
 
135
 
DIRS=   crypto fips ssl engines apps tools
136
 
SHLIBDIRS= crypto ssl fips
 
112
DIRS=   crypto ssl engines apps tools
 
113
ENGDIRS= ccgost
 
114
SHLIBDIRS= crypto ssl
137
115
 
138
116
# dirs in crypto to build
139
117
SDIRS=  \
140
118
        objects \
141
 
        md2 md4 md5 sha mdc2 hmac ripemd \
142
 
        des aes rc2 rc4 rc5 idea bf cast camellia seed \
 
119
        md2 md4 md5 sha mdc2 hmac ripemd whrlpool \
 
120
        des aes rc2 rc4 rc5 idea bf cast camellia seed modes \
143
121
        bn ec rsa dsa ecdsa dh ecdh dso engine \
144
122
        buffer bio stack lhash rand err \
145
123
        evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
146
 
        store cms pqueue jpake
 
124
        cms pqueue ts jpake store
147
125
# keep in mind that the above list is adjusted by ./Configure
148
126
# according to no-xxx arguments...
149
127
 
158
136
MAN3=3
159
137
MANSUFFIX=ssl
160
138
MANSECTION=SSL
 
139
HTMLSUFFIX=html
 
140
HTMLDIR=$(OPENSSLDIR)/html
161
141
SHELL=/bin/sh
162
142
 
163
143
TOP=    .
167
147
LIBS=   libcrypto.a libssl.a
168
148
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
169
149
SHARED_SSL=libssl$(SHLIB_EXT)
170
 
SHARED_FIPS=
171
150
SHARED_LIBS=
172
151
SHARED_LIBS_LINK_EXTS=
173
152
SHARED_LDFLAGS=
198
177
                $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS}     \
199
178
                $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
200
179
 
201
 
BUILDENV=       PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
202
 
                CC='${CC}' CFLAG='${CFLAG}'                     \
203
 
                AS='${CC}' ASFLAG='${CFLAG} -c'                 \
204
 
                AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}'    \
205
 
                SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/$(LIBDIR)'     \
206
 
                INSTALL_PREFIX='${INSTALL_PREFIX}'              \
207
 
                INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}'   \
208
 
                LIBDIR='${LIBDIR}' \
209
 
                MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD ${MAKEDEPPROG}' \
210
 
                DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}'    \
211
 
                MAKEDEPPROG='${MAKEDEPPROG}'                    \
212
 
                SHARED_LDFLAGS='${SHARED_LDFLAGS}'              \
213
 
                KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}'   \
214
 
                EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}'       \
215
 
                SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' \
216
 
                PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}'     \
217
 
                CPUID_OBJ='${CPUID_OBJ}'                        \
218
 
                BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}'         \
219
 
                AES_ASM_OBJ='${AES_ASM_OBJ}'                    \
220
 
                BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}'       \
221
 
                RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}'       \
222
 
                SHA1_ASM_OBJ='${SHA1_ASM_OBJ}'                  \
223
 
                MD5_ASM_OBJ='${MD5_ASM_OBJ}'                    \
224
 
                RMD160_ASM_OBJ='${RMD160_ASM_OBJ}'              \
225
 
                FIPSLIBDIR='${FIPSLIBDIR}'                      \
226
 
                FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}"      \
227
 
                FIPSCANISTERINTERNAL='${FIPSCANISTERINTERNAL}'  \
228
 
                FIPS_EX_OBJ='${FIPS_EX_OBJ}'    \
 
180
BUILDENV=       PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
 
181
                CC='$(CC)' CFLAG='$(CFLAG)'                     \
 
182
                AS='$(CC)' ASFLAG='$(CFLAG) -c'                 \
 
183
                AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'        \
 
184
                CROSS_COMPILE='$(CROSS_COMPILE)'        \
 
185
                PERL='$(PERL)' ENGDIRS='$(ENGDIRS)'             \
 
186
                SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)'     \
 
187
                INSTALL_PREFIX='$(INSTALL_PREFIX)'              \
 
188
                INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)'   \
 
189
                LIBDIR='$(LIBDIR)'                              \
 
190
                MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
 
191
                DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)'    \
 
192
                MAKEDEPPROG='$(MAKEDEPPROG)'                    \
 
193
                SHARED_LDFLAGS='$(SHARED_LDFLAGS)'              \
 
194
                KRB5_INCLUDES='$(KRB5_INCLUDES)' LIBKRB5='$(LIBKRB5)'   \
 
195
                ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)'     \
 
196
                EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)'       \
 
197
                SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
 
198
                PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)'     \
 
199
                CPUID_OBJ='$(CPUID_OBJ)'                        \
 
200
                BN_ASM='$(BN_ASM)' DES_ENC='$(DES_ENC)'         \
 
201
                AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)'     \
 
202
                BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)'       \
 
203
                RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)'       \
 
204
                SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)'                  \
 
205
                MD5_ASM_OBJ='$(MD5_ASM_OBJ)'                    \
 
206
                RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)'              \
 
207
                WP_ASM_OBJ='$(WP_ASM_OBJ)'                      \
 
208
                PERLASM_SCHEME='$(PERLASM_SCHEME)'              \
229
209
                THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
230
210
# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
231
211
# which in turn eliminates ambiguities in variable treatment with -e.
244
224
# subdirectories defined in $(DIRS).  It requires that the target
245
225
# is given through the shell variable `target'.
246
226
BUILD_CMD=  if [ -d "$$dir" ]; then \
247
 
            (   [ $$target != all -a -z "$(FIPSCANLIB)" ] && FIPSCANLIB=/dev/null; \
248
 
                cd $$dir && echo "making $$target in $$dir..." && \
 
227
            (   cd $$dir && echo "making $$target in $$dir..." && \
249
228
                $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
250
229
            ) || exit 1; \
251
230
            fi
252
231
RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
253
232
BUILD_ONE_CMD=\
254
 
        if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
 
233
        if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
255
234
                $(BUILD_CMD); \
256
235
        fi
257
236
 
258
237
reflect:
259
238
        @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
260
239
 
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 \
304
 
        ../crypto/mem.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 \
322
 
        ../crypto/uid.o
323
 
 
324
240
sub_all: build_all
325
241
build_all: build_libs build_apps build_tests build_tools
326
242
 
327
 
build_libs: build_crypto build_fips build_ssl build_shared build_engines
 
243
build_libs: build_crypto build_ssl build_engines
328
244
 
329
245
build_crypto:
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)' ; \
333
 
        else \
334
 
                ARX='${AR}' ; \
335
 
        fi ; export ARX ; \
336
 
                dir=crypto; target=all; $(BUILD_ONE_CMD)
337
 
build_fips:
338
 
        @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
339
 
build_ssl: build_crypto
 
246
        @dir=crypto; target=all; $(BUILD_ONE_CMD)
 
247
build_ssl:
340
248
        @dir=ssl; target=all; $(BUILD_ONE_CMD)
341
 
build_engines: build_crypto
 
249
build_engines:
342
250
        @dir=engines; target=all; $(BUILD_ONE_CMD)
343
 
build_apps: build_libs
 
251
build_apps:
344
252
        @dir=apps; target=all; $(BUILD_ONE_CMD)
345
 
build_tests: build_libs
 
253
build_tests:
346
254
        @dir=test; target=all; $(BUILD_ONE_CMD)
347
 
build_tools: build_libs
 
255
build_tools:
348
256
        @dir=tools; target=all; $(BUILD_ONE_CMD)
349
257
 
350
258
all_testapps: build_libs build_testapps
351
259
build_testapps:
352
260
        @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
353
261
 
354
 
build_shared:   $(SHARED_LIBS)
355
 
libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
 
262
libcrypto$(SHLIB_EXT): libcrypto.a
356
263
        @if [ "$(SHLIB_TARGET)" != "" ]; then \
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 ; \
361
 
                else \
362
 
                        if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
363
 
                                FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
364
 
                                export CC FIPSLD_CC; \
365
 
                        fi; \
366
 
                        $(MAKE) -e SHLIBDIRS='crypto' build-shared; \
367
 
                fi \
 
264
                $(MAKE) SHLIBDIRS=crypto build-shared; \
368
265
        else \
369
266
                echo "There's no support for shared libraries on this platform" >&2; \
370
267
                exit 1; \
372
269
 
373
270
libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
374
271
        @if [ "$(SHLIB_TARGET)" != "" ]; then \
375
 
                shlibdeps=-lcrypto; \
376
 
                [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
377
 
                $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
378
 
        else \
379
 
                echo "There's no support for shared libraries on this platform" >&2 ; \
380
 
                exit 1; \
381
 
        fi
382
 
 
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; } \
 
272
                $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
393
273
        else \
394
274
                echo "There's no support for shared libraries on this platform" >&2; \
395
275
                exit 1; \
396
276
        fi
397
277
 
398
 
libfips.a:
399
 
        dir=fips; target=all; $(BUILD_ONE_CMD)
400
 
 
401
278
clean-shared:
402
279
        @set -e; for i in $(SHLIBDIRS); do \
403
280
                if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
413
290
        done
414
291
 
415
292
link-shared:
416
 
        @ set -e; for i in ${SHLIBDIRS}; do \
 
293
        @ set -e; for i in $(SHLIBDIRS); do \
417
294
                $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
418
 
                        LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
419
 
                        LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
 
295
                        LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
 
296
                        LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
420
297
                        symlink.$(SHLIB_TARGET); \
421
298
                libs="$$libs -l$$i"; \
422
299
        done
424
301
build-shared: do_$(SHLIB_TARGET) link-shared
425
302
 
426
303
do_$(SHLIB_TARGET):
427
 
        @ set -e; libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
428
 
                if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 
304
        @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
 
305
                if [ "$$i" = "ssl" -a -n "$(LIBKRB5)" ]; then \
429
306
                        libs="$(LIBKRB5) $$libs"; \
430
307
                fi; \
431
308
                $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
432
 
                        LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
433
 
                        LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
 
309
                        LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
 
310
                        LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
434
311
                        LIBDEPS="$$libs $(EX_LIBS)" \
435
312
                        link_a.$(SHLIB_TARGET); \
436
313
                libs="-l$$i $$libs"; \
510
387
        @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
511
388
        @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
512
389
        @set -e; target=links; $(RECURSIVE_BUILD_CMD)
513
 
        @if [ -z "$(FIPSCANLIB)" ]; then \
514
 
                set -e; target=links; dir=fips ; $(BUILD_CMD) ; \
515
 
        fi
516
390
 
517
391
gentests:
518
392
        @(cd test && echo "generating dummy tests (if needed)..." && \
519
 
        $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
 
393
        $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
520
394
 
521
395
dclean:
522
 
        rm -f *.bak
 
396
        rm -rf *.bak include/openssl certs/.0
523
397
        @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
524
398
 
525
399
rehash: rehash.time
526
400
rehash.time: certs apps
527
401
        @if [ -z "$(CROSS_COMPILE)" ]; then \
528
402
                (OPENSSL="`pwd`/util/opensslwrap.sh"; \
 
403
                [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
529
404
                OPENSSL_DEBUG_MEMORY=on; \
530
405
                export OPENSSL OPENSSL_DEBUG_MEMORY; \
531
406
                $(PERL) tools/c_rehash certs) && \
532
407
                touch rehash.time; \
533
 
        fi
 
408
        else :; fi
534
409
 
535
410
test:   tests
536
411
 
537
412
tests: rehash
538
413
        @(cd test && echo "testing..." && \
539
 
        $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
540
 
        util/opensslwrap.sh version -a
 
414
        $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
 
415
        OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
541
416
 
542
417
report:
543
418
        @$(PERL) util/selftest.pl
570
445
        $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
571
446
crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
572
447
        $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
 
448
crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num
 
449
        $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h
573
450
 
574
451
apps/openssl-vms.cnf: apps/openssl.cnf
575
452
        $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
582
459
        (echo 'Output of `Configure TABLE'"':"; \
583
460
        $(PERL) Configure TABLE) > TABLE
584
461
 
585
 
update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
 
462
update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h crypto/objects/obj_xref.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
586
463
 
587
464
# Build distribution tar-file. As the list of files returned by "find" is
588
465
# pretty long, on several platforms a "too many arguments" error or similar
613
490
dist:   
614
491
        $(PERL) Configure dist
615
492
        @$(MAKE) dist_pem_h
616
 
        @$(MAKE) SDIRS='${SDIRS}' clean
617
 
        @$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
 
493
        @$(MAKE) SDIRS='$(SDIRS)' clean
 
494
        @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar
618
495
 
619
496
dist_pem_h:
620
497
        (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
624
501
install_sw:
625
502
        @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
626
503
                $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
627
 
                $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines \
 
504
                $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/openssl-1.0.0/engines \
628
505
                $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
629
506
                $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
630
507
                $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
665
542
                                        chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
666
543
                                        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
667
544
                                fi ); \
 
545
                                if expr $(PLATFORM) : 'mingw' > /dev/null; then \
 
546
                                (       case $$i in \
 
547
                                                *crypto*) i=libeay32.dll;; \
 
548
                                                *ssl*)    i=ssleay32.dll;; \
 
549
                                        esac; \
 
550
                                        echo installing $$i; \
 
551
                                        cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
 
552
                                        chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
 
553
                                        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
 
554
                                fi; \
668
555
                        fi; \
669
556
                done; \
670
557
                (       here="`pwd`"; \
684
571
        cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
685
572
        chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
686
573
 
 
574
install_html_docs:
 
575
        here="`pwd`"; \
 
576
        for subdir in apps crypto ssl; do \
 
577
                mkdir -p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
 
578
                for i in doc/$$subdir/*.pod; do \
 
579
                        fn=`basename $$i .pod`; \
 
580
                        echo "installing html/$$fn.$(HTMLSUFFIX)"; \
 
581
                        cat $$i \
 
582
                        | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
 
583
                        | pod2html --podroot=doc --htmlroot=.. --podpath=apps:crypto:ssl \
 
584
                        | sed -r 's/<!DOCTYPE.*//g' \
 
585
                        > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
 
586
                        $(PERL) util/extract-names.pl < $$i | \
 
587
                                grep -v $$filecase "^$$fn\$$" | \
 
588
                                (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
 
589
                                 while read n; do \
 
590
                                        PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
 
591
                                 done); \
 
592
                done; \
 
593
        done
 
594
 
687
595
install_docs:
688
596
        @$(PERL) $(TOP)/util/mkdir-p.pl \
689
597
                $(INSTALL_PREFIX)$(MANDIR)/man1 \
710
618
                        (grep -v "[     ]"; true) | \
711
619
                        (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
712
620
                         while read n; do \
713
 
                                $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
 
621
                                PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
714
622
                         done); \
715
623
        done; \
716
624
        set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
727
635
                        (grep -v "[     ]"; true) | \
728
636
                        (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
729
637
                         while read n; do \
730
 
                                $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
 
638
                                PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
731
639
                         done); \
732
640
        done
733
641