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} -}
|
|
|
|
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 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=.
|
|
|
|
|
1999-04-30 05:52:08 +08: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-21 02:03:20 +08:00
|
|
|
INSTALL_PREFIX={- $config{install_prefix} -}
|
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
|
2015-05-21 02:03:20 +08:00
|
|
|
INSTALLTOP={- $config{prefix} -}
|
|
|
|
OPENSSLDIR={- $config{openssldir} -}
|
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 :-)
|
|
|
|
# REF_CHECK - 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} -}
|
|
|
|
CFLAG= {- $config{cflags} -}
|
|
|
|
DEPFLAG= {- $config{depflags} -}
|
|
|
|
PEX_LIBS= {- $config{prelflags} -}
|
|
|
|
EX_LIBS= {- $config{lflags} -}
|
|
|
|
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
|
2015-05-21 02:03:20 +08:00
|
|
|
MAKEDEPPROG=$(CROSS_COMPILE){- $config{makedepprog} -}
|
|
|
|
LIBDIR={- $config{libdir} -}
|
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
|
2015-05-21 02:03:20 +08: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-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
|
2015-05-21 02:03:20 +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)
|
2015-05-21 02:03:20 +08:00
|
|
|
SHARED_LIBS={- '$(SHARED_CRYPTO) $(SHARED_SSL)' if (!$config{no_shared}) -}
|
|
|
|
SHARED_LDFLAGS={- $target{shared_ldflag} -}
|
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= \
|
|
|
|
$(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-10 07:34:26 +08:00
|
|
|
all: Makefile build_all
|
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)'\
|
2008-12-30 00:17:52 +08:00
|
|
|
CC='$(CC)' CFLAG='$(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)' \
|
2009-10-16 07:43:54 +08:00
|
|
|
CROSS_COMPILE='$(CROSS_COMPILE)' \
|
2016-01-19 20:06:33 +08:00
|
|
|
PERL='$(PERL)' \
|
2009-08-10 22:48:40 +08:00
|
|
|
SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
|
2008-12-30 00:17:52 +08:00
|
|
|
INSTALL_PREFIX='$(INSTALL_PREFIX)' \
|
|
|
|
INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
|
2009-08-26 19:42:11 +08:00
|
|
|
LIBDIR='$(LIBDIR)' \
|
2008-12-30 00:17:52 +08:00
|
|
|
MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
|
2015-09-30 21:44:53 +08:00
|
|
|
DEPFLAG='$(DEPFLAG)' \
|
2008-12-30 00:17:52 +08:00
|
|
|
MAKEDEPPROG='$(MAKEDEPPROG)' \
|
|
|
|
SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
|
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)' \
|
|
|
|
SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
|
|
|
|
PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \
|
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)' \
|
|
|
|
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
|
|
|
|
2002-10-09 22:52:01 +08:00
|
|
|
build_all: build_libs build_apps build_tests build_tools
|
|
|
|
|
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)" \
|
|
|
|
link_a.$(SHLIB_TARGET); \
|
2003-02-14 21:12:00 +08:00
|
|
|
libs="-l$$i $$libs"; \
|
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
|
2015-05-02 00:48:59 +08:00
|
|
|
rm -f */*/*.o */*.o *.o core a.out fluff rehash.time 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
|
|
|
|
2009-10-16 01:17:45 +08:00
|
|
|
rehash: rehash.time
|
2016-01-24 06:19:05 +08:00
|
|
|
rehash.time: certs build_apps build_tools
|
2009-10-16 07:43:54 +08:00
|
|
|
@if [ -z "$(CROSS_COMPILE)" ]; then \
|
2009-10-16 01:17:45 +08:00
|
|
|
(OPENSSL="`pwd`/util/opensslwrap.sh"; \
|
|
|
|
[ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
|
2015-04-29 09:48:44 +08:00
|
|
|
OPENSSL_DEBUG_MEMORY=on; OPENSSL_CONF=/dev/null ; \
|
|
|
|
export OPENSSL OPENSSL_DEBUG_MEMORY OPENSSL_CONF; \
|
2016-01-14 19:18:30 +08:00
|
|
|
$$OPENSSL rehash certs/demo \
|
|
|
|
|| $(PERL) tools/c_rehash certs/demo) && \
|
2009-10-16 01:17:45 +08:00
|
|
|
touch rehash.time; \
|
|
|
|
else :; fi
|
|
|
|
|
1998-12-21 18:56:39 +08:00
|
|
|
test: tests
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2015-12-03 01:20:49 +08:00
|
|
|
|
2009-10-16 01:17:45 +08:00
|
|
|
tests: rehash
|
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)
|
2015-10-19 10:20:01 +08:00
|
|
|
(cd crypto/ct; $(MAKE) PERL=$(PERL) errors)
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2016-01-18 05:53:53 +08:00
|
|
|
ordinals: util/libeay.num util/ssleay.num test_ordinals TABLE
|
1999-06-10 00:18:53 +08:00
|
|
|
util/libeay.num::
|
2001-01-11 00:40:30 +08:00
|
|
|
$(PERL) util/mkdef.pl crypto update
|
1999-06-10 00:18:53 +08:00
|
|
|
util/ssleay.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
|
|
|
|
1998-12-21 18:56:39 +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 \
|
|
|
|
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$$i; \
|
|
|
|
chmod 644 $(INSTALL_PREFIX)$(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; \
|
2009-08-10 22:48:40 +08: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 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 \
|
2000-10-13 23:25:06 +08:00
|
|
|
( echo installing $$i; \
|
2014-03-01 05:54:40 +08:00
|
|
|
if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
|
2005-05-22 00:41:34 +08:00
|
|
|
c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
2002-10-04 21:43:43 +08:00
|
|
|
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
|
|
|
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
2002-12-15 13:59:13 +08:00
|
|
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
2009-08-10 22:48:40 +08: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-03-01 05:54:40 +08: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 22:44:33 +08:00
|
|
|
fi ); \
|
2008-04-17 18:19:16 +08: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 23:28:05 +08: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 18:19:16 +08:00
|
|
|
fi; \
|
2002-05-07 23:35:48 +08:00
|
|
|
fi; \
|
2000-10-13 23:25:06 +08:00
|
|
|
done; \
|
|
|
|
( here="`pwd`"; \
|
2010-01-17 04:05:59 +08:00
|
|
|
cd $(INSTALL_PREFIX)$(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
|
2009-08-10 22:48:40 +08: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-12 00:25:44 +08:00
|
|
|
|
2015-01-12 23:28:05 +08: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-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 \
|
2015-01-12 23:28:05 +08:00
|
|
|
$(PERL) $(TOP)/util/mkdir-p $(INSTALL_PREFIX)$(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' \
|
|
|
|
> $(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 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`; \
|
|
|
|
$(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-12 00:25:44 +08:00
|
|
|
install_docs:
|
|
|
|
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
2000-02-16 02:34:46 +08:00
|
|
|
$(INSTALL_PREFIX)$(MANDIR)/man1 \
|
|
|
|
$(INSTALL_PREFIX)$(MANDIR)/man3 \
|
|
|
|
$(INSTALL_PREFIX)$(MANDIR)/man5 \
|
|
|
|
$(INSTALL_PREFIX)$(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`) \
|
2003-04-22 06:00:36 +08:00
|
|
|
> $(INSTALL_PREFIX)$(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) | \
|
2002-12-15 14:45:43 +08:00
|
|
|
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
|
|
|
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`) \
|
2003-04-22 06:00:36 +08:00
|
|
|
> $(INSTALL_PREFIX)$(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) | \
|
2002-12-15 14:45:43 +08:00
|
|
|
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
|
|
|
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`; \
|
|
|
|
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 18:52:47 +08:00
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|