#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
# When new version of OpenSSL comes in, you must update both COMPONENT_VERSION
# and IPS_COMPONENT_VERSION.
# When upgrading OpenSSL, please, DON'T FORGET TO TEST WANBOOT too.
# For more information about wanboot-openssl testing, please refer to
# ../README.
# Version for IPS. It is easier to do it manually than convert the letter to a
# number while taking into account that there might be no letter at all.
# Clone the patch files to the patches-all dir.
# COPY_COMMON_FILES is there so that rsync is called as soon as
# the Makefile is parsed.
CLEAN_PATHS += $(PATCH_DIR)
# Variant of OpenSSL for wanboot is built in build/sparcv9-wanboot.
# OpenSSL does not use autoconf but its own configure system.
# Ignore default CC_FOR_BUILD, CC, and CXX in CONFIGURE_ENV.
CONFIGURE_ENV += CC=
CONFIGURE_ENV += CXX=
# This is to force OpenSSL's Configure script to use gmake for 'make links'.
# Otherwise it fails with:
# mksh: Fatal error in reader: Unmatched `(' on line
# Used in the configure options below.
# Configure options common to both regular OpenSSL and OpenSSL for wanboot.
# We use OpenSSL install code for installing only manual pages and we do that
# for 32-bit version only.
# MD2 is not enabled by default in OpensSSL but some software we have in
# Userland needs it. One example is nmap.
# We don't ship GOST engine.
# Disable SSLv2 protocol
# We use both no-whirlpool and no-whrlpool since there is an inconsistency in
# the OpenSSL code and one needs both to build OpenSSL successfully with
# Whirlpool implementation removed.
# Some additional options needed for our engines.
# We define our own compiler and linker option sets for Solaris. See Configure
# for more information.
# Options specific to regular build.
# They must not be specified as common, as they cannot be overridden.
# OpenSSL for wanboot specific options
# OpenSSL has its own configure system which must be run from the fully
# populated source code directory. However, the Userland configuration phase is
# run from the build directory. So, we must get the full source code into the
# build directory.
# We deliver only one opensslconf.h file which must be suitable for both 32 and
# 64 bits. Depending on the configuration option, OpenSSL's Configure script
# creates opensslconf.h for either 32 or 64 bits. A patch makes the resulting
# header file usable on both architectures. The patch was generated against the
# opensslconf.h version from the 32 bit build.
# We do not ship our engines as patches since it would be more difficult to
# update the files which have been under continuous development. We rather copy
# the files to the right directories.
# Same holds for wanboot-stubs.c, which stubs out several functions, that are
# not available in the stand-alone environment of wanboot.
( echo "Cloning engines..."; \
# Enable ASLR for this component
# OpenSSL for wanboot is built on sparc only.
build: $(BUILD_32_and_64)
# Object files for wanboot-openssl.o have to be listed explicitly.
WANBOOT_OBJS = \
# Linking of openssl bits for wanboot.
# Interface for wanboot is specified in mapfile.wanboot. Object files are
# compiled to have functions in separate sections, unused sections get
# discarded.
)
# OpenSSL uses sections man[1357] by default so we must create the man
# directories we use for OpenSSL man pages in Solaris. Note that we patch the
# OpenSSL man page install script to use the correct directories.
# We must create man page directories manually since we patched OpenSSL install
# code to install into manXopenssl instead of manX. Also, OpenSSL does not
# install into <dir>/$(MACH64) for 64-bit install so no such directory is
# created and Userland install code would fail when installing lint libraries.
# The install_docs target will install man pages into $(PROTO_DIR)/$(MANDIR). We
# system pod2man. If not set, OpenSSL make would use an internal implementation
# from the tarball which would corrupt some man pages.
# We could run OpenSSL install code for 32 bits only to process header files and
# manual pages. However, lint libraries depend on install stamps so we run
# install for 64 bit as well. Note that we must take built binary files from
# build directories, not from the proto area which contains whatever was
# installed first.
# OpenSSL for wanboot is built on sparc only.
$(MKDIR) -p $(WANBOOT_TO);
else
# We need to modify the default lint flags to include patched opensslconf.h from
# the build directory. If we do not do that, lint will complain about md2.h
# which is not enabled by default but it is in our opensslconf.h.
# Set modified lint flags for our lint library targets.
# There are also separate STC test suites 'openssl' and 'openssl-engine'
# for regression testing. These internal tests are unit tests only.
COMPONENT_TEST_TARGETS = test
test: $(TEST_32_and_64)
system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)