Makefile revision 3930
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland#
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# CDDL HEADER START
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland#
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# The contents of this file are subject to the terms of the
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# Common Development and Distribution License (the "License").
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# You may not use this file except in compliance with the License.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland#
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# or http://www.opensolaris.org/os/licensing.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# See the License for the specific language governing permissions
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# and limitations under the License.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland#
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# When distributing Covered Code, include this CDDL HEADER in each
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# If applicable, add the following below this CDDL HEADER, with the
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# fields enclosed by brackets "[]" replaced with your own identifying
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# information: Portions Copyright [yyyy] [name of copyright owner]
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland#
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# CDDL HEADER END
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland#
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland#
9444c26f4faabda140242c3986089704c4073cedTom Whitteninclude ../../make-rules/shared-macros.mk
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCOMPONENT_NAME= openssh
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCOMPONENT_VERSION= 6.5p1
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandHUMAN_VERSION= $(COMPONENT_VERSION)
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# Version for IPS. The encoding rules are:
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# OpenSSH <x>.<y>p<n> => IPS <x>.<y>.0.<n>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# OpenSSH <x>.<y>.<z>p<n> => IPS <x>.<y>.<z>.<n>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandIPS_COMPONENT_VERSION= 6.5.0.1
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland
53520bfd0d8e6401efee237b91e682ab66f77eefMoriah WaterlandCOMPONENT_PROJECT_URL= http://www.openssh.org/
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCOMPONENT_ARCHIVE_HASH= sha256:a1195ed55db945252d5a1730d4a2a2a5c1c9a6aa01ef2e5af750a962623d9027
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCOMPONENT_ARCHIVE_URL= http://mirror.team-cymru.org/pub/OpenBSD/OpenSSH/portable/$(COMPONENT_ARCHIVE)
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCOMPONENT_BUGDB=utility/openssh
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandTPNO_OPENSSH= 16633
9444c26f4faabda140242c3986089704c4073cedTom WhittenTPNO_GSSKEX= 20377
62224350e5355e6834f7deb9d8a7d062a50cb7c2Casper H.S. Dik
62224350e5355e6834f7deb9d8a7d062a50cb7c2Casper H.S. Dikinclude $(WS_MAKE_RULES)/prep.mk
62224350e5355e6834f7deb9d8a7d062a50cb7c2Casper H.S. Dikinclude $(WS_MAKE_RULES)/configure.mk
62224350e5355e6834f7deb9d8a7d062a50cb7c2Casper H.S. Dikinclude $(WS_MAKE_RULES)/ips.mk
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland# Enable ASLR for this component
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandASLR_MODE = $(ASLR_ENABLE)
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCOMPILER= gcc
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland
82623ab63a7c17ffa0e306afef3be05316812f6eMoriah WaterlandCFLAGS += -DSET_USE_PAM
82623ab63a7c17ffa0e306afef3be05316812f6eMoriah WaterlandCFLAGS += -DDEPRECATE_SUNSSH_OPT
82623ab63a7c17ffa0e306afef3be05316812f6eMoriah WaterlandCFLAGS += -DKRB5_BUILD_FIX
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCFLAGS += -DDTRACE_SFTP
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCFLAGS += -DDISABLE_BANNER
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCFLAGS += -DPAM_ENHANCEMENT
82623ab63a7c17ffa0e306afef3be05316812f6eMoriah WaterlandCFLAGS += -DPAM_BUGFIX
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandCFLAGS += -DOPTION_DEFAULT_VALUE
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland
62224350e5355e6834f7deb9d8a7d062a50cb7c2Casper H.S. DikCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
82623ab63a7c17ffa0e306afef3be05316812f6eMoriah Waterland
82623ab63a7c17ffa0e306afef3be05316812f6eMoriah Waterland# We need to disable lazyloading of dynamic dependent libraries. During the
82623ab63a7c17ffa0e306afef3be05316812f6eMoriah Waterland# pre-authentication phase, sshd will chroot to /var/empty which doesn't
82623ab63a7c17ffa0e306afef3be05316812f6eMoriah Waterland# contain any files. If we use lazyloading, sshd will fail to find any
82623ab63a7c17ffa0e306afef3be05316812f6eMoriah Waterland# libraries that it needs.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah WaterlandLDFLAGS += -B direct -z nolazyload
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland
# Just $(BUILD_64) option was not propogating the 64 bit flags to all the
# necessary places. Hence the -m64 option is added to LDFLAGS for
# CONFIGURE_OPTIONS.64.
CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
CONFIGURE_OPTIONS += --with-audit=solaris
CONFIGURE_OPTIONS += --with-libedit
CONFIGURE_OPTIONS += --with-kerberos5
CONFIGURE_OPTIONS += --with-pam
CONFIGURE_OPTIONS += --with-sandbox=no
CONFIGURE_OPTIONS += --with-solaris-contracts
CONFIGURE_OPTIONS += --with-solaris-projects
CONFIGURE_OPTIONS += --with-tcp-wrappers
CONFIGURE_OPTIONS += --with-4in6
CONFIGURE_OPTIONS += --enable-strip=no
CONFIGURE_OPTIONS += --without-rpath
CONFIGURE_OPTIONS += --libexecdir=/usr/lib/ssh
CONFIGURE_OPTIONS += --sbindir=/usr/lib/ssh
CONFIGURE_OPTIONS += --sysconfdir=/etc/ssh
CONFIGURE_OPTIONS += --bindir=/usr/bin
CONFIGURE_OPTIONS += --disable-lastlog
# Copy the sftp dtrace provider file and the header file to source directory
COMPONENT_PRE_BUILD_ACTION = \
( echo "Copying dtrace sftp files..."; \
$(LN) -fs $(COMPONENT_DIR)/dtrace_sftp/*.[dh] $(SOURCE_DIR); \
)
# Copy source files that are not yet part of a patch
COMPONENT_PREP_ACTION += ($(CP) sources/*.c $(@D)/)
# common targets
configure: $(CONFIGURE_64)
build: $(BUILD_64)
install: $(INSTALL_64)
# Because of certain set up requirement, the regress test suite is ported to
# the STC gate.
test: $(NO_TESTS)
REQUIRED_PACKAGES += library/libedit
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += service/security/kerberos-5
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/gcc-45-runtime
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
REQUIRED_PACKAGES += system/library/security/gss
REQUIRED_PACKAGES += system/linker