Makefile revision 5305
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang# CDDL HEADER START
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# The contents of this file are subject to the terms of the
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Common Development and Distribution License (the "License").
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# You may not use this file except in compliance with the License.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# See the License for the specific language governing permissions
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# and limitations under the License.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# When distributing Covered Code, include this CDDL HEADER in each
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# If applicable, add the following below this CDDL HEADER, with the
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# fields enclosed by brackets "[]" replaced with your own identifying
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# information: Portions Copyright [yyyy] [name of copyright owner]
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# CDDL HEADER END
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# When new version of OpenSSL comes in, you must update both COMPONENT_VERSION
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# and IPS_COMPONENT_VERSION.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# When upgrading OpenSSL, please, DON'T FORGET TO TEST WANBOOT too.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# For more information about wanboot-openssl testing, please refer to
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Version for IPS. It is easier to do it manually than convert the letter to a
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# number while taking into account that there might be no letter at all.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarCOMPONENT_SRC = $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar sha256:e23ccafdb75cfcde782da0151731aa2185195ac745eea3846133f2e05c0e0bff
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarCOMPONENT_ARCHIVE_URL = $(COMPONENT_PROJECT_URL)source/$(COMPONENT_ARCHIVE)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Clone the patch files to the patches-all dir.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# COPY_COMMON_FILES is there so that rsync is called as soon as
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# the Makefile is parsed.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarCOPY_COMMON_FILES:= $(shell rsync -ac ../common/patches/ patches/ $(PATCH_DIR))
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarPATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin:/usr/perl5/bin
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarPATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:/usr/bin:/usr/perl5/bin
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Variant of OpenSSL for wanboot is built in build/sparcv9-wanboot.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarBUILD_DIR_WANBOOT = $(BUILD_DIR)/$(MACH64)-wanboot
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# OpenSSL does not use autoconf but its own configure system.
b6b15642ffbc95b31765357dc6cc036b590c3a97Reza Sabdar# Ignore default CC_FOR_BUILD, CC, and CXX in CONFIGURE_ENV.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# This is to force OpenSSL's Configure script to use gmake for 'make links'.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Otherwise it fails with:
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# mksh: Fatal error in reader: Unmatched `(' on line
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Used in the configure options below.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Configure options common to both regular OpenSSL and OpenSSL for wanboot.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarCONFIGURE_OPTIONS = -DSOLARIS_OPENSSL -DNO_WINDOWS_BRAINDEATH
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# We use OpenSSL install code for installing only manual pages and we do that
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang# for 32-bit version only.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarCONFIGURE_OPTIONS += --install_prefix=$(PROTO_DIR)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# MD2 is not enabled by default in OpensSSL but some software we have in
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Userland needs it. One example is nmap.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Disable SSLv2 and SSLv3 protocols
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# We use both no-whirlpool and no-whrlpool since there is an inconsistency in
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# the OpenSSL code and one needs both to build OpenSSL successfully with
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Whirlpool implementation removed.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Some additional options needed for our engines.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarCONFIGURE_OPTIONS += --pk11-libname=$(PKCS11_LIB$(BITS))
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarCONFIGURE_OPTIONS += --enginesdir=$(ENGINESDIR_$(BITS))
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# We define our own compiler and linker option sets for Solaris. See Configure
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# for more information.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarCONFIGURE_OPTIONS32_sparc = solaris-sparcv9-cc-sunw
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarCONFIGURE_OPTIONS64_i386 = solaris64-x86_64-cc-sunw
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza SabdarCONFIGURE_OPTIONS64_sparc = solaris64-sparcv9-cc-sunw
3afe87ebb25691cb6d158edaa34a6fb9b703a691Roger A. Faulkner# Options specific to regular build.
3afe87ebb25691cb6d158edaa34a6fb9b703a691Roger A. Faulkner# They must not be specified as common, as they cannot be overridden.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR)/$(MACH32)/.configured: CONFIGURE_OPTIONS += threads
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR)/$(MACH64)/.configured: CONFIGURE_OPTIONS += threads
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR)/$(MACH32)/.configured: CONFIGURE_OPTIONS += shared
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR)/$(MACH64)/.configured: CONFIGURE_OPTIONS += shared
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR)/$(MACH32)/.configured: CONFIGURE_OPTIONS += shared
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR)/$(MACH64)/.configured: CONFIGURE_OPTIONS += shared
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR)/$(MACH32)/.configured: CONFIGURE_OPTIONS += \
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR)/$(MACH64)/.configured: CONFIGURE_OPTIONS += \
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# OpenSSL for wanboot specific options
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR_WANBOOT)/.configured: CONFIGURE_OPTIONS += -DNO_CHMOD
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR_WANBOOT)/.configured: CONFIGURE_OPTIONS += -D_BOOT
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR_WANBOOT)/.configured: CONFIGURE_OPTIONS += -DOPENSSL_NO_DTLS1
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR_WANBOOT)/.configured: CONFIGURE_OPTIONS += -DOPENSSL_NO_HEARTBEATS
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar$(BUILD_DIR_WANBOOT)/.configured: CONFIGURE_OPTIONS += -DOPENSSL_NO_SRP
# 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
# 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.
COMPONENT_TEST_TARGETS = test
test: $(TEST_32_and_64)