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.
28 # Do not edit these manually. Use Configure with --prefix or --openssldir
29 # to change this! Short explanation in the top comment in Configure
31 OPENSSLDIR=$(INSTALLTOP)/ssl
33 # NO_IDEA - Define to build without the IDEA algorithm
34 # NO_RC4 - Define to build without the RC4 algorithm
35 # NO_RC2 - Define to build without the RC2 algorithm
36 # THREADS - Define when building with threads, you will probably also need any
37 # system defines as well, i.e. _REENTRANT for Solaris 2.[34]
38 # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing.
39 # TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
40 # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
41 # DEVRANDOM - Give this the value of the 'random device' if your OS supports
42 # one. 32 bytes will be read from this when the random
43 # number generator is initalised.
44 # SSL_FORBID_ENULL - define if you want the server to be not able to use the
45 # NULL encryption ciphers.
47 # LOCK_DEBUG - turns on lots of lock debug output :-)
48 # REF_CHECK - turn on some xyz_free() assertions.
49 # REF_PRINT - prints some stuff on structure free.
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.
74 TARFLAGS= --no-recursion
75 MAKEDEPPROG=makedepend
78 # We let the C compiler driver to take care of .s files. This is done in
79 # order to be excused from maintaining a separate set of architecture
80 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
81 # gcc, then the driver will automatically translate it to -xarch=v8plus
82 # and pass it down to assembler.
86 # For x86 assembler: Set PROCESSOR to 386 if you want to support
90 # CPUID module collects small commonly used assembler snippets
94 DES_ENC= des_enc.o fcrypt_b.o
95 AES_ENC= aes_core.o aes_cbc.o
107 CHACHA_ENC= chacha_enc.o
115 # This is the location of fipscanister.o and friends.
116 # The FIPS module build will place it $(INSTALLTOP)/lib
117 # but since $(INSTALLTOP) can only take the default value
118 # when the module is built it will be in /usr/local/ssl/lib
119 # $(INSTALLTOP) for this build may be different so hard
122 FIPSLIBDIR=/usr/local/ssl/$(LIBDIR)/
124 # The location of the library which contains fipscanister.o
125 # normally it will be libcrypto. If not compiling in FIPS mode
126 # at all 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 ssl engines apps test tools
136 SHLIBDIRS= crypto ssl
137 INSTALL_SUBS= engines apps tools
139 # dirs in crypto to build
142 md2 md4 md5 sha mdc2 hmac ripemd whrlpool poly1305 \
143 des aes rc2 rc4 rc5 idea bf cast camellia seed chacha modes \
144 bn ec rsa dsa dh dso engine \
145 buffer bio stack lhash rand err \
146 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui \
147 cms pqueue ts jpake srp store cmac ct async kdf
148 # keep in mind that the above list is adjusted by ./Configure
149 # according to no-xxx arguments...
151 # tests to perform. "alltests" is a special word indicating that all tests
152 # should be performed.
157 MANDIR=$(INSTALLTOP)/share/man
162 HTMLDIR=$(INSTALLTOP)/share/doc/$(BASENAME)/html
166 LIBS= libcrypto.a libssl.a
167 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
168 SHARED_SSL=libssl$(SHLIB_EXT)
170 SHARED_LIBS_LINK_EXTS=
175 NAME= $(BASENAME)-$(VERSION)
176 TARFILE= ../$(NAME).tar
179 # Directories created on install if they don't exist.
181 $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
182 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
183 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
184 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
185 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
186 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
187 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
188 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
190 all: Makefile build_all
192 # as we stick to -e, CLEARENV ensures that local variables in lower
193 # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
194 # shell, which [annoyingly enough] terminates unset with error if VAR
195 # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
196 # which terminates unset with error if no variable was present:-(
197 CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
198 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
199 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
200 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
202 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
203 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
204 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \
205 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
206 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
208 # LC_ALL=C ensures that error [and other] messages are delivered in
209 # same language for uniform treatment.
210 BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
211 CC='$(CC)' CFLAG='$(CFLAG)' \
212 AS='$(CC)' ASFLAG='$(CFLAG) -c' \
213 AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
214 CROSS_COMPILE='$(CROSS_COMPILE)' \
216 SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
217 INSTALL_PREFIX='$(INSTALL_PREFIX)' \
218 INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
220 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
221 DEPFLAG='$(DEPFLAG)' \
222 MAKEDEPPROG='$(MAKEDEPPROG)' \
223 SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
224 ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
225 EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
226 SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
227 PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \
228 CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \
229 EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \
230 AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
231 BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \
232 RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \
233 SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \
234 MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \
235 RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \
236 WP_ASM_OBJ='$(WP_ASM_OBJ)' \
237 MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \
238 ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)' \
239 CHACHA_ENC='$(CHACHA_ENC)' \
240 POLY1305_ASM_OBJ='$(POLY1305_ASM_OBJ)' \
241 PERLASM_SCHEME='$(PERLASM_SCHEME)' \
242 FIPSLIBDIR='${FIPSLIBDIR}' \
243 FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
244 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
245 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
246 # which in turn eliminates ambiguities in variable treatment with -e.
248 # BUILD_CMD is a generic macro to build a given target in a given
249 # subdirectory. The target must be given through the shell variable
250 # `target' and the subdirectory to build in must be given through `dir'.
251 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
252 # BUILD_ONE_CMD instead.
254 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
255 # subdirectories defined in $(DIRS). It requires that the target
256 # is given through the shell variable `target'.
258 # BUILD_ONE_CMD is a macro to build a given target in a given
259 # subdirectory if that subdirectory is part of $(DIRS). It requires
260 # exactly the same shell variables as BUILD_CMD.
261 BUILD_CMD= if [ -d "$$dir" ]; then \
262 ( cd $$dir && echo "making $$target in $$dir..." && \
263 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
266 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
268 if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
273 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
277 build_all: build_libs build_apps build_tests build_tools
279 build_libs: build_libcrypto build_libssl openssl.pc
281 build_libcrypto: build_crypto build_engines libcrypto.pc
282 build_libssl: build_ssl libssl.pc
285 @dir=crypto; target=all; $(BUILD_ONE_CMD)
286 build_ssl: build_crypto
287 @dir=ssl; target=all; $(BUILD_ONE_CMD)
288 build_engines: build_crypto
289 @dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD)
291 build_apps: build_libs
292 @dir=apps; target=all; $(BUILD_ONE_CMD)
293 build_tests: build_libs
294 @dir=test; target=all; $(BUILD_ONE_CMD)
295 build_tools: build_libs
296 @dir=tools; target=all; $(BUILD_ONE_CMD)
298 all_testapps: build_libs build_testapps
300 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
302 libcrypto$(SHLIB_EXT): libcrypto.a
303 @if [ "$(SHLIB_TARGET)" != "" ]; then \
304 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
305 FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
306 export CC FIPSLD_CC; \
308 $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \
310 echo "There's no support for shared libraries on this platform" >&2; \
314 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
315 @if [ "$(SHLIB_TARGET)" != "" ]; then \
316 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
318 echo "There's no support for shared libraries on this platform" >&2; \
323 @set -e; for i in $(SHLIBDIRS); do \
324 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
325 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
326 for j in $${tmp:-x}; do \
327 ( set -x; rm -f lib$$i$$j ); \
330 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
331 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
332 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
337 @ set -e; for i in $(SHLIBDIRS); do \
338 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
339 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
340 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
341 symlink.$(SHLIB_TARGET); \
342 libs="$$libs -l$$i"; \
345 build-shared: do_$(SHLIB_TARGET) link-shared
348 @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
349 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
350 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
351 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
352 LIBDEPS="$$libs $(EX_LIBS)" \
353 link_a.$(SHLIB_TARGET); \
354 libs="-l$$i $$libs"; \
357 libcrypto.pc: Makefile
358 @ ( echo 'prefix=$(INSTALLTOP)'; \
359 echo 'exec_prefix=$${prefix}'; \
360 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
361 echo 'includedir=$${prefix}/include'; \
363 echo 'Name: OpenSSL-libcrypto'; \
364 echo 'Description: OpenSSL cryptography library'; \
365 echo 'Version: '$(VERSION); \
367 echo 'Libs: -L$${libdir} -lcrypto'; \
368 echo 'Libs.private: $(EX_LIBS)'; \
369 echo 'Cflags: -I$${includedir}' ) > libcrypto.pc
372 @ ( echo 'prefix=$(INSTALLTOP)'; \
373 echo 'exec_prefix=$${prefix}'; \
374 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
375 echo 'includedir=$${prefix}/include'; \
377 echo 'Name: OpenSSL-libssl'; \
378 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
379 echo 'Version: '$(VERSION); \
380 echo 'Requires.private: libcrypto'; \
381 echo 'Libs: -L$${libdir} -lssl'; \
382 echo 'Libs.private: $(EX_LIBS)'; \
383 echo 'Cflags: -I$${includedir}' ) > libssl.pc
386 @ ( echo 'prefix=$(INSTALLTOP)'; \
387 echo 'exec_prefix=$${prefix}'; \
388 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
389 echo 'includedir=$${prefix}/include'; \
391 echo 'Name: OpenSSL'; \
392 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
393 echo 'Version: '$(VERSION); \
394 echo 'Requires: libssl libcrypto' ) > openssl.pc
396 Makefile: Makefile.in Configure config
397 @echo "Makefile is older than Makefile.in, Configure or config."
398 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
402 rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
405 rm -f */*/*.o */*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
406 rm -rf *.bak certs/.0
407 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
408 rm -f $(LIBS) tags TAGS
409 rm -f openssl.pc libssl.pc libcrypto.pc
414 $(PERL) util/mk1mf.pl >makefile.one; \
418 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
419 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
422 @(cd test && echo "generating dummy tests (if needed)..." && \
423 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
426 rehash.time: certs build_apps
427 @if [ -z "$(CROSS_COMPILE)" ]; then \
428 (OPENSSL="`pwd`/util/opensslwrap.sh"; \
429 [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
430 OPENSSL_DEBUG_MEMORY=on; OPENSSL_CONF=/dev/null ; \
431 export OPENSSL OPENSSL_DEBUG_MEMORY OPENSSL_CONF; \
432 $$OPENSSL rehash certs/demo \
433 || $(PERL) tools/c_rehash certs/demo) && \
441 @(cd test && echo "testing..." && \
442 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
443 @if [ -z "$(CROSS_COMPILE)" ]; then \
444 OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a; \
449 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. list-tests)
452 @$(PERL) util/selftest.pl
457 -etags `find . -name '*.[ch]' -o -name '*.pm'`
462 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
464 update: generate errors ordinals depend
467 (cd apps && $(MAKE) generate)
468 (cd crypto/bn && $(MAKE) generate)
469 (cd crypto/objects && $(MAKE) generate)
472 $(PERL) util/ck_errf.pl -strict */*.c */*/*.c
473 $(PERL) util/mkerr.pl -recurse -write
474 (cd engines; $(MAKE) PERL=$(PERL) errors)
475 (cd crypto/ct; $(MAKE) PERL=$(PERL) errors)
477 ordinals: util/libeay.num util/ssleay.num test_ordinals TABLE
479 $(PERL) util/mkdef.pl crypto update
481 $(PERL) util/mkdef.pl ssl update
483 TOP=$(TOP) PERL=$(PERL) $(PERL) test/run_tests.pl test_ordinals
485 TABLE: Configure Configurations/*.conf
486 (echo 'Output of `Configure TABLE'"':"; \
487 $(PERL) Configure TABLE) > TABLE
489 # Build distribution tar-file. As the list of files returned by "find" is
490 # pretty long, on several platforms a "too many arguments" error or similar
491 # would occur. Therefore the list of files is temporarily stored into a file
492 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
493 # tar does not support the --files-from option.
494 TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \
495 --owner 0 --group 0 \
496 --transform 's|^|$(NAME)/|' \
500 find * \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \
501 \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \
502 \! -name '*test' \! -name '.#*' \! -name '*~' \! -type l \
503 | sort > $(TARFILE).list
506 find . -type d -print | xargs chmod 755
507 find . -type f -print | xargs chmod a+r
508 find . -type f -perm -0100 -print | xargs chmod a+x
509 $(TAR_COMMAND) | gzip --best > $(TARFILE).gz
510 rm -f $(TARFILE).list
513 tar-snap: $(TARFILE).list
514 $(TAR_COMMAND) > $(TARFILE)
515 rm -f $(TARFILE).list
519 $(PERL) Configure dist
520 @$(MAKE) SDIRS='$(SDIRS)' clean
521 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
523 install: all install_docs install_sw
525 uninstall: uninstall_sw uninstall_docs
528 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS)
529 @set -e; for i in include/openssl/*.h; do \
530 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$$i; \
531 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$$i ); \
533 @set -e; target=install; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done
534 @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
536 if [ -f "$$i" ]; then \
537 ( echo installing $$i; \
538 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
539 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
540 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
541 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
544 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
545 tmp="$(SHARED_LIBS)"; \
546 for i in $${tmp:-x}; \
548 if [ -f "$$i" -o -f "$$i.a" ]; then \
549 ( echo installing $$i; \
550 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
551 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
552 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
553 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
554 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
555 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
556 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
557 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
559 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
560 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
561 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
563 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
565 *crypto*) i=libeay32.dll;; \
566 *ssl*) i=ssleay32.dll;; \
568 echo installing $$i; \
569 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
570 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
571 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
576 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
577 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
578 if [ "$(INSTALLTOP)" != "/usr" ]; then \
579 echo 'OpenSSL shared libraries have been installed in:'; \
580 echo ' $(INSTALLTOP)'; \
583 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
584 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
585 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
586 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
587 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
588 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
591 cd include/openssl && files=* && cd $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl && $(RM) $$files
595 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i && \
596 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
598 @if [ -n "$(SHARED_LIBS)" ]; then \
599 tmp="$(SHARED_LIBS)"; \
600 for i in $${tmp:-x}; \
602 if [ -f "$$i" -o -f "$$i.a" ]; then \
603 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
604 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
605 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
606 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
607 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
608 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
610 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
611 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
613 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
615 *crypto*) i=libeay32.dll;; \
616 *ssl*) i=ssleay32.dll;; \
618 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
619 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
624 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
625 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
626 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
627 @target=uninstall; $(RECURSIVE_BUILD_CMD)
632 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
635 for subdir in apps crypto ssl; do \
636 $(PERL) $(TOP)/util/mkdir-p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
637 for i in doc/$$subdir/*.pod; do \
638 fn=`basename $$i .pod`; \
639 echo "installing html/$$fn.$(HTMLSUFFIX)"; \
641 | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
642 | pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \
643 | sed -r 's/<!DOCTYPE.*//g' \
644 > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
645 $(PERL) util/extract-names.pl < $$i | \
646 grep -v $$filecase "^$$fn\$$" | \
647 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
649 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
657 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
660 for subdir in apps crypto ssl; do \
661 for i in doc/$$subdir/*.pod; do \
662 fn=`basename $$i .pod`; \
663 $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
664 $(PERL) util/extract-names.pl < $$i | \
665 grep -v $$filecase "^$$fn\$$" | \
667 $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \
673 @$(PERL) $(TOP)/util/mkdir-p.pl \
674 $(INSTALL_PREFIX)$(MANDIR)/man1 \
675 $(INSTALL_PREFIX)$(MANDIR)/man3 \
676 $(INSTALL_PREFIX)$(MANDIR)/man5 \
677 $(INSTALL_PREFIX)$(MANDIR)/man7
680 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
683 set -e; for i in doc/apps/*.pod; do \
684 fn=`basename $$i .pod`; \
685 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
686 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
687 (cd `$(PERL) util/dirname.pl $$i`; \
689 --section=$$sec --center=OpenSSL \
690 --release=$(VERSION) `basename $$i`) \
691 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
692 $(PERL) util/extract-names.pl < $$i | \
693 (grep -v $$filecase "^$$fn\$$"; true) | \
694 (grep -v "[ ]"; true) | \
695 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
697 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
700 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
701 fn=`basename $$i .pod`; \
702 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
703 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
704 (cd `$(PERL) util/dirname.pl $$i`; \
706 --section=$$sec --center=OpenSSL \
707 --release=$(VERSION) `basename $$i`) \
708 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
709 $(PERL) util/extract-names.pl < $$i | \
710 (grep -v $$filecase "^$$fn\$$"; true) | \
711 (grep -v "[ ]"; true) | \
712 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
714 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
721 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \
724 for i in doc/apps/*.pod; do \
725 fn=`basename $$i .pod`; \
726 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
727 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
728 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
729 $(PERL) util/extract-names.pl < $$i | \
730 (grep -v $$filecase "^$$fn\$$"; true) | \
731 (grep -v "[ ]"; true) | \
733 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
734 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
737 for i in doc/crypto/*.pod doc/ssl/*.pod; do \
738 fn=`basename $$i .pod`; \
739 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
740 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
741 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
742 $(PERL) util/extract-names.pl < $$i | \
743 (grep -v $$filecase "^$$fn\$$"; true) | \
744 (grep -v "[ ]"; true) | \
746 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
747 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
751 # DO NOT DELETE THIS LINE -- make depend depends on it.