Makefile revision 3697
72N/A#
72N/A# CDDL HEADER START
72N/A#
72N/A# The contents of this file are subject to the terms of the
72N/A# Common Development and Distribution License (the "License").
72N/A# You may not use this file except in compliance with the License.
72N/A#
72N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
72N/A# or http://www.opensolaris.org/os/licensing.
72N/A# See the License for the specific language governing permissions
72N/A# and limitations under the License.
72N/A#
72N/A# When distributing Covered Code, include this CDDL HEADER in each
72N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
72N/A# If applicable, add the following below this CDDL HEADER, with the
72N/A# fields enclosed by brackets "[]" replaced with your own identifying
72N/A# information: Portions Copyright [yyyy] [name of copyright owner]
72N/A#
72N/A# CDDL HEADER END
72N/A
3817N/A#
72N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
72N/A#
72N/A
72N/Ainclude ../../make-rules/shared-macros.mk
2394N/A
618N/ACOMPONENT_NAME= sudo
72N/ASRC_VERSION= 1.8.9
72N/ASRC_PATCH_VERSION= 5
844N/ACOMPONENT_VERSION= $(SRC_VERSION).$(SRC_PATCH_VERSION)
2394N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
72N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
1258N/ACOMPONENT_ARCHIVE_HASH= \
72N/A sha256:bc9d5c96de5f8b4d2b014f87a37870aef60d2891c869202454069150a21a5c21
2899N/ACOMPONENT_ARCHIVE_URL= http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
2899N/ACOMPONENT_PROJECT_URL= http://www.sudo.ws/
3817N/ACOMPONENT_BUGDB= utility/sudo
3817N/A
3817N/ATPNO= 16733
72N/A
2394N/Ainclude $(WS_TOP)/make-rules/prep.mk
2394N/Ainclude $(WS_TOP)/make-rules/configure.mk
2394N/Ainclude $(WS_TOP)/make-rules/ips.mk
574N/A
574N/ACOMPONENT_PREP_ACTION = ( cd $(@D) ; $(AUTORECONF) -f -I m4 )
574N/A
72N/ACONFIGURE_ENV += "CC=$(CC)"
72N/ACONFIGURE_ENV += "CFLAGS=$(CFLAGS)"
72N/ACONFIGURE_ENV += "CXX=$(CXX)"
72N/ACONFIGURE_ENV += "MAKE=$(GMAKE)"
75N/ACONFIGURE_ENV += "LDFLAGS=$(LDFLAGS)"
72N/A
4038N/ACONFIGURE_OPTIONS += --with-ldap
4038N/ACONFIGURE_OPTIONS += --with-project
4038N/ACONFIGURE_OPTIONS += --with-timedir=/system/volatile/sudo
4038N/ACONFIGURE_OPTIONS += --with-pam
2394N/ACONFIGURE_OPTIONS += --with-pam-login
2394N/ACONFIGURE_OPTIONS += --disable-pam-session
3477N/ACONFIGURE_OPTIONS += --with-tty-tickets
3477N/ACONFIGURE_OPTIONS += --without-insults
2394N/ACONFIGURE_OPTIONS += --without-lecture
72N/ACONFIGURE_OPTIONS += --with-ignore-dot
2394N/ACONFIGURE_OPTIONS += --with-solaris-audit
72N/ACONFIGURE_OPTIONS += --libexecdir=/usr/lib/sudo
2394N/ACONFIGURE_OPTIONS += "sudo_cv_var_nroff_opt_Tascii=no"
83N/A
4337N/ACOMPONENT_BUILD_ENV += CC=$(CC) CXX=$(CXX)
4337N/ACOMPONENT_BUILD_ENV += "CFLAGS=$(CFLAGS)"
72N/A
3817N/ACOMPONENT_INSTALL_TARGETS = install
3817N/ACOMPONENT_INSTALL_ARGS += bindir=$(USRBINDIR)
3817N/ACOMPONENT_INSTALL_ARGS += sbindir=$(USRSBINDIR)
4037N/A
3817N/A
3817N/A# Enable aslr for this component
ASLR_MODE = $(ASLR_ENABLE)
# common targets
# 64 build corrupts audit logs because of 17561594. Until that is fixed do 32bit build.
build: $(BUILD_32)
install: $(INSTALL_32)
VISUDO=$(BUILD_DIR_32)/plugins/sudoers/visudo
test:
# Since linking with libmd.so (which provides sha2 capability on
# Solaris) is optional, we have a check here to make sure that the
# configure script found it correctly.
# http://www.sudo.ws/bugs/show_bug.cgi?id=641
# Make sure that sudo is NOT built with it's internal sha2 implementation
if [[ -n $$( elfdump -s "$(VISUDO)" | grep SHA256Init | grep -v UNDEF ) ]]; then \
echo "SHA256Init is not an undefined symbol in $(VISUDO)"; \
exit 1; \
fi
# ... but is linked with libmd instead
if [[ -z $$( elfdump -d "$(VISUDO)" | grep 'NEEDED .* libmd.so' ) ]]; then \
echo "$(VISUDO) is not linked against libmd.so"; \
exit 1; \
fi
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include $(WS_TOP)/make-rules/depend.mk