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_ENC= aes_core.o aes_cbc.o
112 DIRS= crypto ssl engines apps test tools
114 SHLIBDIRS= crypto ssl
116 # dirs in crypto to build
119 md2 md4 md5 sha mdc2 hmac ripemd whrlpool \
120 des aes rc2 rc4 rc5 idea bf cast camellia seed modes \
121 bn ec rsa dsa ecdsa dh ecdh dso engine \
122 buffer bio stack lhash rand err \
123 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
124 cms pqueue ts jpake store cmac
125 # keep in mind that the above list is adjusted by ./Configure
126 # according to no-xxx arguments...
128 # tests to perform. "alltests" is a special word indicating that all tests
129 # should be performed.
134 MANDIR=$(OPENSSLDIR)/man
139 HTMLDIR=$(OPENSSLDIR)/html
144 EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
146 LIBS= libcrypto.a libssl.a
147 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
148 SHARED_SSL=libssl$(SHLIB_EXT)
150 SHARED_LIBS_LINK_EXTS=
155 NAME= $(BASENAME)-$(VERSION)
157 WTARFILE= $(NAME)-win.tar
161 all: Makefile build_all openssl.pc libssl.pc libcrypto.pc
163 # as we stick to -e, CLEARENV ensures that local variables in lower
164 # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
165 # shell, which [annoyingly enough] terminates unset with error if VAR
166 # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
167 # which terminates unset with error if no variable was present:-(
168 CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
169 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
170 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
171 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
172 $${EXHEADER+EXHEADER} $${HEADER+HEADER} \
173 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
174 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
175 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} \
176 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
177 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
179 BUILDENV= PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
180 CC='$(CC)' CFLAG='$(CFLAG)' \
181 AS='$(CC)' ASFLAG='$(CFLAG) -c' \
182 AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
183 CROSS_COMPILE='$(CROSS_COMPILE)' \
184 PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \
185 SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
186 INSTALL_PREFIX='$(INSTALL_PREFIX)' \
187 INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
189 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
190 DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)' \
191 MAKEDEPPROG='$(MAKEDEPPROG)' \
192 SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
193 KRB5_INCLUDES='$(KRB5_INCLUDES)' LIBKRB5='$(LIBKRB5)' \
194 ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
195 EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
196 SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
197 PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \
198 CPUID_OBJ='$(CPUID_OBJ)' \
199 BN_ASM='$(BN_ASM)' DES_ENC='$(DES_ENC)' \
200 AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
201 BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \
202 RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \
203 SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \
204 MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \
205 RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \
206 WP_ASM_OBJ='$(WP_ASM_OBJ)' \
207 PERLASM_SCHEME='$(PERLASM_SCHEME)' \
208 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
209 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
210 # which in turn eliminates ambiguities in variable treatment with -e.
212 # BUILD_CMD is a generic macro to build a given target in a given
213 # subdirectory. The target must be given through the shell variable
214 # `target' and the subdirectory to build in must be given through `dir'.
215 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
216 # BUILD_ONE_CMD instead.
218 # BUILD_ONE_CMD is a macro to build a given target in a given
219 # subdirectory if that subdirectory is part of $(DIRS). It requires
220 # exactly the same shell variables as BUILD_CMD.
222 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
223 # subdirectories defined in $(DIRS). It requires that the target
224 # is given through the shell variable `target'.
225 BUILD_CMD= if [ -d "$$dir" ]; then \
226 ( cd $$dir && echo "making $$target in $$dir..." && \
227 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
230 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
232 if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
237 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
240 build_all: build_libs build_apps build_tests build_tools
242 build_libs: build_crypto build_ssl build_engines
245 @dir=crypto; target=all; $(BUILD_ONE_CMD)
247 @dir=ssl; target=all; $(BUILD_ONE_CMD)
249 @dir=engines; target=all; $(BUILD_ONE_CMD)
251 @dir=apps; target=all; $(BUILD_ONE_CMD)
253 @dir=test; target=all; $(BUILD_ONE_CMD)
255 @dir=tools; target=all; $(BUILD_ONE_CMD)
257 all_testapps: build_libs build_testapps
259 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
261 libcrypto$(SHLIB_EXT): libcrypto.a
262 @if [ "$(SHLIB_TARGET)" != "" ]; then \
263 $(MAKE) SHLIBDIRS=crypto build-shared; \
265 echo "There's no support for shared libraries on this platform" >&2; \
269 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
270 @if [ "$(SHLIB_TARGET)" != "" ]; then \
271 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
273 echo "There's no support for shared libraries on this platform" >&2; \
278 @set -e; for i in $(SHLIBDIRS); do \
279 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
280 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
281 for j in $${tmp:-x}; do \
282 ( set -x; rm -f lib$$i$$j ); \
285 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
286 if [ "$(PLATFORM)" = "Cygwin" ]; then \
287 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
292 @ set -e; for i in $(SHLIBDIRS); do \
293 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
294 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
295 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
296 symlink.$(SHLIB_TARGET); \
297 libs="$$libs -l$$i"; \
300 build-shared: do_$(SHLIB_TARGET) link-shared
303 @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
304 if [ "$$i" = "ssl" -a -n "$(LIBKRB5)" ]; then \
305 libs="$(LIBKRB5) $$libs"; \
307 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
308 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
309 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
310 LIBDEPS="$$libs $(EX_LIBS)" \
311 link_a.$(SHLIB_TARGET); \
312 libs="-l$$i $$libs"; \
315 libcrypto.pc: Makefile
316 @ ( echo 'prefix=$(INSTALLTOP)'; \
317 echo 'exec_prefix=$${prefix}'; \
318 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
319 echo 'includedir=$${prefix}/include'; \
321 echo 'Name: OpenSSL-libcrypto'; \
322 echo 'Description: OpenSSL cryptography library'; \
323 echo 'Version: '$(VERSION); \
325 echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
326 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
329 @ ( echo 'prefix=$(INSTALLTOP)'; \
330 echo 'exec_prefix=$${prefix}'; \
331 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
332 echo 'includedir=$${prefix}/include'; \
334 echo 'Name: OpenSSL'; \
335 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
336 echo 'Version: '$(VERSION); \
338 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
339 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
342 @ ( echo 'prefix=$(INSTALLTOP)'; \
343 echo 'exec_prefix=$${prefix}'; \
344 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
345 echo 'includedir=$${prefix}/include'; \
347 echo 'Name: OpenSSL'; \
348 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
349 echo 'Version: '$(VERSION); \
351 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
352 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
354 Makefile: Makefile.org Configure config
355 @echo "Makefile is older than Makefile.org, Configure or config."
356 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
360 rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib
363 rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
364 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
366 rm -f openssl.pc libssl.pc libcrypto.pc
369 @set -e; for i in $(ONEDIRS) ;\
375 $(PERL) util/mk1mf.pl >makefile.one; \
379 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
380 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
383 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
384 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
385 @set -e; target=links; $(RECURSIVE_BUILD_CMD)
388 @(cd test && echo "generating dummy tests (if needed)..." && \
389 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
392 rm -rf *.bak include/openssl certs/.0
393 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
396 rehash.time: certs apps
397 @if [ -z "$(CROSS_COMPILE)" ]; then \
398 (OPENSSL="`pwd`/util/opensslwrap.sh"; \
399 [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
400 OPENSSL_DEBUG_MEMORY=on; \
401 export OPENSSL OPENSSL_DEBUG_MEMORY; \
402 $(PERL) tools/c_rehash certs) && \
409 @(cd test && echo "testing..." && \
410 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
411 OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
414 @$(PERL) util/selftest.pl
417 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
420 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
424 find . -name '[^.]*.[ch]' | xargs etags -a
427 $(PERL) util/mkerr.pl -recurse -write
428 (cd engines; $(MAKE) PERL=$(PERL) errors)
429 $(PERL) util/ck_errf.pl -strict */*.c */*/*.c
432 $(PERL) util/mkstack.pl -write
435 $(PERL) util/mkdef.pl crypto update
438 $(PERL) util/mkdef.pl ssl update
440 crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
441 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
442 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
443 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
444 crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num
445 $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h
447 apps/openssl-vms.cnf: apps/openssl.cnf
448 $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
450 crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
451 $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
455 (echo 'Output of `Configure TABLE'"':"; \
456 $(PERL) Configure TABLE) > TABLE
458 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
460 # Build distribution tar-file. As the list of files returned by "find" is
461 # pretty long, on several platforms a "too many arguments" error or similar
462 # would occur. Therefore the list of files is temporarily stored into a file
463 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
464 # tar does not support the --files-from option.
466 find . -type d -print | xargs chmod 755
467 find . -type f -print | xargs chmod a+r
468 find . -type f -perm -0100 -print | xargs chmod a+x
469 find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
470 $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
471 tardy --user_number=0 --user_name=openssl \
472 --group_number=0 --group_name=openssl \
473 --prefix=openssl-$(VERSION) - |\
474 gzip --best >../$(TARFILE).gz; \
475 rm -f ../$(TARFILE).list; \
476 ls -l ../$(TARFILE).gz
479 @$(TAR) $(TARFLAGS) -cvf - \
480 `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` |\
481 tardy --user_number=0 --user_name=openssl \
482 --group_number=0 --group_name=openssl \
483 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
487 $(PERL) Configure dist
489 @$(MAKE) SDIRS='$(SDIRS)' clean
490 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar
493 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
495 install: all install_docs install_sw
498 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
499 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
500 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
501 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
502 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
503 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
504 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
505 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
506 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
508 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
509 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
511 @set -e; target=install; $(RECURSIVE_BUILD_CMD)
512 @set -e; for i in $(LIBS) ;\
514 if [ -f "$$i" ]; then \
515 ( echo installing $$i; \
516 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
517 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
518 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
519 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
522 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
523 tmp="$(SHARED_LIBS)"; \
524 for i in $${tmp:-x}; \
526 if [ -f "$$i" -o -f "$$i.a" ]; then \
527 ( echo installing $$i; \
528 if [ "$(PLATFORM)" != "Cygwin" ]; then \
529 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
530 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
531 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
533 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
534 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
535 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
536 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
537 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
538 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
539 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
541 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
543 *crypto*) i=libeay32.dll;; \
544 *ssl*) i=ssleay32.dll;; \
546 echo installing $$i; \
547 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
548 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
549 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
554 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
555 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
556 if [ "$(INSTALLTOP)" != "/usr" ]; then \
557 echo 'OpenSSL shared libraries have been installed in:'; \
558 echo ' $(INSTALLTOP)'; \
560 sed -e '1,/^$$/d' doc/openssl-shared.txt; \
563 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
564 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
565 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
566 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
567 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
568 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
572 for subdir in apps crypto ssl; do \
573 mkdir -p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
574 for i in doc/$$subdir/*.pod; do \
575 fn=`basename $$i .pod`; \
576 echo "installing html/$$fn.$(HTMLSUFFIX)"; \
578 | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
579 | pod2html --podroot=doc --htmlroot=.. --podpath=apps:crypto:ssl \
580 | sed -r 's/<!DOCTYPE.*//g' \
581 > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
582 $(PERL) util/extract-names.pl < $$i | \
583 grep -v $$filecase "^$$fn\$$" | \
584 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
586 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
592 @$(PERL) $(TOP)/util/mkdir-p.pl \
593 $(INSTALL_PREFIX)$(MANDIR)/man1 \
594 $(INSTALL_PREFIX)$(MANDIR)/man3 \
595 $(INSTALL_PREFIX)$(MANDIR)/man5 \
596 $(INSTALL_PREFIX)$(MANDIR)/man7
597 @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
600 if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
603 set -e; for i in doc/apps/*.pod; do \
604 fn=`basename $$i .pod`; \
605 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
606 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
607 (cd `$(PERL) util/dirname.pl $$i`; \
609 --section=$$sec --center=OpenSSL \
610 --release=$(VERSION) `basename $$i`") \
611 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
612 $(PERL) util/extract-names.pl < $$i | \
613 (grep -v $$filecase "^$$fn\$$"; true) | \
614 (grep -v "[ ]"; true) | \
615 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
617 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
620 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
621 fn=`basename $$i .pod`; \
622 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
623 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
624 (cd `$(PERL) util/dirname.pl $$i`; \
626 --section=$$sec --center=OpenSSL \
627 --release=$(VERSION) `basename $$i`") \
628 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
629 $(PERL) util/extract-names.pl < $$i | \
630 (grep -v $$filecase "^$$fn\$$"; true) | \
631 (grep -v "[ ]"; true) | \
632 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
634 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
638 # DO NOT DELETE THIS LINE -- make depend depends on it.