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.
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
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)
176 WTARFILE= $(NAME)-win.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 openssl.pc libssl.pc libcrypto.pc
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 BUILDENV= PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
209 CC='$(CC)' CFLAG='$(CFLAG)' \
210 AS='$(CC)' ASFLAG='$(CFLAG) -c' \
211 AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
212 CROSS_COMPILE='$(CROSS_COMPILE)' \
213 PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \
214 SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
215 INSTALL_PREFIX='$(INSTALL_PREFIX)' \
216 INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
218 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
219 DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)' \
220 MAKEDEPPROG='$(MAKEDEPPROG)' \
221 SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
222 ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
223 EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
224 SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
225 PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \
226 CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \
227 EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \
228 AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
229 BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \
230 RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \
231 SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \
232 MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \
233 RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \
234 WP_ASM_OBJ='$(WP_ASM_OBJ)' \
235 MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \
236 ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)' \
237 PERLASM_SCHEME='$(PERLASM_SCHEME)' \
238 FIPSLIBDIR='${FIPSLIBDIR}' \
239 FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
240 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
241 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
242 # which in turn eliminates ambiguities in variable treatment with -e.
244 # BUILD_CMD is a generic macro to build a given target in a given
245 # subdirectory. The target must be given through the shell variable
246 # `target' and the subdirectory to build in must be given through `dir'.
247 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
248 # BUILD_ONE_CMD instead.
250 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
251 # subdirectories defined in $(DIRS). It requires that the target
252 # is given through the shell variable `target'.
254 # BUILD_ONE_CMD is a macro to build a given target in a given
255 # subdirectory if that subdirectory is part of $(DIRS). It requires
256 # exactly the same shell variables as BUILD_CMD.
257 BUILD_CMD= if [ -d "$$dir" ]; then \
258 ( cd $$dir && echo "making $$target in $$dir..." && \
259 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
262 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
264 if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
269 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
273 build_all: build_libs build_apps build_tests build_tools
275 build_libs: build_crypto build_ssl build_engines
278 @dir=crypto; target=all; $(BUILD_ONE_CMD)
279 build_ssl: build_crypto
280 @dir=ssl; target=all; $(BUILD_ONE_CMD)
281 build_engines: build_crypto
282 @dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD)
284 build_apps: build_libs
285 @dir=apps; target=all; $(BUILD_ONE_CMD)
286 build_tests: build_libs
287 @dir=test; target=all; $(BUILD_ONE_CMD)
288 build_tools: build_libs
289 @dir=tools; target=all; $(BUILD_ONE_CMD)
291 all_testapps: build_libs build_testapps
293 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
295 libcrypto$(SHLIB_EXT): libcrypto.a
296 @if [ "$(SHLIB_TARGET)" != "" ]; then \
297 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
298 FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
299 export CC FIPSLD_CC; \
301 $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \
303 echo "There's no support for shared libraries on this platform" >&2; \
307 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
308 @if [ "$(SHLIB_TARGET)" != "" ]; then \
309 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
311 echo "There's no support for shared libraries on this platform" >&2; \
316 @set -e; for i in $(SHLIBDIRS); do \
317 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
318 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
319 for j in $${tmp:-x}; do \
320 ( set -x; rm -f lib$$i$$j ); \
323 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
324 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
325 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
330 @ set -e; for i in $(SHLIBDIRS); do \
331 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
332 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
333 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
334 symlink.$(SHLIB_TARGET); \
335 libs="$$libs -l$$i"; \
338 build-shared: do_$(SHLIB_TARGET) link-shared
341 @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
342 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
343 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
344 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
345 LIBDEPS="$$libs $(EX_LIBS)" \
346 link_a.$(SHLIB_TARGET); \
347 libs="-l$$i $$libs"; \
350 libcrypto.pc: Makefile
351 @ ( echo 'prefix=$(INSTALLTOP)'; \
352 echo 'exec_prefix=$${prefix}'; \
353 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
354 echo 'includedir=$${prefix}/include'; \
356 echo 'Name: OpenSSL-libcrypto'; \
357 echo 'Description: OpenSSL cryptography library'; \
358 echo 'Version: '$(VERSION); \
360 echo 'Libs: -L$${libdir} -lcrypto'; \
361 echo 'Libs.private: $(EX_LIBS)'; \
362 echo 'Cflags: -I$${includedir}' ) > libcrypto.pc
365 @ ( echo 'prefix=$(INSTALLTOP)'; \
366 echo 'exec_prefix=$${prefix}'; \
367 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
368 echo 'includedir=$${prefix}/include'; \
370 echo 'Name: OpenSSL-libssl'; \
371 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
372 echo 'Version: '$(VERSION); \
373 echo 'Requires.private: libcrypto'; \
374 echo 'Libs: -L$${libdir} -lssl'; \
375 echo 'Libs.private: $(EX_LIBS)'; \
376 echo 'Cflags: -I$${includedir}' ) > libssl.pc
379 @ ( echo 'prefix=$(INSTALLTOP)'; \
380 echo 'exec_prefix=$${prefix}'; \
381 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
382 echo 'includedir=$${prefix}/include'; \
384 echo 'Name: OpenSSL'; \
385 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
386 echo 'Version: '$(VERSION); \
387 echo 'Requires: libssl libcrypto' ) > openssl.pc
389 Makefile: Makefile.org Configure config
390 @echo "Makefile is older than Makefile.org, Configure or config."
391 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
395 rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
398 rm -f */*/*.o */*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
399 rm -rf *.bak certs/.0
400 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
401 rm -f $(LIBS) tags TAGS
402 rm -f openssl.pc libssl.pc libcrypto.pc
407 $(PERL) util/mk1mf.pl >makefile.one; \
411 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
412 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
415 @(cd test && echo "generating dummy tests (if needed)..." && \
416 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
419 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
422 rehash.time: certs apps
423 @if [ -z "$(CROSS_COMPILE)" ]; then \
424 (OPENSSL="`pwd`/util/opensslwrap.sh"; \
425 [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
426 OPENSSL_DEBUG_MEMORY=on; OPENSSL_CONF=/dev/null ; \
427 export OPENSSL OPENSSL_DEBUG_MEMORY OPENSSL_CONF; \
428 $(PERL) tools/c_rehash certs/demo) && \
435 @(cd test && echo "testing..." && \
436 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
437 OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
440 @$(PERL) util/selftest.pl
442 update: errors stacks util/libeay.num util/ssleay.num TABLE
443 @set -e; target=update; $(RECURSIVE_BUILD_CMD)
446 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
449 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
459 $(PERL) util/ck_errf.pl -strict */*.c */*/*.c
460 $(PERL) util/mkerr.pl -recurse -write
461 (cd engines; $(MAKE) PERL=$(PERL) errors)
464 $(PERL) util/mkstack.pl -write
467 $(PERL) util/mkdef.pl crypto update
470 $(PERL) util/mkdef.pl ssl update
472 TABLE: Configure Configurations/*.conf
473 (echo 'Output of `Configure TABLE'"':"; \
474 $(PERL) Configure TABLE) > TABLE
476 # Build distribution tar-file. As the list of files returned by "find" is
477 # pretty long, on several platforms a "too many arguments" error or similar
478 # would occur. Therefore the list of files is temporarily stored into a file
479 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
480 # tar does not support the --files-from option.
482 find . -type d -print | xargs chmod 755
483 find . -type f -print | xargs chmod a+r
484 find . -type f -perm -0100 -print | xargs chmod a+x
485 find * \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
486 $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
487 tardy --user_number=0 --user_name=openssl \
488 --group_number=0 --group_name=openssl \
489 --prefix=openssl-$(VERSION) - |\
490 gzip --best >../$(TARFILE).gz; \
491 rm -f ../$(TARFILE).list; \
492 ls -l ../$(TARFILE).gz
495 @$(TAR) $(TARFLAGS) -cvf - \
496 `find * \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\
497 tardy --user_number=0 --user_name=openssl \
498 --group_number=0 --group_name=openssl \
499 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
503 $(PERL) Configure dist
505 @$(MAKE) SDIRS='$(SDIRS)' clean
506 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar
509 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
511 install: all install_docs install_sw
513 uninstall: uninstall_sw uninstall_docs
516 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS)
517 @set -e; for i in include/openssl/*.h; do \
518 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$$i; \
519 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$$i ); \
521 @set -e; target=install; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done
522 @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
524 if [ -f "$$i" ]; then \
525 ( echo installing $$i; \
526 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
527 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
528 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
529 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
532 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
533 tmp="$(SHARED_LIBS)"; \
534 for i in $${tmp:-x}; \
536 if [ -f "$$i" -o -f "$$i.a" ]; then \
537 ( echo installing $$i; \
538 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
539 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
540 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
541 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
542 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
543 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
544 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
545 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
547 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
548 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
549 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
551 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
553 *crypto*) i=libeay32.dll;; \
554 *ssl*) i=ssleay32.dll;; \
556 echo installing $$i; \
557 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
558 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
559 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
564 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
565 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
566 if [ "$(INSTALLTOP)" != "/usr" ]; then \
567 echo 'OpenSSL shared libraries have been installed in:'; \
568 echo ' $(INSTALLTOP)'; \
571 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
572 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
573 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
574 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
575 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
576 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
579 cd include/openssl && files=* && cd $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl && $(RM) $$files
583 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i && \
584 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
586 @if [ -n "$(SHARED_LIBS)" ]; then \
587 tmp="$(SHARED_LIBS)"; \
588 for i in $${tmp:-x}; \
590 if [ -f "$$i" -o -f "$$i.a" ]; then \
591 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
592 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
593 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
594 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
595 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
596 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
598 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
599 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
601 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
603 *crypto*) i=libeay32.dll;; \
604 *ssl*) i=ssleay32.dll;; \
606 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
607 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
612 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
613 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
614 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
615 @target=uninstall; $(RECURSIVE_BUILD_CMD)
620 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
623 for subdir in apps crypto ssl; do \
624 $(PERL) $(TOP)/util/mkdir-p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
625 for i in doc/$$subdir/*.pod; do \
626 fn=`basename $$i .pod`; \
627 echo "installing html/$$fn.$(HTMLSUFFIX)"; \
629 | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
630 | pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \
631 | sed -r 's/<!DOCTYPE.*//g' \
632 > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
633 $(PERL) util/extract-names.pl < $$i | \
634 grep -v $$filecase "^$$fn\$$" | \
635 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
637 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
645 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
648 for subdir in apps crypto ssl; do \
649 for i in doc/$$subdir/*.pod; do \
650 fn=`basename $$i .pod`; \
651 $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
652 $(PERL) util/extract-names.pl < $$i | \
653 grep -v $$filecase "^$$fn\$$" | \
655 $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \
661 @$(PERL) $(TOP)/util/mkdir-p.pl \
662 $(INSTALL_PREFIX)$(MANDIR)/man1 \
663 $(INSTALL_PREFIX)$(MANDIR)/man3 \
664 $(INSTALL_PREFIX)$(MANDIR)/man5 \
665 $(INSTALL_PREFIX)$(MANDIR)/man7
668 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
671 set -e; for i in doc/apps/*.pod; do \
672 fn=`basename $$i .pod`; \
673 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
674 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
675 (cd `$(PERL) util/dirname.pl $$i`; \
677 --section=$$sec --center=OpenSSL \
678 --release=$(VERSION) `basename $$i`) \
679 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
680 $(PERL) util/extract-names.pl < $$i | \
681 (grep -v $$filecase "^$$fn\$$"; true) | \
682 (grep -v "[ ]"; true) | \
683 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
685 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
688 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
689 fn=`basename $$i .pod`; \
690 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
691 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
692 (cd `$(PERL) util/dirname.pl $$i`; \
694 --section=$$sec --center=OpenSSL \
695 --release=$(VERSION) `basename $$i`) \
696 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
697 $(PERL) util/extract-names.pl < $$i | \
698 (grep -v $$filecase "^$$fn\$$"; true) | \
699 (grep -v "[ ]"; true) | \
700 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
702 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
709 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \
712 for i in doc/apps/*.pod; do \
713 fn=`basename $$i .pod`; \
714 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
715 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
716 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
717 $(PERL) util/extract-names.pl < $$i | \
718 (grep -v $$filecase "^$$fn\$$"; true) | \
719 (grep -v "[ ]"; true) | \
721 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
722 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
725 for i in doc/crypto/*.pod doc/ssl/*.pod; do \
726 fn=`basename $$i .pod`; \
727 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
728 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
729 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
730 $(PERL) util/extract-names.pl < $$i | \
731 (grep -v $$filecase "^$$fn\$$"; true) | \
732 (grep -v "[ ]"; true) | \
734 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
735 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
739 # DO NOT DELETE THIS LINE -- make depend depends on it.