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
76 # We let the C compiler driver to take care of .s files. This is done in
77 # order to be excused from maintaining a separate set of architecture
78 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
79 # gcc, then the driver will automatically translate it to -xarch=v8plus
80 # and pass it down to assembler.
84 # For x86 assembler: Set PROCESSOR to 386 if you want to support
88 # CPUID module collects small commonly used assembler snippets
91 DES_ENC= des_enc.o fcrypt_b.o
92 AES_ASM_OBJ=aes_core.o aes_cbc.o
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
116 FIPSLIBDIR=/usr/local/ssl/$(LIBDIR)/
118 # This is set to "y" if fipscanister.o is compiled internally as
119 # opposed to coming from an external validated location.
121 FIPSCANISTERINTERNAL=n
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.
130 # Shared library base address. Currently only used on Windows.
135 DIRS= crypto fips ssl engines apps test tools
136 SHLIBDIRS= crypto ssl fips
138 # dirs in crypto to build
141 md2 md4 md5 sha mdc2 hmac ripemd \
142 des aes rc2 rc4 rc5 idea bf cast camellia seed \
143 bn ec rsa dsa ecdsa dh ecdh dso engine \
144 buffer bio stack lhash rand err \
145 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
146 store cms pqueue jpake
147 # keep in mind that the above list is adjusted by ./Configure
148 # according to no-xxx arguments...
150 # tests to perform. "alltests" is a special word indicating that all tests
151 # should be performed.
156 MANDIR=$(OPENSSLDIR)/man
164 EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
166 LIBS= libcrypto.a libssl.a
167 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
168 SHARED_SSL=libssl$(SHLIB_EXT)
171 SHARED_LIBS_LINK_EXTS=
176 NAME= $(BASENAME)-$(VERSION)
178 WTARFILE= $(NAME)-win.tar
182 all: Makefile build_all openssl.pc libssl.pc libcrypto.pc
184 # as we stick to -e, CLEARENV ensures that local variables in lower
185 # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
186 # shell, which [annoyingly enough] terminates unset with error if VAR
187 # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
188 # which terminates unset with error if no variable was present:-(
189 CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
190 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
191 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
192 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
193 $${EXHEADER+EXHEADER} $${HEADER+HEADER} \
194 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
195 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
196 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} \
197 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
198 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
200 BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
201 CC='${CC}' CFLAG='${CFLAG}' \
202 AS='${CC}' ASFLAG='${CFLAG} -c' \
203 AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}' \
204 SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/$(LIBDIR)' \
205 INSTALL_PREFIX='${INSTALL_PREFIX}' \
206 INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' \
207 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD ${MAKEDEPPROG}' \
208 DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}' \
209 MAKEDEPPROG='${MAKEDEPPROG}' \
210 SHARED_LDFLAGS='${SHARED_LDFLAGS}' \
211 KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' \
212 EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' \
213 SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' \
214 PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' \
215 CPUID_OBJ='${CPUID_OBJ}' \
216 BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' \
217 AES_ASM_OBJ='${AES_ASM_OBJ}' \
218 BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' \
219 RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' \
220 SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \
221 MD5_ASM_OBJ='${MD5_ASM_OBJ}' \
222 RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \
223 FIPSLIBDIR='${FIPSLIBDIR}' \
224 FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
225 FIPSCANISTERINTERNAL='${FIPSCANISTERINTERNAL}' \
226 FIPS_EX_OBJ='${FIPS_EX_OBJ}' \
227 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
228 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
229 # which in turn eliminates ambiguities in variable treatment with -e.
231 # BUILD_CMD is a generic macro to build a given target in a given
232 # subdirectory. The target must be given through the shell variable
233 # `target' and the subdirectory to build in must be given through `dir'.
234 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
235 # BUILD_ONE_CMD instead.
237 # BUILD_ONE_CMD is a macro to build a given target in a given
238 # subdirectory if that subdirectory is part of $(DIRS). It requires
239 # exactly the same shell variables as BUILD_CMD.
241 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
242 # subdirectories defined in $(DIRS). It requires that the target
243 # is given through the shell variable `target'.
244 BUILD_CMD= if [ -d "$$dir" ]; then \
245 ( [ $$target != all -a -z "$(FIPSCANLIB)" ] && FIPSCANLIB=/dev/null; \
246 cd $$dir && echo "making $$target in $$dir..." && \
247 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
250 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
252 if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
257 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
259 FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \
260 ../crypto/aes/aes_ecb.o \
261 ../crypto/aes/aes_ofb.o \
262 ../crypto/bn/bn_add.o \
263 ../crypto/bn/bn_blind.o \
264 ../crypto/bn/bn_ctx.o \
265 ../crypto/bn/bn_div.o \
266 ../crypto/bn/bn_exp2.o \
267 ../crypto/bn/bn_exp.o \
268 ../crypto/bn/bn_gcd.o \
269 ../crypto/bn/bn_lib.o \
270 ../crypto/bn/bn_mod.o \
271 ../crypto/bn/bn_mont.o \
272 ../crypto/bn/bn_mul.o \
273 ../crypto/bn/bn_prime.o \
274 ../crypto/bn/bn_rand.o \
275 ../crypto/bn/bn_recp.o \
276 ../crypto/bn/bn_shift.o \
277 ../crypto/bn/bn_sqr.o \
278 ../crypto/bn/bn_word.o \
279 ../crypto/bn/bn_x931p.o \
280 ../crypto/buffer/buf_str.o \
281 ../crypto/cryptlib.o \
282 ../crypto/des/cfb64ede.o \
283 ../crypto/des/cfb64enc.o \
284 ../crypto/des/cfb_enc.o \
285 ../crypto/des/ecb3_enc.o \
286 ../crypto/des/ecb_enc.o \
287 ../crypto/des/ofb64ede.o \
288 ../crypto/des/ofb64enc.o \
289 ../crypto/des/fcrypt.o \
290 ../crypto/des/set_key.o \
291 ../crypto/dsa/dsa_utl.o \
292 ../crypto/dsa/dsa_sign.o \
293 ../crypto/dsa/dsa_vrf.o \
294 ../crypto/err/err.o \
295 ../crypto/evp/digest.o \
296 ../crypto/evp/enc_min.o \
297 ../crypto/evp/e_aes.o \
298 ../crypto/evp/e_des3.o \
299 ../crypto/evp/p_sign.o \
300 ../crypto/evp/p_verify.o \
301 ../crypto/mem_clr.o \
303 ../crypto/rand/md_rand.o \
304 ../crypto/rand/rand_egd.o \
305 ../crypto/rand/randfile.o \
306 ../crypto/rand/rand_lib.o \
307 ../crypto/rand/rand_os2.o \
308 ../crypto/rand/rand_unix.o \
309 ../crypto/rand/rand_win.o \
310 ../crypto/rsa/rsa_lib.o \
311 ../crypto/rsa/rsa_none.o \
312 ../crypto/rsa/rsa_oaep.o \
313 ../crypto/rsa/rsa_pk1.o \
314 ../crypto/rsa/rsa_pss.o \
315 ../crypto/rsa/rsa_ssl.o \
316 ../crypto/rsa/rsa_x931.o \
317 ../crypto/sha/sha1dgst.o \
318 ../crypto/sha/sha256.o \
319 ../crypto/sha/sha512.o \
323 build_all: build_libs build_apps build_tests build_tools
325 build_libs: build_crypto build_fips build_ssl build_shared build_engines
328 if [ -n "$(FIPSCANLIB)" ]; then \
329 EXCL_OBJ='$(AES_ASM_OBJ) $(BN_ASM) $(DES_ENC) $(CPUID_OBJ) $(SHA1_ASM_OBJ) $(FIPS_EX_OBJ)' ; export EXCL_OBJ ; \
330 ARX='$(PERL) $${TOP}/util/arx.pl $(AR)' ; \
334 dir=crypto; target=all; $(BUILD_ONE_CMD)
336 @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
338 @dir=ssl; target=all; $(BUILD_ONE_CMD)
340 @dir=engines; target=all; $(BUILD_ONE_CMD)
342 @dir=apps; target=all; $(BUILD_ONE_CMD)
344 @dir=test; target=all; $(BUILD_ONE_CMD)
346 @dir=tools; target=all; $(BUILD_ONE_CMD)
348 all_testapps: build_libs build_testapps
350 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
352 build_shared: $(SHARED_LIBS)
353 libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
354 @if [ "$(SHLIB_TARGET)" != "" ]; then \
355 if [ "$(FIPSCANLIB)" = "libfips" ]; then \
356 $(ARD) libcrypto.a fipscanister.o ; \
357 $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
358 $(AR) libcrypto.a fips/fipscanister.o ; \
360 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
361 FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
362 export CC FIPSLD_CC; \
364 $(MAKE) -e SHLIBDIRS='crypto' build-shared; \
367 echo "There's no support for shared libraries on this platform" >&2; \
371 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
372 @if [ "$(SHLIB_TARGET)" != "" ]; then \
373 shlibdeps=-lcrypto; \
374 [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
375 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
377 echo "There's no support for shared libraries on this platform" >&2 ; \
381 fips/fipscanister.o: build_fips
382 libfips$(SHLIB_EXT): fips/fipscanister.o
383 @if [ "$(SHLIB_TARGET)" != "" ]; then \
384 FIPSLD_CC="$(CC)"; CC=fips/fipsld; export CC FIPSLD_CC; \
385 $(MAKE) -f Makefile.shared -e $(BUILDENV) \
386 CC=$${CC} LIBNAME=fips THIS=$@ \
387 LIBEXTRAS=fips/fipscanister.o \
388 LIBDEPS="$(EX_LIBS)" \
389 LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
390 link_o.$(SHLIB_TARGET) || { rm -f $@; exit 1; } \
392 echo "There's no support for shared libraries on this platform" >&2; \
397 dir=fips; target=all; $(BUILD_ONE_CMD)
400 @set -e; for i in $(SHLIBDIRS); do \
401 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
402 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
403 for j in $${tmp:-x}; do \
404 ( set -x; rm -f lib$$i$$j ); \
407 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
408 if [ "$(PLATFORM)" = "Cygwin" ]; then \
409 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
414 @ set -e; for i in ${SHLIBDIRS}; do \
415 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
416 LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
417 LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
418 symlink.$(SHLIB_TARGET); \
419 libs="$$libs -l$$i"; \
422 build-shared: do_$(SHLIB_TARGET) link-shared
425 @ set -e; libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
426 if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
427 libs="$(LIBKRB5) $$libs"; \
429 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
430 LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
431 LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
432 LIBDEPS="$$libs $(EX_LIBS)" \
433 link_a.$(SHLIB_TARGET); \
434 libs="-l$$i $$libs"; \
437 libcrypto.pc: Makefile
438 @ ( echo 'prefix=$(INSTALLTOP)'; \
439 echo 'exec_prefix=$${prefix}'; \
440 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
441 echo 'includedir=$${prefix}/include'; \
443 echo 'Name: OpenSSL-libcrypto'; \
444 echo 'Description: OpenSSL cryptography library'; \
445 echo 'Version: '$(VERSION); \
447 echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
448 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
451 @ ( echo 'prefix=$(INSTALLTOP)'; \
452 echo 'exec_prefix=$${prefix}'; \
453 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
454 echo 'includedir=$${prefix}/include'; \
456 echo 'Name: OpenSSL'; \
457 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
458 echo 'Version: '$(VERSION); \
460 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
461 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
464 @ ( echo 'prefix=$(INSTALLTOP)'; \
465 echo 'exec_prefix=$${prefix}'; \
466 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
467 echo 'includedir=$${prefix}/include'; \
469 echo 'Name: OpenSSL'; \
470 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
471 echo 'Version: '$(VERSION); \
473 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
474 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
476 Makefile: Makefile.org Configure config
477 @echo "Makefile is older than Makefile.org, Configure or config."
478 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
482 rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib
485 rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
486 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
488 rm -f openssl.pc libssl.pc libcrypto.pc
491 @set -e; for i in $(ONEDIRS) ;\
497 $(PERL) util/mk1mf.pl >makefile.one; \
501 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
502 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
505 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
506 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
507 @set -e; target=links; $(RECURSIVE_BUILD_CMD)
508 @if [ -z "$(FIPSCANLIB)" ]; then \
509 set -e; target=links; dir=fips ; $(BUILD_CMD) ; \
513 @(cd test && echo "generating dummy tests (if needed)..." && \
514 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
518 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
522 @(OPENSSL="`pwd`/util/opensslwrap.sh"; \
523 OPENSSL_DEBUG_MEMORY=on; \
524 export OPENSSL OPENSSL_DEBUG_MEMORY; \
525 $(PERL) tools/c_rehash certs)
531 @(cd test && echo "testing..." && \
532 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
533 util/opensslwrap.sh version -a
536 @$(PERL) util/selftest.pl
539 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
542 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
546 find . -name '[^.]*.[ch]' | xargs etags -a
549 $(PERL) util/mkerr.pl -recurse -write
550 (cd engines; $(MAKE) PERL=$(PERL) errors)
551 $(PERL) util/ck_errf.pl */*.c */*/*.c
554 $(PERL) util/mkstack.pl -write
557 $(PERL) util/mkdef.pl crypto update
560 $(PERL) util/mkdef.pl ssl update
562 crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
563 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
564 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
565 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
567 apps/openssl-vms.cnf: apps/openssl.cnf
568 $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
570 crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
571 $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
575 (echo 'Output of `Configure TABLE'"':"; \
576 $(PERL) Configure TABLE) > TABLE
578 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
580 # Build distribution tar-file. As the list of files returned by "find" is
581 # pretty long, on several platforms a "too many arguments" error or similar
582 # would occur. Therefore the list of files is temporarily stored into a file
583 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
584 # tar does not support the --files-from option.
586 find . -type d -print | xargs chmod 755
587 find . -type f -print | xargs chmod a+r
588 find . -type f -perm -0100 -print | xargs chmod a+x
589 find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
590 $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
591 tardy --user_number=0 --user_name=openssl \
592 --group_number=0 --group_name=openssl \
593 --prefix=openssl-$(VERSION) - |\
594 gzip --best >../$(TARFILE).gz; \
595 rm -f ../$(TARFILE).list; \
596 ls -l ../$(TARFILE).gz
599 @$(TAR) $(TARFLAGS) -cvf - \
600 `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` |\
601 tardy --user_number=0 --user_name=openssl \
602 --group_number=0 --group_name=openssl \
603 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
607 $(PERL) Configure dist
609 @$(MAKE) SDIRS='${SDIRS}' clean
610 @$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
613 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
615 install: all install_docs install_sw
618 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
619 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
620 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
621 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
622 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
623 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
624 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
625 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
626 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
628 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
629 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
631 @set -e; target=install; $(RECURSIVE_BUILD_CMD)
632 @set -e; for i in $(LIBS) ;\
634 if [ -f "$$i" ]; then \
635 ( echo installing $$i; \
636 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
637 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
638 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
639 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
642 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
643 tmp="$(SHARED_LIBS)"; \
644 for i in $${tmp:-x}; \
646 if [ -f "$$i" -o -f "$$i.a" ]; then \
647 ( echo installing $$i; \
648 if [ "$(PLATFORM)" != "Cygwin" ]; then \
649 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
650 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
651 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
653 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
654 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
655 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
656 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
657 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
658 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
659 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
664 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
665 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
666 if [ "$(INSTALLTOP)" != "/usr" ]; then \
667 echo 'OpenSSL shared libraries have been installed in:'; \
668 echo ' $(INSTALLTOP)'; \
670 sed -e '1,/^$$/d' doc/openssl-shared.txt; \
673 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
674 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
675 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
676 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
677 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
678 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
681 @$(PERL) $(TOP)/util/mkdir-p.pl \
682 $(INSTALL_PREFIX)$(MANDIR)/man1 \
683 $(INSTALL_PREFIX)$(MANDIR)/man3 \
684 $(INSTALL_PREFIX)$(MANDIR)/man5 \
685 $(INSTALL_PREFIX)$(MANDIR)/man7
686 @pod2man="`cd util; ./pod2mantest $(PERL)`"; \
689 if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
692 set -e; for i in doc/apps/*.pod; do \
693 fn=`basename $$i .pod`; \
694 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
695 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
696 (cd `$(PERL) util/dirname.pl $$i`; \
698 --section=$$sec --center=OpenSSL \
699 --release=$(VERSION) `basename $$i`") \
700 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
701 $(PERL) util/extract-names.pl < $$i | \
702 (grep -v $$filecase "^$$fn\$$"; true) | \
703 (grep -v "[ ]"; true) | \
704 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
706 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
709 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
710 fn=`basename $$i .pod`; \
711 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
712 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
713 (cd `$(PERL) util/dirname.pl $$i`; \
715 --section=$$sec --center=OpenSSL \
716 --release=$(VERSION) `basename $$i`") \
717 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
718 $(PERL) util/extract-names.pl < $$i | \
719 (grep -v $$filecase "^$$fn\$$"; true) | \
720 (grep -v "[ ]"; true) | \
721 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
723 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
727 # DO NOT DELETE THIS LINE -- make depend depends on it.