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 to 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. _REENTRANT 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 # MFUNC - Make all Malloc/Free/Realloc calls call
50 # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
51 # call application defined callbacks via CRYPTO_set_mem_functions()
52 # MD5_ASM needs to be defined to use the x86 assembler for MD5
53 # SHA1_ASM needs to be defined to use the x86 assembler for SHA1
54 # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
55 # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
57 # PKCS1_CHECK - pkcs1 tests.
73 TARFLAGS= --no-recursion
74 MAKEDEPPROG=makedepend
77 # We let the C compiler driver to take care of .s files. This is done in
78 # order to be excused from maintaining a separate set of architecture
79 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
80 # gcc, then the driver will automatically translate it to -xarch=v8plus
81 # and pass it down to assembler.
85 # For x86 assembler: Set PROCESSOR to 386 if you want to support
89 # CPUID module collects small commonly used assembler snippets
93 DES_ENC= des_enc.o fcrypt_b.o
94 AES_ENC= aes_core.o aes_cbc.o
106 CHACHA_ENC= chacha_enc.o
114 # This is the location of fipscanister.o and friends.
115 # The FIPS module build will place it $(INSTALLTOP)/lib
116 # but since $(INSTALLTOP) can only take the default value
117 # when the module is built it will be in /usr/local/ssl/lib
118 # $(INSTALLTOP) for this build may be different so hard
121 FIPSLIBDIR=/usr/local/ssl/$(LIBDIR)/
123 # The location of the library which contains fipscanister.o
124 # normally it will be libcrypto. If not compiling in FIPS mode
125 # at all 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 ssl engines apps test tools
135 SHLIBDIRS= crypto ssl
136 INSTALL_SUBS= engines apps tools
138 # dirs in crypto to build
141 md2 md4 md5 sha mdc2 hmac ripemd whrlpool poly1305 \
142 des aes rc2 rc4 rc5 idea bf cast camellia seed chacha modes \
143 bn ec rsa dsa dh dso engine \
144 buffer bio stack lhash rand err \
145 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui \
146 cms pqueue ts jpake srp store cmac ct async kdf
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
161 HTMLDIR=$(OPENSSLDIR)/html
165 LIBS= libcrypto.a libssl.a
166 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
167 SHARED_SSL=libssl$(SHLIB_EXT)
169 SHARED_LIBS_LINK_EXTS=
174 NAME= $(BASENAME)-$(VERSION)
175 TARFILE= ../$(NAME).tar
178 # Directories created on install if they don't exist.
180 $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
181 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
182 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
183 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
184 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
185 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
186 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
187 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
189 all: Makefile build_all
191 # as we stick to -e, CLEARENV ensures that local variables in lower
192 # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
193 # shell, which [annoyingly enough] terminates unset with error if VAR
194 # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
195 # which terminates unset with error if no variable was present:-(
196 CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
197 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
198 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
199 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
201 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
202 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
203 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \
204 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
205 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
207 # LC_ALL=C ensures that error [and other] messages are delivered in
208 # same language for uniform treatment.
209 BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
210 CC='$(CC)' CFLAG='$(CFLAG)' \
211 AS='$(CC)' ASFLAG='$(CFLAG) -c' \
212 AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
213 CROSS_COMPILE='$(CROSS_COMPILE)' \
215 SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
216 INSTALL_PREFIX='$(INSTALL_PREFIX)' \
217 INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
219 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
220 DEPFLAG='$(DEPFLAG)' \
221 MAKEDEPPROG='$(MAKEDEPPROG)' \
222 SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
223 ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
224 EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
225 SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
226 PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \
227 CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \
228 EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \
229 AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
230 BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \
231 RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \
232 SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \
233 MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \
234 RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \
235 WP_ASM_OBJ='$(WP_ASM_OBJ)' \
236 MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \
237 ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)' \
238 CHACHA_ENC='$(CHACHA_ENC)' \
239 POLY1305_ASM_OBJ='$(POLY1305_ASM_OBJ)' \
240 PERLASM_SCHEME='$(PERLASM_SCHEME)' \
241 FIPSLIBDIR='${FIPSLIBDIR}' \
242 FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
243 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
244 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
245 # which in turn eliminates ambiguities in variable treatment with -e.
247 # BUILD_CMD is a generic macro to build a given target in a given
248 # subdirectory. The target must be given through the shell variable
249 # `target' and the subdirectory to build in must be given through `dir'.
250 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
251 # BUILD_ONE_CMD instead.
253 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
254 # subdirectories defined in $(DIRS). It requires that the target
255 # is given through the shell variable `target'.
257 # BUILD_ONE_CMD is a macro to build a given target in a given
258 # subdirectory if that subdirectory is part of $(DIRS). It requires
259 # exactly the same shell variables as BUILD_CMD.
260 BUILD_CMD= if [ -d "$$dir" ]; then \
261 ( cd $$dir && echo "making $$target in $$dir..." && \
262 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
265 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
267 if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
272 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
276 build_all: build_libs build_apps build_tests build_tools
278 build_libs: build_libcrypto build_libssl openssl.pc
280 build_libcrypto: build_crypto build_engines libcrypto.pc
281 build_libssl: build_ssl libssl.pc
284 @dir=crypto; target=all; $(BUILD_ONE_CMD)
285 build_ssl: build_crypto
286 @dir=ssl; target=all; $(BUILD_ONE_CMD)
287 build_engines: build_crypto
288 @dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD)
290 build_apps: build_libs
291 @dir=apps; target=all; $(BUILD_ONE_CMD)
292 build_tests: build_libs
293 @dir=test; target=all; $(BUILD_ONE_CMD)
294 build_tools: build_libs
295 @dir=tools; target=all; $(BUILD_ONE_CMD)
297 all_testapps: build_libs build_testapps
299 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
301 libcrypto$(SHLIB_EXT): libcrypto.a
302 @if [ "$(SHLIB_TARGET)" != "" ]; then \
303 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
304 FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
305 export CC FIPSLD_CC; \
307 $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \
309 echo "There's no support for shared libraries on this platform" >&2; \
313 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
314 @if [ "$(SHLIB_TARGET)" != "" ]; then \
315 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
317 echo "There's no support for shared libraries on this platform" >&2; \
322 @set -e; for i in $(SHLIBDIRS); do \
323 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
324 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
325 for j in $${tmp:-x}; do \
326 ( set -x; rm -f lib$$i$$j ); \
329 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
330 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
331 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
336 @ set -e; for i in $(SHLIBDIRS); do \
337 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
338 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
339 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
340 symlink.$(SHLIB_TARGET); \
341 libs="$$libs -l$$i"; \
344 build-shared: do_$(SHLIB_TARGET) link-shared
347 @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
348 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
349 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
350 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
351 LIBDEPS="$$libs $(EX_LIBS)" \
352 link_a.$(SHLIB_TARGET); \
353 libs="-l$$i $$libs"; \
356 libcrypto.pc: Makefile
357 @ ( echo 'prefix=$(INSTALLTOP)'; \
358 echo 'exec_prefix=$${prefix}'; \
359 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
360 echo 'includedir=$${prefix}/include'; \
362 echo 'Name: OpenSSL-libcrypto'; \
363 echo 'Description: OpenSSL cryptography library'; \
364 echo 'Version: '$(VERSION); \
366 echo 'Libs: -L$${libdir} -lcrypto'; \
367 echo 'Libs.private: $(EX_LIBS)'; \
368 echo 'Cflags: -I$${includedir}' ) > libcrypto.pc
371 @ ( echo 'prefix=$(INSTALLTOP)'; \
372 echo 'exec_prefix=$${prefix}'; \
373 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
374 echo 'includedir=$${prefix}/include'; \
376 echo 'Name: OpenSSL-libssl'; \
377 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
378 echo 'Version: '$(VERSION); \
379 echo 'Requires.private: libcrypto'; \
380 echo 'Libs: -L$${libdir} -lssl'; \
381 echo 'Libs.private: $(EX_LIBS)'; \
382 echo 'Cflags: -I$${includedir}' ) > libssl.pc
385 @ ( echo 'prefix=$(INSTALLTOP)'; \
386 echo 'exec_prefix=$${prefix}'; \
387 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
388 echo 'includedir=$${prefix}/include'; \
390 echo 'Name: OpenSSL'; \
391 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
392 echo 'Version: '$(VERSION); \
393 echo 'Requires: libssl libcrypto' ) > openssl.pc
395 Makefile: Makefile.in Configure config
396 @echo "Makefile is older than Makefile.in, Configure or config."
397 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
401 rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
404 rm -f */*/*.o */*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
405 rm -rf *.bak certs/.0
406 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
407 rm -f $(LIBS) tags TAGS
408 rm -f openssl.pc libssl.pc libcrypto.pc
413 $(PERL) util/mk1mf.pl >makefile.one; \
417 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
418 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
421 @(cd test && echo "generating dummy tests (if needed)..." && \
422 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
425 rehash.time: certs build_apps
426 @if [ -z "$(CROSS_COMPILE)" ]; then \
427 (OPENSSL="`pwd`/util/opensslwrap.sh"; \
428 [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
429 OPENSSL_DEBUG_MEMORY=on; OPENSSL_CONF=/dev/null ; \
430 export OPENSSL OPENSSL_DEBUG_MEMORY OPENSSL_CONF; \
431 $$OPENSSL rehash certs/demo \
432 || $(PERL) tools/c_rehash certs/demo) && \
439 TOP=$(TOP) PERL=$(PERL) $(PERL) test/run_tests.pl test_ordinals
442 @(cd test && echo "testing..." && \
443 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
444 @if [ -z "$(CROSS_COMPILE)" ]; then \
445 OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a; \
450 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. list-tests)
453 @$(PERL) util/selftest.pl
455 update: errors util/libeay.num util/ssleay.num TABLE test_ordinals
456 @set -e; target=update; $(RECURSIVE_BUILD_CMD)
459 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
464 -etags `find . -name '*.[ch]' -o -name '*.pm'`
469 $(PERL) util/ck_errf.pl -strict */*.c */*/*.c
470 $(PERL) util/mkerr.pl -recurse -write
471 (cd engines; $(MAKE) PERL=$(PERL) errors)
472 (cd crypto/ct; $(MAKE) PERL=$(PERL) errors)
475 $(PERL) util/mkdef.pl crypto update
478 $(PERL) util/mkdef.pl ssl update
480 TABLE: Configure Configurations/*.conf
481 (echo 'Output of `Configure TABLE'"':"; \
482 $(PERL) Configure TABLE) > TABLE
484 # Build distribution tar-file. As the list of files returned by "find" is
485 # pretty long, on several platforms a "too many arguments" error or similar
486 # would occur. Therefore the list of files is temporarily stored into a file
487 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
488 # tar does not support the --files-from option.
489 TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \
490 --owner 0 --group 0 \
491 --transform 's|^|$(NAME)/|' \
495 find * \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \
496 \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \
497 \! -name '*test' \! -name '.#*' \! -name '*~' \! -type l \
498 | sort > $(TARFILE).list
501 find . -type d -print | xargs chmod 755
502 find . -type f -print | xargs chmod a+r
503 find . -type f -perm -0100 -print | xargs chmod a+x
504 $(TAR_COMMAND) | gzip --best > $(TARFILE).gz
505 rm -f $(TARFILE).list
508 tar-snap: $(TARFILE).list
509 $(TAR_COMMAND) > $(TARFILE)
510 rm -f $(TARFILE).list
514 $(PERL) Configure dist
515 @$(MAKE) SDIRS='$(SDIRS)' clean
516 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
518 install: all install_docs install_sw
520 uninstall: uninstall_sw uninstall_docs
523 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS)
524 @set -e; for i in include/openssl/*.h; do \
525 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$$i; \
526 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$$i ); \
528 @set -e; target=install; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done
529 @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
531 if [ -f "$$i" ]; then \
532 ( echo installing $$i; \
533 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
534 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
535 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
536 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
539 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
540 tmp="$(SHARED_LIBS)"; \
541 for i in $${tmp:-x}; \
543 if [ -f "$$i" -o -f "$$i.a" ]; then \
544 ( echo installing $$i; \
545 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
546 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
547 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
548 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
549 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
550 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
551 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
552 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
554 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
555 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
556 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
558 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
560 *crypto*) i=libeay32.dll;; \
561 *ssl*) i=ssleay32.dll;; \
563 echo installing $$i; \
564 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
565 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
566 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
571 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
572 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
573 if [ "$(INSTALLTOP)" != "/usr" ]; then \
574 echo 'OpenSSL shared libraries have been installed in:'; \
575 echo ' $(INSTALLTOP)'; \
578 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
579 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
580 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
581 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
582 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
583 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
586 cd include/openssl && files=* && cd $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl && $(RM) $$files
590 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i && \
591 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
593 @if [ -n "$(SHARED_LIBS)" ]; then \
594 tmp="$(SHARED_LIBS)"; \
595 for i in $${tmp:-x}; \
597 if [ -f "$$i" -o -f "$$i.a" ]; then \
598 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
599 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
600 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
601 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
602 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
603 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
605 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
606 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
608 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
610 *crypto*) i=libeay32.dll;; \
611 *ssl*) i=ssleay32.dll;; \
613 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
614 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
619 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
620 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
621 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
622 @target=uninstall; $(RECURSIVE_BUILD_CMD)
627 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
630 for subdir in apps crypto ssl; do \
631 $(PERL) $(TOP)/util/mkdir-p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
632 for i in doc/$$subdir/*.pod; do \
633 fn=`basename $$i .pod`; \
634 echo "installing html/$$fn.$(HTMLSUFFIX)"; \
636 | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
637 | pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \
638 | sed -r 's/<!DOCTYPE.*//g' \
639 > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
640 $(PERL) util/extract-names.pl < $$i | \
641 grep -v $$filecase "^$$fn\$$" | \
642 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
644 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
652 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
655 for subdir in apps crypto ssl; do \
656 for i in doc/$$subdir/*.pod; do \
657 fn=`basename $$i .pod`; \
658 $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
659 $(PERL) util/extract-names.pl < $$i | \
660 grep -v $$filecase "^$$fn\$$" | \
662 $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \
668 @$(PERL) $(TOP)/util/mkdir-p.pl \
669 $(INSTALL_PREFIX)$(MANDIR)/man1 \
670 $(INSTALL_PREFIX)$(MANDIR)/man3 \
671 $(INSTALL_PREFIX)$(MANDIR)/man5 \
672 $(INSTALL_PREFIX)$(MANDIR)/man7
675 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
678 set -e; for i in doc/apps/*.pod; do \
679 fn=`basename $$i .pod`; \
680 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
681 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
682 (cd `$(PERL) util/dirname.pl $$i`; \
684 --section=$$sec --center=OpenSSL \
685 --release=$(VERSION) `basename $$i`) \
686 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
687 $(PERL) util/extract-names.pl < $$i | \
688 (grep -v $$filecase "^$$fn\$$"; true) | \
689 (grep -v "[ ]"; true) | \
690 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
692 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
695 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
696 fn=`basename $$i .pod`; \
697 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
698 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
699 (cd `$(PERL) util/dirname.pl $$i`; \
701 --section=$$sec --center=OpenSSL \
702 --release=$(VERSION) `basename $$i`) \
703 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
704 $(PERL) util/extract-names.pl < $$i | \
705 (grep -v $$filecase "^$$fn\$$"; true) | \
706 (grep -v "[ ]"; true) | \
707 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
709 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
716 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \
719 for i in doc/apps/*.pod; do \
720 fn=`basename $$i .pod`; \
721 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
722 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
723 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
724 $(PERL) util/extract-names.pl < $$i | \
725 (grep -v $$filecase "^$$fn\$$"; true) | \
726 (grep -v "[ ]"; true) | \
728 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
729 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
732 for i in doc/crypto/*.pod doc/ssl/*.pod; do \
733 fn=`basename $$i .pod`; \
734 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
735 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
736 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
737 $(PERL) util/extract-names.pl < $$i | \
738 (grep -v $$filecase "^$$fn\$$"; true) | \
739 (grep -v "[ ]"; true) | \
741 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
742 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
746 # DO NOT DELETE THIS LINE -- make depend depends on it.