Makefile revision 7243
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# You may not use this file except in compliance with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# or http://www.opensolaris.org/os/licensing.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinBUILD_BITS= 64
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPILER= gcc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude ../../make-rules/shared-macros.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_NAME= openssh
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_VERSION= 7.3p1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinHUMAN_VERSION= $(COMPONENT_VERSION)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Version for IPS. The encoding rules are:
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# OpenSSH <x>.<y>p<n> => IPS <x>.<y>.0.<n>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# OpenSSH <x>.<y>.<z>p<n> => IPS <x>.<y>.<z>.<n>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinIPS_COMPONENT_VERSION= 7.3.0.1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_PROJECT_URL= http://www.openssh.org/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_ARCHIVE_HASH= sha256:3ffb989a6dcaa69594c3b550d4855a5a2e1718ccdde7f5e36387b424220fbecc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_ARCHIVE_URL= http://mirrors.sonic.net/pub/OpenBSD/OpenSSH/portable/$(COMPONENT_ARCHIVE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinTPNO_OPENSSH= 30602
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinTPNO_GSSKEX= 20377
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Because of set up requirements, test suite is in stc gate.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinTEST_TARGET= $(SKIP_TEST)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# 11.3 has conflicts with ON's SunSSH package, which had not yet added
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# mediated links, thus cannot be updated to.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinifeq ($(BUILD_TYPE), evaluation)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinBUILD_64=
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinINSTALL_64=
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinPUBLISH_STAMP=
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinendif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(WS_MAKE_RULES)/common.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DSET_USE_PAM
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DDEPRECATE_SUNSSH_OPT
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DKRB5_BUILD_FIX
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DDTRACE_SFTP
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DDISABLE_BANNER
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DPAM_ENHANCEMENT
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DPAM_BUGFIX
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DOPTION_DEFAULT_VALUE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DPER_SESSION_XAUTHFILE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DOPENSSL_NO_CAST
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DENABLE_OPENSSL_FIPS
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DOPENSSL_NO_RC4
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += -DWITHOUT_HMAC_MD5
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# We need to disable lazyloading of dynamic dependent libraries. During the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# pre-authentication phase, sshd will chroot to /var/empty which doesn't
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# contain any files. If we use lazyloading, sshd will fail to find any
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# libraries that it needs.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLDFLAGS += $(LD_B_DIRECT) -z nolazyload
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz# Enable adiheap and adistack security extensions
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland MainzADIHEAP_MODE = $(ADIHEAP_ENABLE)
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland MainzADISTACK_MODE = $(ADISTACK_ENABLE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Build PIE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCC_PIC_MODE = $(CC_PIC_ENABLE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLD_Z_PIE_MODE = $(LD_Z_PIE_ENABLE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Fix 64-bit linking via compiler.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLDFLAGS += $(CC_BITS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --with-audit=solaris
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --with-libedit
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --with-kerberos5
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --with-pam
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --with-sandbox=no
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --with-solaris-contracts
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --with-4in6
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland MainzCONFIGURE_OPTIONS += --with-xauth=$(USRBINDIR)/xauth
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland MainzCONFIGURE_OPTIONS += --disable-strip
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland MainzCONFIGURE_OPTIONS += --without-rpath
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --libexecdir=$(USRLIBDIR)/ssh
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --sbindir=$(USRLIBDIR)/ssh
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/ssh
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --disable-lastlog
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copy the sftp dtrace provider file and the header file to source directory
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_PRE_BUILD_ACTION = \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ( echo "Copying dtrace sftp files..."; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(LN) -fs $(COMPONENT_DIR)/dtrace_sftp/*.[dh] $(SOURCE_DIR); \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin )
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copy Solaris specific source files and generate configuration script
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_PREP_ACTION += \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ( $(CP) sources/moduli sources/*.c $(@D)/; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin cd $(@D); autoconf; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin )
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinREQUIRED_PACKAGES += library/libedit
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinREQUIRED_PACKAGES += library/security/openssl
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinREQUIRED_PACKAGES += library/zlib
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinREQUIRED_PACKAGES += security/kerberos-5
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinREQUIRED_PACKAGES += service/security/kerberos-5
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinREQUIRED_PACKAGES += system/core-os
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinREQUIRED_PACKAGES += system/library/security/gss
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinREQUIRED_PACKAGES += system/network
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinREQUIRED_PACKAGES += text/groff/groff-core
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin