1999-03-22 22:45:08 +08:00
|
|
|
##
|
|
|
|
## Makefile for OpenSSL
|
|
|
|
##
|
2016-01-26 04:19:59 +08:00
|
|
|
## {- join("\n## ", @autowarntext) -}
|
1999-03-22 22:45:08 +08:00
|
|
|
|
2015-05-21 02:03:20 +08: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-16 00:20:15 +08: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-21 02:03:20 +08:00
|
|
|
PLATFORM={- $config{target} -}
|
|
|
|
OPTIONS={- $config{options} -}
|
|
|
|
CONFIGURE_ARGS=({- join(", ",quotify_l(@{$config{perlargv}})) -})
|
|
|
|
SHLIB_TARGET={- $target{shared_target} -}
|
2000-07-21 23:08:53 +08:00
|
|
|
|
2002-12-15 13:59:13 +08: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-13 04:14:03 +08:00
|
|
|
# DESTDIR is for package builders so that they can configure
|
1999-04-30 05:52:08 +08:00
|
|
|
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
|
|
|
|
# Normally it is left empty.
|
2016-02-13 04:14:03 +08:00
|
|
|
DESTDIR=
|
1999-04-25 06:59:36 +08:00
|
|
|
|
2016-01-21 01:11:51 +08: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 09:57:19 +08: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 22:45:08 +08:00
|
|
|
|
1998-12-21 18:52:47 +08: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-25 04:55:50 +08:00
|
|
|
# system defines as well, i.e. _REENTRANT for Solaris 2.[34]
|
1998-12-21 18:52:47 +08: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 18:56:39 +08:00
|
|
|
# one. 32 bytes will be read from this when the random
|
|
|
|
# number generator is initalised.
|
1999-04-13 19:01:44 +08:00
|
|
|
# SSL_FORBID_ENULL - define if you want the server to be not able to use the
|
1998-12-21 18:56:39 +08:00
|
|
|
# NULL encryption ciphers.
|
1998-12-21 18:52:47 +08:00
|
|
|
#
|
|
|
|
# LOCK_DEBUG - turns on lots of lock debug output :-)
|
2016-01-31 01:04:25 +08:00
|
|
|
# REF_DEBUG - turn on some xyz_free() assertions.
|
1998-12-21 18:56:39 +08:00
|
|
|
# REF_PRINT - prints some stuff on structure free.
|
1998-12-21 18:52:47 +08:00
|
|
|
# MFUNC - Make all Malloc/Free/Realloc calls call
|
1998-12-21 18:56:39 +08: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 19:00:56 +08:00
|
|
|
# Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
|
|
|
|
# equal 4.
|
|
|
|
# PKCS1_CHECK - pkcs1 tests.
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2015-05-21 02:03:20 +08:00
|
|
|
CROSS_COMPILE= {- $config{cross_compile_prefix} -}
|
|
|
|
CC= $(CROSS_COMPILE){- $target{cc} -}
|
2016-03-02 17:57:05 +08:00
|
|
|
CFLAG={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -}
|
2016-02-11 02:09:05 +08:00
|
|
|
CFLAG_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
|
2016-03-06 21:36:11 +08:00
|
|
|
LDFLAG= {- $target{lflags} -} {- $config{lflags} -}
|
|
|
|
PLIB_LDFLAG= {- $target{plib_lflags} -} {- $config{plib_lflags} -}
|
2016-03-02 17:57:05 +08:00
|
|
|
EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -}
|
2015-05-21 02:03:20 +08: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 23:28:05 +08:00
|
|
|
#RM= echo --
|
|
|
|
RM= rm -f
|
2000-02-24 09:59:55 +08:00
|
|
|
TAR= tar
|
2000-09-21 15:15:52 +08:00
|
|
|
TARFLAGS= --no-recursion
|
2016-01-30 09:57:19 +08:00
|
|
|
MAKEDEPPROG=$(CROSS_COMPILE){- $config{makedepprog} -}
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2003-01-04 01:37:53 +08: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-19 06:47:03 +08:00
|
|
|
AS=$(CC) -c
|
2003-05-30 06:20:47 +08:00
|
|
|
ASFLAG=$(CFLAG)
|
2003-01-04 01:37:53 +08:00
|
|
|
|
2004-07-27 04:18:55 +08:00
|
|
|
# For x86 assembler: Set PROCESSOR to 386 if you want to support
|
|
|
|
# the 80386.
|
2015-05-21 02:03:20 +08:00
|
|
|
PROCESSOR= {- $config{processor} -}
|
2004-07-27 04:18:55 +08:00
|
|
|
|
|
|
|
# CPUID module collects small commonly used assembler snippets
|
2016-02-19 01:43:56 +08:00
|
|
|
APPS_OBJ={- $target{apps_obj} -}
|
2015-05-21 02:03:20 +08:00
|
|
|
CPUID_OBJ= {- $target{cpuid_obj} -}
|
2016-03-02 16:34:26 +08:00
|
|
|
UPLINK_OBJ= {- $target{uplink_obj} -}
|
2015-05-21 02:03:20 +08:00
|
|
|
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-26 05:23:42 +08:00
|
|
|
PADLOCK_ASM_OBJ= {- $target{padlock_obj} -}
|
2015-05-21 02:03:20 +08:00
|
|
|
CHACHA_ENC= {- $target{chacha_obj} -}
|
|
|
|
POLY1305_ASM_OBJ= {- $target{poly1305_obj} -}
|
|
|
|
PERLASM_SCHEME= {- $target{perlasm_scheme} -}
|
1998-12-21 18:56:39 +08:00
|
|
|
|
2005-12-05 21:46:46 +08:00
|
|
|
# Zlib stuff
|
2016-02-04 00:31:40 +08:00
|
|
|
ZLIB_INCLUDE={- $withargs{zlib_include} -}
|
|
|
|
LIBZLIB={- $withargs{zlib_lib} -}
|
2005-12-05 21:46:46 +08:00
|
|
|
|
2011-01-26 20:31:30 +08: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-30 05:45:04 +08:00
|
|
|
# $(INSTALLTOP) for this build may be different so hard
|
2011-01-26 20:31:30 +08:00
|
|
|
# code the path.
|
|
|
|
|
2015-05-21 02:03:20 +08:00
|
|
|
FIPSLIBDIR={- $config{fipslibdir} -}
|
2011-01-26 20:31:30 +08:00
|
|
|
|
|
|
|
# The location of the library which contains fipscanister.o
|
2014-10-19 06:47:03 +08: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 20:31:30 +08:00
|
|
|
|
2015-05-21 02:03:20 +08:00
|
|
|
FIPSCANLIB={- $config{fips} ? "libcrypto" : "" -}
|
2011-01-26 20:31:30 +08:00
|
|
|
|
|
|
|
# Shared library base address. Currently only used on Windows.
|
|
|
|
#
|
|
|
|
|
2015-05-21 02:03:20 +08:00
|
|
|
BASEADDR={- $config{baseaddr} -}
|
2011-01-26 20:31:30 +08:00
|
|
|
|
2015-05-21 02:03:20 +08:00
|
|
|
DIRS= {- join(" ", @{$config{dirs}}) -}
|
1999-04-29 00:16:31 +08:00
|
|
|
SHLIBDIRS= crypto ssl
|
2015-03-27 04:33:18 +08:00
|
|
|
INSTALL_SUBS= engines apps tools
|
1999-04-29 00:16:31 +08:00
|
|
|
|
1998-12-21 18:52:47 +08:00
|
|
|
# dirs in crypto to build
|
2015-05-21 02:03:20 +08:00
|
|
|
SDIRS= {- join(" ", @{$config{sdirs}}) -}
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2000-11-13 04:24:30 +08:00
|
|
|
# tests to perform. "alltests" is a special word indicating that all tests
|
|
|
|
# should be performed.
|
|
|
|
TESTS = alltests
|
|
|
|
|
2005-03-30 21:05:57 +08:00
|
|
|
MAKEFILE= Makefile
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2016-01-21 01:11:51 +08:00
|
|
|
MANDIR=$(INSTALLTOP)/share/man
|
1998-12-21 18:52:47 +08:00
|
|
|
MAN1=1
|
|
|
|
MAN3=3
|
2003-04-22 06:00:36 +08:00
|
|
|
MANSUFFIX=
|
2006-04-12 05:09:57 +08:00
|
|
|
HTMLSUFFIX=html
|
2016-01-21 01:11:51 +08:00
|
|
|
HTMLDIR=$(INSTALLTOP)/share/doc/$(BASENAME)/html
|
1998-12-21 18:52:47 +08:00
|
|
|
SHELL=/bin/sh
|
|
|
|
|
1998-12-21 18:56:39 +08:00
|
|
|
TOP= .
|
2000-07-21 23:08:53 +08:00
|
|
|
LIBS= libcrypto.a libssl.a
|
2000-10-13 23:25:06 +08:00
|
|
|
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
|
|
|
SHARED_SSL=libssl$(SHLIB_EXT)
|
2016-02-23 02:17:55 +08:00
|
|
|
SHARED_LIBS={- $disabled{shared} ? '' : '$(SHARED_CRYPTO) $(SHARED_SSL)' -}
|
2016-02-20 05:02:41 +08:00
|
|
|
SHARED_CFLAG={- $target{shared_cflag} -}
|
2016-03-02 17:57:05 +08:00
|
|
|
SHARED_LDFLAG={- $target{shared_ldflag}." ".$config{shared_ldflag}
|
2016-01-30 09:57:19 +08:00
|
|
|
# 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 22:17:33 +08:00
|
|
|
SHARED_RCFLAG={- $target{shared_rcflag} -}
|
2016-02-20 05:08:37 +08:00
|
|
|
DYNAMIC_ENGINES={- $config{dynamic_engines} -}
|
1998-12-21 18:56:39 +08:00
|
|
|
|
|
|
|
GENERAL= Makefile
|
1998-12-23 15:58:53 +08:00
|
|
|
BASENAME= openssl
|
1998-12-21 18:56:39 +08:00
|
|
|
NAME= $(BASENAME)-$(VERSION)
|
2015-12-07 22:45:50 +08:00
|
|
|
TARFILE= ../$(NAME).tar
|
1998-12-21 18:56:39 +08:00
|
|
|
HEADER= e_os.h
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2015-01-12 23:28:05 +08:00
|
|
|
# Directories created on install if they don't exist.
|
|
|
|
INSTALLDIRS= \
|
2016-02-13 04:14:03 +08: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 23:28:05 +08:00
|
|
|
|
2016-02-17 21:38:36 +08:00
|
|
|
ENGDIRS={- join(" ", @{$config{engdirs}}) -}
|
|
|
|
|
2016-02-14 01:15:51 +08:00
|
|
|
all: Makefile build_all_but_tests
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2005-06-23 08:03:26 +08:00
|
|
|
# as we stick to -e, CLEARENV ensures that local variables in lower
|
2005-06-23 23:36:15 +08: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 08:03:26 +08:00
|
|
|
$${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
|
|
|
|
$${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
|
|
|
|
$${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
|
2015-03-27 04:44:59 +08:00
|
|
|
$${HEADER+HEADER} \
|
2005-06-23 08:03:26 +08:00
|
|
|
$${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
|
|
|
|
$${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
|
2012-04-19 14:39:40 +08:00
|
|
|
$${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \
|
2005-06-27 01:47:44 +08:00
|
|
|
$${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
|
2005-06-23 08:03:26 +08:00
|
|
|
$${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
|
|
|
|
|
2015-11-21 18:28:05 +08: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-11 02:09:05 +08:00
|
|
|
CC='$(CC)' CFLAG='$(CFLAG)' CFLAG_Q='$(CFLAG_Q)' \
|
2016-02-20 05:02:41 +08:00
|
|
|
SHARED_CFLAG='$(SHARED_CFLAG)' \
|
2014-10-19 06:47:03 +08:00
|
|
|
AS='$(CC)' ASFLAG='$(CFLAG) -c' \
|
2008-12-30 00:17:52 +08:00
|
|
|
AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
|
2016-02-20 05:02:41 +08:00
|
|
|
CROSS_COMPILE='$(CROSS_COMPILE)' \
|
2016-02-20 05:08:37 +08:00
|
|
|
PERL='$(PERL)' DYNAMIC_ENGINES='$(DYNAMIC_ENGINES)' \
|
2009-08-10 22:48:40 +08:00
|
|
|
SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
|
2016-02-13 04:14:03 +08:00
|
|
|
DESTDIR='$(DESTDIR)' \
|
2008-12-30 00:17:52 +08:00
|
|
|
INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
|
2009-08-26 19:42:11 +08: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 18:47:14 +08:00
|
|
|
SHARED_LDFLAG='$(SHARED_LDFLAG)' \
|
2016-02-05 22:17:33 +08:00
|
|
|
SHARED_RCFLAG='$(SHARED_RCFLAG)' \
|
2009-04-08 00:33:26 +08:00
|
|
|
ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
|
2008-12-30 00:17:52 +08:00
|
|
|
EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
|
2016-02-16 00:20:15 +08: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 18:47:14 +08:00
|
|
|
LDFLAG='$(LDFLAG)' \
|
|
|
|
PLIB_LDFLAG='$(PLIB_LDFLAG)' EX_LIBS='$(EX_LIBS)' \
|
2016-03-02 16:34:26 +08:00
|
|
|
APPS_OBJ='$(APPS_OBJ)' UPLINK_OBJ='$(UPLINK_OBJ)' \
|
2014-08-31 01:22:51 +08:00
|
|
|
CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \
|
2015-01-12 23:28:05 +08:00
|
|
|
EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \
|
2008-12-30 00:17:52 +08: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)' \
|
2016-02-17 21:38:36 +08:00
|
|
|
ENGDIRS='$(ENGDIRS)' \
|
2008-12-30 00:17:52 +08:00
|
|
|
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-23 05:36:26 +08:00
|
|
|
MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \
|
2016-01-26 05:23:42 +08:00
|
|
|
PADLOCK_ASM_OBJ='$(PADLOCK_ASM_OBJ)' \
|
2015-12-12 19:29:37 +08:00
|
|
|
CHACHA_ENC='$(CHACHA_ENC)' \
|
|
|
|
POLY1305_ASM_OBJ='$(POLY1305_ASM_OBJ)' \
|
2008-12-30 00:17:52 +08:00
|
|
|
PERLASM_SCHEME='$(PERLASM_SCHEME)' \
|
2011-01-26 20:31:30 +08:00
|
|
|
FIPSLIBDIR='${FIPSLIBDIR}' \
|
|
|
|
FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
|
2005-06-23 08:03:26 +08: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-19 00:19:34 +08:00
|
|
|
|
2006-02-10 16:48:43 +08: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 23:28:05 +08: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 08:03:26 +08: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 16:04:59 +08:00
|
|
|
BUILD_ONE_CMD=\
|
2008-12-30 21:20:17 +08:00
|
|
|
if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
|
2006-02-10 16:04:59 +08:00
|
|
|
$(BUILD_CMD); \
|
|
|
|
fi
|
2002-10-09 22:52:01 +08:00
|
|
|
|
2005-05-16 07:53:34 +08:00
|
|
|
reflect:
|
2005-06-23 08:03:26 +08:00
|
|
|
@[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
|
2005-05-16 07:53:34 +08:00
|
|
|
|
2002-10-09 23:03:21 +08:00
|
|
|
sub_all: build_all
|
2014-12-13 02:17:51 +08:00
|
|
|
|
2016-02-14 01:15:51 +08:00
|
|
|
build_all_but_tests: build_libs build_apps build_tools
|
|
|
|
build_all: build_all_but_tests build_tests
|
2002-10-09 22:52:01 +08:00
|
|
|
|
2015-06-10 07:34:26 +08: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 22:52:01 +08:00
|
|
|
|
|
|
|
build_crypto:
|
2014-10-19 06:47:03 +08:00
|
|
|
@dir=crypto; target=all; $(BUILD_ONE_CMD)
|
2014-12-13 02:17:51 +08:00
|
|
|
build_ssl: build_crypto
|
2006-02-10 16:04:59 +08:00
|
|
|
@dir=ssl; target=all; $(BUILD_ONE_CMD)
|
2014-12-13 02:17:51 +08:00
|
|
|
build_engines: build_crypto
|
2011-09-07 04:45:36 +08:00
|
|
|
@dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD)
|
2014-12-13 02:17:51 +08:00
|
|
|
|
|
|
|
build_apps: build_libs
|
2006-02-10 16:04:59 +08:00
|
|
|
@dir=apps; target=all; $(BUILD_ONE_CMD)
|
2014-12-13 02:17:51 +08:00
|
|
|
build_tests: build_libs
|
2006-02-10 16:04:59 +08:00
|
|
|
@dir=test; target=all; $(BUILD_ONE_CMD)
|
2014-12-13 02:17:51 +08:00
|
|
|
build_tools: build_libs
|
2006-02-10 16:04:59 +08:00
|
|
|
@dir=tools; target=all; $(BUILD_ONE_CMD)
|
2004-03-24 18:50:25 +08:00
|
|
|
|
|
|
|
all_testapps: build_libs build_testapps
|
|
|
|
build_testapps:
|
2006-02-10 16:04:59 +08:00
|
|
|
@dir=crypto; target=testapps; $(BUILD_ONE_CMD)
|
2000-07-21 23:08:53 +08:00
|
|
|
|
2014-10-19 06:47:03 +08:00
|
|
|
libcrypto$(SHLIB_EXT): libcrypto.a
|
2000-07-25 04:36:46 +08:00
|
|
|
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
2011-01-30 09:14:34 +08:00
|
|
|
if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
|
|
|
|
FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
|
|
|
|
export CC FIPSLD_CC; \
|
|
|
|
fi; \
|
2014-02-03 22:10:24 +08:00
|
|
|
$(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \
|
2000-07-25 04:36:46 +08:00
|
|
|
else \
|
|
|
|
echo "There's no support for shared libraries on this platform" >&2; \
|
2004-07-19 00:19:34 +08:00
|
|
|
exit 1; \
|
2000-07-25 04:36:46 +08:00
|
|
|
fi
|
2002-01-29 00:30:06 +08:00
|
|
|
|
2000-10-13 23:25:06 +08:00
|
|
|
libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
|
2000-07-25 04:36:46 +08:00
|
|
|
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
2001-03-16 06:10:07 +08:00
|
|
|
$(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
|
2000-07-25 04:36:46 +08:00
|
|
|
else \
|
|
|
|
echo "There's no support for shared libraries on this platform" >&2; \
|
2004-07-19 00:19:34 +08:00
|
|
|
exit 1; \
|
2000-07-25 04:36:46 +08:00
|
|
|
fi
|
2000-07-21 23:08:53 +08:00
|
|
|
|
2000-10-13 23:25:06 +08:00
|
|
|
link-shared:
|
2008-12-30 00:17:52 +08:00
|
|
|
@ set -e; for i in $(SHLIBDIRS); do \
|
2005-10-26 05:58:59 +08:00
|
|
|
$(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
|
2008-12-30 00:17:52 +08:00
|
|
|
LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
|
|
|
|
LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
|
2002-10-11 08:37:11 +08:00
|
|
|
symlink.$(SHLIB_TARGET); \
|
2001-10-10 22:46:41 +08:00
|
|
|
libs="$$libs -l$$i"; \
|
2000-10-22 05:24:11 +08:00
|
|
|
done
|
|
|
|
|
2002-10-11 08:37:11 +08:00
|
|
|
build-shared: do_$(SHLIB_TARGET) link-shared
|
|
|
|
|
|
|
|
do_$(SHLIB_TARGET):
|
2008-12-30 00:17:52 +08:00
|
|
|
@ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
|
2005-06-23 08:03:26 +08:00
|
|
|
$(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
|
2008-12-30 00:17:52 +08:00
|
|
|
LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
|
|
|
|
LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
|
2002-10-11 08:37:11 +08:00
|
|
|
LIBDEPS="$$libs $(EX_LIBS)" \
|
2016-02-16 01:02:52 +08:00
|
|
|
link_shlib.$(SHLIB_TARGET); \
|
2003-02-14 21:12:00 +08:00
|
|
|
libs="-l$$i $$libs"; \
|
2016-01-30 12:45:29 +08: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-17 03:37:28 +08: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 12:45:29 +08:00
|
|
|
esac; \
|
2002-01-26 11:17:27 +08:00
|
|
|
done
|
|
|
|
|
2005-07-05 13:14:17 +08:00
|
|
|
libcrypto.pc: Makefile
|
|
|
|
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
|
|
|
echo 'exec_prefix=$${prefix}'; \
|
2009-08-10 22:48:40 +08:00
|
|
|
echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
|
2005-07-05 13:14:17 +08:00
|
|
|
echo 'includedir=$${prefix}/include'; \
|
|
|
|
echo ''; \
|
|
|
|
echo 'Name: OpenSSL-libcrypto'; \
|
|
|
|
echo 'Description: OpenSSL cryptography library'; \
|
|
|
|
echo 'Version: '$(VERSION); \
|
|
|
|
echo 'Requires: '; \
|
2012-02-13 02:47:47 +08:00
|
|
|
echo 'Libs: -L$${libdir} -lcrypto'; \
|
|
|
|
echo 'Libs.private: $(EX_LIBS)'; \
|
2015-05-12 19:14:13 +08:00
|
|
|
echo 'Cflags: -I$${includedir}' ) > libcrypto.pc
|
2005-07-05 13:14:17 +08:00
|
|
|
|
|
|
|
libssl.pc: Makefile
|
|
|
|
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
|
|
|
echo 'exec_prefix=$${prefix}'; \
|
2009-08-10 22:48:40 +08:00
|
|
|
echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
|
2005-07-05 13:14:17 +08:00
|
|
|
echo 'includedir=$${prefix}/include'; \
|
|
|
|
echo ''; \
|
2014-05-13 06:31:51 +08:00
|
|
|
echo 'Name: OpenSSL-libssl'; \
|
2005-07-05 13:14:17 +08:00
|
|
|
echo 'Description: Secure Sockets Layer and cryptography libraries'; \
|
|
|
|
echo 'Version: '$(VERSION); \
|
2014-05-13 06:31:51 +08:00
|
|
|
echo 'Requires.private: libcrypto'; \
|
|
|
|
echo 'Libs: -L$${libdir} -lssl'; \
|
2012-02-13 02:47:47 +08:00
|
|
|
echo 'Libs.private: $(EX_LIBS)'; \
|
2015-05-12 19:14:13 +08:00
|
|
|
echo 'Cflags: -I$${includedir}' ) > libssl.pc
|
2005-07-05 13:14:17 +08:00
|
|
|
|
2005-03-30 21:05:57 +08:00
|
|
|
openssl.pc: Makefile
|
2002-11-07 07:35:00 +08:00
|
|
|
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
|
|
|
echo 'exec_prefix=$${prefix}'; \
|
2009-08-10 22:48:40 +08:00
|
|
|
echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
|
2002-11-07 07:35:00 +08:00
|
|
|
echo 'includedir=$${prefix}/include'; \
|
|
|
|
echo ''; \
|
|
|
|
echo 'Name: OpenSSL'; \
|
|
|
|
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
|
|
|
echo 'Version: '$(VERSION); \
|
2014-05-13 06:31:51 +08:00
|
|
|
echo 'Requires: libssl libcrypto' ) > openssl.pc
|
2002-11-07 07:35:00 +08:00
|
|
|
|
2016-01-13 05:25:30 +08:00
|
|
|
Makefile: Makefile.in Configure config
|
|
|
|
@echo "Makefile is older than Makefile.in, Configure or config."
|
1999-07-23 00:10:31 +08:00
|
|
|
@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
|
1999-01-25 02:15:00 +08:00
|
|
|
@false
|
|
|
|
|
1998-12-21 19:00:56 +08:00
|
|
|
libclean:
|
2011-11-12 19:57:54 +08:00
|
|
|
rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
|
1998-12-21 19:00:56 +08:00
|
|
|
|
2003-02-22 23:04:03 +08:00
|
|
|
clean: libclean
|
2016-02-28 01:32:42 +08:00
|
|
|
rm -f */*/*.o */*.o *.o core a.out fluff testlog make.log cctest cctest.c
|
2014-12-15 22:18:11 +08:00
|
|
|
rm -rf *.bak certs/.0
|
2005-06-23 08:03:26 +08:00
|
|
|
@set -e; target=clean; $(RECURSIVE_BUILD_CMD)
|
2014-08-27 08:51:52 +08:00
|
|
|
rm -f $(LIBS) tags TAGS
|
2005-07-05 13:14:17 +08:00
|
|
|
rm -f openssl.pc libssl.pc libcrypto.pc
|
2003-02-22 23:04:03 +08:00
|
|
|
rm -f speed.* .pure
|
1999-03-06 20:32:06 +08:00
|
|
|
rm -f $(TARFILE)
|
1998-12-21 18:52:47 +08:00
|
|
|
|
|
|
|
makefile.one: files
|
1999-04-01 20:34:33 +08:00
|
|
|
$(PERL) util/mk1mf.pl >makefile.one; \
|
1998-12-21 18:52:47 +08:00
|
|
|
sh util/do_ms.sh
|
|
|
|
|
1999-04-08 23:19:36 +08:00
|
|
|
files:
|
2005-03-30 21:05:57 +08:00
|
|
|
$(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
|
2005-06-23 08:03:26 +08:00
|
|
|
@set -e; target=files; $(RECURSIVE_BUILD_CMD)
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2002-07-23 21:31:04 +08:00
|
|
|
gentests:
|
|
|
|
@(cd test && echo "generating dummy tests (if needed)..." && \
|
2008-12-30 00:17:52 +08:00
|
|
|
$(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
|
2002-07-23 21:31:04 +08:00
|
|
|
|
2016-02-10 20:52:49 +08:00
|
|
|
test: files tests
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2016-02-28 01:32:42 +08:00
|
|
|
tests: build_tests
|
1999-03-06 20:32:06 +08:00
|
|
|
@(cd test && echo "testing..." && \
|
2009-04-06 23:22:01 +08:00
|
|
|
$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
|
2015-10-16 23:19:04 +08:00
|
|
|
@if [ -z "$(CROSS_COMPILE)" ]; then \
|
|
|
|
OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a; \
|
|
|
|
fi
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2015-09-15 20:07:10 +08:00
|
|
|
list-tests:
|
|
|
|
@(cd test && \
|
|
|
|
$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. list-tests)
|
|
|
|
|
2000-02-24 07:47:05 +08:00
|
|
|
report:
|
|
|
|
@$(PERL) util/selftest.pl
|
|
|
|
|
2014-08-27 08:51:52 +08:00
|
|
|
tags TAGS: FORCE
|
|
|
|
rm -f TAGS tags
|
|
|
|
-ctags -R .
|
2015-12-19 07:09:05 +08:00
|
|
|
-etags `find . -name '*.[ch]' -o -name '*.pm'`
|
2014-08-27 08:51:52 +08:00
|
|
|
|
|
|
|
FORCE:
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2016-01-18 05:53:53 +08:00
|
|
|
depend:
|
|
|
|
@set -e; target=depend; $(RECURSIVE_BUILD_CMD)
|
|
|
|
|
|
|
|
update: generate errors ordinals depend
|
|
|
|
|
|
|
|
generate:
|
2016-01-28 13:10:11 +08:00
|
|
|
(cd apps && PERL='${PERL}' $(MAKE) generate)
|
|
|
|
(cd crypto/bn && PERL='${PERL}' $(MAKE) generate)
|
|
|
|
(cd crypto/objects && PERL='${PERL}' $(MAKE) generate)
|
2016-01-18 05:53:53 +08:00
|
|
|
|
1998-12-21 18:52:47 +08:00
|
|
|
errors:
|
2012-04-22 21:25:51 +08:00
|
|
|
$(PERL) util/ck_errf.pl -strict */*.c */*/*.c
|
2001-01-11 00:40:30 +08:00
|
|
|
$(PERL) util/mkerr.pl -recurse -write
|
2002-10-12 02:51:29 +08:00
|
|
|
(cd engines; $(MAKE) PERL=$(PERL) errors)
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2016-03-03 19:42:01 +08:00
|
|
|
ordinals: util/libcrypto.num util/libssl.num test_ordinals TABLE
|
|
|
|
util/libcrypto.num::
|
2001-01-11 00:40:30 +08:00
|
|
|
$(PERL) util/mkdef.pl crypto update
|
2016-03-03 19:42:01 +08:00
|
|
|
util/libssl.num::
|
2001-01-11 00:40:30 +08:00
|
|
|
$(PERL) util/mkdef.pl ssl update
|
2016-01-18 05:53:53 +08:00
|
|
|
test_ordinals:
|
|
|
|
TOP=$(TOP) PERL=$(PERL) $(PERL) test/run_tests.pl test_ordinals
|
1999-06-10 00:18:53 +08: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 17:22:50 +08:00
|
|
|
TABLE: Configure Configurations/*.conf
|
1999-06-10 07:13:03 +08:00
|
|
|
(echo 'Output of `Configure TABLE'"':"; \
|
2001-01-11 00:40:30 +08:00
|
|
|
$(PERL) Configure TABLE) > TABLE
|
1999-06-10 00:18:53 +08:00
|
|
|
|
2002-06-12 20:26:34 +08: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 22:45:50 +08:00
|
|
|
TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \
|
2016-01-26 08:40:13 +08:00
|
|
|
--owner 0 --group 0 \
|
2015-12-07 22:45:50 +08:00
|
|
|
--transform 's|^|$(NAME)/|' \
|
2015-07-10 21:40:53 +08:00
|
|
|
-cvf -
|
|
|
|
|
2015-12-07 22:45:50 +08:00
|
|
|
$(TARFILE).list:
|
2016-01-26 08:40:13 +08:00
|
|
|
git diff --quiet HEAD
|
|
|
|
git ls-files | sort > $(TARFILE).list
|
2015-07-10 21:40:53 +08:00
|
|
|
|
2015-12-07 22:45:50 +08:00
|
|
|
tar: $(TARFILE).list
|
2002-11-11 16:57:04 +08: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 22:45:50 +08:00
|
|
|
$(TAR_COMMAND) | gzip --best > $(TARFILE).gz
|
|
|
|
rm -f $(TARFILE).list
|
|
|
|
ls -l $(TARFILE).gz
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2015-12-07 22:45:50 +08:00
|
|
|
tar-snap: $(TARFILE).list
|
|
|
|
$(TAR_COMMAND) > $(TARFILE)
|
|
|
|
rm -f $(TARFILE).list
|
|
|
|
ls -l $(TARFILE)
|
2001-02-22 22:45:02 +08:00
|
|
|
|
2016-02-10 20:52:49 +08:00
|
|
|
dist:
|
1999-04-01 20:34:33 +08:00
|
|
|
$(PERL) Configure dist
|
2008-12-30 00:17:52 +08:00
|
|
|
@$(MAKE) SDIRS='$(SDIRS)' clean
|
2015-12-08 19:42:27 +08:00
|
|
|
@$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2004-06-29 06:01:37 +08:00
|
|
|
install: all install_docs install_sw
|
|
|
|
|
2015-01-12 23:28:05 +08:00
|
|
|
uninstall: uninstall_sw uninstall_docs
|
|
|
|
|
2004-06-29 06:01:37 +08:00
|
|
|
install_sw:
|
2015-01-12 23:28:05 +08:00
|
|
|
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS)
|
2015-03-27 04:33:18 +08:00
|
|
|
@set -e; for i in include/openssl/*.h; do \
|
2016-02-13 04:14:03 +08:00
|
|
|
(cp $$i $(DESTDIR)$(INSTALLTOP)/$$i; \
|
|
|
|
chmod 644 $(DESTDIR)$(INSTALLTOP)/$$i ); \
|
1999-05-15 21:24:16 +08:00
|
|
|
done;
|
2015-03-27 04:33:18 +08:00
|
|
|
@set -e; target=install; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done
|
2011-08-16 16:56:07 +08:00
|
|
|
@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
|
1998-12-21 18:52:47 +08:00
|
|
|
do \
|
2000-07-21 23:08:53 +08:00
|
|
|
if [ -f "$$i" ]; then \
|
|
|
|
( echo installing $$i; \
|
2016-02-13 04:14:03 +08: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 23:35:48 +08:00
|
|
|
fi; \
|
|
|
|
done;
|
2003-10-31 14:58:24 +08:00
|
|
|
@set -e; if [ -n "$(SHARED_LIBS)" ]; then \
|
2000-10-13 23:25:06 +08:00
|
|
|
tmp="$(SHARED_LIBS)"; \
|
|
|
|
for i in $${tmp:-x}; \
|
|
|
|
do \
|
2002-02-13 22:44:33 +08: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-17 03:37:28 +08:00
|
|
|
case "$(PLATFORM)" in \
|
|
|
|
Cygwin*) \
|
|
|
|
c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
|
|
|
echo installing $$c; \
|
2016-02-13 04:14:03 +08: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-17 03:37:28 +08: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-13 04:14:03 +08: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-17 03:37:28 +08:00
|
|
|
;; \
|
|
|
|
esac; \
|
2002-05-07 23:35:48 +08:00
|
|
|
fi; \
|
2000-10-13 23:25:06 +08:00
|
|
|
done; \
|
|
|
|
( here="`pwd`"; \
|
2016-02-13 04:14:03 +08:00
|
|
|
cd $(DESTDIR)$(INSTALLTOP)/$(LIBDIR); \
|
2005-05-01 05:39:39 +08:00
|
|
|
$(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
|
2003-01-11 00:14:32 +08:00
|
|
|
if [ "$(INSTALLTOP)" != "/usr" ]; then \
|
|
|
|
echo 'OpenSSL shared libraries have been installed in:'; \
|
|
|
|
echo ' $(INSTALLTOP)'; \
|
|
|
|
fi; \
|
2000-10-13 23:25:06 +08:00
|
|
|
fi
|
2016-02-13 04:14:03 +08: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-12 00:25:44 +08:00
|
|
|
|
2015-01-12 23:28:05 +08:00
|
|
|
uninstall_sw:
|
2016-02-13 04:14:03 +08:00
|
|
|
cd include/openssl && files=* && cd $(DESTDIR)$(INSTALLTOP)/include/openssl && $(RM) $$files
|
2015-01-12 23:28:05 +08:00
|
|
|
@for i in $(LIBS) ;\
|
|
|
|
do \
|
|
|
|
test -f "$$i" && \
|
2016-02-13 04:14:03 +08:00
|
|
|
echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i && \
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
2015-01-12 23:28:05 +08: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-17 03:37:28 +08:00
|
|
|
case "$(PLATFORM)" in \
|
|
|
|
Cygwin*) \
|
|
|
|
c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
2016-02-13 04:14:03 +08: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-17 03:37:28 +08: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-13 04:14:03 +08: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-17 03:37:28 +08:00
|
|
|
;; \
|
|
|
|
esac; \
|
2015-01-12 23:28:05 +08:00
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
fi
|
2016-02-13 04:14:03 +08:00
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
|
2016-02-19 05:38:21 +08:00
|
|
|
@target=uninstall; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done
|
2015-01-12 23:28:05 +08:00
|
|
|
|
2006-04-12 05:09:57 +08:00
|
|
|
install_html_docs:
|
|
|
|
here="`pwd`"; \
|
2014-08-30 00:07:42 +08:00
|
|
|
filecase=; \
|
2014-08-30 22:18:51 +08:00
|
|
|
case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
|
2014-08-30 00:07:42 +08:00
|
|
|
filecase=-i; \
|
|
|
|
esac; \
|
2006-04-12 05:09:57 +08:00
|
|
|
for subdir in apps crypto ssl; do \
|
2016-02-13 04:14:03 +08:00
|
|
|
$(PERL) $(TOP)/util/mkdir-p $(DESTDIR)$(HTMLDIR)/$$subdir; \
|
2006-04-12 05:09:57 +08: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 12:28:03 +08:00
|
|
|
| pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \
|
2006-04-12 05:09:57 +08:00
|
|
|
| sed -r 's/<!DOCTYPE.*//g' \
|
2016-02-13 04:14:03 +08:00
|
|
|
> $(DESTDIR)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
|
2006-04-12 05:09:57 +08:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
grep -v $$filecase "^$$fn\$$" | \
|
2016-02-13 04:14:03 +08:00
|
|
|
(cd $(DESTDIR)$(HTMLDIR)/$$subdir; \
|
2006-04-12 05:09:57 +08:00
|
|
|
while read n; do \
|
2009-04-06 23:22:01 +08:00
|
|
|
PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
|
2006-04-12 05:09:57 +08:00
|
|
|
done); \
|
|
|
|
done; \
|
|
|
|
done
|
|
|
|
|
2015-01-12 23:28:05 +08: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-13 04:14:03 +08:00
|
|
|
$(RM) $(DESTDIR)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
|
2015-01-12 23:28:05 +08:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
grep -v $$filecase "^$$fn\$$" | \
|
|
|
|
while read n; do \
|
2016-02-13 04:14:03 +08:00
|
|
|
$(RM) $(DESTDIR)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \
|
2015-01-12 23:28:05 +08:00
|
|
|
done; \
|
|
|
|
done; \
|
|
|
|
done
|
|
|
|
|
2000-02-12 00:25:44 +08:00
|
|
|
install_docs:
|
|
|
|
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
2016-02-13 04:14:03 +08:00
|
|
|
$(DESTDIR)$(MANDIR)/man1 \
|
|
|
|
$(DESTDIR)$(MANDIR)/man3 \
|
|
|
|
$(DESTDIR)$(MANDIR)/man5 \
|
|
|
|
$(DESTDIR)$(MANDIR)/man7
|
2002-12-15 14:45:43 +08:00
|
|
|
here="`pwd`"; \
|
|
|
|
filecase=; \
|
2014-08-30 22:18:51 +08:00
|
|
|
case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
|
2002-12-15 14:45:43 +08:00
|
|
|
filecase=-i; \
|
2013-09-16 03:59:25 +08:00
|
|
|
esac; \
|
2003-10-31 14:58:24 +08:00
|
|
|
set -e; for i in doc/apps/*.pod; do \
|
2000-02-15 00:55:23 +08:00
|
|
|
fn=`basename $$i .pod`; \
|
2004-11-26 01:47:31 +08:00
|
|
|
sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
|
2003-04-22 06:00:36 +08:00
|
|
|
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
2002-06-05 22:10:59 +08:00
|
|
|
(cd `$(PERL) util/dirname.pl $$i`; \
|
2014-12-11 06:10:59 +08:00
|
|
|
pod2man \
|
2002-05-30 23:19:43 +08:00
|
|
|
--section=$$sec --center=OpenSSL \
|
2014-12-11 06:10:59 +08:00
|
|
|
--release=$(VERSION) `basename $$i`) \
|
2016-02-13 04:14:03 +08:00
|
|
|
> $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
2002-12-15 14:45:43 +08:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
2005-06-20 04:31:15 +08:00
|
|
|
(grep -v $$filecase "^$$fn\$$"; true) | \
|
|
|
|
(grep -v "[ ]"; true) | \
|
2016-02-13 04:14:03 +08:00
|
|
|
(cd $(DESTDIR)$(MANDIR)/man$$sec/; \
|
2002-12-15 14:45:43 +08:00
|
|
|
while read n; do \
|
2009-04-06 23:22:01 +08:00
|
|
|
PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
2002-12-15 14:45:43 +08:00
|
|
|
done); \
|
2002-08-02 05:52:56 +08:00
|
|
|
done; \
|
2003-10-31 14:58:24 +08:00
|
|
|
set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
2000-02-15 00:55:23 +08:00
|
|
|
fn=`basename $$i .pod`; \
|
2004-11-26 01:47:31 +08:00
|
|
|
sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
|
2003-04-22 06:00:36 +08:00
|
|
|
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
2002-06-05 22:10:59 +08:00
|
|
|
(cd `$(PERL) util/dirname.pl $$i`; \
|
2014-12-11 06:10:59 +08:00
|
|
|
pod2man \
|
2002-05-30 23:19:43 +08:00
|
|
|
--section=$$sec --center=OpenSSL \
|
2014-12-11 06:10:59 +08:00
|
|
|
--release=$(VERSION) `basename $$i`) \
|
2016-02-13 04:14:03 +08:00
|
|
|
> $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
2002-12-15 14:45:43 +08:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
2005-06-20 04:31:15 +08:00
|
|
|
(grep -v $$filecase "^$$fn\$$"; true) | \
|
|
|
|
(grep -v "[ ]"; true) | \
|
2016-02-13 04:14:03 +08:00
|
|
|
(cd $(DESTDIR)$(MANDIR)/man$$sec/; \
|
2002-12-15 14:45:43 +08:00
|
|
|
while read n; do \
|
2009-04-06 23:22:01 +08:00
|
|
|
PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
2002-12-15 14:45:43 +08:00
|
|
|
done); \
|
2000-02-15 00:55:23 +08:00
|
|
|
done
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2015-01-12 23:28:05 +08: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-13 04:14:03 +08:00
|
|
|
echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
2015-01-12 23:28:05 +08:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
(grep -v $$filecase "^$$fn\$$"; true) | \
|
|
|
|
(grep -v "[ ]"; true) | \
|
|
|
|
while read n; do \
|
2016-02-13 04:14:03 +08:00
|
|
|
echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
2015-01-12 23:28:05 +08: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-13 04:14:03 +08:00
|
|
|
echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
2015-01-12 23:28:05 +08:00
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
(grep -v $$filecase "^$$fn\$$"; true) | \
|
|
|
|
(grep -v "[ ]"; true) | \
|
|
|
|
while read n; do \
|
2016-02-13 04:14:03 +08:00
|
|
|
echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
2015-01-12 23:28:05 +08:00
|
|
|
done; \
|
|
|
|
done
|
|
|
|
|
1998-12-21 18:52:47 +08:00
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|