2 ## Makefile for OpenSSL
18 # HERE indicates where this Makefile lives. This can be used to indicate
19 # where sub-Makefiles are expected to be. Currently has very limited usage,
20 # and should probably not be bothered with at all.
23 # INSTALL_PREFIX is for package builders so that they can configure
24 # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
25 # Normally it is left empty.
27 INSTALLTOP=/usr/local/ssl
29 # Do not edit this manually. Use Configure --openssldir=DIR do change this!
30 OPENSSLDIR=/usr/local/ssl
32 # NO_IDEA - Define to build without the IDEA algorithm
33 # NO_RC4 - Define to build without the RC4 algorithm
34 # NO_RC2 - Define to build without the RC2 algorithm
35 # THREADS - Define when building with threads, you will probably also need any
36 # system defines as well, i.e. _REENTERANT for Solaris 2.[34]
37 # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing.
38 # TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
39 # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
40 # DEVRANDOM - Give this the value of the 'random device' if your OS supports
41 # one. 32 bytes will be read from this when the random
42 # number generator is initalised.
43 # SSL_FORBID_ENULL - define if you want the server to be not able to use the
44 # NULL encryption ciphers.
46 # LOCK_DEBUG - turns on lots of lock debug output :-)
47 # REF_CHECK - turn on some xyz_free() assertions.
48 # REF_PRINT - prints some stuff on structure free.
49 # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
50 # MFUNC - Make all Malloc/Free/Realloc calls call
51 # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
52 # call application defined callbacks via CRYPTO_set_mem_functions()
53 # MD5_ASM needs to be defined to use the x86 assembler for MD5
54 # SHA1_ASM needs to be defined to use the x86 assembler for SHA1
55 # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
56 # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
58 # PKCS1_CHECK - pkcs1 tests.
72 TARFLAGS= --no-recursion
73 MAKEDEPPROG=makedepend
75 # We let the C compiler driver to take care of .s files. This is done in
76 # order to be excused from maintaining a separate set of architecture
77 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
78 # gcc, then the driver will automatically translate it to -xarch=v8plus
79 # and pass it down to assembler.
83 # For x86 assembler: Set PROCESSOR to 386 if you want to support
87 # CPUID module collects small commonly used assembler snippets
90 DES_ENC= des_enc.o fcrypt_b.o
91 AES_ASM_OBJ=aes_core.o aes_cbc.o
108 # This is the location of fipscanister.o and friends.
109 # The FIPS module build will place it $(INSTALLTOP)/lib
110 # but since $(INSTALLTOP) can only take the default value
111 # when the module is built it will be in /usr/local/ssl/lib
112 # $(INSTALLTOP) for this build make be different so hard
115 FIPSLIBDIR=/usr/local/ssl/lib/
117 # This is set to "y" if fipscanister.o is compiled internally as
118 # opposed to coming from an external validated location.
120 FIPSCANISTERINTERNAL=n
122 # The location of the library which contains fipscanister.o
123 # normally it will be libcrypto unless fipsdso is set in which
124 # case it will be libfips. If not compiling in FIPS mode at all
125 # this is empty making it a useful test for a FIPS compile.
129 # Shared library base address. Currently only used on Windows.
134 DIRS= crypto fips ssl engines apps test tools
135 SHLIBDIRS= crypto ssl fips
137 # dirs in crypto to build
140 md2 md4 md5 sha mdc2 hmac ripemd \
141 des aes rc2 rc4 rc5 idea bf cast camellia seed \
142 bn ec rsa dsa ecdsa dh ecdh dso engine \
143 buffer bio stack lhash rand err \
144 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
146 # keep in mind that the above list is adjusted by ./Configure
147 # according to no-xxx arguments...
149 # tests to perform. "alltests" is a special word indicating that all tests
150 # should be performed.
155 MANDIR=$(OPENSSLDIR)/man
163 EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
165 LIBS= libcrypto.a libssl.a
166 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
167 SHARED_SSL=libssl$(SHLIB_EXT)
170 SHARED_LIBS_LINK_EXTS=
175 NAME= $(BASENAME)-$(VERSION)
177 WTARFILE= $(NAME)-win.tar
181 all: Makefile build_all openssl.pc libssl.pc libcrypto.pc
183 # as we stick to -e, CLEARENV ensures that local variables in lower
184 # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
185 # shell, which [annoyingly enough] terminates unset with error if VAR
186 # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
187 # which terminates unset with error if no variable was present:-(
188 CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
189 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
190 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
191 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
192 $${EXHEADER+EXHEADER} $${HEADER+HEADER} \
193 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
194 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
195 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} \
196 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
197 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
199 BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
200 CC='${CC}' CFLAG='${CFLAG}' \
201 AS='${CC}' ASFLAG='${CFLAG} -c' \
202 AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}' \
203 SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib' \
204 INSTALL_PREFIX='${INSTALL_PREFIX}' \
205 INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' \
206 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD ${MAKEDEPPROG}' \
207 DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}' \
208 MAKEDEPPROG='${MAKEDEPPROG}' \
209 SHARED_LDFLAGS='${SHARED_LDFLAGS}' \
210 KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' \
211 EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' \
212 SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' \
213 PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' \
214 CPUID_OBJ='${CPUID_OBJ}' \
215 BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' \
216 AES_ASM_OBJ='${AES_ASM_OBJ}' \
217 BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' \
218 RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' \
219 SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \
220 MD5_ASM_OBJ='${MD5_ASM_OBJ}' \
221 RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \
222 FIPSLIBDIR='${FIPSLIBDIR}' FIPSCANLIB='${FIPSCANLIB}' \
223 FIPSCANISTERINTERNAL='${FIPSCANISTERINTERNAL}' \
224 FIPS_EX_OBJ='${FIPS_EX_OBJ}' \
225 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
226 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
227 # which in turn eliminates ambiguities in variable treatment with -e.
229 # BUILD_CMD is a generic macro to build a given target in a given
230 # subdirectory. The target must be given through the shell variable
231 # `target' and the subdirectory to build in must be given through `dir'.
232 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
233 # BUILD_ONE_CMD instead.
235 # BUILD_ONE_CMD is a macro to build a given target in a given
236 # subdirectory if that subdirectory is part of $(DIRS). It requires
237 # exactly the same shell variables as BUILD_CMD.
239 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
240 # subdirectories defined in $(DIRS). It requires that the target
241 # is given through the shell variable `target'.
242 BUILD_CMD= if [ -d "$$dir" ]; then \
243 ( cd $$dir && echo "making $$target in $$dir..." && \
244 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
247 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
249 if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
254 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
256 FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \
257 ../crypto/aes/aes_ecb.o \
258 ../crypto/aes/aes_ofb.o \
259 ../crypto/bn/bn_add.o \
260 ../crypto/bn/bn_blind.o \
261 ../crypto/bn/bn_ctx.o \
262 ../crypto/bn/bn_div.o \
263 ../crypto/bn/bn_exp2.o \
264 ../crypto/bn/bn_exp.o \
265 ../crypto/bn/bn_gcd.o \
266 ../crypto/bn/bn_lib.o \
267 ../crypto/bn/bn_mod.o \
268 ../crypto/bn/bn_mont.o \
269 ../crypto/bn/bn_mul.o \
270 ../crypto/bn/bn_prime.o \
271 ../crypto/bn/bn_rand.o \
272 ../crypto/bn/bn_recp.o \
273 ../crypto/bn/bn_shift.o \
274 ../crypto/bn/bn_sqr.o \
275 ../crypto/bn/bn_word.o \
276 ../crypto/bn/bn_x931p.o \
277 ../crypto/buffer/buf_str.o \
278 ../crypto/cryptlib.o \
279 ../crypto/des/cfb64ede.o \
280 ../crypto/des/cfb64enc.o \
281 ../crypto/des/cfb_enc.o \
282 ../crypto/des/ecb3_enc.o \
283 ../crypto/des/ecb_enc.o \
284 ../crypto/des/ofb64ede.o \
285 ../crypto/des/ofb64enc.o \
286 ../crypto/des/fcrypt.o \
287 ../crypto/des/set_key.o \
288 ../crypto/dsa/dsa_utl.o \
289 ../crypto/dsa/dsa_sign.o \
290 ../crypto/dsa/dsa_vrf.o \
291 ../crypto/err/err.o \
292 ../crypto/evp/digest.o \
293 ../crypto/evp/enc_min.o \
294 ../crypto/evp/e_aes.o \
295 ../crypto/evp/e_des3.o \
296 ../crypto/evp/p_sign.o \
297 ../crypto/evp/p_verify.o \
298 ../crypto/mem_clr.o \
300 ../crypto/rand/md_rand.o \
301 ../crypto/rand/rand_egd.o \
302 ../crypto/rand/randfile.o \
303 ../crypto/rand/rand_lib.o \
304 ../crypto/rand/rand_os2.o \
305 ../crypto/rand/rand_unix.o \
306 ../crypto/rand/rand_win.o \
307 ../crypto/rsa/rsa_lib.o \
308 ../crypto/rsa/rsa_none.o \
309 ../crypto/rsa/rsa_oaep.o \
310 ../crypto/rsa/rsa_pk1.o \
311 ../crypto/rsa/rsa_pss.o \
312 ../crypto/rsa/rsa_ssl.o \
313 ../crypto/rsa/rsa_x931.o \
314 ../crypto/sha/sha1dgst.o \
315 ../crypto/sha/sha256.o \
316 ../crypto/sha/sha512.o \
320 build_all: build_libs build_apps build_tests build_tools
322 build_libs: build_crypto build_fips build_ssl build_shared build_engines
325 if [ -n "$(FIPSCANLIB)" ]; then \
326 EXCL_OBJ='$(AES_ASM_OBJ) $(BN_ASM) $(DES_ENC) $(CPUID_OBJ) $(SHA1_ASM_OBJ) $(FIPS_EX_OBJ)' ; export EXCL_OBJ ; \
327 ARX='$(PERL) $${TOP}/util/arx.pl $(AR)' ; \
331 dir=crypto; target=all; $(BUILD_ONE_CMD)
333 @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
335 @dir=ssl; target=all; $(BUILD_ONE_CMD)
337 @dir=engines; target=all; $(BUILD_ONE_CMD)
339 @dir=apps; target=all; $(BUILD_ONE_CMD)
341 @dir=test; target=all; $(BUILD_ONE_CMD)
343 @dir=tools; target=all; $(BUILD_ONE_CMD)
345 all_testapps: build_libs build_testapps
347 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
349 build_shared: $(SHARED_LIBS)
350 libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
351 @if [ "$(SHLIB_TARGET)" != "" ]; then \
352 if [ "$(FIPSCANLIB)" = "libfips" ]; then \
353 $(ARD) libcrypto.a fipscanister.o ; \
354 $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
355 $(AR) libcrypto.a fips/fipscanister.o ; \
357 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
358 FIPSLD_CC=$(CC); CC=fips/fipsld; \
359 export CC FIPSLD_CC; \
361 $(MAKE) -e SHLIBDIRS='crypto' build-shared; \
364 echo "There's no support for shared libraries on this platform" >&2; \
368 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
369 @if [ "$(SHLIB_TARGET)" != "" ]; then \
370 shlibdeps=-lcrypto; \
371 [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
372 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
374 echo "There's no support for shared libraries on this platform" >&2 ; \
378 fips/fipscanister.o: build_fips
379 libfips$(SHLIB_EXT): fips/fipscanister.o
380 @if [ "$(SHLIB_TARGET)" != "" ]; then \
381 FIPSLD_CC=$(CC); CC=fips/fipsld; export CC FIPSLD_CC; \
382 $(MAKE) -f Makefile.shared -e $(BUILDENV) \
383 CC=$${CC} LIBNAME=fips THIS=$@ \
384 LIBEXTRAS=fips/fipscanister.o \
385 LIBDEPS="$(EX_LIBS)" \
386 LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
387 link_o.$(SHLIB_TARGET) || { rm -f $@; exit 1; } \
389 echo "There's no support for shared libraries on this platform" >&2; \
394 dir=fips; target=all; $(BUILD_ONE_CMD)
397 @set -e; for i in $(SHLIBDIRS); do \
398 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
399 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
400 for j in $${tmp:-x}; do \
401 ( set -x; rm -f lib$$i$$j ); \
404 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
405 if [ "$(PLATFORM)" = "Cygwin" ]; then \
406 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
411 @ set -e; for i in ${SHLIBDIRS}; do \
412 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
413 LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
414 LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
415 symlink.$(SHLIB_TARGET); \
416 libs="$$libs -l$$i"; \
419 build-shared: do_$(SHLIB_TARGET) link-shared
422 @ set -e; libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
423 if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
424 libs="$(LIBKRB5) $$libs"; \
426 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
427 LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
428 LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
429 LIBDEPS="$$libs $(EX_LIBS)" \
430 link_a.$(SHLIB_TARGET); \
431 libs="-l$$i $$libs"; \
434 libcrypto.pc: Makefile
435 @ ( echo 'prefix=$(INSTALLTOP)'; \
436 echo 'exec_prefix=$${prefix}'; \
437 echo 'libdir=$${exec_prefix}/lib'; \
438 echo 'includedir=$${prefix}/include'; \
440 echo 'Name: OpenSSL-libcrypto'; \
441 echo 'Description: OpenSSL cryptography library'; \
442 echo 'Version: '$(VERSION); \
444 echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
445 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
448 @ ( echo 'prefix=$(INSTALLTOP)'; \
449 echo 'exec_prefix=$${prefix}'; \
450 echo 'libdir=$${exec_prefix}/lib'; \
451 echo 'includedir=$${prefix}/include'; \
453 echo 'Name: OpenSSL'; \
454 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
455 echo 'Version: '$(VERSION); \
457 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
458 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
461 @ ( echo 'prefix=$(INSTALLTOP)'; \
462 echo 'exec_prefix=$${prefix}'; \
463 echo 'libdir=$${exec_prefix}/lib'; \
464 echo 'includedir=$${prefix}/include'; \
466 echo 'Name: OpenSSL'; \
467 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
468 echo 'Version: '$(VERSION); \
470 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
471 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
473 Makefile: Makefile.org Configure config
474 @echo "Makefile is older than Makefile.org, Configure or config."
475 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
479 rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib
482 rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
483 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
485 rm -f openssl.pc libssl.pc libcrypto.pc
488 @set -e; for i in $(ONEDIRS) ;\
494 $(PERL) util/mk1mf.pl >makefile.one; \
498 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
499 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
502 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
503 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
504 @set -e; target=links; $(RECURSIVE_BUILD_CMD)
507 @(cd test && echo "generating dummy tests (if needed)..." && \
508 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
512 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
516 @(OPENSSL="`pwd`/util/opensslwrap.sh"; \
517 OPENSSL_DEBUG_MEMORY=on; \
518 export OPENSSL OPENSSL_DEBUG_MEMORY; \
519 $(PERL) tools/c_rehash certs)
525 @(cd test && echo "testing..." && \
526 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
527 util/opensslwrap.sh version -a
530 @$(PERL) util/selftest.pl
533 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
536 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
540 find . -name '[^.]*.[ch]' | xargs etags -a
543 $(PERL) util/mkerr.pl -recurse -write
544 (cd engines; $(MAKE) PERL=$(PERL) errors)
545 $(PERL) util/ck_errf.pl */*.c */*/*.c
548 $(PERL) util/mkstack.pl -write
551 $(PERL) util/mkdef.pl crypto update
554 $(PERL) util/mkdef.pl ssl update
556 crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
557 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
558 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
559 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
561 apps/openssl-vms.cnf: apps/openssl.cnf
562 $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
564 crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
565 $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
569 (echo 'Output of `Configure TABLE'"':"; \
570 $(PERL) Configure TABLE) > TABLE
572 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
574 # Build distribution tar-file. As the list of files returned by "find" is
575 # pretty long, on several platforms a "too many arguments" error or similar
576 # would occur. Therefore the list of files is temporarily stored into a file
577 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
578 # tar does not support the --files-from option.
580 find . -type d -print | xargs chmod 755
581 find . -type f -print | xargs chmod a+r
582 find . -type f -perm -0100 -print | xargs chmod a+x
583 find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
584 $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
585 tardy --user_number=0 --user_name=openssl \
586 --group_number=0 --group_name=openssl \
587 --prefix=openssl-$(VERSION) - |\
588 gzip --best >../$(TARFILE).gz; \
589 rm -f ../$(TARFILE).list; \
590 ls -l ../$(TARFILE).gz
593 @$(TAR) $(TARFLAGS) -cvf - \
594 `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\
595 tardy --user_number=0 --user_name=openssl \
596 --group_number=0 --group_name=openssl \
597 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
601 $(PERL) Configure dist
603 @$(MAKE) SDIRS='${SDIRS}' clean
604 @$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
607 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
609 install: all install_docs install_sw
612 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
613 $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
614 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
615 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
616 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
617 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
618 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
619 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
620 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
622 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
623 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
625 @set -e; target=install; $(RECURSIVE_BUILD_CMD)
626 @set -e; for i in $(LIBS) ;\
628 if [ -f "$$i" ]; then \
629 ( echo installing $$i; \
630 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
631 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
632 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
633 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
636 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
637 tmp="$(SHARED_LIBS)"; \
638 for i in $${tmp:-x}; \
640 if [ -f "$$i" -o -f "$$i.a" ]; then \
641 ( echo installing $$i; \
642 if [ "$(PLATFORM)" != "Cygwin" ]; then \
643 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
644 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
645 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
647 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
648 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
649 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
650 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
651 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
652 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
653 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
658 cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
659 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
660 if [ "$(INSTALLTOP)" != "/usr" ]; then \
661 echo 'OpenSSL shared libraries have been installed in:'; \
662 echo ' $(INSTALLTOP)'; \
664 sed -e '1,/^$$/d' doc/openssl-shared.txt; \
667 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
668 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/libcrypto.pc
669 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
670 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/libssl.pc
671 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
672 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
675 @$(PERL) $(TOP)/util/mkdir-p.pl \
676 $(INSTALL_PREFIX)$(MANDIR)/man1 \
677 $(INSTALL_PREFIX)$(MANDIR)/man3 \
678 $(INSTALL_PREFIX)$(MANDIR)/man5 \
679 $(INSTALL_PREFIX)$(MANDIR)/man7
680 @pod2man="`cd util; ./pod2mantest $(PERL)`"; \
683 if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
686 set -e; for i in doc/apps/*.pod; do \
687 fn=`basename $$i .pod`; \
688 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
689 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
690 (cd `$(PERL) util/dirname.pl $$i`; \
692 --section=$$sec --center=OpenSSL \
693 --release=$(VERSION) `basename $$i`") \
694 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
695 $(PERL) util/extract-names.pl < $$i | \
696 (grep -v $$filecase "^$$fn\$$"; true) | \
697 (grep -v "[ ]"; true) | \
698 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
700 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
703 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
704 fn=`basename $$i .pod`; \
705 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
706 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
707 (cd `$(PERL) util/dirname.pl $$i`; \
709 --section=$$sec --center=OpenSSL \
710 --release=$(VERSION) `basename $$i`") \
711 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
712 $(PERL) util/extract-names.pl < $$i | \
713 (grep -v $$filecase "^$$fn\$$"; true) | \
714 (grep -v "[ ]"; true) | \
715 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
717 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
721 # DO NOT DELETE THIS LINE -- make depend depends on it.