Makefile revision 6082
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# CDDL HEADER START
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# The contents of this file are subject to the terms of the
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Common Development and Distribution License (the "License").
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# You may not use this file except in compliance with the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# See the License for the specific language governing permissions
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# and limitations under the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# When distributing Covered Code, include this CDDL HEADER in each
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# If applicable, add the following below this CDDL HEADER, with the
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# fields enclosed by brackets "[]" replaced with your own identifying
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# information: Portions Copyright [yyyy] [name of copyright owner]
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# CDDL HEADER END
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# When new version of OpenSSL comes in, you must update both COMPONENT_VERSION
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# and IPS_COMPONENT_VERSION.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# When upgrading OpenSSL, please, DON'T FORGET TO TEST WANBOOT too.
449854c2a07b50ea64d9d6a8b03d18d4afeeee43Ken Stubbings# For more information about wanboot-openssl testing, please refer to
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Version for IPS. It is easier to do it manually than convert the letter to a
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# number while taking into account that there might be no letter at all.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterCOMPONENT_SRC = $(COMPONENT_NAME)-$(COMPONENT_VERSION)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster sha256:1d4007e53aad94a5b2002fe045ee7bb0b3d98f1a47f8b2bc851dcd1c74332919
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterCOMPONENT_ARCHIVE_URL = $(COMPONENT_PROJECT_URL)source/$(COMPONENT_ARCHIVE)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Clone the patch files to the patches-all dir.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# COPY_COMMON_FILES is there so that rsync is called as soon as
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# the Makefile is parsed.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterCOPY_COMMON_FILES:= $(shell rsync -ac ../common/patches/ patches/ $(PATCH_DIR))
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterPATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin:/usr/perl5/bin
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterPATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:/usr/bin:/usr/perl5/bin
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Variant of OpenSSL for wanboot is built in build/sparcv9-wanboot.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterBUILD_DIR_WANBOOT = $(BUILD_DIR)/$(MACH64)-wanboot
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# OpenSSL does not use autoconf but its own configure system.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Ignore default CC_FOR_BUILD, CC, and CXX in CONFIGURE_ENV.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# This is to force OpenSSL's Configure script to use gmake for 'make links'.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Otherwise it fails with:
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# mksh: Fatal error in reader: Unmatched `(' on line
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Used in the configure options below.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Configure options common to both regular OpenSSL and OpenSSL for wanboot.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterCONFIGURE_OPTIONS = -DSOLARIS_OPENSSL -DNO_WINDOWS_BRAINDEATH
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# We use OpenSSL install code for installing only manual pages and we do that
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# for 32-bit version only.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterCONFIGURE_OPTIONS += --install_prefix=$(PROTO_DIR)
449854c2a07b50ea64d9d6a8b03d18d4afeeee43Ken Stubbings# Disable SSLv2 and SSLv3 protocols
5bdd6bf9211505ff52afc7e32bdc49cdfacf4879Charles Sparey# We use both no-whirlpool and no-whrlpool since there is an inconsistency in
5bdd6bf9211505ff52afc7e32bdc49cdfacf4879Charles Sparey# the OpenSSL code and one needs both to build OpenSSL successfully with
449854c2a07b50ea64d9d6a8b03d18d4afeeee43Ken Stubbings# Whirlpool implementation removed.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Some additional options needed for our engines.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterCONFIGURE_OPTIONS += --pk11-libname=$(PKCS11_LIB$(BITS))
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterCONFIGURE_OPTIONS += --enginesdir=$(ENGINESDIR_$(BITS))
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# We define our own compiler and linker option sets for Solaris. See Configure
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# for more information.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterCONFIGURE_OPTIONS32_sparc = solaris-sparcv9-cc-sunw
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterCONFIGURE_OPTIONS64_i386 = solaris64-x86_64-cc-sunw
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan FosterCONFIGURE_OPTIONS64_sparc = solaris64-sparcv9-cc-sunw
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Options specific to regular build.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# They must not be specified as common, as they cannot be overridden.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster$(BUILD_DIR)/$(MACH32)/.configured: CONFIGURE_OPTIONS += threads
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster$(BUILD_DIR)/$(MACH64)/.configured: CONFIGURE_OPTIONS += threads
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster$(BUILD_DIR)/$(MACH32)/.configured: CONFIGURE_OPTIONS += shared
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster$(BUILD_DIR)/$(MACH64)/.configured: CONFIGURE_OPTIONS += shared
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster$(BUILD_DIR)/$(MACH32)/.configured: CONFIGURE_OPTIONS += shared
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster$(BUILD_DIR)/$(MACH64)/.configured: CONFIGURE_OPTIONS += shared
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster$(BUILD_DIR)/$(MACH32)/.configured: CONFIGURE_OPTIONS += \
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster$(BUILD_DIR)/$(MACH64)/.configured: CONFIGURE_OPTIONS += \
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# OpenSSL for wanboot specific options
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster$(BUILD_DIR_WANBOOT)/.configured: CONFIGURE_OPTIONS += -DNO_CHMOD
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster$(BUILD_DIR_WANBOOT)/.configured: CONFIGURE_OPTIONS += -D_BOOT
# We deliver only one opensslconf.h file which must be suitable for both 32 and
# creates opensslconf.h for either 32 or 64 bits. A patch makes the resulting
# opensslconf.h version from the 32 bit build.
# Same holds for wanboot-stubs.c, which stubs out several functions, that are
# Object files for wanboot-openssl.o have to be listed explicitly.
WANBOOT_OBJS = \
# Interface for wanboot is specified in mapfile.wanboot. Object files are
COMPONENT_TEST_TARGETS = test
test: $(TEST_32_and_64)