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 # 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.
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
113 # This is the location of fipscanister.o and friends.
114 # The FIPS module build will place it $(INSTALLTOP)/lib
115 # but since $(INSTALLTOP) can only take the default value
116 # when the module is built it will be in /usr/local/ssl/lib
117 # $(INSTALLTOP) for this build may be different so hard
120 FIPSLIBDIR=/usr/local/ssl/$(LIBDIR)/
122 # The location of the library which contains fipscanister.o
123 # normally it will be libcrypto. If not compiling in FIPS mode
124 # at all this is empty making it a useful test for a FIPS compile.
128 # Shared library base address. Currently only used on Windows.
133 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 \
142 des aes rc2 rc4 rc5 idea bf cast camellia seed modes \
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 \
146 cms pqueue ts jpake srp store cmac ct async
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)' \
214 PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \
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 PERLASM_SCHEME='$(PERLASM_SCHEME)' \
239 FIPSLIBDIR='${FIPSLIBDIR}' \
240 FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
241 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
242 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
243 # which in turn eliminates ambiguities in variable treatment with -e.
245 # BUILD_CMD is a generic macro to build a given target in a given
246 # subdirectory. The target must be given through the shell variable
247 # `target' and the subdirectory to build in must be given through `dir'.
248 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
249 # BUILD_ONE_CMD instead.
251 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
252 # subdirectories defined in $(DIRS). It requires that the target
253 # is given through the shell variable `target'.
255 # BUILD_ONE_CMD is a macro to build a given target in a given
256 # subdirectory if that subdirectory is part of $(DIRS). It requires
257 # exactly the same shell variables as BUILD_CMD.
258 BUILD_CMD= if [ -d "$$dir" ]; then \
259 ( cd $$dir && echo "making $$target in $$dir..." && \
260 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
263 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
265 if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
270 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
274 build_all: build_libs build_apps build_tests build_tools
276 build_libs: build_libcrypto build_libssl openssl.pc
278 build_libcrypto: build_crypto build_engines libcrypto.pc
279 build_libssl: build_ssl libssl.pc
282 @dir=crypto; target=all; $(BUILD_ONE_CMD)
283 build_ssl: build_crypto
284 @dir=ssl; target=all; $(BUILD_ONE_CMD)
285 build_engines: build_crypto
286 @dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD)
288 build_apps: build_libs
289 @dir=apps; target=all; $(BUILD_ONE_CMD)
290 build_tests: build_libs
291 @dir=test; target=all; $(BUILD_ONE_CMD)
292 build_tools: build_libs
293 @dir=tools; target=all; $(BUILD_ONE_CMD)
295 all_testapps: build_libs build_testapps
297 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
299 libcrypto$(SHLIB_EXT): libcrypto.a
300 @if [ "$(SHLIB_TARGET)" != "" ]; then \
301 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
302 FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
303 export CC FIPSLD_CC; \
305 $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \
307 echo "There's no support for shared libraries on this platform" >&2; \
311 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
312 @if [ "$(SHLIB_TARGET)" != "" ]; then \
313 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
315 echo "There's no support for shared libraries on this platform" >&2; \
320 @set -e; for i in $(SHLIBDIRS); do \
321 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
322 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
323 for j in $${tmp:-x}; do \
324 ( set -x; rm -f lib$$i$$j ); \
327 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
328 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
329 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
334 @ set -e; for i in $(SHLIBDIRS); do \
335 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
336 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
337 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
338 symlink.$(SHLIB_TARGET); \
339 libs="$$libs -l$$i"; \
342 build-shared: do_$(SHLIB_TARGET) link-shared
345 @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
346 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
347 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
348 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
349 LIBDEPS="$$libs $(EX_LIBS)" \
350 link_a.$(SHLIB_TARGET); \
351 libs="-l$$i $$libs"; \
354 libcrypto.pc: Makefile
355 @ ( echo 'prefix=$(INSTALLTOP)'; \
356 echo 'exec_prefix=$${prefix}'; \
357 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
358 echo 'includedir=$${prefix}/include'; \
360 echo 'Name: OpenSSL-libcrypto'; \
361 echo 'Description: OpenSSL cryptography library'; \
362 echo 'Version: '$(VERSION); \
364 echo 'Libs: -L$${libdir} -lcrypto'; \
365 echo 'Libs.private: $(EX_LIBS)'; \
366 echo 'Cflags: -I$${includedir}' ) > libcrypto.pc
369 @ ( echo 'prefix=$(INSTALLTOP)'; \
370 echo 'exec_prefix=$${prefix}'; \
371 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
372 echo 'includedir=$${prefix}/include'; \
374 echo 'Name: OpenSSL-libssl'; \
375 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
376 echo 'Version: '$(VERSION); \
377 echo 'Requires.private: libcrypto'; \
378 echo 'Libs: -L$${libdir} -lssl'; \
379 echo 'Libs.private: $(EX_LIBS)'; \
380 echo 'Cflags: -I$${includedir}' ) > libssl.pc
383 @ ( echo 'prefix=$(INSTALLTOP)'; \
384 echo 'exec_prefix=$${prefix}'; \
385 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
386 echo 'includedir=$${prefix}/include'; \
388 echo 'Name: OpenSSL'; \
389 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
390 echo 'Version: '$(VERSION); \
391 echo 'Requires: libssl libcrypto' ) > openssl.pc
393 Makefile: Makefile.org Configure config
394 @echo "Makefile is older than Makefile.org, Configure or config."
395 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
399 rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
402 rm -f */*/*.o */*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
403 rm -rf *.bak certs/.0
404 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
405 rm -f $(LIBS) tags TAGS
406 rm -f openssl.pc libssl.pc libcrypto.pc
411 $(PERL) util/mk1mf.pl >makefile.one; \
415 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
416 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
419 @(cd test && echo "generating dummy tests (if needed)..." && \
420 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
423 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
426 rehash.time: certs 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) && \
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 stacks 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)
462 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
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)
478 $(PERL) util/mkstack.pl -write
481 $(PERL) util/mkdef.pl crypto update
484 $(PERL) util/mkdef.pl ssl update
486 TABLE: Configure Configurations/*.conf
487 (echo 'Output of `Configure TABLE'"':"; \
488 $(PERL) Configure TABLE) > TABLE
490 # Build distribution tar-file. As the list of files returned by "find" is
491 # pretty long, on several platforms a "too many arguments" error or similar
492 # would occur. Therefore the list of files is temporarily stored into a file
493 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
494 # tar does not support the --files-from option.
495 TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \
496 --owner openssl:0 --group openssl:0 \
497 --transform 's|^|$(NAME)/|' \
501 find * \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \
502 \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \
503 \! -name '*test' \! -name '.#*' \! -name '*~' \! -xtype l \
504 | sort > $(TARFILE).list
507 find . -type d -print | xargs chmod 755
508 find . -type f -print | xargs chmod a+r
509 find . -type f -perm -0100 -print | xargs chmod a+x
510 $(TAR_COMMAND) | gzip --best > $(TARFILE).gz
511 rm -f $(TARFILE).list
514 tar-snap: $(TARFILE).list
515 $(TAR_COMMAND) > $(TARFILE)
516 rm -f $(TARFILE).list
520 $(PERL) Configure dist
521 @$(MAKE) SDIRS='$(SDIRS)' clean
522 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' \
523 TARFILE='$(TARFILE)' NAME='$(NAME)' tar
525 install: all install_docs install_sw
527 uninstall: uninstall_sw uninstall_docs
530 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS)
531 @set -e; for i in include/openssl/*.h; do \
532 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$$i; \
533 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$$i ); \
535 @set -e; target=install; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done
536 @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
538 if [ -f "$$i" ]; then \
539 ( echo installing $$i; \
540 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
541 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
542 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
543 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
546 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
547 tmp="$(SHARED_LIBS)"; \
548 for i in $${tmp:-x}; \
550 if [ -f "$$i" -o -f "$$i.a" ]; then \
551 ( echo installing $$i; \
552 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
553 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
554 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
555 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
556 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
557 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
558 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
559 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
561 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
562 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
563 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
565 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
567 *crypto*) i=libeay32.dll;; \
568 *ssl*) i=ssleay32.dll;; \
570 echo installing $$i; \
571 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
572 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
573 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
578 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
579 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
580 if [ "$(INSTALLTOP)" != "/usr" ]; then \
581 echo 'OpenSSL shared libraries have been installed in:'; \
582 echo ' $(INSTALLTOP)'; \
585 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
586 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
587 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
588 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
589 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
590 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
593 cd include/openssl && files=* && cd $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl && $(RM) $$files
597 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i && \
598 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
600 @if [ -n "$(SHARED_LIBS)" ]; then \
601 tmp="$(SHARED_LIBS)"; \
602 for i in $${tmp:-x}; \
604 if [ -f "$$i" -o -f "$$i.a" ]; then \
605 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
606 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
607 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
608 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
609 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
610 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
612 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
613 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
615 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
617 *crypto*) i=libeay32.dll;; \
618 *ssl*) i=ssleay32.dll;; \
620 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
621 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
626 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
627 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
628 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
629 @target=uninstall; $(RECURSIVE_BUILD_CMD)
634 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
637 for subdir in apps crypto ssl; do \
638 $(PERL) $(TOP)/util/mkdir-p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
639 for i in doc/$$subdir/*.pod; do \
640 fn=`basename $$i .pod`; \
641 echo "installing html/$$fn.$(HTMLSUFFIX)"; \
643 | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
644 | pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \
645 | sed -r 's/<!DOCTYPE.*//g' \
646 > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
647 $(PERL) util/extract-names.pl < $$i | \
648 grep -v $$filecase "^$$fn\$$" | \
649 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
651 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
659 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
662 for subdir in apps crypto ssl; do \
663 for i in doc/$$subdir/*.pod; do \
664 fn=`basename $$i .pod`; \
665 $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
666 $(PERL) util/extract-names.pl < $$i | \
667 grep -v $$filecase "^$$fn\$$" | \
669 $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \
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
682 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
685 set -e; for i in doc/apps/*.pod; do \
686 fn=`basename $$i .pod`; \
687 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
688 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
689 (cd `$(PERL) util/dirname.pl $$i`; \
691 --section=$$sec --center=OpenSSL \
692 --release=$(VERSION) `basename $$i`) \
693 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
694 $(PERL) util/extract-names.pl < $$i | \
695 (grep -v $$filecase "^$$fn\$$"; true) | \
696 (grep -v "[ ]"; true) | \
697 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
699 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
702 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
703 fn=`basename $$i .pod`; \
704 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
705 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
706 (cd `$(PERL) util/dirname.pl $$i`; \
708 --section=$$sec --center=OpenSSL \
709 --release=$(VERSION) `basename $$i`) \
710 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
711 $(PERL) util/extract-names.pl < $$i | \
712 (grep -v $$filecase "^$$fn\$$"; true) | \
713 (grep -v "[ ]"; true) | \
714 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
716 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
723 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \
726 for i in doc/apps/*.pod; do \
727 fn=`basename $$i .pod`; \
728 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
729 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
730 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
731 $(PERL) util/extract-names.pl < $$i | \
732 (grep -v $$filecase "^$$fn\$$"; true) | \
733 (grep -v "[ ]"; true) | \
735 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
736 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
739 for i in doc/crypto/*.pod doc/ssl/*.pod; do \
740 fn=`basename $$i .pod`; \
741 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
742 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
743 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
744 $(PERL) util/extract-names.pl < $$i | \
745 (grep -v $$filecase "^$$fn\$$"; true) | \
746 (grep -v "[ ]"; true) | \
748 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
749 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
753 # DO NOT DELETE THIS LINE -- make depend depends on it.