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} -}
|
|
|
|
SHLIB_EXT={- $target{shared_extension} -}
|
|
|
|
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=.
|
|
|
|
|
1999-04-29 21:52:08 +00:00
|
|
|
# INSTALL_PREFIX is for package builders so that they can configure
|
|
|
|
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
|
|
|
|
# Normally it is left empty.
|
2015-05-20 18:03:20 +00:00
|
|
|
INSTALL_PREFIX={- $config{install_prefix} -}
|
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
|
2015-05-20 18:03:20 +00:00
|
|
|
INSTALLTOP={- $config{prefix} -}
|
|
|
|
OPENSSLDIR={- $config{openssldir} -}
|
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 :-)
|
|
|
|
# REF_CHECK - 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} -}
|
|
|
|
CFLAG= {- $config{cflags} -}
|
|
|
|
DEPFLAG= {- $config{depflags} -}
|
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
|
2015-05-20 18:03:20 +00:00
|
|
|
LIBDIR={- $config{libdir} -}
|
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
|
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}) -}
|
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={- $target{shared_ldflag} -}
|
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= \
|
|
|
|
$(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
|
|
|
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
|
|
|
|
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
|
|
|
|
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
|
|
|
|
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
|
|
|
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
|
|
|
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
|
|
|
|
$(INSTALL_PREFIX)$(OPENSSLDIR)/private
|
|
|
|
|
2015-06-09 23:34:26 +00:00
|
|
|
all: Makefile build_all
|
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)'\
|
2008-12-29 16:17:52 +00:00
|
|
|
CC='$(CC)' CFLAG='$(CFLAG)' \
|
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)' \
|
2008-12-29 16:17:52 +00:00
|
|
|
INSTALL_PREFIX='$(INSTALL_PREFIX)' \
|
|
|
|
INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
|
2009-08-26 11:42:11 +00:00
|
|
|
LIBDIR='$(LIBDIR)' \
|
2015-09-30 13:44:53 +00:00
|
|
|
DEPFLAG='$(DEPFLAG)' \
|
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)' \
|
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)' \
|
|
|
|
SHLIB_EXT='$(SHLIB_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)' \
|
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
|
|
|
|
2002-10-09 14:52:01 +00:00
|
|
|
build_all: build_libs build_apps build_tests build_tools
|
|
|
|
|
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)" \
|
|
|
|
link_a.$(SHLIB_TARGET); \
|
2003-02-14 13:12:00 +00:00
|
|
|
libs="-l$$i $$libs"; \
|
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
|
|
|
|
|
1998-12-21 10:56:39 +00:00
|
|
|
test: tests
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2015-12-02 17:20:49 +00:00
|
|
|
|
2009-10-15 17:17:45 +00:00
|
|
|
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
|
|
|
|
1998-12-21 10:56:39 +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 \
|
|
|
|
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$$i; \
|
|
|
|
chmod 644 $(INSTALL_PREFIX)$(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; \
|
2009-08-10 14:48:40 +00:00
|
|
|
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(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 \
|
2000-10-13 15:25:06 +00:00
|
|
|
( echo installing $$i; \
|
2014-02-28 21:54:40 +00:00
|
|
|
if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
|
2005-05-21 16:41:34 +00:00
|
|
|
c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
2002-10-04 13:43:43 +00:00
|
|
|
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
|
|
|
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
2002-12-15 05:59:13 +00:00
|
|
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
2009-08-10 14:48:40 +00:00
|
|
|
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
2014-02-28 21:54:40 +00:00
|
|
|
else \
|
|
|
|
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
|
|
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
2002-02-13 14:44:33 +00:00
|
|
|
fi ); \
|
2008-04-17 10:19:16 +00:00
|
|
|
if expr $(PLATFORM) : 'mingw' > /dev/null; then \
|
|
|
|
( case $$i in \
|
|
|
|
*crypto*) i=libeay32.dll;; \
|
|
|
|
*ssl*) i=ssleay32.dll;; \
|
|
|
|
esac; \
|
|
|
|
echo installing $$i; \
|
2015-01-12 15:28:05 +00:00
|
|
|
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
|
|
|
|
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
|
|
|
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
|
2008-04-17 10:19:16 +00:00
|
|
|
fi; \
|
2002-05-07 15:35:48 +00:00
|
|
|
fi; \
|
2000-10-13 15:25:06 +00:00
|
|
|
done; \
|
|
|
|
( here="`pwd`"; \
|
2010-01-16 20:05:59 +00:00
|
|
|
cd $(INSTALL_PREFIX)$(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
|
2009-08-10 14:48:40 +00:00
|
|
|
cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
|
|
|
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
|
|
|
|
cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
|
|
|
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
|
|
|
|
cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
|
|
|
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
|
2000-02-11 16:25:44 +00:00
|
|
|
|
2015-01-12 15:28:05 +00:00
|
|
|
uninstall_sw:
|
|
|
|
cd include/openssl && files=* && cd $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl && $(RM) $$files
|
|
|
|
@for i in $(LIBS) ;\
|
|
|
|
do \
|
|
|
|
test -f "$$i" && \
|
|
|
|
echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i && \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
|
|
|
done;
|
|
|
|
@if [ -n "$(SHARED_LIBS)" ]; then \
|
|
|
|
tmp="$(SHARED_LIBS)"; \
|
|
|
|
for i in $${tmp:-x}; \
|
|
|
|
do \
|
|
|
|
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
|
|
|
if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
|
|
|
|
c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
|
|
|
echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
|
|
|
echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
|
|
|
else \
|
|
|
|
echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
|
|
|
fi; \
|
|
|
|
if expr $(PLATFORM) : 'mingw' > /dev/null; then \
|
|
|
|
case $$i in \
|
|
|
|
*crypto*) i=libeay32.dll;; \
|
|
|
|
*ssl*) i=ssleay32.dll;; \
|
|
|
|
esac; \
|
|
|
|
echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
fi
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
|
|
|
|
@target=uninstall; $(RECURSIVE_BUILD_CMD)
|
|
|
|
|
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 \
|
2015-01-12 15:28:05 +00:00
|
|
|
$(PERL) $(TOP)/util/mkdir-p $(INSTALL_PREFIX)$(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' \
|
|
|
|
> $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
|
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
grep -v $$filecase "^$$fn\$$" | \
|
|
|
|
(cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
|
|
|
|
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`; \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
|
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
grep -v $$filecase "^$$fn\$$" | \
|
|
|
|
while read n; do \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \
|
|
|
|
done; \
|
|
|
|
done; \
|
|
|
|
done
|
|
|
|
|
2000-02-11 16:25:44 +00:00
|
|
|
install_docs:
|
|
|
|
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
2000-02-15 18:34:46 +00:00
|
|
|
$(INSTALL_PREFIX)$(MANDIR)/man1 \
|
|
|
|
$(INSTALL_PREFIX)$(MANDIR)/man3 \
|
|
|
|
$(INSTALL_PREFIX)$(MANDIR)/man5 \
|
|
|
|
$(INSTALL_PREFIX)$(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`) \
|
2003-04-21 22:00:36 +00:00
|
|
|
> $(INSTALL_PREFIX)$(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) | \
|
2002-12-15 06:45:43 +00:00
|
|
|
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
|
|
|
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`) \
|
2003-04-21 22:00:36 +00:00
|
|
|
> $(INSTALL_PREFIX)$(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) | \
|
2002-12-15 06:45:43 +00:00
|
|
|
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
|
|
|
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`; \
|
|
|
|
echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
(grep -v $$filecase "^$$fn\$$"; true) | \
|
|
|
|
(grep -v "[ ]"; true) | \
|
|
|
|
while read n; do \
|
|
|
|
echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
|
|
|
done; \
|
|
|
|
done; \
|
|
|
|
for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
|
|
|
fn=`basename $$i .pod`; \
|
|
|
|
sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
|
|
|
|
echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
|
|
|
$(PERL) util/extract-names.pl < $$i | \
|
|
|
|
(grep -v $$filecase "^$$fn\$$"; true) | \
|
|
|
|
(grep -v "[ ]"; true) | \
|
|
|
|
while read n; do \
|
|
|
|
echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
|
|
|
$(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
|
|
|
|
done; \
|
|
|
|
done
|
|
|
|
|
1998-12-21 10:52:47 +00:00
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|