1999-03-22 14:45:08 +00:00
|
|
|
##
|
|
|
|
## Makefile for OpenSSL
|
|
|
|
##
|
2016-01-25 20:19:59 +00:00
|
|
|
## {- join("\n## ", @autowarntext) -}
|
1999-03-22 14:45:08 +00:00
|
|
|
|
2015-05-20 18:03:20 +00:00
|
|
|
VERSION={- $config{version} -}
|
|
|
|
MAJOR={- $config{major} -}
|
|
|
|
MINOR={- $config{minor} -}
|
|
|
|
SHLIB_VERSION_NUMBER={- $config{shlib_version_number} -}
|
|
|
|
SHLIB_VERSION_HISTORY={- $config{shlib_version_history} -}
|
|
|
|
SHLIB_MAJOR={- $config{shlib_major} -}
|
|
|
|
SHLIB_MINOR={- $config{shlib_minor} -}
|
2016-02-15 16:20:15 +00:00
|
|
|
SHLIB_EXT={- $target{shared_extension} || ".so" -}
|
|
|
|
SHLIB_EXT_SIMPLE={- $target{shared_extension_simple} || ".so" -}
|
|
|
|
SHLIB_EXT_IMPORT={- $target{shared_import_extension} || "" -}
|
|
|
|
DSO_EXT={- $target{dso_extension} || ".so" -}
|
2015-05-20 18:03:20 +00:00
|
|
|
PLATFORM={- $config{target} -}
|
|
|
|
OPTIONS={- $config{options} -}
|
|
|
|
CONFIGURE_ARGS=({- join(", ",quotify_l(@{$config{perlargv}})) -})
|
|
|
|
SHLIB_TARGET={- $target{shared_target} -}
|
2000-07-21 15:08:53 +00:00
|
|
|
|
2002-12-15 05:59:13 +00:00
|
|
|
# HERE indicates where this Makefile lives. This can be used to indicate
|
|
|
|
# where sub-Makefiles are expected to be. Currently has very limited usage,
|
|
|
|
# and should probably not be bothered with at all.
|
|
|
|
HERE=.
|
|
|
|
|
2016-02-12 20:14:03 +00:00
|
|
|
# DESTDIR is for package builders so that they can configure
|
1999-04-29 21:52:08 +00:00
|
|
|
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
|
|
|
|
# Normally it is left empty.
|
2016-02-12 20:14:03 +00:00
|
|
|
DESTDIR=
|
1999-04-24 22:59:36 +00:00
|
|
|
|
2016-01-20 17:11:51 +00:00
|
|
|
# Do not edit these manually. Use Configure with --prefix or --openssldir
|
|
|
|
# to change this! Short explanation in the top comment in Configure
|
2016-01-30 01:57:19 +00:00
|
|
|
INSTALLTOP={- # $prefix is used in the OPENSSLDIR perl snippet
|
|
|
|
#
|
|
|
|
our $prefix = $config{prefix} || "/usr/local";
|
|
|
|
$prefix -}
|
|
|
|
OPENSSLDIR={- #
|
|
|
|
# The logic here is that if no --openssldir was given,
|
|
|
|
# OPENSSLDIR will get the value from $prefix plus "/ssl".
|
|
|
|
# If --openssldir was given and the value is an absolute
|
|
|
|
# path, OPENSSLDIR will get its value without change.
|
|
|
|
# If the value from --openssldir is a relative path,
|
|
|
|
# OPENSSLDIR will get $prefix with the --openssldir
|
|
|
|
# value appended as a subdirectory.
|
|
|
|
#
|
|
|
|
use File::Spec::Functions;
|
|
|
|
our $openssldir =
|
|
|
|
$config{openssldir} ?
|
|
|
|
(file_name_is_absolute($config{openssldir}) ?
|
|
|
|
$config{openssldir}
|
|
|
|
: catdir($prefix, $config{openssldir}))
|
|
|
|
: catdir($prefix, "ssl");
|
|
|
|
$openssldir -}
|
|
|
|
LIBDIR={- #
|
|
|
|
# if $prefix/lib$target{multilib} is not an existing
|
|
|
|
# directory, then assume that it's not searched by linker
|
|
|
|
# automatically, in which case adding $target{multilib} suffix
|
|
|
|
# causes more grief than we're ready to tolerate, so don't...
|
|
|
|
our $multilib =
|
|
|
|
-d "$prefix/lib$target{multilib}" ? $target{multilib} : "";
|
|
|
|
our $libdir = $config{libdir} || "lib$multilib";
|
|
|
|
$libdir -}
|
|
|
|
ENGINESDIR={- use File::Spec::Functions;
|
|
|
|
catdir($prefix,$libdir,"engines") -}
|
1999-03-22 14:45:08 +00:00
|
|
|
|
1998-12-21 10:52:47 +00:00
|
|
|
# NO_IDEA - Define to build without the IDEA algorithm
|
|
|
|
# NO_RC4 - Define to build without the RC4 algorithm
|
|
|
|
# NO_RC2 - Define to build without the RC2 algorithm
|
|
|
|
# THREADS - Define when building with threads, you will probably also need any
|
2015-11-24 20:55:50 +00:00
|
|
|
# system defines as well, i.e. _REENTRANT for Solaris 2.[34]
|
1998-12-21 10:52:47 +00:00
|
|
|
# TERMIO - Define the termio terminal subsystem, needed if sgtty is missing.
|
|
|
|
# TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
|
|
|
|
# LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
|
|
|
|
# DEVRANDOM - Give this the value of the 'random device' if your OS supports
|
1998-12-21 10:56:39 +00:00
|
|
|
# one. 32 bytes will be read from this when the random
|
|
|
|
# number generator is initalised.
|
1999-04-13 11:01:44 +00:00
|
|
|
# SSL_FORBID_ENULL - define if you want the server to be not able to use the
|
1998-12-21 10:56:39 +00:00
|
|
|
# NULL encryption ciphers.
|
1998-12-21 10:52:47 +00:00
|
|
|
#
|
|
|
|
# LOCK_DEBUG - turns on lots of lock debug output :-)
|
2016-01-30 17:04:25 +00:00
|
|
|
# REF_DEBUG - turn on some xyz_free() assertions.
|
1998-12-21 10:56:39 +00:00
|
|
|
# REF_PRINT - prints some stuff on structure free.
|
1998-12-21 10:52:47 +00:00
|
|
|
# MFUNC - Make all Malloc/Free/Realloc calls call
|
1998-12-21 10:56:39 +00:00
|
|
|
# CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
|
|
|
|
# call application defined callbacks via CRYPTO_set_mem_functions()
|
|
|
|
# MD5_ASM needs to be defined to use the x86 assembler for MD5
|
|
|
|
# SHA1_ASM needs to be defined to use the x86 assembler for SHA1
|
|
|
|
# RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
|
1998-12-21 11:00:56 +00:00
|
|
|
# Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
|
|
|
|
# equal 4.
|
|
|
|
# PKCS1_CHECK - pkcs1 tests.
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2015-05-20 18:03:20 +00:00
|
|
|
CROSS_COMPILE= {- $config{cross_compile_prefix} -}
|
|
|
|
CC= $(CROSS_COMPILE){- $target{cc} -}
|
2016-02-15 21:13:41 +00:00
|
|
|
CFLAG={- our $cflags2 = join(" ",(map { "-D".$_} @{$config{defines}},"OPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","ENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"")) -} {- $config{cflags} -}
|
2016-02-10 18:09:05 +00:00
|
|
|
CFLAG_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
|
Enhance and clear the support of linker flags
Some time ago, we had a ex_libs configuration setting that could be
divided into lflags and ex_libs. These got divided in two settings,
lflags and ex_libs, and the former was interpreted to be general
linking flags.
Unfortunately, that conclusion wasn't entirely accurate. Most of
those linking were meant to end up in a very precise position on the
linking command line, just before the spec of libraries the linking
depends on.
Back to the drawing board, we're diving things further, now having
lflags, which are linking flags that aren't depending on command line
position, plib_lflags, which are linking flags that should show up just
before the spec of libraries to depend on, and finally ex_libs, which
is the spec of extra libraries to depend on.
Also, documentation is changed in Configurations/README. This was
previously forgotten.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-05 10:47:14 +00:00
|
|
|
LDFLAG= {- $config{lflags} -}
|
|
|
|
PLIB_LDFLAG= {- $config{plib_lflags} -}
|
2016-01-29 17:07:37 +00:00
|
|
|
EX_LIBS= {- $config{ex_libs} -}
|
2015-05-20 18:03:20 +00:00
|
|
|
EXE_EXT= {- $target{exe_extension} -}
|
|
|
|
ARFLAGS= {- $target{arflags} -}
|
|
|
|
AR=$(CROSS_COMPILE){- $target{ar} -} $(ARFLAGS) r
|
|
|
|
RANLIB= {- $target{ranlib} -}
|
|
|
|
NM= $(CROSS_COMPILE){- $target{nm} -}
|
|
|
|
PERL= {- $config{perl} -}
|
2015-01-12 15:28:05 +00:00
|
|
|
#RM= echo --
|
|
|
|
RM= rm -f
|
2000-02-24 01:59:55 +00:00
|
|
|
TAR= tar
|
2000-09-21 07:15:52 +00:00
|
|
|
TARFLAGS= --no-recursion
|
2016-01-30 01:57:19 +00:00
|
|
|
MAKEDEPPROG=$(CROSS_COMPILE){- $config{makedepprog} -}
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2003-01-03 17:37:53 +00:00
|
|
|
# We let the C compiler driver to take care of .s files. This is done in
|
|
|
|
# order to be excused from maintaining a separate set of architecture
|
|
|
|
# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
|
|
|
|
# gcc, then the driver will automatically translate it to -xarch=v8plus
|
|
|
|
# and pass it down to assembler.
|
2014-10-18 22:47:03 +00:00
|
|
|
AS=$(CC) -c
|
2003-05-29 22:20:47 +00:00
|
|
|
ASFLAG=$(CFLAG)
|
2003-01-03 17:37:53 +00:00
|
|
|
|
2004-07-26 20:18:55 +00:00
|
|
|
# For x86 assembler: Set PROCESSOR to 386 if you want to support
|
|
|
|
# the 80386.
|
2015-05-20 18:03:20 +00:00
|
|
|
PROCESSOR= {- $config{processor} -}
|
2004-07-26 20:18:55 +00:00
|
|
|
|
|
|
|
# CPUID module collects small commonly used assembler snippets
|
2016-02-18 17:43:56 +00:00
|
|
|
APPS_OBJ={- $target{apps_obj} -}
|
2015-05-20 18:03:20 +00:00
|
|
|
CPUID_OBJ= {- $target{cpuid_obj} -}
|
|
|
|
BN_ASM= {- $target{bn_obj} -}
|
|
|
|
EC_ASM= {- $target{ec_obj} -}
|
|
|
|
DES_ENC= {- $target{des_obj} -}
|
|
|
|
AES_ENC= {- $target{aes_obj} -}
|
|
|
|
BF_ENC= {- $target{bf_obj} -}
|
|
|
|
CAST_ENC= {- $target{cast_obj} -}
|
|
|
|
RC4_ENC= {- $target{rc4_obj} -}
|
|
|
|
RC5_ENC= {- $target{rc5_obj} -}
|
|
|
|
MD5_ASM_OBJ= {- $target{md5_obj} -}
|
|
|
|
SHA1_ASM_OBJ= {- $target{sha1_obj} -}
|
|
|
|
RMD160_ASM_OBJ= {- $target{rmd160_obj} -}
|
|
|
|
WP_ASM_OBJ= {- $target{wp_obj} -}
|
|
|
|
CMLL_ENC= {- $target{cmll_obj} -}
|
|
|
|
MODES_ASM_OBJ= {- $target{modes_obj} -}
|
2016-01-25 21:23:42 +00:00
|
|
|
PADLOCK_ASM_OBJ= {- $target{padlock_obj} -}
|
2015-05-20 18:03:20 +00:00
|
|
|
CHACHA_ENC= {- $target{chacha_obj} -}
|
|
|
|
POLY1305_ASM_OBJ= {- $target{poly1305_obj} -}
|
|
|
|
PERLASM_SCHEME= {- $target{perlasm_scheme} -}
|
1998-12-21 10:56:39 +00:00
|
|
|
|
2005-12-05 13:46:46 +00:00
|
|
|
# Zlib stuff
|
2016-02-03 16:31:40 +00:00
|
|
|
ZLIB_INCLUDE={- $withargs{zlib_include} -}
|
|
|
|
LIBZLIB={- $withargs{zlib_lib} -}
|
2005-12-05 13:46:46 +00:00
|
|
|
|
2011-01-26 12:31:30 +00:00
|
|
|
# This is the location of fipscanister.o and friends.
|
|
|
|
# The FIPS module build will place it $(INSTALLTOP)/lib
|
|
|
|
# but since $(INSTALLTOP) can only take the default value
|
|
|
|
# when the module is built it will be in /usr/local/ssl/lib
|
2011-01-29 21:45:04 +00:00
|
|
|
# $(INSTALLTOP) for this build may be different so hard
|
2011-01-26 12:31:30 +00:00
|
|
|
# code the path.
|
|
|
|
|
2015-05-20 18:03:20 +00:00
|
|
|
FIPSLIBDIR={- $config{fipslibdir} -}
|
2011-01-26 12:31:30 +00:00
|
|
|
|
|
|
|
# The location of the library which contains fipscanister.o
|
2014-10-18 22:47:03 +00:00
|
|
|
# normally it will be libcrypto. If not compiling in FIPS mode
|
|
|
|
# at all this is empty making it a useful test for a FIPS compile.
|
2011-01-26 12:31:30 +00:00
|
|
|
|
2015-05-20 18:03:20 +00:00
|
|
|
FIPSCANLIB={- $config{fips} ? "libcrypto" : "" -}
|
2011-01-26 12:31:30 +00:00
|
|
|
|
|
|
|
# Shared library base address. Currently only used on Windows.
|
|
|
|
#
|
|
|
|
|
2015-05-20 18:03:20 +00:00
|
|
|
BASEADDR={- $config{baseaddr} -}
|
2011-01-26 12:31:30 +00:00
|
|
|
|
2015-05-20 18:03:20 +00:00
|
|
|
DIRS= {- join(" ", @{$config{dirs}}) -}
|
1999-04-28 16:16:31 +00:00
|
|
|
SHLIBDIRS= crypto ssl
|
2015-03-26 20:33:18 +00:00
|
|
|
INSTALL_SUBS= engines apps tools
|
1999-04-28 16:16:31 +00:00
|
|
|
|
1998-12-21 10:52:47 +00:00
|
|
|
# dirs in crypto to build
|
2015-05-20 18:03:20 +00:00
|
|
|
SDIRS= {- join(" ", @{$config{sdirs}}) -}
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2000-11-12 20:24:30 +00:00
|
|
|
# tests to perform. "alltests" is a special word indicating that all tests
|
|
|
|
# should be performed.
|
|
|
|
TESTS = alltests
|
|
|
|
|
2005-03-30 13:05:57 +00:00
|
|
|
MAKEFILE= Makefile
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2016-01-20 17:11:51 +00:00
|
|
|
MANDIR=$(INSTALLTOP)/share/man
|
1998-12-21 10:52:47 +00:00
|
|
|
MAN1=1
|
|
|
|
MAN3=3
|
2003-04-21 22:00:36 +00:00
|
|
|
MANSUFFIX=
|
2006-04-11 21:09:57 +00:00
|
|
|
HTMLSUFFIX=html
|
2016-01-20 17:11:51 +00:00
|
|
|
HTMLDIR=$(INSTALLTOP)/share/doc/$(BASENAME)/html
|
1998-12-21 10:52:47 +00:00
|
|
|
SHELL=/bin/sh
|
|
|
|
|
1998-12-21 10:56:39 +00:00
|
|
|
TOP= .
|
2000-07-21 15:08:53 +00:00
|
|
|
LIBS= libcrypto.a libssl.a
|
2000-10-13 15:25:06 +00:00
|
|
|
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
|
|
|
SHARED_SSL=libssl$(SHLIB_EXT)
|
2015-05-20 18:03:20 +00:00
|
|
|
SHARED_LIBS={- '$(SHARED_CRYPTO) $(SHARED_SSL)' if (!$config{no_shared}) -}
|
2016-01-30 01:57:19 +00:00
|
|
|
SHARED_LDFLAG={- $target{shared_ldflag}
|
|
|
|
# Unlike other OSes (like Solaris, Linux, Tru64,
|
|
|
|
# IRIX) BSD run-time linkers (tested OpenBSD, NetBSD
|
|
|
|
# and FreeBSD) "demand" RPATH set on .so objects.
|
|
|
|
# Apparently application RPATH is not global and
|
|
|
|
# does not apply to .so linked with other .so.
|
|
|
|
# Problem manifests itself when libssl.so fails to
|
|
|
|
# load libcrypto.so. One can argue that we should
|
|
|
|
# engrave this into Makefile.shared rules or into
|
|
|
|
# BSD-* config lines above. Meanwhile let's try to
|
|
|
|
# be cautious and pass -rpath to linker only when
|
|
|
|
# $prefix is not /usr.
|
|
|
|
. ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
|
|
|
|
? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
|
2016-02-05 14:17:33 +00:00
|
|
|
SHARED_RCFLAG={- $target{shared_rcflag} -}
|
1998-12-21 10:56:39 +00:00
|
|
|
|
|
|
|
GENERAL= Makefile
|
1998-12-23 07:58:53 +00:00
|
|
|
BASENAME= openssl
|
1998-12-21 10:56:39 +00:00
|
|
|
NAME= $(BASENAME)-$(VERSION)
|
2015-12-07 14:45:50 +00:00
|
|
|
TARFILE= ../$(NAME).tar
|
1998-12-21 10:56:39 +00:00
|
|
|
HEADER= e_os.h
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2015-01-12 15:28:05 +00:00
|
|
|
# Directories created on install if they don't exist.
|
|
|
|
INSTALLDIRS= \
|
2016-02-12 20:14:03 +00:00
|
|
|
$(DESTDIR)$(INSTALLTOP)/bin \
|
|
|
|
$(DESTDIR)$(INSTALLTOP)/$(LIBDIR) \
|
|
|
|
$(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines \
|
|
|
|
$(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
|
|
|
|
$(DESTDIR)$(INSTALLTOP)/include/openssl \
|
|
|
|
$(DESTDIR)$(OPENSSLDIR)/misc \
|
|
|
|
$(DESTDIR)$(OPENSSLDIR)/certs \
|
|
|
|
$(DESTDIR)$(OPENSSLDIR)/private
|
2015-01-12 15:28:05 +00:00
|
|
|
|
2016-02-13 17:15:51 +00:00
|
|
|
all: Makefile build_all_but_tests
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2005-06-23 00:03:26 +00:00
|
|
|
# as we stick to -e, CLEARENV ensures that local variables in lower
|
2005-06-23 15:36:15 +00:00
|
|
|
# Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
|
|
|
|
# shell, which [annoyingly enough] terminates unset with error if VAR
|
|
|
|
# is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
|
|
|
|
# which terminates unset with error if no variable was present:-(
|
|
|
|
CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
|
2005-06-23 00:03:26 +00:00
|
|
|
$${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
|
|
|
|
$${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
|
|
|
|
$${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
|
2015-03-26 20:44:59 +00:00
|
|
|
$${HEADER+HEADER} \
|
2005-06-23 00:03:26 +00:00
|
|
|
$${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
|
|
|
|
$${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
|
2012-04-19 06:39:40 +00:00
|
|
|
$${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \
|
2005-06-26 17:47:44 +00:00
|
|
|
$${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
|
2005-06-23 00:03:26 +00:00
|
|
|
$${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
|
|
|
|
|
2015-11-21 10:28:05 +00:00
|
|
|
# LC_ALL=C ensures that error [and other] messages are delivered in
|
|
|
|
# same language for uniform treatment.
|
|
|
|
BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
|
2016-02-10 18:09:05 +00:00
|
|
|
CC='$(CC)' CFLAG='$(CFLAG)' CFLAG_Q='$(CFLAG_Q)' \
|
2014-10-18 22:47:03 +00:00
|
|
|
AS='$(CC)' ASFLAG='$(CFLAG) -c' \
|
2008-12-29 16:17:52 +00:00
|
|
|
AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
|
2009-10-15 23:43:54 +00:00
|
|
|
CROSS_COMPILE='$(CROSS_COMPILE)' \
|
2016-01-19 12:06:33 +00:00
|
|
|
PERL='$(PERL)' \
|
2009-08-10 14:48:40 +00:00
|
|
|
SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
|
2016-02-12 20:14:03 +00:00
|
|
|
DESTDIR='$(DESTDIR)' \
|
2008-12-29 16:17:52 +00:00
|
|
|
INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
|
2009-08-26 11:42:11 +00:00
|
|
|
LIBDIR='$(LIBDIR)' \
|
Enhance and clear the support of linker flags
Some time ago, we had a ex_libs configuration setting that could be
divided into lflags and ex_libs. These got divided in two settings,
lflags and ex_libs, and the former was interpreted to be general
linking flags.
Unfortunately, that conclusion wasn't entirely accurate. Most of
those linking were meant to end up in a very precise position on the
linking command line, just before the spec of libraries the linking
depends on.
Back to the drawing board, we're diving things further, now having
lflags, which are linking flags that aren't depending on command line
position, plib_lflags, which are linking flags that should show up just
before the spec of libraries to depend on, and finally ex_libs, which
is the spec of extra libraries to depend on.
Also, documentation is changed in Configurations/README. This was
previously forgotten.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-05 10:47:14 +00:00
|
|
|
SHARED_LDFLAG='$(SHARED_LDFLAG)' \
|
2016-02-05 14:17:33 +00:00
|
|
|
SHARED_RCFLAG='$(SHARED_RCFLAG)' \
|
2009-04-07 16:33:26 +00:00
|
|
|
ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
|
2008-12-29 16:17:52 +00:00
|
|
|
EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
|
2016-02-15 16:20:15 +00:00
|
|
|
SHLIB_EXT='$(SHLIB_EXT)' DSO_EXT='$(DSO_EXT)' \
|
|
|
|
SHLIB_TARGET='$(SHLIB_TARGET)' \
|
Enhance and clear the support of linker flags
Some time ago, we had a ex_libs configuration setting that could be
divided into lflags and ex_libs. These got divided in two settings,
lflags and ex_libs, and the former was interpreted to be general
linking flags.
Unfortunately, that conclusion wasn't entirely accurate. Most of
those linking were meant to end up in a very precise position on the
linking command line, just before the spec of libraries the linking
depends on.
Back to the drawing board, we're diving things further, now having
lflags, which are linking flags that aren't depending on command line
position, plib_lflags, which are linking flags that should show up just
before the spec of libraries to depend on, and finally ex_libs, which
is the spec of extra libraries to depend on.
Also, documentation is changed in Configurations/README. This was
previously forgotten.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-05 10:47:14 +00:00
|
|
|
LDFLAG='$(LDFLAG)' \
|
|
|
|
PLIB_LDFLAG='$(PLIB_LDFLAG)' EX_LIBS='$(EX_LIBS)' \
|
2016-02-18 17:43:56 +00:00
|
|
|
APPS_OBJ='$(APPS_OBJ)' \
|
2014-08-30 17:22:51 +00:00
|
|
|
CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \
|
2015-01-12 15:28:05 +00:00
|
|
|
EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \
|
2008-12-29 16:17:52 +00:00
|
|
|
AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
|
|
|
|
BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \
|
|
|
|
RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \
|
|
|
|
SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \
|
|
|
|
MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \
|
|
|
|
RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \
|
|
|
|
WP_ASM_OBJ='$(WP_ASM_OBJ)' \
|
2010-04-22 21:36:26 +00:00
|
|
|
MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \
|
2016-01-25 21:23:42 +00:00
|
|
|
PADLOCK_ASM_OBJ='$(PADLOCK_ASM_OBJ)' \
|
2015-12-12 11:29:37 +00:00
|
|
|
CHACHA_ENC='$(CHACHA_ENC)' \
|
|
|
|
POLY1305_ASM_OBJ='$(POLY1305_ASM_OBJ)' \
|
2008-12-29 16:17:52 +00:00
|
|
|
PERLASM_SCHEME='$(PERLASM_SCHEME)' \
|
2011-01-26 12:31:30 +00:00
|
|
|
FIPSLIBDIR='${FIPSLIBDIR}' \
|
|
|
|
FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
|
2005-06-23 00:03:26 +00:00
|
|
|
THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
|
|
|
|
# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
|
|
|
|
# which in turn eliminates ambiguities in variable treatment with -e.
|
2004-07-18 16:19:34 +00:00
|
|
|
|
2006-02-10 08:48:43 +00:00
|
|
|
# BUILD_CMD is a generic macro to build a given target in a given
|
|
|
|
# subdirectory. The target must be given through the shell variable
|
|
|
|
# `target' and the subdirectory to build in must be given through `dir'.
|
|
|
|
# This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
|
|
|
|
# BUILD_ONE_CMD instead.
|
|
|
|
#
|
|
|
|
# RECURSIVE_BUILD_CMD is a macro to build a given target in all
|
|
|
|
# subdirectories defined in $(DIRS). It requires that the target
|
|
|
|
# is given through the shell variable `target'.
|
2015-01-12 15:28:05 +00:00
|
|
|
#
|
|
|
|
# BUILD_ONE_CMD is a macro to build a given target in a given
|
|
|
|
# subdirectory if that subdirectory is part of $(DIRS). It requires
|
|
|
|
# exactly the same shell variables as BUILD_CMD.
|
2005-06-23 00:03:26 +00:00
|
|
|
BUILD_CMD= if [ -d "$$dir" ]; then \
|
|
|
|
( cd $$dir && echo "making $$target in $$dir..." && \
|
|
|
|
$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
|
|
|
|
) || exit 1; \
|
|
|
|
fi
|
|
|
|
RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
|
2006-02-10 08:04:59 +00:00
|
|
|
BUILD_ONE_CMD=\
|
2008-12-30 13:20:17 +00:00
|
|
|
if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
|
2006-02-10 08:04:59 +00:00
|
|
|
$(BUILD_CMD); \
|
|
|
|
fi
|
2002-10-09 14:52:01 +00:00
|
|
|
|
2005-05-15 23:53:34 +00:00
|
|
|
reflect:
|
2005-06-23 00:03:26 +00:00
|
|
|
@[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
|
2005-05-15 23:53:34 +00:00
|
|
|
|
2002-10-09 15:03:21 +00:00
|
|
|
sub_all: build_all
|
2014-12-12 18:17:51 +00:00
|
|
|
|
2016-02-13 17:15:51 +00:00
|
|
|
build_all_but_tests: build_libs build_apps build_tools
|
|
|
|
build_all: build_all_but_tests build_tests
|
2002-10-09 14:52:01 +00:00
|
|
|
|
2015-06-09 23:34:26 +00:00
|
|
|
build_libs: build_libcrypto build_libssl openssl.pc
|
|
|
|
|
|
|
|
build_libcrypto: build_crypto build_engines libcrypto.pc
|
|
|
|
build_libssl: build_ssl libssl.pc
|
2002-10-09 14:52:01 +00:00
|
|
|
|
|
|
|
build_crypto:
|
2014-10-18 22:47:03 +00:00
|
|
|
@dir=crypto; target=all; $(BUILD_ONE_CMD)
|
2014-12-12 18:17:51 +00:00
|
|
|
build_ssl: build_crypto
|
2006-02-10 08:04:59 +00:00
|
|
|
@dir=ssl; target=all; $(BUILD_ONE_CMD)
|
2014-12-12 18:17:51 +00:00
|
|
|
build_engines: build_crypto
|
2011-09-06 20:45:36 +00:00
|
|
|
@dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD)
|
2014-12-12 18:17:51 +00:00
|
|
|
|
|
|
|
build_apps: build_libs
|
2006-02-10 08:04:59 +00:00
|
|
|
@dir=apps; target=all; $(BUILD_ONE_CMD)
|
2014-12-12 18:17:51 +00:00
|
|
|
build_tests: build_libs
|
2006-02-10 08:04:59 +00:00
|
|
|
@dir=test; target=all; $(BUILD_ONE_CMD)
|
2014-12-12 18:17:51 +00:00
|
|
|
build_tools: build_libs
|
2006-02-10 08:04:59 +00:00
|
|
|
@dir=tools; target=all; $(BUILD_ONE_CMD)
|
2004-03-24 10:50:25 +00:00
|
|
|
|
|
|
|
all_testapps: build_libs build_testapps
|
|
|
|
build_testapps:
|
2006-02-10 08:04:59 +00:00
|
|
|
@dir=crypto; target=testapps; $(BUILD_ONE_CMD)
|
2000-07-21 15:08:53 +00:00
|
|
|
|
2014-10-18 22:47:03 +00:00
|
|
|
libcrypto$(SHLIB_EXT): libcrypto.a
|
2000-07-24 20:36:46 +00:00
|
|
|
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
2011-01-30 01:14:34 +00:00
|
|
|
if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
|
|
|
|
FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
|
|
|
|
export CC FIPSLD_CC; \
|
|
|
|
fi; \
|
2014-02-03 14:10:24 +00:00
|
|
|
$(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \
|
2000-07-24 20:36:46 +00:00
|
|
|
else \
|
|
|
|
echo "There's no support for shared libraries on this platform" >&2; \
|
2004-07-18 16:19:34 +00:00
|
|
|
exit 1; \
|
2000-07-24 20:36:46 +00:00
|
|
|
fi
|
2002-01-28 16:30:06 +00:00
|
|
|
|
2000-10-13 15:25:06 +00:00
|
|
|
libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
|
2000-07-24 20:36:46 +00:00
|
|
|
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
2001-03-15 22:10:07 +00:00
|
|
|
$(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
|
2000-07-24 20:36:46 +00:00
|
|
|
else \
|
|
|
|
echo "There's no support for shared libraries on this platform" >&2; \
|
2004-07-18 16:19:34 +00:00
|
|
|
exit 1; \
|
2000-07-24 20:36:46 +00:00
|
|
|
fi
|
2000-07-21 15:08:53 +00:00
|
|
|
|
2000-10-13 15:25:06 +00:00
|
|
|
link-shared:
|
2008-12-29 16:17:52 +00:00
|
|
|
@ set -e; for i in $(SHLIBDIRS); do \
|
2005-10-25 21:58:59 +00:00
|
|
|
$(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
|
2008-12-29 16:17:52 +00:00
|
|
|
LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
|
|
|
|
LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
|
2002-10-11 00:37:11 +00:00
|
|
|
symlink.$(SHLIB_TARGET); \
|
2001-10-10 14:46:41 +00:00
|
|
|
libs="$$libs -l$$i"; \
|
2000-10-21 21:24:11 +00:00
|
|
|
done
|
|
|
|
|
2002-10-11 00:37:11 +00:00
|
|
|
build-shared: do_$(SHLIB_TARGET) link-shared
|
|
|
|
|
|
|
|
do_$(SHLIB_TARGET):
|
2008-12-29 16:17:52 +00:00
|
|
|
@ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
|
2005-06-23 00:03:26 +00:00
|
|
|
$(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
|
2008-12-29 16:17:52 +00:00
|
|
|
LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
|
|
|
|
LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
|
2002-10-11 00:37:11 +00:00
|
|
|
LIBDEPS="$$libs $(EX_LIBS)" \
|
2016-02-15 17:02:52 +00:00
|
|
|
link_shlib.$(SHLIB_TARGET); \
|
2003-02-14 13:12:00 +00:00
|
|
|
libs="-l$$i $$libs"; \
|
2016-01-30 04:45:29 +00:00
|
|
|
case "$(PLATFORM)" in \
|
|
|
|
Cygwin*) \
|
|
|
|
rm -f apps/cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll; \
|
|
|
|
rm -f test/cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll; \
|
|
|
|
cp cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll apps/; \
|
|
|
|
cp cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll test/; \
|
|
|
|
;; \
|
|
|
|
mingw*) \
|
Big rename fest of MingW shared libraries
So far, MingW shared libraries were named like this
libeay32.dll + libeay32.dll.a
ssleay32.dll + ssleay32.dll.a
That naming scheme is antiquated, a reminicense of SSLeay. We're
therefore changing the scheme to something that's more like the rest
of OpenSSL.
There are two factors to remember:
- Windows libraries have no recorded SOvers, which means that the
shared library version must be encoded in the name. According to
some, it's unwise to encode extra periods in a Windows file name,
so we convert version number periods to underscores.
- MingW has multilib ability. However, DLLs need to reside with the
binaries that use them, so to allow both 32-bit and 64-bit DLLs to
reside in the same place, we add '-x64' in the name of the 64-bit
ones.
The resulting name scheme (for SOver 1.1) is this:
on x86:
libcrypto-1_1.dll + libcrypto.dll.a
libssl-1_1.dll + libssl.dll.a
on x86_64:
libcrypto-1_1-x64.dll + libcrypto.dll.a
libssl-1_1-x64.dll + libssl.dll.a
An observation is that the import lib is the same for both
architectures. Not to worry, though, as they will be installed in
PREFIX/lib/ for x86 and PREFIX/lib64/ for x86_64.
As a side effect, MingW got its own targets in Makefile.shared.
link_dso.mingw-shared and link_app.mingw-shared are aliases for the
corresponding cygwin-shared targets. link_shlib.mingw-shared is,
however, a target separated from the cygwin one.
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-16 19:37:28 +00:00
|
|
|
arch=; \
|
|
|
|
if expr $(PLATFORM) : mingw64 > /dev/null; then \
|
|
|
|
arch=-x64; \
|
|
|
|
fi; \
|
|
|
|
rm -f apps/lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll; \
|
|
|
|
rm -f test/lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll; \
|
|
|
|
cp lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll apps/; \
|
|
|
|
cp lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll test/; \
|
|
|
|
;; \
|
2016-01-30 04:45:29 +00:00
|
|
|
esac; \
|
2002-01-26 03:17:27 +00:00
|
|
|
done
|
|
|
|
|
2005-07-05 05:14:17 +00:00
|
|
|
libcrypto.pc: Makefile
|
|
|
|
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
|
|
|
echo 'exec_prefix=$${prefix}'; \
|
2009-08-10 14:48:40 +00:00
|
|
|
echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
|
2005-07-05 05:14:17 +00:00
|
|
|
echo 'includedir=$${prefix}/include'; \
|
|
|
|
echo ''; \
|
|
|
|
echo 'Name: OpenSSL-libcrypto'; \
|
|
|
|
echo 'Description: OpenSSL cryptography library'; \
|
|
|
|
echo 'Version: '$(VERSION); \
|
|
|
|
echo 'Requires: '; \
|
2012-02-12 18:47:47 +00:00
|
|
|
echo 'Libs: -L$${libdir} -lcrypto'; \
|
|
|
|
echo 'Libs.private: $(EX_LIBS)'; \
|
2015-05-12 11:14:13 +00:00
|
|
|
echo 'Cflags: -I$${includedir}' ) > libcrypto.pc
|
2005-07-05 05:14:17 +00:00
|
|
|
|
|
|
|
libssl.pc: Makefile
|
|
|
|
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
|
|
|
echo 'exec_prefix=$${prefix}'; \
|
2009-08-10 14:48:40 +00:00
|
|
|
echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
|
2005-07-05 05:14:17 +00:00
|
|
|
echo 'includedir=$${prefix}/include'; \
|
|
|
|
echo ''; \
|
2014-05-12 22:31:51 +00:00
|
|
|
echo 'Name: OpenSSL-libssl'; \
|
2005-07-05 05:14:17 +00:00
|
|
|
echo 'Description: Secure Sockets Layer and cryptography libraries'; \
|
|
|
|
echo 'Version: '$(VERSION); \
|
2014-05-12 22:31:51 +00:00
|
|
|
echo 'Requires.private: libcrypto'; \
|
|
|
|
echo 'Libs: -L$${libdir} -lssl'; \
|
2012-02-12 18:47:47 +00:00
|
|
|
echo 'Libs.private: $(EX_LIBS)'; \
|
2015-05-12 11:14:13 +00:00
|
|
|
echo 'Cflags: -I$${includedir}' ) > libssl.pc
|
2005-07-05 05:14:17 +00:00
|
|
|
|
2005-03-30 13:05:57 +00:00
|
|
|
openssl.pc: Makefile
|
2002-11-06 23:35:00 +00:00
|
|
|
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
|
|
|
echo 'exec_prefix=$${prefix}'; \
|
2009-08-10 14:48:40 +00:00
|
|
|
echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
|
2002-11-06 23:35:00 +00:00
|
|
|
echo 'includedir=$${prefix}/include'; \
|
|
|
|
echo ''; \
|
|
|
|
echo 'Name: OpenSSL'; \
|
|
|
|
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
|
|
|
echo 'Version: '$(VERSION); \
|
2014-05-12 22:31:51 +00:00
|
|
|
echo 'Requires: libssl libcrypto' ) > openssl.pc
|
2002-11-06 23:35:00 +00:00
|
|
|
|
2016-01-12 21:25:30 +00:00
|
|
|
Makefile: Makefile.in Configure config
|
|
|
|
@echo "Makefile is older than Makefile.in, Configure or config."
|
1999-07-22 16:10:31 +00:00
|
|
|
@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
|
1999-01-24 18:15:00 +00:00
|
|
|
@false
|
|
|
|
|
1998-12-21 11:00:56 +00:00
|
|
|
libclean:
|
2011-11-12 11:57:54 +00:00
|
|
|
rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
|
1998-12-21 11:00:56 +00:00
|
|
|
|
2003-02-22 15:04:03 +00:00
|
|
|
clean: libclean
|
2015-05-01 16:48:59 +00:00
|
|
|
rm -f */*/*.o */*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
|
2014-12-15 14:18:11 +00:00
|
|
|
rm -rf *.bak certs/.0
|
2005-06-23 00:03:26 +00:00
|
|
|
@set -e; target=clean; $(RECURSIVE_BUILD_CMD)
|
2014-08-27 00:51:52 +00:00
|
|
|
rm -f $(LIBS) tags TAGS
|
2005-07-05 05:14:17 +00:00
|
|
|
rm -f openssl.pc libssl.pc libcrypto.pc
|
2003-02-22 15:04:03 +00:00
|
|
|
rm -f speed.* .pure
|
1999-03-06 12:32:06 +00:00
|
|
|
rm -f $(TARFILE)
|
1998-12-21 10:52:47 +00:00
|
|
|
|
|
|
|
makefile.one: files
|
1999-04-01 12:34:33 +00:00
|
|
|
$(PERL) util/mk1mf.pl >makefile.one; \
|
1998-12-21 10:52:47 +00:00
|
|
|
sh util/do_ms.sh
|
|
|
|
|
1999-04-08 15:19:36 +00:00
|
|
|
files:
|
2005-03-30 13:05:57 +00:00
|
|
|
$(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
|
2005-06-23 00:03:26 +00:00
|
|
|
@set -e; target=files; $(RECURSIVE_BUILD_CMD)
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2002-07-23 13:31:04 +00:00
|
|
|
gentests:
|
|
|
|
@(cd test && echo "generating dummy tests (if needed)..." && \
|
2008-12-29 16:17:52 +00:00
|
|
|
$(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
|
2002-07-23 13:31:04 +00:00
|
|
|
|
2009-10-15 17:17:45 +00:00
|
|
|
rehash: rehash.time
|
2016-01-23 22:19:05 +00:00
|
|
|
rehash.time: certs build_apps build_tools
|
2009-10-15 23:43:54 +00:00
|
|
|
@if [ -z "$(CROSS_COMPILE)" ]; then \
|
2009-10-15 17:17:45 +00:00
|
|
|
(OPENSSL="`pwd`/util/opensslwrap.sh"; \
|
|
|
|
[ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
|
2015-04-29 01:48:44 +00:00
|
|
|
OPENSSL_DEBUG_MEMORY=on; OPENSSL_CONF=/dev/null ; \
|
|
|
|
export OPENSSL OPENSSL_DEBUG_MEMORY OPENSSL_CONF; \
|
2016-01-14 11:18:30 +00:00
|
|
|
$$OPENSSL rehash certs/demo \
|
|
|
|
|| $(PERL) tools/c_rehash certs/demo) && \
|
2009-10-15 17:17:45 +00:00
|
|
|
touch rehash.time; \
|
|
|
|
else :; fi
|
|
|
|
|
2016-02-10 12:52:49 +00:00
|
|
|
test: files tests
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2015-12-02 17:20:49 +00:00
|
|
|
|
2016-02-13 17:15:51 +00:00
|
|
|
tests: build_tests rehash
|
1999-03-06 12:32:06 +00:00
|
|
|
@(cd test && echo "testing..." && \
|
2009-04-06 15:22:01 +00:00
|
|
|
$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
|
2015-10-16 15:19:04 +00:00
|
|
|
@if [ -z "$(CROSS_COMPILE)" ]; then \
|
|
|
|
OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a; \
|
|
|
|
fi
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2015-09-15 12:07:10 +00:00
|
|
|
list-tests:
|
|
|
|
@(cd test && \
|
|
|
|
$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. list-tests)
|
|
|
|
|
2000-02-23 23:47:05 +00:00
|
|
|
report:
|
|
|
|
@$(PERL) util/selftest.pl
|
|
|
|
|
2014-08-27 00:51:52 +00:00
|
|
|
tags TAGS: FORCE
|
|
|
|
rm -f TAGS tags
|
|
|
|
-ctags -R .
|
2015-12-18 23:09:05 +00:00
|
|
|
-etags `find . -name '*.[ch]' -o -name '*.pm'`
|
2014-08-27 00:51:52 +00:00
|
|
|
|
|
|
|
FORCE:
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2016-01-17 21:53:53 +00:00
|
|
|
depend:
|
|
|
|
@set -e; target=depend; $(RECURSIVE_BUILD_CMD)
|
|
|
|
|
|
|
|
update: generate errors ordinals depend
|
|
|
|
|
|
|
|
generate:
|
2016-01-28 05:10:11 +00:00
|
|
|
(cd apps && PERL='${PERL}' $(MAKE) generate)
|
|
|
|
(cd crypto/bn && PERL='${PERL}' $(MAKE) generate)
|
|
|
|
(cd crypto/objects && PERL='${PERL}' $(MAKE) generate)
|
2016-01-17 21:53:53 +00:00
|
|
|
|
1998-12-21 10:52:47 +00:00
|
|
|
errors:
|
2012-04-22 13:25:51 +00:00
|
|
|
$(PERL) util/ck_errf.pl -strict */*.c */*/*.c
|
2001-01-10 16:40:30 +00:00
|
|
|
$(PERL) util/mkerr.pl -recurse -write
|
2002-10-11 18:51:29 +00:00
|
|
|
(cd engines; $(MAKE) PERL=$(PERL) errors)
|
2015-10-19 02:20:01 +00:00
|
|
|
(cd crypto/ct; $(MAKE) PERL=$(PERL) errors)
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2016-01-17 21:53:53 +00:00
|
|
|
ordinals: util/libeay.num util/ssleay.num test_ordinals TABLE
|
1999-06-09 16:18:53 +00:00
|
|
|
util/libeay.num::
|
2001-01-10 16:40:30 +00:00
|
|
|
$(PERL) util/mkdef.pl crypto update
|
1999-06-09 16:18:53 +00:00
|
|
|
util/ssleay.num::
|
2001-01-10 16:40:30 +00:00
|
|
|
$(PERL) util/mkdef.pl ssl update
|
2016-01-17 21:53:53 +00:00
|
|
|
test_ordinals:
|
|
|
|
TOP=$(TOP) PERL=$(PERL) $(PERL) test/run_tests.pl test_ordinals
|
1999-06-09 16:18:53 +00:00
|
|
|
|
Move Configurations* out of the way and rename them.
Configure would load the glob "Configurations*". The problem with
this is that it also loads all kinds of backups of those
configurations that some editors do, like emacs' classic
'Configurations~'. The solution is to give them an extension, such as
'.conf', and make sure to end the glob with that.
Also, because 'Configurations.conf' makes for a silly name, and
because a possibly large number of configurations will become clutter,
move them to a subdirectory 'Configurations/', and rename them to
something more expressive, as well as something that sets up some form
of sorting order. Thus:
Configurations -> Configurations/10-main.conf
Configurations.team -> Configurations/90-team.conf
Finally, make sure that Configure sorts the list of files that 'glob'
produces, and adapt Makefile.org.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-11 09:22:50 +00:00
|
|
|
TABLE: Configure Configurations/*.conf
|
1999-06-09 23:13:03 +00:00
|
|
|
(echo 'Output of `Configure TABLE'"':"; \
|
2001-01-10 16:40:30 +00:00
|
|
|
$(PERL) Configure TABLE) > TABLE
|
1999-06-09 16:18:53 +00:00
|
|
|
|
2002-06-12 12:26:34 +00:00
|
|
|
# Build distribution tar-file. As the list of files returned by "find" is
|
|
|
|
# pretty long, on several platforms a "too many arguments" error or similar
|
|
|
|
# would occur. Therefore the list of files is temporarily stored into a file
|
|
|
|
# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
|
|
|
|
# tar does not support the --files-from option.
|
2015-12-07 14:45:50 +00:00
|
|
|
TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \
|
2016-01-26 00:40:13 +00:00
|
|
|
--owner 0 --group 0 \
|
2015-12-07 14:45:50 +00:00
|
|
|
--transform 's|^|$(NAME)/|' \
|
2015-07-10 13:40:53 +00:00
|
|
|
-cvf -
|
|
|
|
|
2015-12-07 14:45:50 +00:00
|
|
|
$(TARFILE).list:
|
2016-01-26 00:40:13 +00:00
|
|
|
git diff --quiet HEAD
|
|
|
|
git ls-files | sort > $(TARFILE).list
|
2015-07-10 13:40:53 +00:00
|
|
|
|
2015-12-07 14:45:50 +00:00
|
|
|
tar: $(TARFILE).list
|
2002-11-11 08:57:04 +00:00
|
|
|
find . -type d -print | xargs chmod 755
|
|
|
|
find . -type f -print | xargs chmod a+r
|
|
|
|
find . -type f -perm -0100 -print | xargs chmod a+x
|
2015-12-07 14:45:50 +00:00
|
|
|
$(TAR_COMMAND) | gzip --best > $(TARFILE).gz
|
|
|
|
rm -f $(TARFILE).list
|
|
|
|
ls -l $(TARFILE).gz
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2015-12-07 14:45:50 +00:00
|
|
|
tar-snap: $(TARFILE).list
|
|
|
|
$(TAR_COMMAND) > $(TARFILE)
|
|
|
|
rm -f $(TARFILE).list
|
|
|
|
ls -l $(TARFILE)
|
2001-02-22 14:45:02 +00:00
|
|
|
|
2016-02-10 12:52:49 +00:00
|
|
|
dist:
|
1999-04-01 12:34:33 +00:00
|
|
|
$(PERL) Configure dist
|
2008-12-29 16:17:52 +00:00
|
|
|
@$(MAKE) SDIRS='$(SDIRS)' clean
|
2015-12-08 11:42:27 +00:00
|
|
|
@$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2004-06-28 22:01:37 +00:00
|
|
|
install: all install_docs install_sw
|
|
|
|
|
2015-01-12 15:28:05 +00:00
|
|
|
uninstall: uninstall_sw uninstall_docs
|
|
|
|
|
2004-06-28 22:01:37 +00:00
|
|
|
install_sw:
|
2015-01-12 15:28:05 +00:00
|
|
|
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS)
|
2015-03-26 20:33:18 +00:00
|
|
|
@set -e; for i in include/openssl/*.h; do \
|
2016-02-12 20:14:03 +00:00
|
|
|
(cp $$i $(DESTDIR)$(INSTALLTOP)/$$i; \
|
|
|
|
chmod 644 $(DESTDIR)$(INSTALLTOP)/$$i ); \
|
1999-05-15 13:24:16 +00:00
|
|
|
done;
|
2015-03-26 20:33:18 +00:00
|
|
|
@set -e; target=install; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done
|
2011-08-16 08:56:07 +00:00
|
|
|
@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
|
1998-12-21 10:52:47 +00:00
|
|
|
do \
|
2000-07-21 15:08:53 +00:00
|
|
|
if [ -f "$$i" ]; then \
|
|
|
|
( echo installing $$i; \
|
2016-02-12 20:14:03 +00:00
|
|
|
cp $$i $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
$(RANLIB) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
|
2002-05-07 15:35:48 +00:00
|
|
|
fi; \
|
|
|
|
done;
|
2003-10-31 06:58:24 +00:00
|
|
|
@set -e; if [ -n "$(SHARED_LIBS)" ]; then \
|
2000-10-13 15:25:06 +00:00
|
|
|
tmp="$(SHARED_LIBS)"; \
|
|
|
|
for i in $${tmp:-x}; \
|
|
|
|
do \
|
2002-02-13 14:44:33 +00:00
|
|
|
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
Big rename fest of MingW shared libraries
So far, MingW shared libraries were named like this
libeay32.dll + libeay32.dll.a
ssleay32.dll + ssleay32.dll.a
That naming scheme is antiquated, a reminicense of SSLeay. We're
therefore changing the scheme to something that's more like the rest
of OpenSSL.
There are two factors to remember:
- Windows libraries have no recorded SOvers, which means that the
shared library version must be encoded in the name. According to
some, it's unwise to encode extra periods in a Windows file name,
so we convert version number periods to underscores.
- MingW has multilib ability. However, DLLs need to reside with the
binaries that use them, so to allow both 32-bit and 64-bit DLLs to
reside in the same place, we add '-x64' in the name of the 64-bit
ones.
The resulting name scheme (for SOver 1.1) is this:
on x86:
libcrypto-1_1.dll + libcrypto.dll.a
libssl-1_1.dll + libssl.dll.a
on x86_64:
libcrypto-1_1-x64.dll + libcrypto.dll.a
libssl-1_1-x64.dll + libssl.dll.a
An observation is that the import lib is the same for both
architectures. Not to worry, though, as they will be installed in
PREFIX/lib/ for x86 and PREFIX/lib64/ for x86_64.
As a side effect, MingW got its own targets in Makefile.shared.
link_dso.mingw-shared and link_app.mingw-shared are aliases for the
corresponding cygwin-shared targets. link_shlib.mingw-shared is,
however, a target separated from the cygwin one.
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-16 19:37:28 +00:00
|
|
|
case "$(PLATFORM)" in \
|
|
|
|
Cygwin*) \
|
|
|
|
c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
|
|
|
echo installing $$c; \
|
2016-02-12 20:14:03 +00:00
|
|
|
cp $$c $(DESTDIR)$(INSTALLTOP)/bin/$$c.new; \
|
|
|
|
chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$c.new; \
|
|
|
|
mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$c.new $(DESTDIR)$(INSTALLTOP)/bin/$$c; \
|
Big rename fest of MingW shared libraries
So far, MingW shared libraries were named like this
libeay32.dll + libeay32.dll.a
ssleay32.dll + ssleay32.dll.a
That naming scheme is antiquated, a reminicense of SSLeay. We're
therefore changing the scheme to something that's more like the rest
of OpenSSL.
There are two factors to remember:
- Windows libraries have no recorded SOvers, which means that the
shared library version must be encoded in the name. According to
some, it's unwise to encode extra periods in a Windows file name,
so we convert version number periods to underscores.
- MingW has multilib ability. However, DLLs need to reside with the
binaries that use them, so to allow both 32-bit and 64-bit DLLs to
reside in the same place, we add '-x64' in the name of the 64-bit
ones.
The resulting name scheme (for SOver 1.1) is this:
on x86:
libcrypto-1_1.dll + libcrypto.dll.a
libssl-1_1.dll + libssl.dll.a
on x86_64:
libcrypto-1_1-x64.dll + libcrypto.dll.a
libssl-1_1-x64.dll + libssl.dll.a
An observation is that the import lib is the same for both
architectures. Not to worry, though, as they will be installed in
PREFIX/lib/ for x86 and PREFIX/lib64/ for x86_64.
As a side effect, MingW got its own targets in Makefile.shared.
link_dso.mingw-shared and link_app.mingw-shared are aliases for the
corresponding cygwin-shared targets. link_shlib.mingw-shared is,
however, a target separated from the cygwin one.
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-16 19:37:28 +00:00
|
|
|
echo installing $$i.a; \
|
|
|
|
cp $$i.a $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \
|
|
|
|
chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \
|
|
|
|
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \
|
|
|
|
;; \
|
|
|
|
mingw*) \
|
|
|
|
arch=; \
|
|
|
|
if expr $(PLATFORM) : mingw64 > /dev/null; then \
|
|
|
|
arch=-x64; \
|
|
|
|
fi; \
|
|
|
|
m=`echo $$i | sed -e 's/\.dll$$/-$(SHLIB_MAJOR)_$(SHLIB_MINOR)'"$$arch"'.dll/'`; \
|
|
|
|
echo installing $$m; \
|
|
|
|
cp $$m $(DESTDIR)$(INSTALLTOP)/bin/$$m.new; \
|
|
|
|
chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$m.new; \
|
|
|
|
mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$m.new $(DESTDIR)$(INSTALLTOP)/bin/$$m; \
|
|
|
|
echo installing $$i.a; \
|
|
|
|
cp $$i.a $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \
|
|
|
|
chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \
|
|
|
|
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \
|
|
|
|
;; \
|
|
|
|
*) \
|
|
|
|
echo installing $$i; \
|
2016-02-12 20:14:03 +00:00
|
|
|
cp $$i $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
Big rename fest of MingW shared libraries
So far, MingW shared libraries were named like this
libeay32.dll + libeay32.dll.a
ssleay32.dll + ssleay32.dll.a
That naming scheme is antiquated, a reminicense of SSLeay. We're
therefore changing the scheme to something that's more like the rest
of OpenSSL.
There are two factors to remember:
- Windows libraries have no recorded SOvers, which means that the
shared library version must be encoded in the name. According to
some, it's unwise to encode extra periods in a Windows file name,
so we convert version number periods to underscores.
- MingW has multilib ability. However, DLLs need to reside with the
binaries that use them, so to allow both 32-bit and 64-bit DLLs to
reside in the same place, we add '-x64' in the name of the 64-bit
ones.
The resulting name scheme (for SOver 1.1) is this:
on x86:
libcrypto-1_1.dll + libcrypto.dll.a
libssl-1_1.dll + libssl.dll.a
on x86_64:
libcrypto-1_1-x64.dll + libcrypto.dll.a
libssl-1_1-x64.dll + libssl.dll.a
An observation is that the import lib is the same for both
architectures. Not to worry, though, as they will be installed in
PREFIX/lib/ for x86 and PREFIX/lib64/ for x86_64.
As a side effect, MingW got its own targets in Makefile.shared.
link_dso.mingw-shared and link_app.mingw-shared are aliases for the
corresponding cygwin-shared targets. link_shlib.mingw-shared is,
however, a target separated from the cygwin one.
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-16 19:37:28 +00:00
|
|
|
;; \
|
|
|
|
esac; \
|
2002-05-07 15:35:48 +00:00
|
|
|
fi; \
|
2000-10-13 15:25:06 +00:00
|
|
|
done; \
|
|
|
|
( here="`pwd`"; \
|
2016-02-12 20:14:03 +00:00
|
|
|
cd $(DESTDIR)$(INSTALLTOP)/$(LIBDIR); \
|
2005-04-30 21:39:39 +00:00
|
|
|
$(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
|
2003-01-10 16:14:32 +00:00
|
|
|
if [ "$(INSTALLTOP)" != "/usr" ]; then \
|
|
|
|
echo 'OpenSSL shared libraries have been installed in:'; \
|
|
|
|
echo ' $(INSTALLTOP)'; \
|
|
|
|
fi; \
|
2000-10-13 15:25:06 +00:00
|
|
|
fi
|
2016-02-12 20:14:03 +00:00
|
|
|
cp libcrypto.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
|
|
|
|
chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
|
|
|
|
cp libssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
|
|
|
|
chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
|
|
|
|
cp openssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
|
|
|
|
chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
|
2000-02-11 16:25:44 +00:00
|
|
|
|
2015-01-12 15:28:05 +00:00
|
|
|
uninstall_sw:
|
2016-02-12 20:14:03 +00:00
|
|
|
cd include/openssl && files=* && cd $(DESTDIR)$(INSTALLTOP)/include/openssl && $(RM) $$files
|
2015-01-12 15:28:05 +00:00
|
|
|
@for i in $(LIBS) ;\
|
|
|
|
do \
|
|
|
|
test -f "$$i" && \
|
2016-02-12 20:14:03 +00:00
|
|
|
echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i && \
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
2015-01-12 15:28:05 +00:00
|
|
|
done;
|
|
|
|
@if [ -n "$(SHARED_LIBS)" ]; then \
|
|
|
|
tmp="$(SHARED_LIBS)"; \
|
|
|
|
for i in $${tmp:-x}; \
|
|
|
|
do \
|
|
|
|
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
Big rename fest of MingW shared libraries
So far, MingW shared libraries were named like this
libeay32.dll + libeay32.dll.a
ssleay32.dll + ssleay32.dll.a
That naming scheme is antiquated, a reminicense of SSLeay. We're
therefore changing the scheme to something that's more like the rest
of OpenSSL.
There are two factors to remember:
- Windows libraries have no recorded SOvers, which means that the
shared library version must be encoded in the name. According to
some, it's unwise to encode extra periods in a Windows file name,
so we convert version number periods to underscores.
- MingW has multilib ability. However, DLLs need to reside with the
binaries that use them, so to allow both 32-bit and 64-bit DLLs to
reside in the same place, we add '-x64' in the name of the 64-bit
ones.
The resulting name scheme (for SOver 1.1) is this:
on x86:
libcrypto-1_1.dll + libcrypto.dll.a
libssl-1_1.dll + libssl.dll.a
on x86_64:
libcrypto-1_1-x64.dll + libcrypto.dll.a
libssl-1_1-x64.dll + libssl.dll.a
An observation is that the import lib is the same for both
architectures. Not to worry, though, as they will be installed in
PREFIX/lib/ for x86 and PREFIX/lib64/ for x86_64.
As a side effect, MingW got its own targets in Makefile.shared.
link_dso.mingw-shared and link_app.mingw-shared are aliases for the
corresponding cygwin-shared targets. link_shlib.mingw-shared is,
however, a target separated from the cygwin one.
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-16 19:37:28 +00:00
|
|
|
case "$(PLATFORM)" in \
|
|
|
|
Cygwin*) \
|
|
|
|
c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
2016-02-12 20:14:03 +00:00
|
|
|
echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$c; \
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$c; \
|
Big rename fest of MingW shared libraries
So far, MingW shared libraries were named like this
libeay32.dll + libeay32.dll.a
ssleay32.dll + ssleay32.dll.a
That naming scheme is antiquated, a reminicense of SSLeay. We're
therefore changing the scheme to something that's more like the rest
of OpenSSL.
There are two factors to remember:
- Windows libraries have no recorded SOvers, which means that the
shared library version must be encoded in the name. According to
some, it's unwise to encode extra periods in a Windows file name,
so we convert version number periods to underscores.
- MingW has multilib ability. However, DLLs need to reside with the
binaries that use them, so to allow both 32-bit and 64-bit DLLs to
reside in the same place, we add '-x64' in the name of the 64-bit
ones.
The resulting name scheme (for SOver 1.1) is this:
on x86:
libcrypto-1_1.dll + libcrypto.dll.a
libssl-1_1.dll + libssl.dll.a
on x86_64:
libcrypto-1_1-x64.dll + libcrypto.dll.a
libssl-1_1-x64.dll + libssl.dll.a
An observation is that the import lib is the same for both
architectures. Not to worry, though, as they will be installed in
PREFIX/lib/ for x86 and PREFIX/lib64/ for x86_64.
As a side effect, MingW got its own targets in Makefile.shared.
link_dso.mingw-shared and link_app.mingw-shared are aliases for the
corresponding cygwin-shared targets. link_shlib.mingw-shared is,
however, a target separated from the cygwin one.
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-16 19:37:28 +00:00
|
|
|
echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \
|
|
|
|
;; \
|
|
|
|
mingw*) \
|
|
|
|
arch=; \
|
|
|
|
if expr $(PLATFORM) : mingw64 > /dev/null; then \
|
|
|
|
arch=-x64; \
|
|
|
|
fi; \
|
|
|
|
m=`echo $$i | sed -e 's/\.dll$$/-$(SHLIB_MAJOR)_$(SHLIB_MINOR)'"$$arch"'.dll/'`; \
|
|
|
|
echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$m; \
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$m; \
|
|
|
|
echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \
|
|
|
|
;; \
|
|
|
|
*) \
|
2016-02-12 20:14:03 +00:00
|
|
|
echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
Big rename fest of MingW shared libraries
So far, MingW shared libraries were named like this
libeay32.dll + libeay32.dll.a
ssleay32.dll + ssleay32.dll.a
That naming scheme is antiquated, a reminicense of SSLeay. We're
therefore changing the scheme to something that's more like the rest
of OpenSSL.
There are two factors to remember:
- Windows libraries have no recorded SOvers, which means that the
shared library version must be encoded in the name. According to
some, it's unwise to encode extra periods in a Windows file name,
so we convert version number periods to underscores.
- MingW has multilib ability. However, DLLs need to reside with the
binaries that use them, so to allow both 32-bit and 64-bit DLLs to
reside in the same place, we add '-x64' in the name of the 64-bit
ones.
The resulting name scheme (for SOver 1.1) is this:
on x86:
libcrypto-1_1.dll + libcrypto.dll.a
libssl-1_1.dll + libssl.dll.a
on x86_64:
libcrypto-1_1-x64.dll + libcrypto.dll.a
libssl-1_1-x64.dll + libssl.dll.a
An observation is that the import lib is the same for both
architectures. Not to worry, though, as they will be installed in
PREFIX/lib/ for x86 and PREFIX/lib64/ for x86_64.
As a side effect, MingW got its own targets in Makefile.shared.
link_dso.mingw-shared and link_app.mingw-shared are aliases for the
corresponding cygwin-shared targets. link_shlib.mingw-shared is,
however, a target separated from the cygwin one.
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-16 19:37:28 +00:00
|
|
|
;; \
|
|
|
|
esac; \
|
2015-01-12 15:28:05 +00:00
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
fi
|
2016-02-12 20:14:03 +00:00
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
|
2016-02-18 21:38:21 +00:00
|
|
|
@target=uninstall; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done
|
2015-01-12 15:28:05 +00:00
|
|
|
|
2006-04-11 21:09:57 +00:00
|
|
|
install_html_docs:
|
|
|
|
here="`pwd`"; \
|
2014-08-29 16:07:42 +00:00
|
|
|
filecase=; \
|
2014-08-30 14:18:51 +00:00
|
|
|
case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
|
2014-08-29 16:07:42 +00:00
|
|
|
filecase=-i; \
|
|
|
|
esac; \
|
2006-04-11 21:09:57 +00:00
|
|
|
for subdir in apps crypto ssl; do \
|
2016-02-12 20:14:03 +00:00
|
|
|
$(PERL) $(TOP)/util/mkdir-p $(DESTDIR)$(HTMLDIR)/$$subdir; \
|
2006-04-11 21:09:57 +00:00
|
|
|
for i in doc/$$subdir/*.pod; do \
|
|
|
|
fn=`basename $$i .pod`; \
|
|
|
|
echo "installing html/$$fn.$(HTMLSUFFIX)"; \
|
|
|
|
cat $$i \
|
|
|
|
| sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
|
2014-08-13 04:28:03 +00:00
|
|
|
| pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \
|
2006-04-11 21:09:57 +00:00
|
|
|
| sed -r 's/<!DOCTYPE.*//g' \
|
2016-02-12 20:14:03 +00:00
|
|
|
> $(DESTDIR)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
|
2006-04-11 21:09:57 +00:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
grep -v $$filecase "^$$fn\$$" | \
|
2016-02-12 20:14:03 +00:00
|
|
|
(cd $(DESTDIR)$(HTMLDIR)/$$subdir; \
|
2006-04-11 21:09:57 +00:00
|
|
|
while read n; do \
|
2009-04-06 15:22:01 +00:00
|
|
|
PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
|
2006-04-11 21:09:57 +00:00
|
|
|
done); \
|
|
|
|
done; \
|
|
|
|
done
|
|
|
|
|
2015-01-12 15:28:05 +00:00
|
|
|
uninstall_html_docs:
|
|
|
|
here="`pwd`"; \
|
|
|
|
filecase=; \
|
|
|
|
case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
|
|
|
|
filecase=-i; \
|
|
|
|
esac; \
|
|
|
|
for subdir in apps crypto ssl; do \
|
|
|
|
for i in doc/$$subdir/*.pod; do \
|
|
|
|
fn=`basename $$i .pod`; \
|
2016-02-12 20:14:03 +00:00
|
|
|
$(RM) $(DESTDIR)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
|
2015-01-12 15:28:05 +00:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
grep -v $$filecase "^$$fn\$$" | \
|
|
|
|
while read n; do \
|
2016-02-12 20:14:03 +00:00
|
|
|
$(RM) $(DESTDIR)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \
|
2015-01-12 15:28:05 +00:00
|
|
|
done; \
|
|
|
|
done; \
|
|
|
|
done
|
|
|
|
|
2000-02-11 16:25:44 +00:00
|
|
|
install_docs:
|
|
|
|
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
2016-02-12 20:14:03 +00:00
|
|
|
$(DESTDIR)$(MANDIR)/man1 \
|
|
|
|
$(DESTDIR)$(MANDIR)/man3 \
|
|
|
|
$(DESTDIR)$(MANDIR)/man5 \
|
|
|
|
$(DESTDIR)$(MANDIR)/man7
|
2002-12-15 06:45:43 +00:00
|
|
|
here="`pwd`"; \
|
|
|
|
filecase=; \
|
2014-08-30 14:18:51 +00:00
|
|
|
case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
|
2002-12-15 06:45:43 +00:00
|
|
|
filecase=-i; \
|
2013-09-15 19:59:25 +00:00
|
|
|
esac; \
|
2003-10-31 06:58:24 +00:00
|
|
|
set -e; for i in doc/apps/*.pod; do \
|
2000-02-14 16:55:23 +00:00
|
|
|
fn=`basename $$i .pod`; \
|
2004-11-25 17:47:31 +00:00
|
|
|
sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
|
2003-04-21 22:00:36 +00:00
|
|
|
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
2002-06-05 14:10:59 +00:00
|
|
|
(cd `$(PERL) util/dirname.pl $$i`; \
|
2014-12-10 22:10:59 +00:00
|
|
|
pod2man \
|
2002-05-30 15:19:43 +00:00
|
|
|
--section=$$sec --center=OpenSSL \
|
2014-12-10 22:10:59 +00:00
|
|
|
--release=$(VERSION) `basename $$i`) \
|
2016-02-12 20:14:03 +00:00
|
|
|
> $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
2002-12-15 06:45:43 +00:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
2005-06-19 20:31:15 +00:00
|
|
|
(grep -v $$filecase "^$$fn\$$"; true) | \
|
|
|
|
(grep -v "[ ]"; true) | \
|
2016-02-12 20:14:03 +00:00
|
|
|
(cd $(DESTDIR)$(MANDIR)/man$$sec/; \
|
2002-12-15 06:45:43 +00:00
|
|
|
while read n; do \
|
2009-04-06 15:22:01 +00:00
|
|
|
PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
2002-12-15 06:45:43 +00:00
|
|
|
done); \
|
2002-08-01 21:52:56 +00:00
|
|
|
done; \
|
2003-10-31 06:58:24 +00:00
|
|
|
set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
2000-02-14 16:55:23 +00:00
|
|
|
fn=`basename $$i .pod`; \
|
2004-11-25 17:47:31 +00:00
|
|
|
sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
|
2003-04-21 22:00:36 +00:00
|
|
|
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
2002-06-05 14:10:59 +00:00
|
|
|
(cd `$(PERL) util/dirname.pl $$i`; \
|
2014-12-10 22:10:59 +00:00
|
|
|
pod2man \
|
2002-05-30 15:19:43 +00:00
|
|
|
--section=$$sec --center=OpenSSL \
|
2014-12-10 22:10:59 +00:00
|
|
|
--release=$(VERSION) `basename $$i`) \
|
2016-02-12 20:14:03 +00:00
|
|
|
> $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
2002-12-15 06:45:43 +00:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
2005-06-19 20:31:15 +00:00
|
|
|
(grep -v $$filecase "^$$fn\$$"; true) | \
|
|
|
|
(grep -v "[ ]"; true) | \
|
2016-02-12 20:14:03 +00:00
|
|
|
(cd $(DESTDIR)$(MANDIR)/man$$sec/; \
|
2002-12-15 06:45:43 +00:00
|
|
|
while read n; do \
|
2009-04-06 15:22:01 +00:00
|
|
|
PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
2002-12-15 06:45:43 +00:00
|
|
|
done); \
|
2000-02-14 16:55:23 +00:00
|
|
|
done
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2015-01-12 15:28:05 +00:00
|
|
|
uninstall_docs:
|
|
|
|
@here="`pwd`"; \
|
|
|
|
filecase=; \
|
|
|
|
case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \
|
|
|
|
filecase=-i; \
|
|
|
|
esac; \
|
|
|
|
for i in doc/apps/*.pod; do \
|
|
|
|
fn=`basename $$i .pod`; \
|
|
|
|
sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
|
2016-02-12 20:14:03 +00:00
|
|
|
echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
2015-01-12 15:28:05 +00:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
(grep -v $$filecase "^$$fn\$$"; true) | \
|
|
|
|
(grep -v "[ ]"; true) | \
|
|
|
|
while read n; do \
|
2016-02-12 20:14:03 +00:00
|
|
|
echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
2015-01-12 15:28:05 +00:00
|
|
|
done; \
|
|
|
|
done; \
|
|
|
|
for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
|
|
|
fn=`basename $$i .pod`; \
|
|
|
|
sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
|
2016-02-12 20:14:03 +00:00
|
|
|
echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
2015-01-12 15:28:05 +00:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
(grep -v $$filecase "^$$fn\$$"; true) | \
|
|
|
|
(grep -v "[ ]"; true) | \
|
|
|
|
while read n; do \
|
2016-02-12 20:14:03 +00:00
|
|
|
echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
2015-01-12 15:28:05 +00:00
|
|
|
done; \
|
|
|
|
done
|
|
|
|
|
1998-12-21 10:52:47 +00:00
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|